@organizaone/o1-code 0.23.1 → 0.23.3
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/bundled/qc-helper/docs/configuration/model-providers.md +49 -20
- package/bundled/qc-helper/docs/support/troubleshooting.md +8 -0
- package/chunks/{MaxSizedBox-HMZHVBB4.js → MaxSizedBox-PNOKV5XB.js} +29 -28
- package/chunks/{StandaloneSessionPicker-P4GOMYHR.js → StandaloneSessionPicker-DI2PPRCG.js} +47 -46
- package/chunks/{acp-subagent-executor-3IS4UQXS.js → acp-subagent-executor-J5IOC3T2.js} +32 -31
- package/chunks/{acpAgent-RUS62IJ2.js → acpAgent-Q3ES6XUH.js} +78 -76
- package/chunks/{agent-WO7H3FRF.js → agent-VXBORFU5.js} +18 -17
- package/chunks/{agent-headless-DQHOJM3J.js → agent-headless-F7X4H6AT.js} +18 -17
- package/chunks/{all-providers-AGB7PSE7.js → all-providers-UJJNWFBU.js} +2 -2
- package/chunks/{anthropicContentGenerator-SVXJ2WC5.js → anthropicContentGenerator-PXN4JHYG.js} +9 -8
- package/chunks/{bridge-6DNUXTIG.js → bridge-OHMXMD6B.js} +32 -31
- package/chunks/{chunk-JTL36LF7.js → chunk-2JVMVD6L.js} +14 -14
- package/chunks/chunk-2SJEYSJ5.js +478 -0
- package/chunks/{chunk-QS7XJXMY.js → chunk-2VH7GPPV.js} +2 -2
- package/chunks/{chunk-RH6ENXV4.js → chunk-35WHEBW3.js} +6 -6
- package/chunks/{chunk-G376S7VI.js → chunk-3FDAQK6P.js} +1 -1
- package/chunks/chunk-3JWJHYFV.js +328 -0
- package/chunks/{chunk-XWJPREGE.js → chunk-45LWV5IN.js} +7 -7
- package/chunks/{chunk-BH64NQFS.js → chunk-4FKNGLMA.js} +4 -4
- package/chunks/{chunk-5WCEM6DZ.js → chunk-4MFP7T32.js} +1 -1
- package/chunks/{chunk-J6IO5FRE.js → chunk-4OV5UWWQ.js} +2 -2
- package/chunks/{chunk-2HSMDGHO.js → chunk-4Q5LZTPI.js} +3 -3
- package/chunks/{chunk-P2AKFALJ.js → chunk-5UX4INNV.js} +59 -16
- package/chunks/{chunk-NRCAQMQE.js → chunk-5UZNF6UX.js} +1 -1
- package/chunks/{chunk-XR3PDQ7P.js → chunk-63BWCBL5.js} +6 -6
- package/chunks/{chunk-KXDR4O5J.js → chunk-6LJBRLNS.js} +8 -8
- package/chunks/{chunk-7TGDEUSS.js → chunk-6RIH5HJL.js} +3 -3
- package/chunks/{chunk-B3VFKGW7.js → chunk-756Q43CP.js} +3 -3
- package/chunks/{chunk-3MWH2YYG.js → chunk-7BEB4OCA.js} +4 -4
- package/chunks/{chunk-4WZ25EWZ.js → chunk-7DHQ5FE7.js} +1 -1
- package/chunks/{chunk-T7XP4FJG.js → chunk-7GCSNYB5.js} +3 -3
- package/chunks/{chunk-RWUZRVUT.js → chunk-AE4IQ5HU.js} +2 -2
- package/chunks/{chunk-OXIUXVOT.js → chunk-AEQNNEHI.js} +1 -1
- package/chunks/{chunk-YPTR7ZFB.js → chunk-AFLYEJ7J.js} +20 -314
- package/chunks/{chunk-MEBXT3L3.js → chunk-AK6UP3LA.js} +2 -2
- package/chunks/{chunk-O6V4DKZY.js → chunk-BBQWOOBL.js} +8 -8
- package/chunks/{chunk-WA47FG3A.js → chunk-BEGSPMH3.js} +5 -5
- package/chunks/{chunk-2OEBEF5L.js → chunk-BZYI5TLI.js} +1 -1
- package/chunks/{chunk-DCGCG4T6.js → chunk-CQL2XFY3.js} +3 -3
- package/chunks/{chunk-5T7YYYZN.js → chunk-DHXBIFA3.js} +1 -1
- package/chunks/{chunk-W5XYWVXE.js → chunk-EB4VOVOS.js} +4 -4
- package/chunks/{chunk-XST2W6J5.js → chunk-ER7RIWYZ.js} +1 -1
- package/chunks/{chunk-AXM2QH6N.js → chunk-ETYF6LYZ.js} +1 -1
- package/chunks/{chunk-GLSFB2Z7.js → chunk-F5XJP6CK.js} +1 -1
- package/chunks/{chunk-CMDJL3HC.js → chunk-FE2ZH6WW.js} +83 -92
- package/chunks/{chunk-VPWZ7N32.js → chunk-FIPT36QW.js} +4 -4
- package/chunks/{chunk-SLYGIHMA.js → chunk-FMWQ43OS.js} +4 -4
- package/chunks/{chunk-CADCX42P.js → chunk-FQZNP6Z5.js} +2 -2
- package/chunks/{chunk-CNXTYK25.js → chunk-G7TCNWW4.js} +2 -2
- package/chunks/{chunk-6IAICUFQ.js → chunk-GHFDVXXW.js} +2 -2
- package/chunks/{chunk-ZTYFX6BP.js → chunk-GJKIVVOK.js} +3 -3
- package/chunks/{chunk-R75USKXV.js → chunk-GQSJRXHV.js} +2 -2
- package/chunks/{chunk-OFZASMA6.js → chunk-GRSBNB75.js} +4 -4
- package/chunks/{chunk-DS3A6UN5.js → chunk-GXQSKSIX.js} +4 -4
- package/chunks/{chunk-F5GPRGLO.js → chunk-HA5FHKHP.js} +1 -1
- package/chunks/{chunk-KPPSQ5EU.js → chunk-HBVBJLFL.js} +1 -1
- package/chunks/{chunk-PHTNY4JK.js → chunk-HFH6267M.js} +6 -2
- package/chunks/{chunk-CMPS6GD5.js → chunk-HFYFYN7B.js} +3 -3
- package/chunks/{chunk-KZCG5HAI.js → chunk-HV7DTSIC.js} +1 -1
- package/chunks/{chunk-SLNJDU4D.js → chunk-IJLB54SO.js} +4 -4
- package/chunks/{chunk-SJG3PCMJ.js → chunk-IOWEOCTW.js} +3 -3
- package/chunks/{chunk-HKOWTL7X.js → chunk-IQS3YNFT.js} +3 -3
- package/chunks/{chunk-WXIQKOFD.js → chunk-JCWIHPJ2.js} +32 -2
- package/chunks/{chunk-ZXSPXXBY.js → chunk-K3QLKXBZ.js} +1 -1
- package/chunks/{chunk-SEBFGV7T.js → chunk-K7OVGWJS.js} +5 -5
- package/chunks/{chunk-MRAQKHJP.js → chunk-KH547BMV.js} +1 -1
- package/chunks/{chunk-I4WCGUHX.js → chunk-L37WQYHD.js} +3 -3
- package/chunks/{chunk-C6HK75MO.js → chunk-LOWKYYPU.js} +3 -3
- package/chunks/{chunk-DCMEEISM.js → chunk-LRLHFEMZ.js} +1 -1
- package/chunks/{chunk-IR2EWI3F.js → chunk-MDRVMHR5.js} +1 -1
- package/chunks/{chunk-IULGJTBN.js → chunk-MDZE3I5B.js} +3 -3
- package/chunks/{chunk-4UC6NODS.js → chunk-MEHOIUQO.js} +1 -1
- package/chunks/{chunk-3SIUBEAC.js → chunk-MLMRVKRY.js} +1 -1
- package/chunks/{chunk-HGY3PIN4.js → chunk-MNPMZBSO.js} +8 -8
- package/chunks/{chunk-FFDLG4P3.js → chunk-MYLH5UBR.js} +3 -3
- package/chunks/{chunk-KM6V7YUD.js → chunk-MZ4ZQ5JN.js} +3 -3
- package/chunks/{chunk-ZKQ2SFH7.js → chunk-NO5DFAGI.js} +1 -1
- package/chunks/{chunk-F7SCCXXH.js → chunk-NWRMBNPA.js} +1 -1
- package/chunks/{chunk-ODPTXM6X.js → chunk-ODSKG77G.js} +2 -2
- package/chunks/{chunk-UQSP4Y3H.js → chunk-P3K3UIUL.js} +1 -1
- package/chunks/{chunk-JYT4QT7G.js → chunk-PMFVBLGB.js} +5 -5
- package/chunks/{chunk-5TGVTMA4.js → chunk-PZ5JMLBW.js} +2 -2
- package/chunks/{chunk-UZIP5RZG.js → chunk-Q2LPAA7C.js} +1 -1
- package/chunks/{chunk-VY24CEQH.js → chunk-QEYB4PDO.js} +6 -6
- package/chunks/{chunk-2NTOADNA.js → chunk-QPGYYXO7.js} +1 -1
- package/chunks/{chunk-EE35GR3R.js → chunk-QQXXDTSU.js} +1 -1
- package/chunks/{chunk-27WKLITY.js → chunk-QSSYZQUP.js} +2 -2
- package/chunks/{chunk-6HNVIHAF.js → chunk-QUTCQFWY.js} +9 -9
- package/chunks/{chunk-6WR3DWHA.js → chunk-R5IR75RD.js} +1 -1
- package/chunks/{chunk-B4CCJMG6.js → chunk-R66LP4MO.js} +2 -2
- package/chunks/{chunk-UVW5RWDM.js → chunk-RHOOOMUK.js} +2 -2
- package/chunks/{chunk-B4K3VBFF.js → chunk-RI6JVRWR.js} +1 -1
- package/chunks/{chunk-7UCLXR66.js → chunk-RRRI34RZ.js} +11 -11
- package/chunks/{chunk-VJNBNL44.js → chunk-RXSGUX7U.js} +1 -1
- package/chunks/{chunk-4HQ4I3PR.js → chunk-SE4AX4Z4.js} +2 -2
- package/chunks/{chunk-CPYRGB5A.js → chunk-SQRKCXPM.js} +6 -6
- package/chunks/{chunk-6XQREQ7X.js → chunk-SY5UOOLE.js} +8 -8
- package/chunks/{chunk-QLR4QOL7.js → chunk-T636IYGV.js} +1 -1
- package/chunks/{chunk-4KLFLD6W.js → chunk-TASQRFKT.js} +1 -1
- package/chunks/{chunk-CCC24CXE.js → chunk-TQXNST6Y.js} +2 -2
- package/chunks/{chunk-W4LHOCZD.js → chunk-UBWDDULS.js} +1 -1
- package/chunks/{chunk-UM5Y2RAD.js → chunk-V7K34NU3.js} +1 -1
- package/chunks/{chunk-AW4B6RTB.js → chunk-VCUEXE3H.js} +3 -3
- package/chunks/{chunk-3KNM7K53.js → chunk-W42YGWDC.js} +74 -35
- package/chunks/{chunk-GBAPQSEP.js → chunk-WOUHB7ZU.js} +4 -4
- package/chunks/{chunk-2OUOX7LX.js → chunk-X3KJPJFI.js} +2 -2
- package/chunks/{chunk-LMFAYXBU.js → chunk-XBZ4D64Q.js} +1 -1
- package/chunks/{chunk-Z4AMHZHW.js → chunk-XOT6SBGY.js} +102 -43
- package/chunks/{chunk-INXZWNOV.js → chunk-Y77F2ZSE.js} +2 -2
- package/chunks/{chunk-7Q3WUUDP.js → chunk-YQN4NZ4S.js} +5 -5
- package/chunks/{chunk-CNXCYQSU.js → chunk-Z35PMMFQ.js} +3 -3
- package/chunks/{chunk-LNRMJR3C.js → chunk-ZIWDO6UP.js} +5 -5
- package/chunks/{chunk-OCGMQ7V4.js → chunk-ZIWHK3AH.js} +1 -1
- package/chunks/{chunk-HAFQUJ2R.js → chunk-ZSCKJRVS.js} +9 -9
- package/chunks/{codex-subagent-executor-LRMIHGUJ.js → codex-subagent-executor-NKIAVWGC.js} +32 -31
- package/chunks/{contextCommand-LCS4K6AS.js → contextCommand-5JWT6VQL.js} +31 -30
- package/chunks/{core-runtime-KA3DTXOS.js → core-runtime-7DRPFC35.js} +29 -28
- package/chunks/{create-sub-session-AOLRCPHX.js → create-sub-session-3YQEERSH.js} +30 -29
- package/chunks/{daemon-git-worktree-guard-XNJQMGBA.js → daemon-git-worktree-guard-VFOGBZHD.js} +29 -28
- package/chunks/{daemon-status-provider-S7JFBO7R.js → daemon-status-provider-IIFM5IM6.js} +37 -36
- package/chunks/{daemon-trust-policy-3TZF3A23.js → daemon-trust-policy-AVBAHIIT.js} +35 -34
- package/chunks/{daemon-trust-policy-monitor-KCTEA4NB.js → daemon-trust-policy-monitor-KKXFYM52.js} +35 -34
- package/chunks/{deferred-core-runtime-APR46DSV.js → deferred-core-runtime-3MIPB4S7.js} +29 -28
- package/chunks/{edit-3XYI6QI5.js → edit-PPJLVA5I.js} +20 -19
- package/chunks/{en-MQICGJBA.js → en-V375KBHU.js} +4 -0
- package/chunks/{enterPlanMode-T6ZQCSIY.js → enterPlanMode-YJTR3OC2.js} +18 -17
- package/chunks/{environment-ZSKN47KY.js → environment-PQMV73WH.js} +31 -30
- package/chunks/{errors-JVU3YU37.js → errors-YXLBIGK2.js} +31 -30
- package/chunks/{execution-tool-4AHWPEBH.js → execution-tool-PRN55ECE.js} +20 -19
- package/chunks/{execution-worker-V22CIVJD.js → execution-worker-5VUJKVPI.js} +23 -22
- package/chunks/{exitPlanMode-HSLDDGIZ.js → exitPlanMode-3SOHTPAM.js} +18 -17
- package/chunks/{fast-path-55D3R6HR.js → fast-path-KKKMA4OP.js} +2 -2
- package/chunks/{foreground-runner-3JU62IZN.js → foreground-runner-G3TYGJAE.js} +31 -30
- package/chunks/{gateway-content-generator-76KRZXAA.js → gateway-content-generator-URNHKQ6P.js} +128 -123
- package/chunks/{gateway-models-N5DT7Q4M.js → gateway-models-UR5GHR6N.js} +7 -6
- package/chunks/gateway-transfer-OASSZYSK.js +46 -0
- package/chunks/{glob-FVF7TFRO.js → glob-5AEFGOMN.js} +18 -17
- package/chunks/{goal-tools-UHHDYOKQ.js → goal-tools-O5TA2PQY.js} +18 -17
- package/chunks/{handleAutoUpdate-EOHNI5GZ.js → handleAutoUpdate-JAQEKGA7.js} +33 -32
- package/chunks/{i18n-QYM6PMQT.js → i18n-SKUHM5IJ.js} +30 -29
- package/chunks/{image-gen-WGMRL47H.js → image-gen-D4WPSZB4.js} +3 -2
- package/chunks/{initializer-MYP7CFZW.js → initializer-XZ6MXFUA.js} +35 -34
- package/chunks/{installationInfo-FJ67GP5M.js → installationInfo-YXI3S52N.js} +30 -29
- package/chunks/{list-XF6G4GUF.js → list-K3KSNZSU.js} +37 -36
- package/chunks/{llm-W4KJ3VXB.js → llm-DMR52SHW.js} +64 -63
- package/chunks/{llm-content-generator-UZLRLOG3.js → llm-content-generator-UWKSCTYE.js} +4 -4
- package/chunks/{loadedSettingsAdapter-7Q5U3DXV.js → loadedSettingsAdapter-TW2IMB6V.js} +35 -34
- package/chunks/{local-execution-environment-MYZ2Y54Q.js → local-execution-environment-KH5EESSY.js} +23 -22
- package/chunks/{loggingContentGenerator-4OPNBZMP.js → loggingContentGenerator-T2W2WRJJ.js} +19 -18
- package/chunks/{managed-npm-update-KLB5RZZX.js → managed-npm-update-6RQYY3YZ.js} +30 -29
- package/chunks/{mcp-NC27EHB4.js → mcp-64G5H2OG.js} +35 -34
- package/chunks/{model-call-collection-YKPPKTJC.js → model-call-collection-Z4NJZHIV.js} +1 -1
- package/chunks/{model-configuration-2G3ULIR4.js → model-configuration-Q36E3EFG.js} +36 -35
- package/chunks/{modelConfigUtils-664FHNH3.js → modelConfigUtils-7LRIWH6S.js} +31 -30
- package/chunks/{monitor-UBN77ORZ.js → monitor-VT7Z5NIW.js} +18 -17
- package/chunks/{nonInteractiveCli-L3L4WX5E.js → nonInteractiveCli-YTRGNVIT.js} +66 -64
- package/chunks/{nonInteractiveToolExecutor-C3T5J2NW.js → nonInteractiveToolExecutor-KCT5X3VP.js} +19 -18
- package/chunks/{notebook-edit-63MI44CU.js → notebook-edit-BTEP4ZZF.js} +19 -18
- package/chunks/{omni-SLZABQRH.js → omni-J52AX5TE.js} +13 -12
- package/chunks/{openaiContentGenerator-7V6CYXFU.js → openaiContentGenerator-I2O3ZSYA.js} +15 -13
- package/chunks/{openaiResponsesContentGenerator-6YVQAUJ3.js → openaiResponsesContentGenerator-FUJIJGE2.js} +8 -7
- package/chunks/{processUtils-7ZT2P4R2.js → processUtils-BPHUSEPE.js} +2 -2
- package/chunks/{prompt-terminal-ledger-QPVHC4HA.js → prompt-terminal-ledger-JAMNBNXB.js} +30 -29
- package/chunks/{pt-EZL4H2AB.js → pt-554PEF6Z.js} +4 -0
- package/chunks/{reactive-degrade-SLNICU7U.js → reactive-degrade-XI6MKZZ5.js} +12 -11
- package/chunks/{read-file-WBHCQFBS.js → read-file-TXVD2R3P.js} +4 -4
- package/chunks/{resumeHistoryUtils-RMVHH2EV.js → resumeHistoryUtils-2SRSXIHZ.js} +34 -33
- package/chunks/{ripGrep-RXD7MQDC.js → ripGrep-IZ3IBKVF.js} +5 -5
- package/chunks/{run-o1-code-serve-QTI4KAOJ.js → run-o1-code-serve-XO4BHKDA.js} +32 -32
- package/chunks/{sandboxConfig-DAOIURBO.js → sandboxConfig-YTUMPCXL.js} +29 -28
- package/chunks/{scheduled-tasks-SXKRP3GY.js → scheduled-tasks-KJYPVS4M.js} +35 -34
- package/chunks/{scheduler-YECMJLGP.js → scheduler-IAQQQQYN.js} +31 -30
- package/chunks/{sdk-exporters-http-66WPQ7UY.js → sdk-exporters-http-YROX3PLL.js} +2 -2
- package/chunks/{sdk-impl-B4WTXTDQ.js → sdk-impl-LMCYCCTE.js} +4 -4
- package/chunks/{serve-N4CEYSQI.js → serve-3LSIZROT.js} +35 -34
- package/chunks/{server-VSMVJXNJ.js → server-2YOZRQDZ.js} +67 -66
- package/chunks/{session-DQY6YADB.js → session-G6BRGHF4.js} +177 -68
- package/chunks/{session-WXHJRBXC.js → session-JVXNBIG2.js} +1 -1
- package/chunks/{session-attachments-root-NKR2OHXN.js → session-attachments-root-57AW3DJA.js} +29 -28
- package/chunks/{session-pr-refresh-FESHW7O7.js → session-pr-refresh-KVCFM7XO.js} +34 -33
- package/chunks/{settings-MJDXAJOQ.js → settings-LEYMP47D.js} +34 -33
- package/chunks/{shell-XUMG65ZC.js → shell-IZZXIZEA.js} +18 -17
- package/chunks/{skill-RS7AGKYN.js → skill-VKY4NL3S.js} +6 -6
- package/chunks/{skill-settings-MEXN6DN6.js → skill-settings-II2S2X4N.js} +35 -34
- package/chunks/{spawnChannel-GOF25LIG.js → spawnChannel-5ZGURNUI.js} +31 -30
- package/chunks/{standalone-update-AYQDZNVC.js → standalone-update-3WGDHWYQ.js} +31 -30
- package/chunks/{startInteractiveUI-7HHCEPIG.js → startInteractiveUI-ILJJTRGB.js} +125 -153
- package/chunks/{supervisor-runner-VSXLLNB3.js → supervisor-runner-JTBZ6TKM.js} +2 -2
- package/chunks/{team-create-4LGDPW5M.js → team-create-OB7H2J22.js} +18 -17
- package/chunks/{team-plan-approval-KYQWPQXN.js → team-plan-approval-IWAVB7GG.js} +18 -17
- package/chunks/{terminal-image-renderer-PVLPYQHK.js → terminal-image-renderer-TKSJWK74.js} +29 -28
- package/chunks/{theme-manager-I4JCVFQ3.js → theme-manager-PMVUV6N4.js} +29 -28
- package/chunks/{tool-result-media-AFIZLPZ7.js → tool-result-media-YXNXZVPE.js} +13 -12
- package/chunks/{tool-search-B5WIMGV2.js → tool-search-MCUYQHXS.js} +4 -4
- package/chunks/{total-session-admission-WAQB3AMR.js → total-session-admission-47PQOJF4.js} +32 -31
- package/chunks/{trustedFolders-MMMGBQOP.js → trustedFolders-YQXN7ZK7.js} +30 -29
- package/chunks/{update-relaunch-WE7M3JFY.js → update-relaunch-IJ2CZAKA.js} +5 -5
- package/chunks/{updateCheck-O4WELAS7.js → updateCheck-ZLTZQV3Q.js} +32 -31
- package/chunks/{upload-config-5IV7GPH3.js → upload-config-P5BLCB72.js} +10 -9
- package/chunks/{useAutoAcceptIndicator-L5APVQBL.js → useAutoAcceptIndicator-KS6UQLAF.js} +39 -38
- package/chunks/{validateNonInterActiveAuth-HMLF22RB.js → validateNonInterActiveAuth-JFHD2CGM.js} +63 -61
- package/chunks/{version-HF62HOZR.js → version-JYHYRKC2.js} +1 -1
- package/chunks/{web-fetch-ACG4GZWS.js → web-fetch-QS7AL72Y.js} +6 -5
- package/chunks/{web-search-FOBOKL5H.js → web-search-M5YLCDCJ.js} +10 -9
- package/chunks/{workflow-ILU5GODQ.js → workflow-QIHDEVAH.js} +21 -20
- package/chunks/{workspace-providers-status-OQ6BF2I4.js → workspace-providers-status-BBQTHMSA.js} +41 -40
- package/chunks/{workspace-registration-store-C7HXASW3.js → workspace-registration-store-X3UYZFNJ.js} +1 -1
- package/chunks/{workspace-registry-BLZXWWBO.js → workspace-registry-FFHZ2EVX.js} +32 -31
- package/chunks/{workspace-runtime-coordinator-L77AZGKG.js → workspace-runtime-coordinator-BAGT7DSO.js} +33 -32
- package/chunks/{workspace-service-R7A6VM73.js → workspace-service-J24VVFZM.js} +39 -38
- package/chunks/{workspace-skills-status-U2NYMQU3.js → workspace-skills-status-UZ54UGI2.js} +38 -37
- package/chunks/{workspace-trust-reconciler-UGEU2622.js → workspace-trust-reconciler-GTJFOGCS.js} +38 -37
- package/chunks/{write-file-4N2F3VNU.js → write-file-4WGBKBGB.js} +20 -19
- package/chunks/{zoom-image-E772GQFP.js → zoom-image-OYRRFO65.js} +4 -4
- package/cli.js +15 -15
- package/execution-worker.js +1 -1
- package/export-transcript-document.js +1 -1
- package/locales/en.js +7 -0
- package/locales/pt.js +7 -0
- package/package.json +2 -2
- package/release-notes.json +16 -0
- package/web-shell/assets/{abnfDiagram-VCTEODGH-D4wWvLfQ.js → abnfDiagram-VCTEODGH-D-bBdnGb.js} +1 -1
- package/web-shell/assets/{arc-CbFSLdCO.js → arc-B2SS2QTX.js} +1 -1
- package/web-shell/assets/{architectureDiagram-5GKGNRK7-BjZoTViq.js → architectureDiagram-5GKGNRK7-DFVuGyYx.js} +1 -1
- package/web-shell/assets/{blockDiagram-NRAW4CY4-CGSVjghq.js → blockDiagram-NRAW4CY4-CS2hSeXi.js} +1 -1
- package/web-shell/assets/{c4Diagram-UCG6FXSJ-DZszjKKm.js → c4Diagram-UCG6FXSJ-DQShkkBR.js} +1 -1
- package/web-shell/assets/channel-DV-9kalP.js +1 -0
- package/web-shell/assets/{chunk-2Q5K7J3B-snkNi44P.js → chunk-2Q5K7J3B-BwTtOt8R.js} +1 -1
- package/web-shell/assets/{chunk-5VM5RSS4-CsnyTIr_.js → chunk-5VM5RSS4-Bj6h0Dwa.js} +1 -1
- package/web-shell/assets/{chunk-F27PBJKO-BDleVSaw.js → chunk-F27PBJKO-kC66vkrG.js} +1 -1
- package/web-shell/assets/{chunk-G27WJ6UU-CbjFrBwN.js → chunk-G27WJ6UU-Cgvg9nvk.js} +1 -1
- package/web-shell/assets/{chunk-JWPE2WC7-rkiI-MmN.js → chunk-JWPE2WC7-EzC494sa.js} +1 -1
- package/web-shell/assets/{chunk-LCL6LL3I-CEESZISZ.js → chunk-LCL6LL3I-utra0L7l.js} +1 -1
- package/web-shell/assets/{chunk-POPQ4Y6H-C0vPHNMP.js → chunk-POPQ4Y6H-xUBwWPMI.js} +1 -1
- package/web-shell/assets/{chunk-SVP7TREG-_LLDkzrp.js → chunk-SVP7TREG-CSs6ULGi.js} +1 -1
- package/web-shell/assets/{chunk-XXDRQBXY-PCJcNBA-.js → chunk-XXDRQBXY-CWPn3dOd.js} +1 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-DN5tETa4.js +1 -0
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-DN5tETa4.js +1 -0
- package/web-shell/assets/{cose-bilkent-JH36ORCC-Z1LPHXFQ.js → cose-bilkent-JH36ORCC-Dp7POI99.js} +1 -1
- package/web-shell/assets/{cynefin-OW5HDTMX-Ch8GJJZn.js → cynefin-OW5HDTMX-CnqWFq9t.js} +1 -1
- package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-BaZYUcGn.js → cynefinDiagram-5FMLGOSQ-BtgoKTG2.js} +1 -1
- package/web-shell/assets/{dagre-3AP2YEHR-CMiuGPg4.js → dagre-3AP2YEHR-BkDKcnoQ.js} +1 -1
- package/web-shell/assets/{diagram-S7CK7UJ4-Ch4SWYiO.js → diagram-S7CK7UJ4-CoCStDfp.js} +1 -1
- package/web-shell/assets/{diagram-UQ7AKVKN-DrQs-UnS.js → diagram-UQ7AKVKN-D6a6j3_H.js} +1 -1
- package/web-shell/assets/{diagram-VSXAHHWV-CK683mKd.js → diagram-VSXAHHWV-Da_ctgX_.js} +1 -1
- package/web-shell/assets/{diagram-VX7I27RA-CdtSFCwE.js → diagram-VX7I27RA-CoToXRBH.js} +1 -1
- package/web-shell/assets/{diagram-Z3DM3KII-mmDlyQCV.js → diagram-Z3DM3KII-DlRPF3da.js} +1 -1
- package/web-shell/assets/{ebnfDiagram-PWID7BFC-ig7MW8j3.js → ebnfDiagram-PWID7BFC-B0owtdgg.js} +1 -1
- package/web-shell/assets/{erDiagram-SSCWMZ5O-Br1al6yd.js → erDiagram-SSCWMZ5O-DZv1xcIp.js} +1 -1
- package/web-shell/assets/{flowDiagram-A5DVABFB-VU5pvkzQ.js → flowDiagram-A5DVABFB-DqXIgApm.js} +1 -1
- package/web-shell/assets/{ganttDiagram-EL5Y4UJY-D5-CC_k4.js → ganttDiagram-EL5Y4UJY-hp-3Nfao.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-aIOAY7jv.js → gitGraphDiagram-WWUBYQGX-pHy6E6Jm.js} +1 -1
- package/web-shell/assets/{index-BvC4CLzJ.js → index-BM9Xm2Dz.js} +1 -1
- package/web-shell/assets/{index-CHjJJO_-.js → index-zRWCDwX8.js} +3 -3
- package/web-shell/assets/{infoDiagram-RXCK75RN-BLavxALh.js → infoDiagram-RXCK75RN-DQlz-0GH.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-5VMMS53U-WrFAKU7P.js → ishikawaDiagram-5VMMS53U-BA43ebt4.js} +1 -1
- package/web-shell/assets/{journeyDiagram-EYS64GPL-CNB-o7UU.js → journeyDiagram-EYS64GPL-DDlU7qPX.js} +1 -1
- package/web-shell/assets/{kanban-definition-3QL26DDD-BsOlyiXs.js → kanban-definition-3QL26DDD-DaT1T9VO.js} +1 -1
- package/web-shell/assets/{layout-CLP7XDl-.js → layout-CGoDE0Jk.js} +1 -1
- package/web-shell/assets/{linear-B_ZqoW0R.js → linear-Dlcix00h.js} +1 -1
- package/web-shell/assets/{mermaid.core-DM7r4q8D.js → mermaid.core-CTrkfnVV.js} +6 -6
- package/web-shell/assets/{mindmap-definition-FBJOCRG2-Bqb6RJsq.js → mindmap-definition-FBJOCRG2-CKlmCDs2.js} +1 -1
- package/web-shell/assets/{pegDiagram-XKGWAZYB-CvUwl3Q5.js → pegDiagram-XKGWAZYB-C-81xWvj.js} +1 -1
- package/web-shell/assets/{pieDiagram-E7YTZNPT-BQNKFhor.js → pieDiagram-E7YTZNPT-DkWgCGEs.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-AXDQQJYC-7VbOBW8d.js → quadrantDiagram-AXDQQJYC-B8ItQsl-.js} +1 -1
- package/web-shell/assets/{railroadDiagram-O6MQD6OU-CgkPn4Te.js → railroadDiagram-O6MQD6OU-BZMa6PzJ.js} +1 -1
- package/web-shell/assets/{requirementDiagram-EFPCY7ZU-C7XViHWf.js → requirementDiagram-EFPCY7ZU-BGNIJd20.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-P5KCCOFB-vsv0eiDF.js → sankeyDiagram-P5KCCOFB-BfD9Ralh.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-BLdDIcOL.js → sequenceDiagram-WJ2MYXX4-BHv0Frcl.js} +1 -1
- package/web-shell/assets/{sizeCapture-X5ZJPWSS-BVqQaCER.js → sizeCapture-X5ZJPWSS-Dz7SvtQb.js} +1 -1
- package/web-shell/assets/{stateDiagram-HBIQ2CUA-Bq3g73mj.js → stateDiagram-HBIQ2CUA-CgkD_KYa.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-uPaEMeEa.js +1 -0
- package/web-shell/assets/{swimlanes-XN3QIQJK-7w4P-g0w.js → swimlanes-XN3QIQJK-Bv1d8x7Q.js} +1 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-DClL59AS.js +8 -0
- package/web-shell/assets/{timeline-definition-24CTP7MA-DlkUGqRK.js → timeline-definition-24CTP7MA-B_3E6jPw.js} +1 -1
- package/web-shell/assets/{vennDiagram-4TSXK5OY-D920UplN.js → vennDiagram-4TSXK5OY-OX4OfnpL.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-VM6X3IG4-EsWGTViP.js → wardleyDiagram-VM6X3IG4-agygocEg.js} +1 -1
- package/web-shell/assets/{xychartDiagram-S5SC5T6Z-Bhnogtoq.js → xychartDiagram-S5SC5T6Z-Dlre674O.js} +1 -1
- package/web-shell/index.html +1 -1
- package/web-shell/sw.js +1 -1
- package/chunks/chunk-V24FMEXL.js +0 -203
- package/chunks/gateway-transfer-47WP3EUB.js +0 -27
- package/web-shell/assets/channel-BxByz4gj.js +0 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-Vxr2jk7x.js +0 -1
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-Vxr2jk7x.js +0 -1
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-Cb0cd1Bn.js +0 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-BKzBsHUu.js +0 -8
|
@@ -0,0 +1,478 @@
|
|
|
1
|
+
// Force strict mode and setup for ESM
|
|
2
|
+
"use strict";
|
|
3
|
+
import {
|
|
4
|
+
GatewayConversationError,
|
|
5
|
+
isGatewayConversationActive,
|
|
6
|
+
normalizeGatewayEndpoint
|
|
7
|
+
} from "./chunk-JCWIHPJ2.js";
|
|
8
|
+
import {
|
|
9
|
+
getErrorHeader,
|
|
10
|
+
getRateLimitErrorDetails
|
|
11
|
+
} from "./chunk-3JWJHYFV.js";
|
|
12
|
+
import {
|
|
13
|
+
stripAnsiAndControl
|
|
14
|
+
} from "./chunk-FKI7XUZK.js";
|
|
15
|
+
import {
|
|
16
|
+
reachesOrganizaOne
|
|
17
|
+
} from "./chunk-VTIYMCRG.js";
|
|
18
|
+
import {
|
|
19
|
+
redactProxyCredentials
|
|
20
|
+
} from "./chunk-S6HB6BVJ.js";
|
|
21
|
+
import {
|
|
22
|
+
getErrorStatus,
|
|
23
|
+
isAbortError
|
|
24
|
+
} from "./chunk-JAQAGKIV.js";
|
|
25
|
+
import {
|
|
26
|
+
init_esbuild_shims
|
|
27
|
+
} from "./chunk-S2467S6L.js";
|
|
28
|
+
import {
|
|
29
|
+
__name
|
|
30
|
+
} from "./chunk-J2S4EL5Y.js";
|
|
31
|
+
|
|
32
|
+
// packages/core/src/providers/gateway-transfer.ts
|
|
33
|
+
init_esbuild_shims();
|
|
34
|
+
import { createHash } from "node:crypto";
|
|
35
|
+
|
|
36
|
+
// packages/core/src/providers/gateway-errors.ts
|
|
37
|
+
init_esbuild_shims();
|
|
38
|
+
function gatewayFailure(error, secrets = []) {
|
|
39
|
+
let current = error;
|
|
40
|
+
let status;
|
|
41
|
+
let providerCode;
|
|
42
|
+
let message;
|
|
43
|
+
const headers = new Headers();
|
|
44
|
+
for (let depth = 0; depth < 6 && current; depth++) {
|
|
45
|
+
if (current instanceof GatewayConversationError) return current;
|
|
46
|
+
status ??= getErrorStatus(current);
|
|
47
|
+
const diagnostic = getRateLimitErrorDetails(current);
|
|
48
|
+
providerCode ??= diagnostic.providerCode;
|
|
49
|
+
message ??= diagnostic.providerMessage;
|
|
50
|
+
if (status === void 0 && current instanceof Error) {
|
|
51
|
+
const start = current.message.indexOf("{");
|
|
52
|
+
const end = current.message.lastIndexOf("}");
|
|
53
|
+
if (start >= 0 && end > start) {
|
|
54
|
+
try {
|
|
55
|
+
const envelope = JSON.parse(
|
|
56
|
+
current.message.slice(start, end + 1)
|
|
57
|
+
);
|
|
58
|
+
status = getErrorStatus(envelope);
|
|
59
|
+
if (envelope && typeof envelope === "object" && "error" in envelope)
|
|
60
|
+
status ??= getErrorStatus(envelope.error);
|
|
61
|
+
} catch {
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
for (const name of [
|
|
66
|
+
"x-o1gw-device-state",
|
|
67
|
+
"retry-after",
|
|
68
|
+
"x-o1gw-limit",
|
|
69
|
+
"x-o1gw-limit-reset"
|
|
70
|
+
]) {
|
|
71
|
+
const value = getErrorHeader(current, name);
|
|
72
|
+
if (value && !headers.has(name)) headers.set(name, value);
|
|
73
|
+
}
|
|
74
|
+
if (typeof current !== "object") break;
|
|
75
|
+
const row = current;
|
|
76
|
+
if (row["error"] && typeof row["error"] === "object") {
|
|
77
|
+
const payload = row["error"];
|
|
78
|
+
const code = payload["code"] ?? payload["type"];
|
|
79
|
+
if (typeof code === "string") providerCode = code;
|
|
80
|
+
if (typeof payload["message"] === "string") message = payload["message"];
|
|
81
|
+
status ??= getErrorStatus(payload);
|
|
82
|
+
}
|
|
83
|
+
current = row["cause"];
|
|
84
|
+
}
|
|
85
|
+
if (providerCode && !/^[A-Za-z0-9_.-]{1,80}$/.test(providerCode))
|
|
86
|
+
providerCode = void 0;
|
|
87
|
+
if (message) {
|
|
88
|
+
for (const secret of secrets) {
|
|
89
|
+
if (secret) message = message.split(secret).join("[redacted]");
|
|
90
|
+
}
|
|
91
|
+
message = stripAnsiAndControl(redactProxyCredentials(message)).replace(/[\p{Cc}\p{Cf}]/gu, " ").slice(0, 4096).trim();
|
|
92
|
+
}
|
|
93
|
+
const details = { status, headers, providerCode };
|
|
94
|
+
let reason;
|
|
95
|
+
if (isAbortError(error)) reason = "cancelled";
|
|
96
|
+
else if (status === 408 || status !== void 0 && status >= 500)
|
|
97
|
+
reason = "uncertain";
|
|
98
|
+
else if (providerCode === "conversation_busy") reason = "busy";
|
|
99
|
+
else if (providerCode === "conversation_transfer_required")
|
|
100
|
+
reason = "transfer_required";
|
|
101
|
+
else if (["invalid_tool_results", "tool_result_mismatch", "pending_tools"].includes(
|
|
102
|
+
providerCode ?? ""
|
|
103
|
+
))
|
|
104
|
+
reason = "tool_mismatch";
|
|
105
|
+
else if ([
|
|
106
|
+
"execution_uncertain",
|
|
107
|
+
"termination_uncertain",
|
|
108
|
+
"transfer_uncertain"
|
|
109
|
+
].includes(providerCode ?? ""))
|
|
110
|
+
reason = "uncertain";
|
|
111
|
+
else if (status === 401 || status === 403 || [
|
|
112
|
+
"authentication_error",
|
|
113
|
+
"permission_error",
|
|
114
|
+
"permission_denied",
|
|
115
|
+
"device_revoked",
|
|
116
|
+
"device_expired",
|
|
117
|
+
"device_suspended"
|
|
118
|
+
].includes(providerCode ?? ""))
|
|
119
|
+
reason = "authorization";
|
|
120
|
+
else if (status === 409 || ["conversation_unavailable", "transfer_unavailable"].includes(
|
|
121
|
+
providerCode ?? ""
|
|
122
|
+
))
|
|
123
|
+
reason = "conflict";
|
|
124
|
+
else if (status && status >= 400 && status < 500 && status !== 408 || [
|
|
125
|
+
"invalid_request_error",
|
|
126
|
+
"rate_limit_exceeded",
|
|
127
|
+
"rate_limit_error"
|
|
128
|
+
].includes(providerCode ?? ""))
|
|
129
|
+
reason = "unavailable";
|
|
130
|
+
else reason = "uncertain";
|
|
131
|
+
const fallback = reason === "cancelled" ? "The gateway request was cancelled. Remote execution is not confirmed; no request was replayed." : reason === "uncertain" ? "The gateway request did not complete with a confirmed result. Your history is preserved; no request was replayed or moved to another account." : `The gateway refused the request${status ? ` (HTTP ${status})` : ""}. Your history and selected account are preserved.`;
|
|
132
|
+
return new GatewayConversationError(reason, message || fallback, details);
|
|
133
|
+
}
|
|
134
|
+
__name(gatewayFailure, "gatewayFailure");
|
|
135
|
+
|
|
136
|
+
// packages/core/src/providers/gateway-transfer.ts
|
|
137
|
+
var confirmations = /* @__PURE__ */ new WeakMap();
|
|
138
|
+
function registerGatewayTransferConfirmation(config, confirmation) {
|
|
139
|
+
confirmations.set(config, confirmation);
|
|
140
|
+
return () => {
|
|
141
|
+
if (confirmations.get(config) === confirmation)
|
|
142
|
+
confirmations.delete(config);
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
__name(registerGatewayTransferConfirmation, "registerGatewayTransferConfirmation");
|
|
146
|
+
async function confirmGatewayTransfer(config, question) {
|
|
147
|
+
if (question.signal?.aborted) return false;
|
|
148
|
+
return await confirmations.get(config)?.(question) ?? false;
|
|
149
|
+
}
|
|
150
|
+
__name(confirmGatewayTransfer, "confirmGatewayTransfer");
|
|
151
|
+
var intents = /* @__PURE__ */ new WeakMap();
|
|
152
|
+
var selections = /* @__PURE__ */ new WeakMap();
|
|
153
|
+
var selectionsInProgress = /* @__PURE__ */ new WeakMap();
|
|
154
|
+
function isGatewayAccountSelectionInProgress(config) {
|
|
155
|
+
const selection = selectionsInProgress.get(config);
|
|
156
|
+
return selection !== void 0 && selection.sessionId === config.getSessionId();
|
|
157
|
+
}
|
|
158
|
+
__name(isGatewayAccountSelectionInProgress, "isGatewayAccountSelectionInProgress");
|
|
159
|
+
function accountSelectionFingerprint(config) {
|
|
160
|
+
return createHash("sha256").update(
|
|
161
|
+
JSON.stringify([
|
|
162
|
+
config.model,
|
|
163
|
+
config.authType,
|
|
164
|
+
config.apiKey,
|
|
165
|
+
config.customHeaders,
|
|
166
|
+
config.connection,
|
|
167
|
+
normalizeGatewayEndpoint(
|
|
168
|
+
config.reasoningRouteBaseUrl ?? config.baseUrl ?? ""
|
|
169
|
+
)
|
|
170
|
+
])
|
|
171
|
+
).digest("hex");
|
|
172
|
+
}
|
|
173
|
+
__name(accountSelectionFingerprint, "accountSelectionFingerprint");
|
|
174
|
+
function recordGatewayAccountSelection(config, sourceModel, destinationModel) {
|
|
175
|
+
const destination = config.getContentGeneratorConfig();
|
|
176
|
+
if (destination.model !== destinationModel)
|
|
177
|
+
throw new GatewayConversationError(
|
|
178
|
+
"unsupported",
|
|
179
|
+
"The selected account changed before authorization could be recorded. Select the destination again."
|
|
180
|
+
);
|
|
181
|
+
selections.set(config, {
|
|
182
|
+
sessionId: config.getSessionId(),
|
|
183
|
+
sourceModel,
|
|
184
|
+
destinationModel,
|
|
185
|
+
destinationFingerprint: accountSelectionFingerprint(destination)
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
__name(recordGatewayAccountSelection, "recordGatewayAccountSelection");
|
|
189
|
+
function getGatewayAccountSelection(config) {
|
|
190
|
+
const selection = selections.get(config);
|
|
191
|
+
if (!selection || selection.sessionId !== config.getSessionId() || selection.destinationFingerprint !== accountSelectionFingerprint(config.getContentGeneratorConfig()))
|
|
192
|
+
return void 0;
|
|
193
|
+
return selection;
|
|
194
|
+
}
|
|
195
|
+
__name(getGatewayAccountSelection, "getGatewayAccountSelection");
|
|
196
|
+
function hasPendingGatewayTools(contents) {
|
|
197
|
+
const pending = [];
|
|
198
|
+
for (const content of contents) {
|
|
199
|
+
for (const part of content.parts ?? []) {
|
|
200
|
+
if (part.functionCall) {
|
|
201
|
+
pending.push(part.functionCall);
|
|
202
|
+
} else if (part.functionResponse) {
|
|
203
|
+
const response = part.functionResponse;
|
|
204
|
+
const index = pending.findIndex(
|
|
205
|
+
(call) => response.id ? call.id === response.id : !call.id && call.name === response.name
|
|
206
|
+
);
|
|
207
|
+
if (index >= 0) pending.splice(index, 1);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
return pending.length > 0;
|
|
212
|
+
}
|
|
213
|
+
__name(hasPendingGatewayTools, "hasPendingGatewayTools");
|
|
214
|
+
async function switchWithGatewayAccountSelection(config, target, switchModel, options = {}) {
|
|
215
|
+
if (isGatewayAccountSelectionInProgress(config))
|
|
216
|
+
throw new GatewayConversationError(
|
|
217
|
+
"busy",
|
|
218
|
+
"Finish or cancel the current response and pending tools before changing this conversation's model or account."
|
|
219
|
+
);
|
|
220
|
+
const before = config.getContentGeneratorConfig?.();
|
|
221
|
+
if (!before || !reachesOrganizaOne(before) && !target.model.startsWith("o1gw/")) {
|
|
222
|
+
await switchModel();
|
|
223
|
+
return true;
|
|
224
|
+
}
|
|
225
|
+
const history = /* @__PURE__ */ __name(() => {
|
|
226
|
+
const client = config.getLlmClient();
|
|
227
|
+
return client.isInitialized?.() === false ? [] : client.getHistoryShallow();
|
|
228
|
+
}, "history");
|
|
229
|
+
const ensureIdle = /* @__PURE__ */ __name(() => {
|
|
230
|
+
if (options.signal?.aborted)
|
|
231
|
+
throw new GatewayConversationError(
|
|
232
|
+
"cancelled",
|
|
233
|
+
"Account selection was cancelled."
|
|
234
|
+
);
|
|
235
|
+
if (isGatewayAccountSelectionInProgress(config) || isGatewayConversationActive(config, config.getSessionId()) || options.isBusy?.() || hasPendingGatewayTools(history()))
|
|
236
|
+
throw new GatewayConversationError(
|
|
237
|
+
"busy",
|
|
238
|
+
"Finish or cancel the current response and pending tools before changing this conversation's model or account."
|
|
239
|
+
);
|
|
240
|
+
}, "ensureIdle");
|
|
241
|
+
ensureIdle();
|
|
242
|
+
const sessionId = config.getSessionId();
|
|
243
|
+
let sourceModel = before.model;
|
|
244
|
+
if (target.model === before.model) {
|
|
245
|
+
const endpoint = normalizeGatewayEndpoint(
|
|
246
|
+
before.reasoningRouteBaseUrl ?? before.baseUrl ?? ""
|
|
247
|
+
);
|
|
248
|
+
const resumed = config.getResumedSessionData?.()?.conversation.messages ?? [];
|
|
249
|
+
for (const row of [...resumed].reverse()) {
|
|
250
|
+
if (row.subtype !== "gateway_conversation" || row.forkedFrom || row.sessionId !== sessionId)
|
|
251
|
+
continue;
|
|
252
|
+
const record = row.systemPayload;
|
|
253
|
+
if (record?.actor === "main" && record.conversationId === sessionId && normalizeGatewayEndpoint(record.endpoint) === endpoint) {
|
|
254
|
+
sourceModel = record.model;
|
|
255
|
+
break;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
const sourceFingerprint = gatewayTransferFingerprint(before);
|
|
260
|
+
const routeChanged = target.authType !== void 0 && target.authType !== before.authType || normalizeGatewayEndpoint(
|
|
261
|
+
target.baseUrl ?? before.reasoningRouteBaseUrl ?? before.baseUrl ?? ""
|
|
262
|
+
) !== normalizeGatewayEndpoint(
|
|
263
|
+
before.reasoningRouteBaseUrl ?? before.baseUrl ?? ""
|
|
264
|
+
);
|
|
265
|
+
const requiresConsent = (routeChanged || isGatewayAccountChange(sourceModel, target.model)) && history().length > 0;
|
|
266
|
+
if (requiresConsent) {
|
|
267
|
+
const question = {
|
|
268
|
+
source: sourceModel,
|
|
269
|
+
destination: target.label ?? target.model,
|
|
270
|
+
signal: options.signal
|
|
271
|
+
};
|
|
272
|
+
const confirmed = await (options.confirm ? options.confirm(question) : confirmGatewayTransfer(config, question));
|
|
273
|
+
if (!confirmed) return false;
|
|
274
|
+
}
|
|
275
|
+
if (sessionId !== config.getSessionId() || sourceFingerprint !== gatewayTransferFingerprint(config.getContentGeneratorConfig()))
|
|
276
|
+
throw new GatewayConversationError(
|
|
277
|
+
"unsupported",
|
|
278
|
+
"The conversation or model changed while awaiting authorization. Select the destination again."
|
|
279
|
+
);
|
|
280
|
+
ensureIdle();
|
|
281
|
+
const selectionInProgress = { sessionId };
|
|
282
|
+
selectionsInProgress.set(config, selectionInProgress);
|
|
283
|
+
try {
|
|
284
|
+
await switchModel();
|
|
285
|
+
if (sessionId !== config.getSessionId())
|
|
286
|
+
throw new GatewayConversationError(
|
|
287
|
+
"unsupported",
|
|
288
|
+
"The conversation or model changed while awaiting authorization. Select the destination again."
|
|
289
|
+
);
|
|
290
|
+
if (requiresConsent)
|
|
291
|
+
recordGatewayAccountSelection(config, sourceModel, target.model);
|
|
292
|
+
return true;
|
|
293
|
+
} finally {
|
|
294
|
+
if (selectionsInProgress.get(config) === selectionInProgress)
|
|
295
|
+
selectionsInProgress.delete(config);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
__name(switchWithGatewayAccountSelection, "switchWithGatewayAccountSelection");
|
|
299
|
+
function gatewayTransferFingerprint(config) {
|
|
300
|
+
return createHash("sha256").update(
|
|
301
|
+
JSON.stringify([
|
|
302
|
+
config.model,
|
|
303
|
+
config.authType,
|
|
304
|
+
config.apiKey,
|
|
305
|
+
config.customHeaders,
|
|
306
|
+
config.connection,
|
|
307
|
+
normalizeGatewayEndpoint(
|
|
308
|
+
config.reasoningRouteBaseUrl ?? config.baseUrl ?? ""
|
|
309
|
+
),
|
|
310
|
+
config.reasoning,
|
|
311
|
+
config.samplingParams,
|
|
312
|
+
config.extra_body
|
|
313
|
+
])
|
|
314
|
+
).digest("hex");
|
|
315
|
+
}
|
|
316
|
+
__name(gatewayTransferFingerprint, "gatewayTransferFingerprint");
|
|
317
|
+
function stageGatewayTransfer(config, intent) {
|
|
318
|
+
intents.set(config, intent);
|
|
319
|
+
}
|
|
320
|
+
__name(stageGatewayTransfer, "stageGatewayTransfer");
|
|
321
|
+
function takeGatewayTransfer(config) {
|
|
322
|
+
const intent = intents.get(config);
|
|
323
|
+
intents.delete(config);
|
|
324
|
+
if (!intent) return void 0;
|
|
325
|
+
if (intent.sessionId !== config.getSessionId()) return void 0;
|
|
326
|
+
if (intent.sourceModel !== config.getModel() || intent.sourceFingerprint !== gatewayTransferFingerprint(config.getContentGeneratorConfig())) {
|
|
327
|
+
throw new GatewayConversationError(
|
|
328
|
+
"unsupported",
|
|
329
|
+
"The conversation or model changed after transfer consent. Select the destination again to authorize the current transition."
|
|
330
|
+
);
|
|
331
|
+
}
|
|
332
|
+
return intent;
|
|
333
|
+
}
|
|
334
|
+
__name(takeGatewayTransfer, "takeGatewayTransfer");
|
|
335
|
+
function gatewayAccountRoute(id) {
|
|
336
|
+
const match = /^o1gw\/(account|own)\/(claude|codex|copilot)\/([1-9]\d*)\/(.+)$/.exec(id);
|
|
337
|
+
return match ? {
|
|
338
|
+
kind: match[1],
|
|
339
|
+
provider: match[2],
|
|
340
|
+
account: match[3],
|
|
341
|
+
native: match[4]
|
|
342
|
+
} : void 0;
|
|
343
|
+
}
|
|
344
|
+
__name(gatewayAccountRoute, "gatewayAccountRoute");
|
|
345
|
+
function isGatewayAccountChange(source, destination) {
|
|
346
|
+
const left = gatewayAccountRoute(source);
|
|
347
|
+
const right = gatewayAccountRoute(destination);
|
|
348
|
+
if (source === destination) return false;
|
|
349
|
+
if (!left || !right)
|
|
350
|
+
return Boolean(
|
|
351
|
+
left || right || source.startsWith("o1gw/group/") || destination.startsWith("o1gw/group/")
|
|
352
|
+
);
|
|
353
|
+
return Boolean(
|
|
354
|
+
left && right && (left.kind !== right.kind || left.provider !== right.provider || left.account !== right.account)
|
|
355
|
+
);
|
|
356
|
+
}
|
|
357
|
+
__name(isGatewayAccountChange, "isGatewayAccountChange");
|
|
358
|
+
function assertGatewayTransferCompatible(source, destination) {
|
|
359
|
+
const left = gatewayAccountRoute(source);
|
|
360
|
+
const right = gatewayAccountRoute(destination);
|
|
361
|
+
if (!left || !right || left.kind !== right.kind || left.provider !== right.provider || left.native !== right.native || left.account === right.account) {
|
|
362
|
+
throw new GatewayConversationError(
|
|
363
|
+
"unsupported",
|
|
364
|
+
"Native transfer requires two discovered accounts of the same provider, account type and native model. Explicit account selection can send the supplied history as new input instead."
|
|
365
|
+
);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
__name(assertGatewayTransferCompatible, "assertGatewayTransferCompatible");
|
|
369
|
+
async function prepareGatewayTransfer(fetcher, input, init, sourceModel) {
|
|
370
|
+
const url = new URL(input instanceof Request ? input.url : String(input));
|
|
371
|
+
if (url.pathname !== "/v1/messages" && url.pathname !== "/v1/chat/completions")
|
|
372
|
+
throw new GatewayConversationError(
|
|
373
|
+
"unsupported",
|
|
374
|
+
"This route does not support conversation transfer."
|
|
375
|
+
);
|
|
376
|
+
if (typeof init.body !== "string")
|
|
377
|
+
throw new GatewayConversationError(
|
|
378
|
+
"unsupported",
|
|
379
|
+
"The exact completion request is unavailable for transfer preparation."
|
|
380
|
+
);
|
|
381
|
+
const request = JSON.parse(init.body);
|
|
382
|
+
if (!request || typeof request !== "object" || !("model" in request) || typeof request.model !== "string")
|
|
383
|
+
throw new GatewayConversationError(
|
|
384
|
+
"unsupported",
|
|
385
|
+
"Invalid transfer completion request."
|
|
386
|
+
);
|
|
387
|
+
const headers = new Headers(init.headers);
|
|
388
|
+
if (headers.has("x-o1gw-operation-id"))
|
|
389
|
+
throw new GatewayConversationError(
|
|
390
|
+
"unsupported",
|
|
391
|
+
"Independent operations cannot inherit a conversation transfer."
|
|
392
|
+
);
|
|
393
|
+
headers.delete("x-o1gw-conversation-transfer");
|
|
394
|
+
headers.delete("content-length");
|
|
395
|
+
const startedAt = Date.now();
|
|
396
|
+
const response = await fetcher(new URL("/v1/conversations/transfer", url), {
|
|
397
|
+
...init,
|
|
398
|
+
headers,
|
|
399
|
+
body: JSON.stringify({
|
|
400
|
+
model: request.model,
|
|
401
|
+
...sourceModel ? { source_model: sourceModel } : {},
|
|
402
|
+
route: url.pathname,
|
|
403
|
+
request,
|
|
404
|
+
consent: true
|
|
405
|
+
}),
|
|
406
|
+
redirect: "error"
|
|
407
|
+
});
|
|
408
|
+
if (!response.ok) {
|
|
409
|
+
const errorHeaders = new Headers();
|
|
410
|
+
for (const name of [
|
|
411
|
+
"retry-after",
|
|
412
|
+
"x-o1gw-device-state",
|
|
413
|
+
"x-o1gw-limit",
|
|
414
|
+
"x-o1gw-limit-reset"
|
|
415
|
+
]) {
|
|
416
|
+
const value = response.headers.get(name);
|
|
417
|
+
if (value) errorHeaders.set(name, value);
|
|
418
|
+
}
|
|
419
|
+
const body = await response.json().catch(() => void 0);
|
|
420
|
+
const error = body && typeof body === "object" && "error" in body ? body.error : void 0;
|
|
421
|
+
throw gatewayFailure(
|
|
422
|
+
{ status: response.status, headers: errorHeaders, error },
|
|
423
|
+
[
|
|
424
|
+
headers.get("authorization")?.replace(/^Bearer\s+/i, "") ?? "",
|
|
425
|
+
headers.get("x-api-key") ?? ""
|
|
426
|
+
]
|
|
427
|
+
);
|
|
428
|
+
}
|
|
429
|
+
const prepared = await response.json();
|
|
430
|
+
if (!prepared || typeof prepared !== "object" || !("transfer_token" in prepared) || typeof prepared.transfer_token !== "string" || prepared.transfer_token.length === 0 || !("expires_in" in prepared) || typeof prepared.expires_in !== "number" || !Number.isFinite(prepared.expires_in) || prepared.expires_in <= 0 || prepared.expires_in > 60 || Date.now() >= startedAt + prepared.expires_in * 1e3 || init.signal?.aborted) {
|
|
431
|
+
throw new GatewayConversationError(
|
|
432
|
+
"unavailable",
|
|
433
|
+
"Transfer preparation expired or was not authorized. No completion was sent to the destination."
|
|
434
|
+
);
|
|
435
|
+
}
|
|
436
|
+
if ("destination_model" in prepared && prepared.destination_model !== request.model)
|
|
437
|
+
throw new GatewayConversationError(
|
|
438
|
+
"unavailable",
|
|
439
|
+
"The prepared destination does not match the selected account. No completion was sent."
|
|
440
|
+
);
|
|
441
|
+
const destination = gatewayAccountRoute(request.model);
|
|
442
|
+
if (destination?.kind === "account" && (!("destination_account_id" in prepared) || String(prepared.destination_account_id) !== destination.account))
|
|
443
|
+
throw new GatewayConversationError(
|
|
444
|
+
"unavailable",
|
|
445
|
+
"The prepared account does not match the selected destination. No completion was sent."
|
|
446
|
+
);
|
|
447
|
+
if (destination?.kind === "own" && !("destination_model" in prepared))
|
|
448
|
+
throw new GatewayConversationError(
|
|
449
|
+
"unavailable",
|
|
450
|
+
"The gateway did not confirm the prepared private destination. No completion was sent."
|
|
451
|
+
);
|
|
452
|
+
headers.set("x-o1gw-conversation-transfer", prepared.transfer_token);
|
|
453
|
+
return { ...init, headers, redirect: "error" };
|
|
454
|
+
}
|
|
455
|
+
__name(prepareGatewayTransfer, "prepareGatewayTransfer");
|
|
456
|
+
|
|
457
|
+
export {
|
|
458
|
+
gatewayFailure,
|
|
459
|
+
registerGatewayTransferConfirmation,
|
|
460
|
+
confirmGatewayTransfer,
|
|
461
|
+
isGatewayAccountSelectionInProgress,
|
|
462
|
+
recordGatewayAccountSelection,
|
|
463
|
+
getGatewayAccountSelection,
|
|
464
|
+
hasPendingGatewayTools,
|
|
465
|
+
switchWithGatewayAccountSelection,
|
|
466
|
+
gatewayTransferFingerprint,
|
|
467
|
+
stageGatewayTransfer,
|
|
468
|
+
takeGatewayTransfer,
|
|
469
|
+
gatewayAccountRoute,
|
|
470
|
+
isGatewayAccountChange,
|
|
471
|
+
assertGatewayTransferCompatible,
|
|
472
|
+
prepareGatewayTransfer
|
|
473
|
+
};
|
|
474
|
+
/**
|
|
475
|
+
* @license
|
|
476
|
+
* Copyright 2026 o1-code contributors
|
|
477
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
478
|
+
*/
|
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
createPatchSmart,
|
|
9
9
|
detectLineEnding,
|
|
10
10
|
getDiffStat
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-FE2ZH6WW.js";
|
|
12
12
|
import {
|
|
13
13
|
FileOperationEvent,
|
|
14
14
|
logFileOperation
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-BZYI5TLI.js";
|
|
16
16
|
import {
|
|
17
17
|
findCellIndex,
|
|
18
18
|
getCellDisplayId,
|
|
@@ -5,31 +5,31 @@ import {
|
|
|
5
5
|
} from "./chunk-XZ3MQL2U.js";
|
|
6
6
|
import {
|
|
7
7
|
getErrorMessage
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-IOWEOCTW.js";
|
|
9
9
|
import {
|
|
10
10
|
loadSettings
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZIWDO6UP.js";
|
|
12
12
|
import {
|
|
13
13
|
getCurrentLanguage,
|
|
14
14
|
initializeI18n,
|
|
15
15
|
resolveLanguageSetting,
|
|
16
16
|
t
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-4OV5UWWQ.js";
|
|
18
18
|
import {
|
|
19
19
|
isWorkspaceTrusted
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-T636IYGV.js";
|
|
21
21
|
import {
|
|
22
22
|
ExtensionManager,
|
|
23
23
|
getExtensionDescription,
|
|
24
24
|
getExtensionDisplayName,
|
|
25
25
|
require_prompts
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-FE2ZH6WW.js";
|
|
27
27
|
import {
|
|
28
28
|
stripAnsi
|
|
29
29
|
} from "./chunk-WU3R2YUE.js";
|
|
30
30
|
import {
|
|
31
31
|
redactUrlCredentials
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-EB4VOVOS.js";
|
|
33
33
|
import {
|
|
34
34
|
writeStderrLine,
|
|
35
35
|
writeStdoutLine
|