alran 0.9.0 → 1.0.1
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/ALRAN_TOOLS_NOTICES.md +11 -0
- package/README.md +11 -16
- package/assets/agents/alran/skills/alran-code-product/SKILL.md +3 -3
- package/assets/agents/alran/skills/alran-code-product/references/account-models.md +19 -16
- package/chunks/{account-commands-JZ6NXTTK.js → account-commands-GW7N3MYC.js} +1 -1
- package/chunks/{anthropic-MN33DP4E.js → anthropic-63VE6MAE.js} +1 -1
- package/chunks/{application-ITGAJ4HC.js → application-WPPTE6LU.js} +1 -1
- package/chunks/{auth-command-V3RVPLZO.js → auth-command-36RMNQZW.js} +1 -1
- package/chunks/azure-openai-responses-OIP3KVKJ.js +2 -0
- package/chunks/chunk-2K5H5GA7.js +2 -0
- package/chunks/chunk-3GGKARES.js +2 -0
- package/chunks/chunk-5RIMHTEU.js +207 -0
- package/chunks/{chunk-EYK25HWR.js → chunk-5Y76VFHY.js} +1 -1
- package/chunks/{chunk-QIN5ZBE2.js → chunk-6DOVXX7W.js} +1 -1
- package/chunks/{chunk-E3GLGDGC.js → chunk-6PFI65C6.js} +1 -1
- package/chunks/{chunk-4PDIO3M6.js → chunk-6UXSIWCB.js} +1 -1
- package/chunks/{chunk-OQNU3VPS.js → chunk-C6LAAFG2.js} +2 -2
- package/chunks/{chunk-33CNY6GP.js → chunk-CUG7F2FN.js} +1 -1
- package/chunks/chunk-DFMYLGVU.js +249 -0
- package/chunks/{chunk-IIE366LR.js → chunk-G5MOGPZ3.js} +490 -485
- package/chunks/{chunk-FC4M2B7E.js → chunk-IC6A323Q.js} +1 -1
- package/chunks/{chunk-4X22UJQH.js → chunk-IN2Z5SSJ.js} +1 -1
- package/chunks/chunk-JSTSFMGK.js +70 -0
- package/chunks/{chunk-WWNUAU4P.js → chunk-LCC45PCZ.js} +1 -1
- package/chunks/{chunk-7QLAXRD2.js → chunk-MPQ6G7LH.js} +254 -254
- package/chunks/{chunk-FUERW2DW.js → chunk-MUXNNOSQ.js} +1 -1
- package/chunks/{chunk-44VPC5LA.js → chunk-NBONSNQZ.js} +1 -1
- package/chunks/chunk-NMKRNU5O.js +2 -0
- package/chunks/chunk-NVPGGFT3.js +2 -0
- package/chunks/chunk-NZXJAHTO.js +9 -0
- package/chunks/{chunk-6255CZPL.js → chunk-PCL2CVVE.js} +1 -1
- package/chunks/chunk-PXH4SBCS.js +3 -0
- package/chunks/chunk-RLJVY75P.js +28 -0
- package/chunks/{chunk-WYANV3IX.js → chunk-RLND4AYL.js} +1 -1
- package/chunks/chunk-TJC4LPRQ.js +2 -0
- package/chunks/chunk-U4PFHJ7Z.js +27 -0
- package/chunks/chunk-V2SB4U4D.js +2 -0
- package/chunks/chunk-VGKKKM2W.js +6 -0
- package/chunks/{chunk-XFCC2CI2.js → chunk-VUISZDXX.js} +1 -1
- package/chunks/chunk-XVGPB7TW.js +21 -0
- package/chunks/{chunk-CJM7ZJ6W.js → chunk-ZDI22NOK.js} +1 -1
- package/chunks/{data-dir-LDVKDCJ2.js → data-dir-OEPRRIOO.js} +1 -1
- package/chunks/{dist-2BRD4JFU.js → dist-VKYZJYR6.js} +1 -1
- package/chunks/{dist-EXKHRFQO.js → dist-WGTMUM3E.js} +1 -1
- package/chunks/{ffi-OUPK6AY6.js → ffi-EFLUAAVX.js} +1 -1
- package/chunks/{ffi-M5UP5J6C.js → ffi-QKKA5HYI.js} +1 -1
- package/chunks/{google-UJAPMFAB.js → google-RCR46TTQ.js} +1 -1
- package/chunks/{google-vertex-VLSF55PW.js → google-vertex-Y26T7YYR.js} +1 -1
- package/chunks/{install-source-JTIUC4G4.js → install-source-63OVVBMK.js} +1 -1
- package/chunks/launcher-2UG3JPYF.js +63 -0
- package/chunks/lifecycle-5IPJRP2V.js +2 -0
- package/chunks/{main-TQGGRHTS.js → main-7SGOQBHZ.js} +2 -2
- package/chunks/{mistral-ZJZUEF2X.js → mistral-NEBDKUEI.js} +1 -1
- package/chunks/{module-6F3E5H7Y-BN7QWGYB.js → module-6F3E5H7Y-FIMLNSCK.js} +1 -1
- package/chunks/{module-asyncify-R6PWJ6ZV-P4FWSBAY.js → module-asyncify-R6PWJ6ZV-Q2HJ3NOC.js} +1 -1
- package/chunks/{multipart-parser-L6M455MS.js → multipart-parser-JVSLI2CL.js} +1 -1
- package/chunks/{network-proxy-U72JCK2I.js → network-proxy-AJO7ZW3O.js} +1 -1
- package/chunks/openai-codex-responses-L2CIGCKO.js +2 -0
- package/chunks/openai-completions-C4PHW6MD.js +2 -0
- package/chunks/openai-responses-5NVFOW4Y.js +2 -0
- package/chunks/{openrouter-G2EHY5BD.js → openrouter-BKUGQT7Z.js} +1 -1
- package/chunks/{otel-OHXIZ666.js → otel-DRJM2PIX.js} +1 -1
- package/chunks/plugin-command-CIDTOPNB.js +2 -0
- package/chunks/provider-command-UZ7KQFAC.js +2 -0
- package/chunks/run-acp-command-AKDLHKMR.js +59 -0
- package/chunks/{run-exec-command-5ADSQR2Z.js → run-exec-command-UXTPS7LC.js} +1 -1
- package/chunks/{skills-command-XXXEZAG6.js → skills-command-57TF53NO.js} +1 -1
- package/chunks/src-5PSNGHHD.js +2 -0
- package/chunks/{src-IBHIRTD7.js → src-YZ26EVSY.js} +1 -1
- package/chunks/telemetry-3NXMCOVD.js +2 -0
- package/chunks/{telemetry-command-COQG2AKK.js → telemetry-command-CMDERYNN.js} +1 -1
- package/chunks/{tools-WDBB2JKV.js → tools-CRJR35HS.js} +1 -1
- package/chunks/{undici-TUGHZJSA.js → undici-O4OQVZ6I.js} +1 -1
- package/chunks/{update-NB6OD572.js → update-ACFAGV6F.js} +1 -1
- package/cli.js +2 -3
- package/embedded/alran-tools/cli.mjs +1 -5
- package/embedded/alran-tools/manifest.json +1 -1
- package/image-preview-worker.js +1 -1
- package/matrix-mcp-stdio.js +1 -1
- package/package.json +1 -1
- package/quickjs-worker.js +1 -1
- package/chunks/azure-openai-responses-OWHMUNKC.js +0 -2
- package/chunks/chunk-C3CMJAAV.js +0 -3
- package/chunks/chunk-ENHOPPS7.js +0 -16
- package/chunks/chunk-FSNYOJPJ.js +0 -2
- package/chunks/chunk-FXOH6TEQ.js +0 -21
- package/chunks/chunk-GRXX6I72.js +0 -2
- package/chunks/chunk-GSYHBK5Q.js +0 -6
- package/chunks/chunk-IWK7PZP7.js +0 -207
- package/chunks/chunk-KCLRJQ53.js +0 -59
- package/chunks/chunk-M7GW4VMR.js +0 -27
- package/chunks/chunk-QFUV5PX6.js +0 -2
- package/chunks/chunk-TW23QKAD.js +0 -3
- package/chunks/chunk-U7U3DJHF.js +0 -2
- package/chunks/chunk-WTAJMYF2.js +0 -249
- package/chunks/chunk-YLQXZBEL.js +0 -2
- package/chunks/chunk-Z6BHCXKT.js +0 -25
- package/chunks/chunk-Z6HBNJCA.js +0 -8
- package/chunks/launcher-FCZ3EDBF.js +0 -61
- package/chunks/lifecycle-GY435YMF.js +0 -2
- package/chunks/openai-codex-responses-FPCDNRL5.js +0 -2
- package/chunks/openai-completions-D32YW6KL.js +0 -2
- package/chunks/openai-responses-ZCGSENM4.js +0 -2
- package/chunks/plugin-command-OSAFHS7C.js +0 -2
- package/chunks/provider-command-SKTCHD4E.js +0 -2
- package/chunks/run-acp-command-SG2BDMFJ.js +0 -2
- package/chunks/src-DNIDEMVV.js +0 -2
- package/chunks/telemetry-J7ZLGF5X.js +0 -2
- /package/chunks/{chunk-EOR6EDNR.js → chunk-2AYWJZ72.js} +0 -0
- /package/chunks/{chunk-YPV2X2RG.js → chunk-4XP5XUIZ.js} +0 -0
- /package/chunks/{chunk-NWB7LFOK.js → chunk-5DQTVSQV.js} +0 -0
- /package/chunks/{chunk-OIQ336YE.js → chunk-EJN3SE5B.js} +0 -0
- /package/chunks/{chunk-A7GMJNA2.js → chunk-K5DTFR6D.js} +0 -0
- /package/chunks/{chunk-ZQOALVGL.js → chunk-R44C5DM6.js} +0 -0
- /package/chunks/{chunk-PNXZWSWT.js → chunk-UJCAE7SG.js} +0 -0
- /package/chunks/{chunk-J3KCPYZT.js → chunk-W5ZOLW7T.js} +0 -0
- /package/chunks/{chunk-XAGZ6ZEU.js → chunk-XLVABFJC.js} +0 -0
- /package/chunks/{chunk-N5SVBCUB.js → chunk-XSEU4WQD.js} +0 -0
- /package/chunks/{chunk-CSOUJVKM.js → chunk-Z5HOCNTZ.js} +0 -0
- /package/chunks/{emscripten-module-ZS3PMSDF.js → emscripten-module-3WGSFZYF.js} +0 -0
- /package/chunks/{emscripten-module-XPTEOIWW.js → emscripten-module-74WUXTHL.js} +0 -0
- /package/chunks/{emscripten-module-WYNDFH3N.js → emscripten-module-MCN4Y3N4.js} +0 -0
- /package/chunks/{emscripten-module-RD6P2XH5.js → emscripten-module-NEAT5LGD.js} +0 -0
- /package/chunks/{ffi-ORLOPBB3.js → ffi-JIGPPPF7.js} +0 -0
- /package/chunks/{ffi-IO7WZQNG.js → ffi-RLX77WFG.js} +0 -0
- /package/chunks/{pdfjs-SHZAF7PF.js → pdfjs-2UOWBGC2.js} +0 -0
- /package/chunks/{photon_rs-C52RL4CI.js → photon_rs-MVWYTYTO.js} +0 -0
package/ALRAN_TOOLS_NOTICES.md
CHANGED
|
@@ -12,6 +12,17 @@ They now point at the Ottili platform. The tool's behaviour is otherwise
|
|
|
12
12
|
unchanged, and the embedded bytes are pinned by hash in
|
|
13
13
|
`scripts/lib/alran-tools-artifact.mjs`.
|
|
14
14
|
|
|
15
|
+
## Local changes to the vendored CLI
|
|
16
|
+
|
|
17
|
+
One change was made to the vendored bytes after the rebrand: the
|
|
18
|
+
`TEST_SANDBOX_API_BASE_URLS` table, which pointed at two internal Kubernetes
|
|
19
|
+
service addresses of the company the CLI was originally built for, was removed
|
|
20
|
+
together with the `BUILD_ENV === "test"` branch that selected it. The vendored
|
|
21
|
+
build is `prod`, so that branch was already unreachable; the removal leaves no
|
|
22
|
+
upstream infrastructure address in the shipped artifact. The pinned hash in
|
|
23
|
+
`scripts/lib/alran-tools-artifact.mjs` and the resource hash in
|
|
24
|
+
`manifest.json` were updated to the new bytes. No other behaviour changed.
|
|
25
|
+
|
|
15
26
|
> # Third-party notices
|
|
16
27
|
>
|
|
17
28
|
> ## Pi TUI
|
package/README.md
CHANGED
|
@@ -6,12 +6,6 @@
|
|
|
6
6
|
<a href="docs/examples.md">Examples</a> ·
|
|
7
7
|
<a href="CONTRIBUTING.md">Contributing</a>
|
|
8
8
|
</p>
|
|
9
|
-
<p align="center">
|
|
10
|
-
<img src="docs/assets/source-preview.svg" alt="Source preview">
|
|
11
|
-
<img src="docs/assets/node.svg" alt="Compatibility: Node.js 22.19+, 24.2+, 25, and 26">
|
|
12
|
-
<a href="LICENSE-STATUS.md"><img src="docs/assets/license.svg" alt="First-party default license: MIT"></a>
|
|
13
|
-
</p>
|
|
14
|
-
|
|
15
9
|
Alran Code is Ottili's AI coding agent for the terminal. It reads and edits your code, runs
|
|
16
10
|
commands and tests, and keeps iterating until the task works. By default it runs on **Ottili Werk** through the Ottili AI Gateway; Claude Sonnet 5.5 and Claude Opus 5.5 are one switch away, and you can bring your own provider key.
|
|
17
11
|
|
|
@@ -45,21 +39,22 @@ Details: [docs/AUTH.md](docs/AUTH.md).
|
|
|
45
39
|
### 3. Pick a model and start
|
|
46
40
|
|
|
47
41
|
```bash
|
|
48
|
-
alran models # Werk, Claude Sonnet 5.5, Claude Opus 5.5 — price and whether
|
|
42
|
+
alran models # Werk, Claude Sonnet 5.5, Claude Opus 5.5 — price and whether you can use them now
|
|
49
43
|
alran # the interactive terminal UI in the current directory
|
|
50
44
|
alran exec "Add a test for the date parser and make it pass"
|
|
51
|
-
alran usage # credit left, spend this month per model
|
|
45
|
+
alran usage # credit left, your Anthropic key, spend this month per model
|
|
52
46
|
```
|
|
53
47
|
|
|
54
|
-
| Model | Input / output per 1M tokens |
|
|
48
|
+
| Model | Input / output per 1M tokens | Billed by |
|
|
55
49
|
| --- | --- | --- |
|
|
56
|
-
| Ottili Werk 1.1 (default) | $0.50 / $1.50 | free (welcome) or purchased credit |
|
|
57
|
-
| Claude Sonnet 5.5 | $2.00 / $10.00
|
|
58
|
-
| Claude Opus 5.5 | $4.00 / $20.00
|
|
59
|
-
|
|
60
|
-
The free credit you get on sign-up covers Werk.
|
|
61
|
-
|
|
62
|
-
|
|
50
|
+
| Ottili Werk 1.1 (default) | $0.50 / $1.50 | Ottili: free (welcome) or purchased credit |
|
|
51
|
+
| Claude Sonnet 5.5 | $2.00 / $10.00 (Anthropic's price) | Anthropic, on your own API key |
|
|
52
|
+
| Claude Opus 5.5 | $4.00 / $20.00 (Anthropic's price) | Anthropic, on your own API key |
|
|
53
|
+
|
|
54
|
+
The free credit you get on sign-up covers Werk. Claude runs on **your own Anthropic API key**: add it once in
|
|
55
|
+
the Ottili AI Platform under *Settings → Provider keys*, and Anthropic bills you directly — Ottili charges
|
|
56
|
+
nothing for Claude and adds no fee. Without a key a Claude request is refused with `byok_key_required`. Set
|
|
57
|
+
the default with `alran config model sonnet`. More in [docs/MODELS.md](docs/MODELS.md).
|
|
63
58
|
|
|
64
59
|
<details>
|
|
65
60
|
<summary>Use your own API key (bring your own key)</summary>
|
|
@@ -4,7 +4,7 @@ description: >-
|
|
|
4
4
|
Use this skill to answer questions about Alran Code itself, Ottili's AI coding agent for the
|
|
5
5
|
terminal: what it is; installation, update, uninstall, version and supported Node.js; signing in
|
|
6
6
|
with an Ottili account (browser, device code, API key), companies and projects; models, prices,
|
|
7
|
-
|
|
7
|
+
credit (Werk) and the Anthropic key Claude runs on, `alran usage`; bring-your-own-key providers; sessions, modes,
|
|
8
8
|
permissions, Plan mode and shortcuts; Skills, Plugins and MCP; and why a command, a model or a
|
|
9
9
|
sign-in does not work. Treat references such as "Alran Code", "Alran", "alran", "alran tui" or the
|
|
10
10
|
product's commands and settings as product-routing signals even when the user asks for a concrete
|
|
@@ -24,8 +24,8 @@ description: >-
|
|
|
24
24
|
- It is installed from npm as `alran` (`npm install -g alran`), the command is `alran`, and it needs
|
|
25
25
|
Node.js 22.19+ (22.x), 24.2+ (24.x), 25 or 26. Node 24.0 and 24.1 are not supported.
|
|
26
26
|
- The account is the Ottili account. Sign-in goes through the Ottili Platform; model calls go to the
|
|
27
|
-
Ottili AI Gateway. The default model is Ottili Werk; Claude Sonnet 5.5 and Claude Opus 5.5
|
|
28
|
-
|
|
27
|
+
Ottili AI Gateway. The default model is Ottili Werk; Claude Sonnet 5.5 and Claude Opus 5.5 run on the
|
|
28
|
+
customer's own Anthropic API key, which Anthropic bills directly (Ottili charges nothing for Claude).
|
|
29
29
|
- Local state lives in `~/.alran` (`ALRAN_DATA_DIR` overrides it).
|
|
30
30
|
|
|
31
31
|
## Source discovery
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Accounts, credit and models
|
|
2
2
|
|
|
3
|
-
Use this reference for signing in, companies and projects, API keys, credit (
|
|
4
|
-
models and their prices, `alran usage`, bring-your-own-key providers, and why a model or a sign-in is
|
|
3
|
+
Use this reference for signing in, companies and projects, API keys, credit (Werk), the Anthropic key
|
|
4
|
+
that Claude runs on, models and their prices, `alran usage`, bring-your-own-key providers, and why a model or a sign-in is
|
|
5
5
|
refused.
|
|
6
6
|
|
|
7
7
|
## Stable boundaries
|
|
@@ -9,16 +9,18 @@ refused.
|
|
|
9
9
|
- The account is an Ottili account. The CLI never sees a password: it holds a Platform session
|
|
10
10
|
(`~/.alran/auth/platform/<env>/platform-session.json`, mode 0600). Signing out revokes it at the
|
|
11
11
|
Platform.
|
|
12
|
-
- Credit is one wallet
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
- Credit is one wallet. It pays for Werk (the welcome credit covers it). It does **not** pay for Claude.
|
|
13
|
+
- Claude runs on the customer's **own Anthropic API key**: they add it once in the AI Platform under
|
|
14
|
+
Settings → Provider keys (an admin does; it is checked, stored encrypted, used only for their requests).
|
|
15
|
+
The gateway sends their request to Anthropic with it and **Anthropic bills their Anthropic account
|
|
16
|
+
directly**. Ottili charges nothing for Claude: no token price, no service fee, no hold on credit.
|
|
17
|
+
- The gateway enforces this, not the CLI. Without a working key a Claude request is refused with
|
|
18
|
+
`byok_key_required` (HTTP 403); `byok_key_invalid` / `byok_key_rejected` mean Anthropic does not accept the
|
|
19
|
+
stored key; `byok_provider_billing` (HTTP 402) means the Anthropic account has no credit left — the money
|
|
20
|
+
to add is Anthropic's, not Ottili's. The way out is the AI Platform (Settings → Provider keys) or Werk.
|
|
21
|
+
- `alran usage` shows the tokens of Claude requests as "billed by Anthropic" and the state of the key.
|
|
22
|
+
- A provider key you configure in Alran Code itself (`alran provider add`) is a different path: calls go
|
|
23
|
+
directly to the provider, and Ottili does not see, meter or bill them.
|
|
22
24
|
- The agent cannot change a balance, a limit, a company or a permission.
|
|
23
25
|
|
|
24
26
|
## Commands
|
|
@@ -47,8 +49,8 @@ request.
|
|
|
47
49
|
|
|
48
50
|
1. `alran auth status`: signed in? which company and project? A 401 or exit code 2 means
|
|
49
51
|
`alran auth login`.
|
|
50
|
-
2. `alran usage` and `alran models`: is there credit,
|
|
51
|
-
or `
|
|
52
|
+
2. `alran usage` and `alran models`: is there credit (Werk), is an Anthropic key stored and accepted
|
|
53
|
+
(Claude)? Exit code 5 or a `byok_*` code is an answer about credit or the key, not a fault.
|
|
52
54
|
3. Exit code 4 is a reachability problem: check `ALRAN_API_BASE` (default
|
|
53
55
|
`https://ai.ottili.one/v1`) and `OTTILI_PLATFORM_URL` (default `https://platform.ottili.one`).
|
|
54
56
|
4. Report the conclusion first, then the command or page it came from, then what only the user can
|
|
@@ -57,5 +59,6 @@ request.
|
|
|
57
59
|
## Safety
|
|
58
60
|
|
|
59
61
|
Never ask the user to paste an API key, a session file, a password or a sign-in code. Never promise
|
|
60
|
-
that a model is covered by the free credit without `alran models` saying so
|
|
61
|
-
gateway or suggest a client change as a way around a
|
|
62
|
+
that a model is covered by the free credit without `alran models` saying so, and never say that Ottili
|
|
63
|
+
bills Claude or adds a fee to it. Do not bypass the gateway or suggest a client change as a way around a
|
|
64
|
+
credit or key rule.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __alran_cR } from "module"; import { basename as __alran_basename, dirname as __alran_dirname, join as __alran_join } from "path"; import { fileURLToPath as __alran_fileURLToPath, pathToFileURL as __alran_pathToFileURL } from "url"; const __alran_tuiCurrentModuleDir = __alran_dirname(__alran_fileURLToPath(import.meta.url)); const __alran_tuiPackageRoot = __alran_basename(__alran_tuiCurrentModuleDir) === "chunks" ? __alran_dirname(__alran_tuiCurrentModuleDir) : __alran_tuiCurrentModuleDir; const __alran_tuiPackageEntryUrl = __alran_pathToFileURL(__alran_join(__alran_tuiPackageRoot, "cli.js")).href; const require = __alran_cR(__alran_tuiPackageEntryUrl); const __dirname = __alran_tuiPackageRoot;
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u}from"./chunk-
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u}from"./chunk-U4PFHJ7Z.js";import"./chunk-6UXSIWCB.js";import"./chunk-5RIMHTEU.js";import"./chunk-5Y76VFHY.js";import"./chunk-XVGPB7TW.js";import"./chunk-VUISZDXX.js";import"./chunk-XSEU4WQD.js";import"./chunk-HNWBFJNO.js";import"./chunk-XQK7JM66.js";export{a as ACCOUNT_EXIT,b as AlranAccountError,o as OTTILI_MODEL_LISTING,p as colourAvailability,c as defaultAccountCommandIo,f as formatMicroUsd,g as formatTable,e as gatewayCall,m as modelKeyOf,d as platformCall,u as registerAccountCommands,t as runAccountAction,i as runAuthLogin,j as runAuthLogout,h as runAuthStatus,s as runBilling,n as runConfigModel,l as runConfigProject,q as runModels,k as runSwitchCompany,r as runUsage};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __alran_cR } from "module"; import { basename as __alran_basename, dirname as __alran_dirname, join as __alran_join } from "path"; import { fileURLToPath as __alran_fileURLToPath, pathToFileURL as __alran_pathToFileURL } from "url"; const __alran_tuiCurrentModuleDir = __alran_dirname(__alran_fileURLToPath(import.meta.url)); const __alran_tuiPackageRoot = __alran_basename(__alran_tuiCurrentModuleDir) === "chunks" ? __alran_dirname(__alran_tuiCurrentModuleDir) : __alran_tuiCurrentModuleDir; const __alran_tuiPackageEntryUrl = __alran_pathToFileURL(__alran_join(__alran_tuiPackageRoot, "cli.js")).href; const require = __alran_cR(__alran_tuiPackageEntryUrl); const __dirname = __alran_tuiPackageRoot;
|
|
2
|
-
import{a,b,c,d}from"./chunk-
|
|
2
|
+
import{a,b,c,d}from"./chunk-LCC45PCZ.js";import"./chunk-N6W7ZL26.js";import"./chunk-W5ZOLW7T.js";import"./chunk-3AODGLMF.js";import"./chunk-VLXX22YO.js";import"./chunk-7XYOYZX2.js";import"./chunk-XQK7JM66.js";export{a as DEFAULT_THINKING_MODEL_IDS,b as isDefaultThinkingModelId,c as streamAnthropic,d as streamSimpleAnthropic};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __alran_cR } from "module"; import { basename as __alran_basename, dirname as __alran_dirname, join as __alran_join } from "path"; import { fileURLToPath as __alran_fileURLToPath, pathToFileURL as __alran_pathToFileURL } from "url"; const __alran_tuiCurrentModuleDir = __alran_dirname(__alran_fileURLToPath(import.meta.url)); const __alran_tuiPackageRoot = __alran_basename(__alran_tuiCurrentModuleDir) === "chunks" ? __alran_dirname(__alran_tuiCurrentModuleDir) : __alran_tuiCurrentModuleDir; const __alran_tuiPackageEntryUrl = __alran_pathToFileURL(__alran_join(__alran_tuiPackageRoot, "cli.js")).href; const require = __alran_cR(__alran_tuiPackageEntryUrl); const __dirname = __alran_tuiPackageRoot;
|
|
2
|
-
import{c as a}from"./chunk-
|
|
2
|
+
import{c as a}from"./chunk-NBONSNQZ.js";import"./chunk-LZJYNT32.js";import"./chunk-GP52JZMY.js";import"./chunk-IN2Z5SSJ.js";import"./chunk-PCL2CVVE.js";import"./chunk-ZQKVUPKA.js";import"./chunk-R44C5DM6.js";import"./chunk-VUISZDXX.js";import"./chunk-XSEU4WQD.js";import"./chunk-XQK7JM66.js";export{a as AlranUpdateApplication};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __alran_cR } from "module"; import { basename as __alran_basename, dirname as __alran_dirname, join as __alran_join } from "path"; import { fileURLToPath as __alran_fileURLToPath, pathToFileURL as __alran_pathToFileURL } from "url"; const __alran_tuiCurrentModuleDir = __alran_dirname(__alran_fileURLToPath(import.meta.url)); const __alran_tuiPackageRoot = __alran_basename(__alran_tuiCurrentModuleDir) === "chunks" ? __alran_dirname(__alran_tuiCurrentModuleDir) : __alran_tuiCurrentModuleDir; const __alran_tuiPackageEntryUrl = __alran_pathToFileURL(__alran_join(__alran_tuiPackageRoot, "cli.js")).href; const require = __alran_cR(__alran_tuiPackageEntryUrl); const __dirname = __alran_tuiPackageRoot;
|
|
2
|
-
import{d as b,e as c,f as d}from"./chunk-
|
|
2
|
+
import{d as b,e as c,f as d}from"./chunk-NZXJAHTO.js";import"./chunk-3GGKARES.js";import"./chunk-6UXSIWCB.js";import{o as a}from"./chunk-5RIMHTEU.js";import"./chunk-5Y76VFHY.js";import"./chunk-XVGPB7TW.js";import"./chunk-VUISZDXX.js";import"./chunk-XSEU4WQD.js";import"./chunk-HNWBFJNO.js";import"./chunk-XQK7JM66.js";export{a as platformIdempotencyKey,d as platformSessionClient,b as runTuiLogin,c as runTuiLogout};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __alran_cR } from "module"; import { basename as __alran_basename, dirname as __alran_dirname, join as __alran_join } from "path"; import { fileURLToPath as __alran_fileURLToPath, pathToFileURL as __alran_pathToFileURL } from "url"; const __alran_tuiCurrentModuleDir = __alran_dirname(__alran_fileURLToPath(import.meta.url)); const __alran_tuiPackageRoot = __alran_basename(__alran_tuiCurrentModuleDir) === "chunks" ? __alran_dirname(__alran_tuiCurrentModuleDir) : __alran_tuiCurrentModuleDir; const __alran_tuiPackageEntryUrl = __alran_pathToFileURL(__alran_join(__alran_tuiPackageRoot, "cli.js")).href; const require = __alran_cR(__alran_tuiPackageEntryUrl); const __dirname = __alran_tuiPackageRoot;
|
|
2
|
+
import{a as h}from"./chunk-U3RMPDXU.js";import{b as c}from"./chunk-XLVABFJC.js";import{a as R,b as E,c as O}from"./chunk-NVPGGFT3.js";import"./chunk-QKBN5CGI.js";import"./chunk-NMKRNU5O.js";import"./chunk-W5ZOLW7T.js";import{a as f}from"./chunk-3AODGLMF.js";import{e as l,f as d,h as g,j as A}from"./chunk-VLXX22YO.js";import"./chunk-7XYOYZX2.js";import"./chunk-XQK7JM66.js";var S="v1";var I=new Set(["openai","openai-codex","opencode","azure-openai-responses"]);function w(r){const n=new Map;if(!r)return n;for(const e of r.split(",")){const t=e.trim();if(!t)continue;const[a,s]=t.split("=",2);if(!a||!s)continue;n.set(a.trim(),s.trim())}return n}function N(r,n){if(n?.azureDeploymentName){return n.azureDeploymentName}const e=w(process.env.AZURE_OPENAI_DEPLOYMENT_NAME_MAP).get(r.id);return e||r.id}function U(r){if(r instanceof Error){const n=r.status;const e=typeof n==="number"?n:void 0;if(e!==void 0){return`Azure OpenAI API error (${e}): ${r.message}`}return r.message}try{return JSON.stringify(r)}catch{return String(r)}}var _=(r,n,e)=>{const t=new d;(async()=>{const a=N(r,e);const s={role:"assistant",content:[],api:"azure-openai-responses",provider:r.provider,model:r.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"stop",timestamp:Date.now()};try{const o=e?.apiKey;if(!o){throw new Error(`No API key for provider: ${r.provider}`)}const i=P(r,o,e);let p=x(r,n,e,a);const u=await e?.onPayload?.(p,r);if(u!==void 0){p=u}const z={...e?.signal?{signal:e.signal}:{},...e?.timeoutMs!==void 0?{timeout:e.timeoutMs}:{},maxRetries:e?.maxRetries??0};const{data:y,response:m}=await i.responses.create(p,z).withResponse();await e?.onResponse?.({status:m.status,headers:f(m.headers)},r);t.push({type:"start",partial:s});await O(y,s,t,r);if(e?.signal?.aborted){throw new Error("Request was aborted")}if(s.stopReason==="aborted"||s.stopReason==="error"){throw new Error("An unknown error occurred")}t.push({type:"done",reason:s.stopReason,message:s});t.end()}catch(o){g(e?.onProviderError,o,r);for(const i of s.content){delete i.index;delete i.partialJson}s.stopReason=e?.signal?.aborted?"aborted":"error";s.errorMessage=U(o);t.push({type:"error",reason:s.stopReason,error:s});t.end()}})();return t};var Z=(r,n,e)=>{const t=e?.apiKey;if(!t){throw new Error(`No API key for provider: ${r.provider}`)}const a=A(r,e,t);const s=e?.reasoning?l(r,e.reasoning):void 0;const o=s==="off"?void 0:s;return _(r,n,{...a,reasoningEffort:o})};function v(r){const n=r.trim().replace(/\/+$/,"");let e;try{e=new URL(n)}catch{throw new Error(`Invalid Azure OpenAI base URL: ${r}`)}const t=e.hostname.endsWith(".openai.azure.com")||e.hostname.endsWith(".cognitiveservices.azure.com");const a=e.pathname.replace(/\/+$/,"");if(t&&(a===""||a==="/"||a==="/openai")){e.pathname="/openai/v1";e.search=""}return e.toString().replace(/\/+$/,"")}function M(r){return`https://${r}.openai.azure.com/openai/v1`}function b(r,n){const e=n?.azureApiVersion||process.env.AZURE_OPENAI_API_VERSION||S;const t=n?.azureBaseUrl?.trim()||process.env.AZURE_OPENAI_BASE_URL?.trim()||void 0;const a=n?.azureResourceName||process.env.AZURE_OPENAI_RESOURCE_NAME;let s=t;if(!s&&a){s=M(a)}if(!s&&r.baseUrl){s=r.baseUrl}if(!s){throw new Error("Azure OpenAI base URL is required. Set AZURE_OPENAI_BASE_URL or AZURE_OPENAI_RESOURCE_NAME, or pass azureBaseUrl, azureResourceName, or model.baseUrl.")}return{baseUrl:v(s),apiVersion:e}}function P(r,n,e){const t={...r.headers};if(e?.headers){Object.assign(t,e.headers)}const{baseUrl:a,apiVersion:s}=b(r,e);return new c({apiKey:n,apiVersion:s,dangerouslyAllowBrowser:true,defaultHeaders:t,baseURL:a})}function x(r,n,e,t){const a=R(r,n,I);const s={model:t,input:a,stream:true,prompt_cache_key:h(e?.sessionId),store:false};if(e?.maxTokens){s.max_output_tokens=e?.maxTokens}if(e?.temperature!==void 0){s.temperature=e?.temperature}if(n.tools&&n.tools.length>0){s.tools=E(n.tools)}if(r.reasoning){if(e?.reasoningEffort||e?.reasoningSummary){const o=e?.reasoningEffort?r.thinkingLevelMap?.[e.reasoningEffort]??e.reasoningEffort:"medium";s.reasoning={effort:o,summary:e?.reasoningSummary||"auto"};s.include=["reasoning.encrypted_content"]}else if(r.thinkingLevelMap?.off!==null){s.reasoning={effort:r.thinkingLevelMap?.off??"none"}}}return s}export{_ as streamAzureOpenAIResponses,Z as streamSimpleAzureOpenAIResponses};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __alran_cR } from "module"; import { basename as __alran_basename, dirname as __alran_dirname, join as __alran_join } from "path"; import { fileURLToPath as __alran_fileURLToPath, pathToFileURL as __alran_pathToFileURL } from "url"; const __alran_tuiCurrentModuleDir = __alran_dirname(__alran_fileURLToPath(import.meta.url)); const __alran_tuiPackageRoot = __alran_basename(__alran_tuiCurrentModuleDir) === "chunks" ? __alran_dirname(__alran_tuiCurrentModuleDir) : __alran_tuiCurrentModuleDir; const __alran_tuiPackageEntryUrl = __alran_pathToFileURL(__alran_join(__alran_tuiPackageRoot, "cli.js")).href; const require = __alran_cR(__alran_tuiPackageEntryUrl); const __dirname = __alran_tuiPackageRoot;
|
|
2
|
+
import{b as E_,da as Z_,fa as z_}from"./chunk-RLJVY75P.js";var $_=typeof globalThis==="object"?globalThis:global;var I="1.9.0";var _t=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function gt(_){var e=new Set([_]);var t=new Set;var E=_.match(_t);if(!E){return function(){return false}}var o={major:+E[1],minor:+E[2],patch:+E[3],prerelease:E[4]};if(o.prerelease!=null){return function r(n){return n===_}}function T(r){t.add(r);return false}function A(r){e.add(r);return true}return function r(n){if(e.has(n)){return true}if(t.has(n)){return false}var s=n.match(_t);if(!s){return T(n)}var c={major:+s[1],minor:+s[2],patch:+s[3],prerelease:s[4]};if(c.prerelease!=null){return T(n)}if(o.major!==c.major){return T(n)}if(o.major===0){if(o.minor===c.minor&&o.patch<=c.patch){return A(n)}return T(n)}if(o.minor<=c.minor){return A(n)}return T(n)}}var tt=gt(I);var Yt=I.split(".")[0];var u=Symbol.for("opentelemetry.js.api."+Yt);var d=$_;function i(_,e,t,E){var o;if(E===void 0){E=false}var T=d[u]=(o=d[u])!==null&&o!==void 0?o:{version:I};if(!E&&T[_]){var A=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+_);t.error(A.stack||A.message);return false}if(T.version!==I){var A=new Error("@opentelemetry/api: Registration of version v"+T.version+" for "+_+" does not match previously registered API v"+I);t.error(A.stack||A.message);return false}T[_]=e;t.debug("@opentelemetry/api: Registered a global for "+_+" v"+I+".");return true}function O(_){var e,t;var E=(e=d[u])===null||e===void 0?void 0:e.version;if(!E||!tt(E)){return}return(t=d[u])===null||t===void 0?void 0:t[_]}function L(_,e){e.debug("@opentelemetry/api: Unregistering a global for "+_+" v"+I+".");var t=d[u];if(t){delete t[_]}}var ft=function(_,e){var t=typeof Symbol==="function"&&_[Symbol.iterator];if(!t)return _;var E=t.call(_),o,T=[],A;try{while((e===void 0||e-- >0)&&!(o=E.next()).done)T.push(o.value)}catch(r){A={error:r}}finally{try{if(o&&!o.done&&(t=E["return"]))t.call(E)}finally{if(A)throw A.error}}return T};var ht=function(_,e,t){if(t||arguments.length===2)for(var E=0,o=e.length,T;E<o;E++){if(T||!(E in e)){if(!T)T=Array.prototype.slice.call(e,0,E);T[E]=e[E]}}return _.concat(T||Array.prototype.slice.call(e))};var et=(function(){function _(e){this._namespace=e.namespace||"DiagComponentLogger"}_.prototype.debug=function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return m("debug",this._namespace,e)};_.prototype.error=function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return m("error",this._namespace,e)};_.prototype.info=function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return m("info",this._namespace,e)};_.prototype.warn=function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return m("warn",this._namespace,e)};_.prototype.verbose=function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return m("verbose",this._namespace,e)};return _})();function m(_,e,t){var E=O("diag");if(!E){return}t.unshift(e);return E[_].apply(E,ht([],ft(t),false))}var R;(function(_){_[_["NONE"]=0]="NONE";_[_["ERROR"]=30]="ERROR";_[_["WARN"]=50]="WARN";_[_["INFO"]=60]="INFO";_[_["DEBUG"]=70]="DEBUG";_[_["VERBOSE"]=80]="VERBOSE";_[_["ALL"]=9999]="ALL"})(R||(R={}));function Et(_,e){if(_<R.NONE){_=R.NONE}else if(_>R.ALL){_=R.ALL}e=e||{};function t(E,o){var T=e[E];if(typeof T==="function"&&_>=o){return T.bind(e)}return function(){}}return{error:t("error",R.ERROR),warn:t("warn",R.WARN),info:t("info",R.INFO),debug:t("debug",R.DEBUG),verbose:t("verbose",R.VERBOSE)}}var Bt=function(_,e){var t=typeof Symbol==="function"&&_[Symbol.iterator];if(!t)return _;var E=t.call(_),o,T=[],A;try{while((e===void 0||e-- >0)&&!(o=E.next()).done)T.push(o.value)}catch(r){A={error:r}}finally{try{if(o&&!o.done&&(t=E["return"]))t.call(E)}finally{if(A)throw A.error}}return T};var Ht=function(_,e,t){if(t||arguments.length===2)for(var E=0,o=e.length,T;E<o;E++){if(T||!(E in e)){if(!T)T=Array.prototype.slice.call(e,0,E);T[E]=e[E]}}return _.concat(T||Array.prototype.slice.call(e))};var yt="diag";var a=(function(){function _(){function e(o){return function(){var T=[];for(var A=0;A<arguments.length;A++){T[A]=arguments[A]}var r=O("diag");if(!r)return;return r[o].apply(r,Ht([],Bt(T),false))}}var t=this;var E=function(o,T){var A,r,n;if(T===void 0){T={logLevel:R.INFO}}if(o===t){var s=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");t.error((A=s.stack)!==null&&A!==void 0?A:s.message);return false}if(typeof T==="number"){T={logLevel:T}}var c=O("diag");var S=Et((r=T.logLevel)!==null&&r!==void 0?r:R.INFO,o);if(c&&!T.suppressOverrideMessage){var p=(n=new Error().stack)!==null&&n!==void 0?n:"<failed to generate stacktrace>";c.warn("Current logger will be overwritten from "+p);S.warn("Current logger will overwrite one already registered from "+p)}return i("diag",S,t,true)};t.setLogger=E;t.disable=function(){L(yt,t)};t.createComponentLogger=function(o){return new et(o)};t.verbose=e("verbose");t.debug=e("debug");t.info=e("info");t.warn=e("warn");t.error=e("error")}_.instance=function(){if(!this._instance){this._instance=new _}return this._instance};return _})();var vt=function(_,e){var t=typeof Symbol==="function"&&_[Symbol.iterator];if(!t)return _;var E=t.call(_),o,T=[],A;try{while((e===void 0||e-- >0)&&!(o=E.next()).done)T.push(o.value)}catch(r){A={error:r}}finally{try{if(o&&!o.done&&(t=E["return"]))t.call(E)}finally{if(A)throw A.error}}return T};var bt=function(_){var e=typeof Symbol==="function"&&Symbol.iterator,t=e&&_[e],E=0;if(t)return t.call(_);if(_&&typeof _.length==="number")return{next:function(){if(_&&E>=_.length)_=void 0;return{value:_&&_[E++],done:!_}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};var ot=(function(){function _(e){this._entries=e?new Map(e):new Map}_.prototype.getEntry=function(e){var t=this._entries.get(e);if(!t){return void 0}return Object.assign({},t)};_.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(e){var t=vt(e,2),E=t[0],o=t[1];return[E,o]})};_.prototype.setEntry=function(e,t){var E=new _(this._entries);E._entries.set(e,t);return E};_.prototype.removeEntry=function(e){var t=new _(this._entries);t._entries.delete(e);return t};_.prototype.removeEntries=function(){var e,t;var E=[];for(var o=0;o<arguments.length;o++){E[o]=arguments[o]}var T=new _(this._entries);try{for(var A=bt(E),r=A.next();!r.done;r=A.next()){var n=r.value;T._entries.delete(n)}}catch(s){e={error:s}}finally{try{if(r&&!r.done&&(t=A.return))t.call(A)}finally{if(e)throw e.error}}return T};_.prototype.clear=function(){return new _};return _})();var We=a.instance();function Tt(_){if(_===void 0){_={}}return new ot(new Map(Object.entries(_)))}function y(_){return Symbol.for(_)}var Ft=(function(){function _(e){var t=this;t._currentContext=e?new Map(e):new Map;t.getValue=function(E){return t._currentContext.get(E)};t.setValue=function(E,o){var T=new _(t._currentContext);T._currentContext.set(E,o);return T};t.deleteValue=function(E){var o=new _(t._currentContext);o._currentContext.delete(E);return o}}return _})();var At=new Ft;var rt={get:function(_,e){if(_==null){return void 0}return _[e]},keys:function(_){if(_==null){return[]}return Object.keys(_)}};var nt={set:function(_,e,t){if(_==null){return}_[e]=t}};var Kt=function(_,e){var t=typeof Symbol==="function"&&_[Symbol.iterator];if(!t)return _;var E=t.call(_),o,T=[],A;try{while((e===void 0||e-- >0)&&!(o=E.next()).done)T.push(o.value)}catch(r){A={error:r}}finally{try{if(o&&!o.done&&(t=E["return"]))t.call(E)}finally{if(A)throw A.error}}return T};var Wt=function(_,e,t){if(t||arguments.length===2)for(var E=0,o=e.length,T;E<o;E++){if(T||!(E in e)){if(!T)T=Array.prototype.slice.call(e,0,E);T[E]=e[E]}}return _.concat(T||Array.prototype.slice.call(e))};var st=(function(){function _(){}_.prototype.active=function(){return At};_.prototype.with=function(e,t,E){var o=[];for(var T=3;T<arguments.length;T++){o[T-3]=arguments[T]}return t.call.apply(t,Wt([E],Kt(o),false))};_.prototype.bind=function(e,t){return t};_.prototype.enable=function(){return this};_.prototype.disable=function(){return this};return _})();var kt=function(_,e){var t=typeof Symbol==="function"&&_[Symbol.iterator];if(!t)return _;var E=t.call(_),o,T=[],A;try{while((e===void 0||e-- >0)&&!(o=E.next()).done)T.push(o.value)}catch(r){A={error:r}}finally{try{if(o&&!o.done&&(t=E["return"]))t.call(E)}finally{if(A)throw A.error}}return T};var wt=function(_,e,t){if(t||arguments.length===2)for(var E=0,o=e.length,T;E<o;E++){if(T||!(E in e)){if(!T)T=Array.prototype.slice.call(e,0,E);T[E]=e[E]}}return _.concat(T||Array.prototype.slice.call(e))};var o_="context";var Qt=new st;var C=(function(){function _(){}_.getInstance=function(){if(!this._instance){this._instance=new _}return this._instance};_.prototype.setGlobalContextManager=function(e){return i(o_,e,a.instance())};_.prototype.active=function(){return this._getContextManager().active()};_.prototype.with=function(e,t,E){var o;var T=[];for(var A=3;A<arguments.length;A++){T[A-3]=arguments[A]}return(o=this._getContextManager()).with.apply(o,wt([e,t,E],kt(T),false))};_.prototype.bind=function(e,t){return this._getContextManager().bind(e,t)};_.prototype._getContextManager=function(){return O(o_)||Qt};_.prototype.disable=function(){this._getContextManager().disable();L(o_,a.instance())};return _})();var v;(function(_){_[_["NONE"]=0]="NONE";_[_["SAMPLED"]=1]="SAMPLED"})(v||(v={}));var T_="0000000000000000";var A_="00000000000000000000000000000000";var ct={traceId:A_,spanId:T_,traceFlags:v.NONE};var U=(function(){function _(e){if(e===void 0){e=ct}this._spanContext=e}_.prototype.spanContext=function(){return this._spanContext};_.prototype.setAttribute=function(e,t){return this};_.prototype.setAttributes=function(e){return this};_.prototype.addEvent=function(e,t){return this};_.prototype.addLink=function(e){return this};_.prototype.addLinks=function(e){return this};_.prototype.setStatus=function(e){return this};_.prototype.updateName=function(e){return this};_.prototype.end=function(e){};_.prototype.isRecording=function(){return false};_.prototype.recordException=function(e,t){};return _})();var r_=y("OpenTelemetry Context Key SPAN");function b(_){return _.getValue(r_)||void 0}function St(){return b(C.getInstance().active())}function G(_,e){return _.setValue(r_,e)}function Rt(_){return _.deleteValue(r_)}function pt(_,e){return G(_,new U(e))}function F(_){var e;return(e=b(_))===null||e===void 0?void 0:e.spanContext()}var Xt=/^([0-9a-f]{32})$/i;var jt=/^[0-9a-f]{16}$/i;function Jt(_){return Xt.test(_)&&_!==A_}function qt(_){return jt.test(_)&&_!==T_}function K(_){return Jt(_.traceId)&&qt(_.spanId)}function Nt(_){return new U(_)}var n_=C.getInstance();var W=(function(){function _(){}_.prototype.startSpan=function(e,t,E){if(E===void 0){E=n_.active()}var o=Boolean(t===null||t===void 0?void 0:t.root);if(o){return new U}var T=E&&F(E);if(Zt(T)&&K(T)){return new U(T)}else{return new U}};_.prototype.startActiveSpan=function(e,t,E,o){var T;var A;var r;if(arguments.length<2){return}else if(arguments.length===2){r=t}else if(arguments.length===3){T=t;r=E}else{T=t;A=E;r=o}var n=A!==null&&A!==void 0?A:n_.active();var s=this.startSpan(e,T,n);var c=G(n,s);return n_.with(c,r,void 0,s)};return _})();function Zt(_){return typeof _==="object"&&typeof _["spanId"]==="string"&&typeof _["traceId"]==="string"&&typeof _["traceFlags"]==="number"}var zt=new W;var Ot=(function(){function _(e,t,E,o){this._provider=e;this.name=t;this.version=E;this.options=o}_.prototype.startSpan=function(e,t,E){return this._getTracer().startSpan(e,t,E)};_.prototype.startActiveSpan=function(e,t,E,o){var T=this._getTracer();return Reflect.apply(T.startActiveSpan,T,arguments)};_.prototype._getTracer=function(){if(this._delegate){return this._delegate}var e=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!e){return zt}this._delegate=e;return this._delegate};return _})();var at=(function(){function _(){}_.prototype.getTracer=function(e,t,E){return new W};return _})();var $t=new at;var s_=(function(){function _(){}_.prototype.getTracer=function(e,t,E){var o;return(o=this.getDelegateTracer(e,t,E))!==null&&o!==void 0?o:new Ot(this,e,t,E)};_.prototype.getDelegate=function(){var e;return(e=this._delegate)!==null&&e!==void 0?e:$t};_.prototype.setDelegate=function(e){this._delegate=e};_.prototype.getDelegateTracer=function(e,t,E){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getTracer(e,t,E)};return _})();var x;(function(_){_[_["UNSET"]=0]="UNSET";_[_["OK"]=1]="OK";_[_["ERROR"]=2]="ERROR"})(x||(x={}));var D=C.getInstance();var It=(function(){function _(){}_.prototype.inject=function(e,t){};_.prototype.extract=function(e,t){return e};_.prototype.fields=function(){return[]};return _})();var c_=y("OpenTelemetry Baggage Key");function S_(_){return _.getValue(c_)||void 0}function it(){return S_(C.getInstance().active())}function Lt(_,e){return _.setValue(c_,e)}function Ct(_){return _.deleteValue(c_)}var R_="propagation";var _e=new It;var Ut=(function(){function _(){this.createBaggage=Tt;this.getBaggage=S_;this.getActiveBaggage=it;this.setBaggage=Lt;this.deleteBaggage=Ct}_.getInstance=function(){if(!this._instance){this._instance=new _}return this._instance};_.prototype.setGlobalPropagator=function(e){return i(R_,e,a.instance())};_.prototype.inject=function(e,t,E){if(E===void 0){E=nt}return this._getGlobalPropagator().inject(e,t,E)};_.prototype.extract=function(e,t,E){if(E===void 0){E=rt}return this._getGlobalPropagator().extract(e,t,E)};_.prototype.fields=function(){return this._getGlobalPropagator().fields()};_.prototype.disable=function(){L(R_,a.instance())};_.prototype._getGlobalPropagator=function(){return O(R_)||_e};return _})();var k=Ut.getInstance();var p_="trace";var Pt=(function(){function _(){this._proxyTracerProvider=new s_;this.wrapSpanContext=Nt;this.isSpanContextValid=K;this.deleteSpan=Rt;this.getSpan=b;this.getActiveSpan=St;this.getSpanContext=F;this.setSpan=G;this.setSpanContext=pt}_.getInstance=function(){if(!this._instance){this._instance=new _}return this._instance};_.prototype.setGlobalTracerProvider=function(e){var t=i(p_,this._proxyTracerProvider,a.instance());if(t){this._proxyTracerProvider.setDelegate(e)}return t};_.prototype.getTracerProvider=function(){return O(p_)||this._proxyTracerProvider};_.prototype.getTracer=function(e,t){return this.getTracerProvider().getTracer(e,t)};_.prototype.disable=function(){L(p_,a.instance());this._proxyTracerProvider=new s_};return _})();var M=Pt.getInstance();var N_="error.type";var O_="http.request.method";var w="http.response.status_code";var a_="server.address";var I_="server.port";var i_="url.full";var L_="gen_ai.agent.description";var Q="gen_ai.agent.id";var C_="gen_ai.agent.name";var g="gen_ai.conversation.id";var X="gen_ai.input.messages";var Y="gen_ai.operation.name";var j="chat";var l="create_agent";var U_="embeddings";var J="execute_tool";var P_="generate_content";var V="invoke_agent";var x_="text_completion";var q="gen_ai.output.messages";var f="gen_ai.provider.name";var h="mistral_ai";var D_="gen_ai.request.choice.count";var M_="gen_ai.request.encoding_formats";var l_="gen_ai.request.frequency_penalty";var V_="gen_ai.request.max_tokens";var Z="gen_ai.request.model";var u_="gen_ai.request.presence_penalty";var d_="gen_ai.request.seed";var m_="gen_ai.request.stop_sequences";var G_="gen_ai.request.temperature";var g_="gen_ai.request.top_k";var Y_="gen_ai.request.top_p";var f_="gen_ai.response.finish_reasons";var z="gen_ai.response.id";var $="gen_ai.response.model";var h_="gen_ai.system_instructions";var B_="gen_ai.tool.call.arguments";var H_="gen_ai.tool.call.id";var y_="gen_ai.tool.call.result";var v_="gen_ai.tool.definitions";var b_="gen_ai.tool.name";var F_="gen_ai.tool.type";var K_="gen_ai.usage.input_tokens";var W_="gen_ai.usage.output_tokens";function xt(_){if(_==null){return[]}if(typeof _==="string"){return[{type:"text",content:_}]}if(!Array.isArray(_)){return[]}const e=[];for(const t of _){if(typeof t==="string"){e.push({type:"text",content:t})}else if(typeof t==="object"&&t!==null){const E=t;const o=E["type"]||"";if(o==="text"){e.push({type:"text",content:E["text"]||""})}else if(o==="thinking"){const T=E["thinking"];let A;if(Array.isArray(T)){const r=T.filter(n=>typeof n==="object"&&n!==null&&n["type"]==="text").map(n=>n["text"]||"");A=r.join("\n")}else{A=String(T||"")}e.push({type:"reasoning",content:A})}else if(o==="image_url"){const T=E["image_url"];const A=typeof T==="object"&&T!==null?T["url"]||"":String(T||"");e.push({type:"uri",modality:"image",uri:A})}else{e.push({type:o})}}}return e}function Dt(_){if(!_||!Array.isArray(_)){return[]}const e=[];for(const t of _){if(typeof t!=="object"||t===null)continue;const E=t;const o=E["function"]||{};const T={type:"tool_call",name:o["name"]||""};const A=E["id"];if(A!=null){T["id"]=A}const r=o["arguments"];if(r!=null){T["arguments"]=r}e.push(T)}return e}function k_(_){const e=_["type"];if(e==="function.result"){const o={type:"tool_call_response",response:_["result"]};const T=_["tool_call_id"];if(T!=null){o["id"]=T}return{role:"tool",parts:[o]}}const t=_["role"]||"unknown";const E=[];if(t==="tool"){const o={type:"tool_call_response",response:_["content"]};const T=_["tool_call_id"];if(T!=null){o["id"]=T}E.push(o)}else{E.push(...xt(_["content"]));E.push(...Dt(_["tool_calls"]))}return{role:t,parts:E}}function w_(_){const e=_["message"]||{};const t=[];t.push(...xt(e["content"]));t.push(...Dt(e["tool_calls"]));return{role:e["role"]||"assistant",parts:t,finish_reason:_["finish_reason"]||""}}function Mt(_){const e=_["type"]||"function";const t=_["function"];if(!t){return null}const E=t["name"];if(!E){return null}const o={type:e,name:E};const T=t["description"];if(T!=null){o["description"]=T}const A=t["parameters"];if(A!=null){o["parameters"]=A}return o}function te(_){const e=JSON.parse(_);if(typeof e!=="object"||e===null||Array.isArray(e)){return _}const t=e;for(const o of["object","created","usage"]){if(t[o]===null){delete t[o]}}const E=t["choices"];if(Array.isArray(E)){for(const o of E){if(typeof o==="object"&&o!==null&&!Array.isArray(o)){const T=o;if(!("finish_reason"in T)){T["finish_reason"]=null}}}}return JSON.stringify(t)}function lt(_){const e=[];const t=_.split("\n");for(const E of t){const o=E.trim();if(!o.startsWith("data: ")){continue}const T=o.slice(6);if(T==="[DONE]"){continue}try{const A=z_(te(T));if(A.ok){e.push(A.value)}}catch{continue}}return e}function Vt(_){let e;let t;let E;const o=new Map;for(const r of _){e=e||r.id;t=t||r.model;E=E||r.usage;for(const n of r.choices){let s=o.get(n.index);if(!s){s={message:{role:"assistant",content:""},finish_reason:""};o.set(n.index,s)}const c=s.message;const S=n.delta;if(typeof S.role==="string"){c.role=S.role}c.content+=ee(S.content);if(typeof n.finishReason==="string"){s.finish_reason=n.finishReason}if(Array.isArray(S.toolCalls)){if(!c.tool_calls){c.tool_calls=[]}const p=c.tool_calls;for(const N of S.toolCalls){const q_=N.index!=null?N.index:p.length;while(p.length<=q_){p.push({id:null,function:{name:"",arguments:""}})}const e_=p[q_];if(N.id!=null&&N.id!=="null"){e_.id=N.id}if(N.function.name){e_.function.name+=N.function.name}if(typeof N.function.arguments==="string"&&N.function.arguments){e_.function.arguments+=N.function.arguments}}}}}const T=Array.from(o.keys()).sort((r,n)=>r-n);const A={id:e,model:t,choices:T.map(r=>o.get(r))};if(E!=null){A["usage"]=Z_.parse(E)}return A}function ee(_){if(typeof _==="string"){return _}if(!Array.isArray(_)){return""}return _.filter(e=>e.type==="text").map(e=>e.text).join("")}var co={ATTR_ERROR_TYPE:N_,ATTR_GEN_AI_AGENT_DESCRIPTION:L_,ATTR_GEN_AI_AGENT_ID:Q,ATTR_GEN_AI_AGENT_NAME:C_,ATTR_GEN_AI_CONVERSATION_ID:g,ATTR_GEN_AI_INPUT_MESSAGES:X,ATTR_GEN_AI_OPERATION_NAME:Y,ATTR_GEN_AI_OUTPUT_MESSAGES:q,ATTR_GEN_AI_PROVIDER_NAME:f,ATTR_GEN_AI_REQUEST_CHOICE_COUNT:D_,ATTR_GEN_AI_REQUEST_ENCODING_FORMATS:M_,ATTR_GEN_AI_REQUEST_FREQUENCY_PENALTY:l_,ATTR_GEN_AI_REQUEST_MAX_TOKENS:V_,ATTR_GEN_AI_REQUEST_MODEL:Z,ATTR_GEN_AI_REQUEST_PRESENCE_PENALTY:u_,ATTR_GEN_AI_REQUEST_SEED:d_,ATTR_GEN_AI_REQUEST_STOP_SEQUENCES:m_,ATTR_GEN_AI_REQUEST_TEMPERATURE:G_,ATTR_GEN_AI_REQUEST_TOP_K:g_,ATTR_GEN_AI_REQUEST_TOP_P:Y_,ATTR_GEN_AI_RESPONSE_FINISH_REASONS:f_,ATTR_GEN_AI_RESPONSE_ID:z,ATTR_GEN_AI_RESPONSE_MODEL:$,ATTR_GEN_AI_SYSTEM_INSTRUCTIONS:h_,ATTR_GEN_AI_TOOL_CALL_ARGUMENTS:B_,ATTR_GEN_AI_TOOL_CALL_ID:H_,ATTR_GEN_AI_TOOL_CALL_RESULT:y_,ATTR_GEN_AI_TOOL_DEFINITIONS:v_,ATTR_GEN_AI_TOOL_NAME:b_,ATTR_GEN_AI_TOOL_TYPE:F_,ATTR_GEN_AI_USAGE_INPUT_TOKENS:K_,ATTR_GEN_AI_USAGE_OUTPUT_TOKENS:W_,ATTR_HTTP_REQUEST_METHOD:O_,ATTR_HTTP_RESPONSE_STATUS_CODE:w,ATTR_SERVER_ADDRESS:a_,ATTR_SERVER_PORT:I_,ATTR_URL_FULL:i_,GEN_AI_OPERATION_NAME_VALUE_CHAT:j,GEN_AI_OPERATION_NAME_VALUE_CREATE_AGENT:l,GEN_AI_OPERATION_NAME_VALUE_EMBEDDINGS:U_,GEN_AI_OPERATION_NAME_VALUE_EXECUTE_TOOL:J,GEN_AI_OPERATION_NAME_VALUE_GENERATE_CONTENT:P_,GEN_AI_OPERATION_NAME_VALUE_INVOKE_AGENT:V,GEN_AI_OPERATION_NAME_VALUE_TEXT_COMPLETION:x_,GEN_AI_PROVIDER_NAME_VALUE_MISTRAL_AI:h};var Ee="mistralai_sdk";var oe=`${Ee}_tracer`;var Te="agent.trace.public";var Ae=()=>{try{if(typeof globalThis!=="undefined"&&"process"in globalThis){const _=globalThis.process;return _?.env?.["MISTRAL_SDK_DEBUG_TRACING"]?.toLowerCase()==="true"}}catch{}return false};var re=Ae();var ne="To see detailed tracing logs, set MISTRAL_SDK_DEBUG_TRACING=true.";var Q_={MISTRAL_AI_OCR_USAGE_PAGES_PROCESSED:"mistral_ai.ocr.usage.pages_processed",MISTRAL_AI_OCR_USAGE_DOC_SIZE_BYTES:"mistral_ai.ocr.usage.doc_size_bytes",MISTRAL_AI_ERROR_CODE:"mistral_ai.error.code"};var t_={FAILED_TO_CREATE_SPAN_FOR_REQUEST:"Failed to create span for request.",FAILED_TO_ENRICH_SPAN_WITH_RESPONSE:"Failed to enrich span with response.",FAILED_TO_HANDLE_ERROR_IN_SPAN:"Failed to handle error in span.",FAILED_TO_END_SPAN:"Failed to end span."};function __(_){return new Date(_).getTime()}function X_(_){if(_.includes("chat_completion")||_==="stream_chat"){return j}if((_.includes("agents_create")||_.includes("agents_update"))&&!_.includes("alias")){return l}if(_.includes("agents_completion")||_==="stream_agents"){return V}if(_.includes("conversations")&&(_.includes("start")||_.includes("append")||_.includes("restart"))){return V}if(_.includes("fim")){return x_}if(_.includes("embeddings")){return U_}if(_.includes("ocr_post")){return P_}return null}function dt(_){return X_(_)!==null}function mt(_){const e=_?.split(";")[0]?.trim().toLowerCase();return e==="application/json"||e==="text/json"||e?.endsWith("+json")===true}function j_(_,e){if(_===l||_===V){const E=e["name"];return E?`${_} ${E}`:_}if(_===J){const E=e["name"];return E?`${_} ${E}`:_}const t=e["model"];return t?`${_} ${t}`:_}function P(_,e){for(const[t,E]of Object.entries(e)){if(E!=null&&E!==""){_.setAttribute(t,E)}}}function J_(_){_.setAttribute(Te,"")}function se(_,e,t,E){let o=e.port?parseInt(e.port,10):-1;if(o===-1){if(e.protocol==="https:"){o=443}else if(e.protocol==="http:"){o=80}}_.setAttributes({[O_]:t,[i_]:e.toString(),[a_]:E,[I_]:o})}function ce(_,e,t){_.updateName(j_(e,t));const E={[D_]:t["n"],[M_]:t["encoding_formats"],[l_]:t["frequency_penalty"],[V_]:t["max_tokens"],[Z]:t["model"],[u_]:t["presence_penalty"],[d_]:t["random_seed"],[m_]:t["stop"],[G_]:t["temperature"],[Y_]:t["top_p"],[g_]:t["top_k"]};const o=t["messages"]||t["inputs"];if(typeof o==="string"){E[X]=JSON.stringify([k_({role:"user",content:o})])}else if(Array.isArray(o)){E[X]=JSON.stringify(o.map(A=>k_(A)))}const T=t["tools"];if(T){const A=T.map(r=>Mt(r)).filter(r=>r!==null);if(A.length>0){E[v_]=JSON.stringify(A)}}P(_,E)}function Se(_,e,t,E,o,T){se(_,t,E,o);const A=X_(e);if(A===null){return _}_.setAttributes({[Y]:A,[f]:h});if(T){try{const r=JSON.parse(T);ce(_,A,r)}catch{}}return _}function Re(_,e,t){const E={};if(e!==l){E[z]=t["id"]}E[$]=t["model"];const o=t["choices"]||[];const T=o.map(r=>r["finish_reason"]).filter(r=>!!r);if(T.length>0){E[f_]=T}if(o.length>0){E[q]=JSON.stringify(o.map(r=>w_(r)))}const A=t["usage"];if(A){E[K_]=A["prompt_tokens"]||0;E[W_]=A["completion_tokens"]||0}P(_,E)}function pe(_,e){const t={[L_]:e["description"],[Q]:e["id"],[C_]:e["name"],"gen_ai.agent.version":String(e["version"]),[Z]:e["model"],[h_]:e["instructions"]};P(_,t)}function ut(_){if(typeof _==="string"){return _}if(_){return JSON.stringify(_)}return null}function Ne(_,e,t){const E=__(t["created_at"]);const o=__(t["completed_at"]);const T=J;const A=j_(T,t);const r=_.startSpan(A,{startTime:E},e);J_(r);const n=t["arguments"];const s=t["info"];const c={[Y]:T,[f]:h,[H_]:t["id"],[B_]:ut(n),[y_]:ut(s),[b_]:t["name"],[F_]:"extension"};P(r,c);r.end(o)}function Oe(_,e,t){const E=__(t["created_at"]);const o=__(t["completed_at"]);const T=j;const A=j_(T,t);const r=_.startSpan(A,{startTime:E},e);J_(r);const n={message:t,finish_reason:t["finish_reason"]||""};const s={[Y]:T,[f]:h,[z]:t["id"],[Q]:t["agent_id"],[$]:t["model"],[q]:JSON.stringify([w_(n)])};P(r,s);r.end(o)}function ae(_,e,t){const E={[g]:t["conversation_id"]};P(e,E);const o=t["outputs"]||[];const T=M.setSpan(D.active(),e);for(const A of o){const r=A["type"];if(!r)continue;if(r==="function.call"){continue}if(r==="tool.execution"){Ne(_,T,A)}else if(r==="message.output"){Oe(_,T,A)}}}function Ie(_,e){const t=e["usage_info"];if(!t)return;const E={[Q_.MISTRAL_AI_OCR_USAGE_PAGES_PROCESSED]:t["pages_processed"],[Q_.MISTRAL_AI_OCR_USAGE_DOC_SIZE_BYTES]:t["doc_size_bytes"]};P(_,E)}function Gt(_,e,t,E){const o=X_(t);if(o===null){return}Re(e,o,E);if(o===l){pe(e,E)}else if(o===V){ae(_,e,E)}if(t==="ocr_v1_ocr_post"){Ie(e,E)}}function ie(_,e={}){const t=_??(e.useRegisteredProvider===false?void 0:E_())??M.getTracerProvider();return t.getTracer(oe)}function So(_){return M.setSpan(D.active(),_)}function Ro(_,e){return D.with(_,e)}async function po(_,e){const t=M.getSpan(_);if(t){await Ue(t,null,e)}}function H(_,e){if(re){console.warn(_,e)}else{console.warn(_,ne)}}async function No(_,e,t){const E=_.startSpan(e);if(!E.isRecording()){return{request:t,span:E,body:null}}try{J_(E);const o=k.getBaggage(D.active());const T=o?.getEntry(g)?.value;if(T){E.setAttribute(g,T)}let A=null;if(t.body&&dt(e)&&mt(t.headers.get("content-type"))){try{const S=t.clone();A=await S.text()}catch{}}const r=new Headers(t.headers);const n={};k.inject(M.setSpan(D.active(),E),n);for(const[S,p]of Object.entries(n)){r.set(S,p)}const s=new Request(t,{headers:r});const c=new URL(t.url);Se(E,e,c,t.method,r.get("host")||c.host,A);return{request:s,span:E,body:A}}catch(o){H(t_.FAILED_TO_CREATE_SPAN_FOR_REQUEST,o);try{E.end()}catch{}return{request:t,span:E,body:null}}}async function Oo(_,e,t,E){if(!e.isRecording()){return E}try{e.setStatus({code:x.OK});e.setAttribute(w,E.status);const o=dt(t);const T=E.headers.get("content-type");const A=o&&!E.bodyUsed&&T?.toLowerCase().includes("text/event-stream")===true;if(A&&E.body){return Le(E,e,_,t)}if(o&&!E.bodyUsed&&mt(T)){const r=E.clone();try{const n=await r.json();Gt(_,e,t,n)}catch{}}B(e);return E}catch(o){H(t_.FAILED_TO_ENRICH_SPAN_WITH_RESPONSE,o);B(e);return E}}function Le(_,e,t,E){const o=_.body;const T=[];const A=new TextDecoder;const r=o.getReader();let n=false;const s=()=>{if(n){return}const S=A.decode();if(S){T.push(S)}n=true;Ce(T,e,t,E)};const c=new ReadableStream({async pull(S){try{const{done:p,value:N}=await r.read();if(p){s();S.close();return}T.push(A.decode(N,{stream:true}));S.enqueue(N)}catch(p){s();S.error(p);try{await r.cancel(p)}catch{}}},async cancel(S){s();await r.cancel(S)}},{highWaterMark:0});return new Response(c,{status:_.status,statusText:_.statusText,headers:_.headers})}function Ce(_,e,t,E){try{const o=_.join("");const T=lt(o);if(T.length>0){const A=Vt(T);Gt(t,e,E,A)}}catch(o){H("Failed to enrich span with streaming response.",o)}B(e)}async function Ue(_,e,t){if(!_.isRecording()){return{response:e,error:t}}try{if(t){_.recordException(t);_.setStatus({code:x.ERROR,message:String(t)})}if(!e){B(_);return{response:e,error:t}}try{const E=await e.clone().json();const o=E;if(o["object"]==="error"){const T=o["message"]||"";const A=o["type"]||"";if(T){_.setStatus({code:x.ERROR,message:T});_.addEvent("exception",{"exception.type":A||"api_error","exception.message":T});const r={[w]:e.status};if(A){r[N_]=A}if(o["code"]){r[Q_.MISTRAL_AI_ERROR_CODE]=o["code"]}P(_,r)}}}catch{}B(_)}catch(E){H(t_.FAILED_TO_HANDLE_ERROR_IN_SPAN,E);try{_.end()}catch{}}return{response:e,error:t}}function B(_){try{_.end()}catch(e){H(t_.FAILED_TO_END_SPAN,e)}}async function ao(_,e){const t=ie();const E=t.startSpan(_);try{return await e(E)}finally{E.end()}}export{M as a,co as b,Ee as c,oe as d,Q_ as e,t_ as f,Se as g,Gt as h,ie as i,So as j,Ro as k,po as l,No as m,Oo as n,Ue as o,ao as p};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __alran_cR } from "module"; import { basename as __alran_basename, dirname as __alran_dirname, join as __alran_join } from "path"; import { fileURLToPath as __alran_fileURLToPath, pathToFileURL as __alran_pathToFileURL } from "url"; const __alran_tuiCurrentModuleDir = __alran_dirname(__alran_fileURLToPath(import.meta.url)); const __alran_tuiPackageRoot = __alran_basename(__alran_tuiCurrentModuleDir) === "chunks" ? __alran_dirname(__alran_tuiCurrentModuleDir) : __alran_tuiCurrentModuleDir; const __alran_tuiPackageEntryUrl = __alran_pathToFileURL(__alran_join(__alran_tuiPackageRoot, "cli.js")).href; const require = __alran_cR(__alran_tuiPackageEntryUrl); const __dirname = __alran_tuiPackageRoot;
|
|
2
|
+
import{i as n,j as i,k as r,t as a,u as o}from"./chunk-5RIMHTEU.js";function p(t){const e=n({dataDir:t.dataDir,buildEnv:t.buildEnv,region:t.region});const u=t.oauthClient??l(t.oauthEndpoints);const h=o({authHome:e.namespaceHome});return new a({namespace:e,oauthClient:u,credentialStore:h,initialize:()=>i(e)})}function l(t){if(!t){throw new TypeError("Shared Alran OAuth requires explicit device authorization, token, and revocation endpoints.")}return new r(t)}export{p as a};
|