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
|
@@ -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,b}from"./chunk-G5MOGPZ3.js";import"./chunk-GP52JZMY.js";import"./chunk-QPGTKSIQ.js";import"./chunk-BQ3CF3KE.js";import"./chunk-MPQ6G7LH.js";import"./chunk-LU4RPLJ3.js";import"./chunk-2TF6JAQM.js";import"./chunk-AGUSPIUP.js";import"./chunk-PXH4SBCS.js";import"./chunk-U3RMPDXU.js";import"./chunk-XLVABFJC.js";import"./chunk-UJCAE7SG.js";import"./chunk-3GGKARES.js";import"./chunk-DFMYLGVU.js";import"./chunk-IC6A323Q.js";import"./chunk-4CN3IJFH.js";import"./chunk-F46IELF5.js";import"./chunk-JSTSFMGK.js";import"./chunk-VGKKKM2W.js";import"./chunk-WHD2XVT2.js";import"./chunk-LCC45PCZ.js";import"./chunk-N6W7ZL26.js";import"./chunk-NVPGGFT3.js";import"./chunk-QKBN5CGI.js";import"./chunk-NMKRNU5O.js";import"./chunk-W5ZOLW7T.js";import"./chunk-3AODGLMF.js";import"./chunk-VLXX22YO.js";import"./chunk-7XYOYZX2.js";import"./chunk-5DQTVSQV.js";import"./chunk-2AYWJZ72.js";import"./chunk-R44C5DM6.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 createTuiRuntime,b as shutdownTuiRuntime};
|
|
@@ -1,5 +1,5 @@
|
|
|
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 as j,b as L,c as h,d as M,f as B}from"./chunk-
|
|
2
|
+
import{a as j,b as L,c as h,d as M,f as w,h as B}from"./chunk-V2SB4U4D.js";import{a as T,b as U}from"./chunk-N5NTXCJI.js";import{a as P,b as I,c as u,h as N,j as _,k,l as A,m as q,n as C}from"./chunk-EJN3SE5B.js";import{h as F}from"./chunk-LU4RPLJ3.js";import"./chunk-AGUSPIUP.js";import{u as D}from"./chunk-U4PFHJ7Z.js";import{b as $}from"./chunk-MUXNNOSQ.js";import"./chunk-5DQTVSQV.js";import"./chunk-6UXSIWCB.js";import{x as E,z as O}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";import{resolve as fe}from"node:path";var re=new Set(["git","changes","projects"]);function J(e,n={}){const i=e.argument("[prompt]","task to execute in the interactive TUI").addOption(new u("-m, --model <provider/model>","select the model for this Session only")).addOption(new u("--lane <lane>","managed backend lane for test or staging builds")).addOption(new u("--session [id]","open a Session by id, or browse Sessions when id is omitted")).addOption(new u("-c, --continue","continue the latest Session in the current workspace")).addOption(new u("--tui-mode <mode>","TUI mode: regular (default) or fullscreen").argParser(ie)).addOption(new u("--mode <mode>","Context mode: standard (default) or lightweight").argParser(K)).addOption(new u("--ptc","use Programmatic Tool Calling (run_code) for Sessions this process creates or compacts; config.yaml is unchanged")).addOption(new u("--resume <id>").hideHelp());k(i).allowExcessArguments(false).showHelpAfterError();if(n.allowStartupEnvironmentSelection){i.addOption(new u("--env <environment>","startup environment for the internal package: test, staging (pre), or prod").argParser(ae))}return i}function V(e,n){if(e&&re.has(e)){throw new Error("too many arguments")}const i=typeof n.session==="string"?n.session.trim():void 0;const r=n.resume?.trim();const a=n.session===true;const d=[Boolean(i||a),Boolean(r),n.continue===true].filter(Boolean).length;if(d>1){throw new Error("--session, --continue, and --resume cannot be combined")}if(n.mode==="lightweight"&&(i||r||a||n.continue)){throw new Error("--mode lightweight requires a new Session")}const o=i||r;const l=n.model?.trim();if(n.model!==void 0){N(l??"");if(a){throw new Error("--model requires a Session id with --session; use --session <id> or --continue.")}}const m=C(n);return{...e?{initialPrompt:e}:{},...l?{model:l}:{},...o?{sessionId:o}:{},...a?{showSessionPicker:true}:{},...n.continue?{continueLatestSession:true}:{},...n.tuiMode?{tuiMode:n.tuiMode}:{},...n.mode==="lightweight"?{contextMode:"lightweight"}:{},...n.ptc===true?{ptc:true}:{},...n.lane?{lane:n.lane}:{},...m?{systemPromptOverrides:m}:{}}}function H(e){const n=e.argument("[prompt]","task to execute").addOption(new u("--input <source>",'read explicit input; only "-" is supported')).addOption(new u("--input-format <format>","input format: text or json").default("text")).addOption(new u("--cwd <path>","workspace directory")).addOption(new u("--file <path>","attach a file (repeatable)").argParser(se).default([])).addOption(new u("--model <provider/model>","override the model for this Run only")).addOption(new u("--effort <level>","override the reasoning effort for this Run only")).addOption(new u("--mode <mode>","Context mode: standard (default) or lightweight").argParser(K)).addOption(new u("--prompt-mode <mode>","Prompt mode: tui, coding, or work").choices(["tui","coding","work"]).default("tui")).addOption(new u("--session <id>","run in an existing active Session")).addOption(new u("--continue","continue the latest active Session in --cwd")).addOption(new u("--ptc","use Programmatic Tool Calling (run_code) for Sessions this process creates or compacts; config.yaml is unchanged")).addOption(new u("--config <path>","use an explicit Runtime config file for this process")).addOption(new u("--permission <policy>","permission policy: smart, full, or off (ask requires TUI/ACP)").default("smart")).addOption(new u("--timeout <duration>","Run timeout, for example 30s or 2m")).addOption(new u("--max-steps <count>","maximum assistant steps")).addOption(new u("--output-format <format>","output format: text, json, or stream-json")).addOption(new u("--diagnostics-dir <path>","save bounded execution diagnostics to a fresh directory")).addOption(new u("--output-schema <schema>","JSON Schema file or inline object for the final answer")).addOption(new u("-o, --output-last-message <path>","write the final agent message to a file"));return k(n)}function z(e){const n=e.addOption(new u("--cwd <path>","workspace directory")).addOption(new u("--model <provider/model>","override the model for this Run only")).addOption(new u("--effort <level>","override the reasoning effort for this Run only")).addOption(new u("--config <path>","use an explicit Runtime config file for this process")).addOption(new u("--permission <policy>","permission policy: smart, full, or off (ask requires TUI/ACP)").default("smart")).addOption(new u("--timeout <duration>","Run timeout, for example 30s or 2m")).addOption(new u("--max-steps <count>","maximum assistant steps")).addOption(new u("--output-format <format>","output format: text, json, or stream-json")).addOption(new u("-o, --output-last-message <path>","write the final review result to a file"));return k(n).allowExcessArguments(false).showHelpAfterError()}function ie(e){if(e==="regular"||e==="fullscreen")return e;throw new P("TUI mode must be regular or fullscreen")}function K(e){if(e==="standard"||e==="lightweight")return e;throw new P("mode must be standard or lightweight")}function ae(e){try{return E(e)}catch(n){throw new P(n instanceof Error?n.message:String(n))}}function se(e,n){return[...n,e]}var le=w.hex("#FF8C00");var ue=20;var de="\x1B[2J";var ce="\x1B[H";var R="\x1B[?25h";function me(e,n,i){let r=le;if(e==="sleep")r=w.hex("#555555");if(e==="dance"){const c=[w.hex("#FF00FF"),w.hex("#00FFFF"),w.hex("#FFFF00"),w.hex("#00FF00")];r=c[Math.floor(i/5)%c.length]}else if(n>0){r=w.cyan}const a=()=>{if(e==="sleep")return"- -";if(e==="dance")return w.magenta("\u266A \u266A");if(n>2)return w.yellow("O O");return"\u25D5 \u25D5"};const d=a();let o;if(e==="sleep"){const c=i%6===0?"z":" ";const p=i%6===2?"Z":" ";const v=i%6===4?"z":" ";o=[r(` \u256D\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E ${v} `),r(" \u2502 ")+d+r(" \u2502 ")+w.blue(`${p}`),r(" \u2570\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u256F")+w.blue(` ${c} `),r(" \u2571 \u2572 ")]}else if(e==="dance"){const c=Math.floor(i/5)%2===0?"\\":"/";const p=Math.floor(i/5)%2===0?"/":"\\";const v=Math.floor(i/5)%2===0?"\u2571":"\u2572";const g=Math.floor(i/5)%2===0?"\u2572":"\u2571";o=[r(` ${c}\u256D\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E${p} `),r(" \u2502 ")+d+r(" \u2502 "),r(" \u2570\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u256F "),r(` ${v} ${g} `)]}else{o=[r(" \u256D\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E "),r(" \u2502 ")+d+r(" \u2502 "),r(" \u2570\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u256F "),r(" \u2571 \u2572 ")]}const l=[];const m=e==="sleep"?8:Math.max(0,8-n);const y=e==="sleep"?0:n;for(let c=0;c<m;c++)l.push("");for(const c of o)l.push(" ".repeat(ue)+c);for(let c=0;c<y;c++)l.push("");return l}function pe(e={}){const n=e.frameIntervalMs??50;let i="idle";let r=0;let a=0;let d=0;let o="";let l=true;let m=false;let y=false;function c(){l=false;process.stdout.write(R);if(m){try{process.stdin.setRawMode(false)}catch{}}if(!y){process.stdin.pause()}}function p(){if(!l)return;const b=me(i,r,d);process.stdout.write(de+ce);process.stdout.write(`${b.join("\n")}
|
|
3
3
|
`);process.stdout.write(w.dim("Alran Mascot \u2014 dr\xFCcke q zum Beenden. Befehle: jump, dance, sleep\n"))}function v(){if(!l)return;d++;if(i!=="sleep"){if(r>0||a>0){r+=a;a-=1}if(r<=0&&a<0){r=0;a=0;if(i==="dance"){setTimeout(()=>{if(l&&i==="dance"){a=5;r=1}},50)}}}p()}const g=setInterval(v,n);g.unref?.();p();if(process.stdin.isTTY){try{process.stdin.setRawMode(true);m=true}catch{}process.stdin.resume();y=false;process.stdin.setEncoding("utf8");process.stdin.on("data",b=>{if(!l)return;for(const t of b){if(t===""||t==="q"){c();clearInterval(g);process.stdout.write("\n");process.exit(0);return}if(t==="\r"||t==="\n"){o="";continue}if(t>=" "&&t<="~"){o+=t.toLowerCase();if(o.length>20){o=o.slice(-20)}if(o.includes("jump")){i="jump";a=6;r=1;o=""}else if(o.includes("dance")){i="dance";a=5;r=1;o=""}else if(o.includes("sleep")){i="sleep";o=""}}}})}process.on("SIGINT",()=>{c();clearInterval(g);process.stdout.write(`${R}
|
|
4
4
|
`);process.exit(0)});process.on("SIGTERM",()=>{c();clearInterval(g);process.stdout.write(`${R}
|
|
5
5
|
`);process.exit(0)})}function G(e){e.command("mascot").description("Show the animated Alran mascot bot").allowExcessArguments(false).action(()=>{pe()})}function ne(e){let n;const i=t=>({...t,...n?{lane:n}:{}});const r=t=>n?Q(e)(t,n):Q(e)(t);const a=t=>n?Y(e)(t,n):Y(e)(t);const d=t=>n?Z(e)(t,n):Z(e)(t);const o=J(new I().name("alran").description("Alran Code \u2014 terminal coding agent").version(e.version).enablePositionalOptions(),{allowStartupEnvironmentSelection:e.allowStartupEnvironmentSelection}).action((t,s)=>e.launchTui(i(V(t,s))));o.hook("preAction",(t,s)=>{q(s);n=(e.resolveLane??O)(o.opts().lane)});o.command("init").description("Analyze the codebase and generate AGENTS.md with the Runtime init Skill").argument("[directory]","project directory",".").action(t=>e.launchTui(i({initialPrompt:"/init",workspaceDir:fe(t)})));const l=o.command("exec").description("Run one prompt without starting the TUI");H(l).action((t,s)=>{const f=A(l,s);return n?e.runExec(t,f,n):e.runExec(t,f)});z(l.command("review").description("Review staged, unstaged, and untracked local changes")).action((t,s)=>{const f=A(s,ge(l,s));return n?e.runExec(void 0,f,n):e.runExec(void 0,f)});const m=k(o.command("acp").description("Run Alran Code as an Agent Client Protocol server over stdio")).allowExcessArguments(false).action((t,s)=>{const f=Pe(e);const S=C(A(s,t));if(S)return f(n,S);return n?f(n):f()});m.command("login").description("Connect to the Ottili AI Platform").option("--no-browser","print the sign-in page URL without opening a browser").allowExcessArguments(false).action(t=>n?e.runLogin(void 0,t.browser!==false,n):e.runLogin(void 0,t.browser!==false));o.command("login").description("Connect Alran Code to the Ottili AI Platform").option("--no-browser","print the sign-in page URL without opening a browser").option("--provider <provider>","login provider: api-key, keycloak or platform",t=>{if(t==="api-key"||t==="keycloak"||t==="platform")return t;throw new P('expected "api-key", "keycloak" or "platform"')},"platform").option("--platform-env <env>","Platform environment: dev (local Platform) or prod (ottili.one); defaults to the build environment",t=>{if(t==="dev"||t==="prod")return t;throw new P('expected "dev" or "prod"')}).argument("[provider]","login provider: api-key, keycloak or platform").argument("[platform-env]","Platform environment: dev (local Platform) or prod (ottili.one); defaults to the build environment").allowExcessArguments(false).action((t,s,f)=>{const S=t??f.provider??"platform";const x=s??f.platformEnv;return n?e.runLogin(void 0,f.browser!==false,n,S,x):e.runLogin(void 0,f.browser!==false,void 0,S,x)});o.command("logout").description("Sign out: revoke the session at the Ottili Platform and remove local credentials").allowExcessArguments(false).action(()=>e.runLogout());o.command("update").description("Check for and install an Alran Code update").option("--source <url>","self-hosted release source (signed manifests); default: npm or the Ottili release host").allowExcessArguments(false).action(t=>{if(t.source)process.env.ALRAN_UPDATE_SOURCE=t.source;return e.runUpdate()});const y=o.command("telemetry").description("Inspect anonymous TUI usage reporting");y.command("status").description("Show whether usage reporting is enabled and why").allowExcessArguments(false).action(()=>X(e)("status"));y.command("preview").description("Show a representative decoded request without sending it").allowExcessArguments(false).action(()=>X(e)("preview"));const c=o.command("provider").description("Manage model providers and API keys").allowExcessArguments(false).action(()=>e.launchTui(i({initialPrompt:"/provider"})));c.command("list").description("List configured providers").option("--json","print a JSON document").action(t=>r({action:"list",json:t.json}));c.command("add").description("Add a custom provider").requiredOption("--name <name>","provider display name").requiredOption("--base-url <url>","provider API base URL").option("--api-format <format>",T.join(", "),ve,"anthropic-messages").option("--model <id>","model ID (repeatable)",ye,[]).option("--api-key-env <name>","environment variable containing the API key").option("--context-limit <tokens>","context limit for every listed model",ee).option("--output-limit <tokens>","output limit for every listed model",ee).option("--support-image","declare image input support for every listed model").option("--use","test the first model, then save and select it as the default").action(t=>{if(t.model.length===0){throw new Error("At least one --model <id> is required.")}return r({action:"add",name:t.name,baseUrl:t.baseUrl,apiFormat:t.apiFormat,models:t.model,contextLimit:t.contextLimit,outputLimit:t.outputLimit,supportImage:t.supportImage,apiKeyEnv:t.apiKeyEnv,saveAndUse:t.use})});c.command("remove").description("Remove a custom provider").argument("<provider-id>","custom_provider:<id>").option("--yes","confirm removal").action((t,s)=>r({action:"remove",providerId:t,confirmed:Boolean(s.yes)}));c.command("test").description("Test a provider or one configured model").argument("<provider-id>","provider id").option("--model <id>","test one model").option("--json","print a JSON document").action((t,s)=>r({action:"test",providerId:t,modelId:s.model,json:s.json}));c.command("use").description("Choose the Alran credential source").argument("<source>","token-plan or api-key",we).action(t=>r({action:"use",source:t}));c.command("set-alran-key").description("Save and use a Alran API key").option("--api-key-env <name>","environment variable containing the API key").action(t=>r({action:"set-alran-key",apiKeyEnv:t.apiKeyEnv}));const p=o.command("plugin").alias("plugins").description("Browse, install and manage Alran Code Plugins (the Plugin Store)").allowExcessArguments(false).action(()=>e.launchTui(i({initialPrompt:"/plugin"})));p.command("search").description("Search the Plugin Store").argument("[query...]","words to look for in names and descriptions").option("--refresh","ask the stores again instead of using the cached index").option("--json","print a JSON document").action((t,s)=>a({action:"search",...t.length?{query:t.join(" ")}:{},refresh:s.refresh,json:s.json}));p.command("info").description("Show what a Plugin contains before installing it").argument("<plugin[@store]>","Plugin name").option("--json","print a JSON document").action((t,s)=>a({action:"info",selector:t,json:s.json}));p.command("update").description("Update installed Plugins from their store").argument("[plugin[@store]]","Plugin name (default: every Plugin with an update)").option("-y, --yes","approve Plugins that run commands without asking").option("--json","print a JSON document").action((t,s)=>a({action:"update",...t?{selector:t}:{},yes:s.yes,json:s.json}));p.command("list").description("List installed or available Plugins").option("-m, --marketplace <marketplace>","official or local",W).option("--available","include uninstalled Plugins").option("--json","print a JSON document").action(t=>a({action:"list",marketplace:t.marketplace,available:t.available,json:t.json}));for(const t of["add","remove","enable","disable"]){const s=p.command(t);if(t==="add")s.alias("install");s.description(`${he(t)} a Plugin`).argument("<plugin[@store|@official|@local]>","Plugin selector").option("-m, --marketplace <marketplace>","official or local",W).option("-y, --yes","approve a Plugin that runs commands without asking (install)").option("--json","print a JSON document").action((f,S)=>a({action:t,selector:f,marketplace:S.marketplace,yes:S.yes,json:S.json}))}const v=p.command("marketplace").description("List, add, remove or refresh the stores and folders Plugins come from");v.command("add").description("Add a store (an https URL, a file path or a Git-hosted index.json)").argument("<url>","location of the store (a directory or index.json URL)").option("--name <name>","short name to select its packages with, e.g. name@store").option("--json","print a JSON document").action((t,s)=>a({action:"marketplace-add",url:t,...s.name?{name:s.name}:{},json:s.json}));v.command("remove").description("Remove a store you added; its installed packages stay").argument("<name>","store name from `alran plugin marketplace list`").option("--json","print a JSON document").action((t,s)=>a({action:"marketplace-remove",name:t,json:s.json}));v.command("list").description("List Plugin sources").option("--json","print a JSON document").action(t=>a({action:"marketplace-list",json:t.json}));v.command("upgrade").description("Refresh all Plugin source snapshots").option("--json","print a JSON document").action(t=>a({action:"marketplace-upgrade",json:t.json}));const g=o.command("skills").alias("skill").description("Browse, install and update Skills (the Skill Library)").allowExcessArguments(false).action(()=>e.launchTui(i({initialPrompt:"/skills library"})));g.command("list").description("List the Skills of the library, by group").option("--installed","only Skills that are installed").option("--json","print a JSON document").action(t=>d({action:"list",installed:t.installed,json:t.json}));g.command("search").description("Search the Skill Library").argument("[query...]","words to look for in names and descriptions").option("--refresh","ask the stores again instead of using the cached index").option("--json","print a JSON document").action((t,s)=>d({action:"search",...t.length?{query:t.join(" ")}:{},refresh:s.refresh,json:s.json}));g.command("info").description("Show what a Skill is for before installing it").argument("<skill[@store]>","Skill name").option("--json","print a JSON document").action((t,s)=>d({action:"info",selector:t,json:s.json}));g.command("add").alias("install").description("Install a Skill from the library").argument("<skill[@store]>","Skill name").option("--json","print a JSON document").action((t,s)=>d({action:"add",selector:t,json:s.json}));g.command("update").description("Update installed Skills from their store").argument("[skill[@store]]","Skill name (default: every Skill with an update)").option("--json","print a JSON document").action((t,s)=>d({action:"update",...t?{selector:t}:{},json:s.json}));g.command("remove").alias("uninstall").description("Remove a Skill the library installed").argument("<skill[@store]>","Skill name").option("--json","print a JSON document").action((t,s)=>d({action:"remove",selector:t,json:s.json}));const b=new M;b.registerAll(e.commandContributions??[]);for(const t of b.freeze()){if(o.commands.some(s=>s.name()===t.name)){throw new Error(`Duplicate CLI command name: ${t.name}`)}t.register(o,e)}G(o);D(o,void 0,e.version);return o}function ge(e,n){const i={...n.opts(),review:true};const r=new Set(n.options.map(a=>a.attributeName()));for(const a of e.options){const d=a.attributeName();if(e.getOptionValueSource(d)!=="cli")continue;if(!r.has(d)){n.error(`error: option '${a.long}' is not supported by 'exec review'`,{code:"commander.unknownOption"})}if(_.has(d))continue;if(n.getOptionValueSource(d)!=="cli"){Object.assign(i,{[d]:e.getOptionValue(d)})}}return i}function ye(e,n){return[...n,e]}function ve(e){if(U(e))return e;throw new P(`expected one of: ${T.join(", ")}`)}function we(e){if(e==="token-plan")return"token_plan";if(e==="api-key")return"alran_api_key";throw new P('expected "token-plan" or "api-key"')}function W(e){const n=e.trim().toLocaleLowerCase();if(n==="official"||n==="local")return n;throw new P('expected "official" or "local"')}function he(e){if(e==="add")return"Install";if(e==="remove")return"Uninstall";return e==="enable"?"Enable":"Disable"}function Q(e){if(!e.runProvider)throw new Error("Provider management is unavailable.");return e.runProvider}function Y(e){if(!e.runPlugin)throw new Error("Plugin management is unavailable.");return e.runPlugin}function Z(e){if(!e.runSkills)throw new Error("Skill management is unavailable.");return e.runSkills}function Pe(e){if(!e.runAcp)throw new Error("ACP server is unavailable.");return e.runAcp}function X(e){if(!e.runTelemetry)throw new Error("Telemetry inspection is unavailable.");return e.runTelemetry}function ee(e){const n=Number(e);if(!Number.isSafeInteger(n)||n<=0){throw new P("expected a positive safe integer")}return n}var te=250;var Se="alran-code";async function nn(e={}){const n=e.processRef??process;n.title=Se;const i=B(n.env);const r=e.supportsNodeVersion??(d=>L(d));if(!r(n.versions.node)){n.stderr.write(`Alran Code supports Node.js ${j}; current version is ${n.versions.node}.
|
|
@@ -10,4 +10,4 @@ import{a as j,b as L,c as h,d as M,f as B}from"./chunk-GRXX6I72.js";import{a as
|
|
|
10
10
|
`);a="natural"},runPlugin:async(o,l)=>{const m=e.runPlugin??Oe;n.stdout.write(`${await m(o,h,l)}
|
|
11
11
|
`);a="natural"},runSkills:async o=>{const l=e.runSkills??je;n.stdout.write(`${await l(o)}
|
|
12
12
|
`);a="natural"},runTelemetry:async o=>{const l=e.runTelemetry??Le;n.stdout.write(await l(o,h,n.env));a="natural"}}).parseAsync(n.argv,{from:"node"});if(a){const o=typeof n.exitCode==="number"?n.exitCode:0;await Promise.all([oe(n.stdout,e.outputDrainTimeoutMs??te),oe(n.stderr,e.outputDrainTimeoutMs??te)]);if((e.platform??process.platform)==="win32"&&a==="natural"){n.exitCode=o}else{n.exit(o)}}}catch(d){n.stderr.write(`${await be(d)}
|
|
13
|
-
`);n.exitCode=1}}async function be(e){const n=F(e);if(!/better[-_]sqlite3/iu.test(n)||!/Could not locate the bindings file|Cannot find (?:module|package)|NODE_MODULE_VERSION|Module did not self-register/iu.test(n)){return n}const{buildAlranPackageManagerCommand:i,resolveAlranNpmPrefixInstall:r}=await import("./install-source-
|
|
13
|
+
`);n.exitCode=1}}async function be(e){const n=F(e);if(!/better[-_]sqlite3/iu.test(n)||!/Could not locate the bindings file|Cannot find (?:module|package)|NODE_MODULE_VERSION|Module did not self-register/iu.test(n)){return n}const{buildAlranPackageManagerCommand:i,resolveAlranNpmPrefixInstall:r}=await import("./install-source-63OVVBMK.js");if(r()){return["Alran could not load its native SQLite dependency.","The Node runtime recorded by this installation no longer loads it (for example after a Homebrew Node upgrade).","Reinstall with the original installer to repair this installation.","",`Original error: ${n}`].join("\n")}const a=i("npm-global",h);return["Alran could not load its native SQLite dependency.","If npm reported blocked install scripts, the installation needs explicit script approval.","Reinstall with the original installer. For npm installations, run:",` ${a.display} --foreground-scripts`,"",`Original error: ${n}`].join("\n")}function oe(e,n){if(e.destroyed||e.writableEnded)return Promise.resolve();return new Promise(i=>{let r=false;let a;const d=()=>o(true);const o=(l=false)=>{if(r)return;r=true;if(a)clearTimeout(a);if(!l)e.off?.("error",d);i()};a=setTimeout(o,n);a.unref?.();e.once?.("error",d);try{e.write("",l=>o(Boolean(l)))}catch{o()}})}async function ke(e){const{launchTui:n}=await import("./launcher-2UG3JPYF.js");await n(e)}async function Ae(e,n,i){const{runTuiExecCommand:r}=await import("./run-exec-command-UXTPS7LC.js");await r(e,n,i)}async function Ce(e,n,i){const{runTuiAcpCommand:r}=await import("./run-acp-command-AKDLHKMR.js");await(i?r(e,{},n,i):r(e,{},n))}async function Te(e,n=true,i,r="platform",a){const{runTuiLogin:d}=await import("./auth-command-36RMNQZW.js");return d({region:e,openBrowser:n,lane:i,provider:r,platformEnv:a})}async function Re(e){const{defaultAccountCommandIo:n,runAuthLogout:i}=await import("./account-commands-GW7N3MYC.js");const r=n();await i({...r,out:()=>void 0});return"Logged out."}async function xe(e){const{runAlranUpdate:n}=await import("./update-ACFAGV6F.js");await n(e)}async function Ee(e,n,i){const{runAlranProviderCommand:r}=await import("./provider-command-UZ7KQFAC.js");return r({request:e,version:n,lane:i})}async function Oe(e,n,i){const{runAlranPluginCommand:r}=await import("./plugin-command-CIDTOPNB.js");return r({request:e,version:n,lane:i})}async function je(e){const{runAlranSkillCommand:n}=await import("./skills-command-57TF53NO.js");return n({request:e})}async function Le(e,n,i){const{runAlranTelemetryCommand:r}=await import("./telemetry-command-CMDERYNN.js");return r(e,n,{environment:i})}export{oe as drainTuiOutput,nn as runTuiCli};
|