openpond 0.2.6 → 0.2.8
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/README.md +2 -0
- package/dist/api/core.d.ts +2 -0
- package/dist/app-server.d.ts +2693 -0
- package/dist/app-server.js +2 -0
- package/dist/chunks/{actions-command-R5R3KR5Q.js → actions-command-V5DZWEON.js} +1 -1
- package/dist/chunks/{app-layer-JNSKATX7.js → app-layer-SFV6ZPKZ.js} +1 -1
- package/dist/chunks/app-server-runtime-OYF6XBVI.js +2 -0
- package/dist/chunks/{apps-3TXUNF65.js → apps-SR7CAM42.js} +1 -1
- package/dist/chunks/{chunk-OD6AGGH6.js → chunk-4LLHOG7L.js} +1 -1
- package/dist/chunks/{chunk-NWI7H753.js → chunk-5N6YRABR.js} +2 -2
- package/dist/chunks/{chunk-3NDRIQTI.js → chunk-73KFNV3D.js} +1 -1
- package/dist/chunks/chunk-B6IIGPWS.js +6 -0
- package/dist/chunks/chunk-BB6DJKXX.js +19 -0
- package/dist/chunks/chunk-DY5RF2YE.js +26 -0
- package/dist/chunks/{chunk-37V5TT45.js → chunk-EEBLJPIB.js} +1 -1
- package/dist/chunks/{chunk-CCJG7GLE.js → chunk-G2VYRU27.js} +1 -1
- package/dist/chunks/chunk-J2S7BOZU.js +12 -0
- package/dist/chunks/chunk-KRNLKKN6.js +5 -0
- package/dist/chunks/{chunk-2LADHICK.js → chunk-LLJI6QAY.js} +1 -1
- package/dist/chunks/{chunk-FYCJSUFV.js → chunk-NNLI4OWY.js} +1 -1
- package/dist/chunks/{chunk-U6HOHOOI.js → chunk-O4IARD7H.js} +1 -1
- package/dist/chunks/{chunk-ZKA3XSM7.js → chunk-QOR55VHT.js} +1 -1
- package/dist/chunks/{chunk-A42DFLOR.js → chunk-QWE3RHNY.js} +1 -1
- package/dist/chunks/{chunk-4HIHSG5M.js → chunk-S64WASAO.js} +1 -1
- package/dist/chunks/chunk-SS3EG6S2.js +2 -0
- package/dist/chunks/{chunk-EESJULVS.js → chunk-T2GNPVRY.js} +7 -3
- package/dist/chunks/{chunk-FESS4IR4.js → chunk-UW4XDFLU.js} +439 -343
- package/dist/chunks/chunk-UW6ES5DM.js +28 -0
- package/dist/chunks/{chunk-K35OOAW2.js → chunk-V4ACXLID.js} +1 -1
- package/dist/chunks/{chunk-3ZEV5UKA.js → chunk-VJBEK64H.js} +1 -1
- package/dist/chunks/{chunk-RWSAGQTP.js → chunk-Y7ZYJQGZ.js} +1 -1
- package/dist/chunks/cli-MS4KADND.js +2 -0
- package/dist/chunks/{configuration-command-54D6TOEV.js → configuration-command-EBN7RH3X.js} +1 -1
- package/dist/chunks/{continual-D75WA7E7.js → continual-OJYXVTIZ.js} +1 -1
- package/dist/chunks/{core-commands-F35UFIXE.js → core-commands-2S4UQPXW.js} +1 -1
- package/dist/chunks/{desktop-test-U2MMP2NE.js → desktop-test-WN7ZLQVQ.js} +1 -1
- package/dist/chunks/{dist-NKLXFA37.js → dist-UA2RQUA4.js} +1 -1
- package/dist/chunks/extension-ERM5EUUO.js +6 -0
- package/dist/chunks/{help-VGDW6SBX.js → help-N25BKIHM.js} +1 -1
- package/dist/chunks/{opchat-QK2KIHN3.js → opchat-V4A4WCND.js} +1 -1
- package/dist/chunks/{organizations-MUDOF6VM.js → organizations-TSOT7MDT.js} +1 -1
- package/dist/chunks/{profile-FW5COIFH.js → profile-3JQ3XM6Q.js} +1 -1
- package/dist/chunks/{project-agent-G6GJOIVI.js → project-agent-S76FWVPV.js} +1 -1
- package/dist/chunks/{sandbox-command-H7INTQJZ.js → sandbox-command-YQDGQBBQ.js} +1 -1
- package/dist/chunks/{sandbox-template-7MXJQ3X4.js → sandbox-template-GM2A3437.js} +1 -1
- package/dist/chunks/{src-E7WA3OPU.js → src-BC7WOVGF.js} +1 -1
- package/dist/chunks/src-S7XTFQ4V.js +319 -0
- package/dist/chunks/{teams-bot-ZDTMGPCU.js → teams-bot-M6QLZAHA.js} +1 -1
- package/dist/chunks/{workspaces-UB2HJGNE.js → workspaces-MJVCPH22.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/profile/local-profile.d.ts +7 -0
- package/dist/sandbox/sandbox-instance-client.d.ts +2 -1
- package/dist/sandbox/types/client.d.ts +2 -0
- package/dist/skills/openpond-agent-authoring/references/profile-layout.md +9 -0
- package/dist/web/assets/App-7h_oHCFd.css +1 -0
- package/dist/web/assets/App-Dx38Dhlo.js +176 -0
- package/dist/web/assets/{AppDialog-CtqbY289.js → AppDialog-DdWbnFnr.js} +1 -1
- package/dist/web/assets/AppTerminalPanel-BotH-2y4.js +2 -0
- package/dist/web/assets/{AppsView-BeGbrJkU.js → AppsView-B3ybXi71.js} +1 -1
- package/dist/web/assets/BrowserSidebar-CLE27mjT.js +1 -0
- package/dist/web/assets/{BrowserSidebar-D9i7gQzw.css → BrowserSidebar-lNqqj4Ip.css} +1 -1
- package/dist/web/assets/{CartesianChart-Cp_-LaJY.js → CartesianChart-SB3Jq3CQ.js} +1 -1
- package/dist/web/assets/{CollaborationTabs-BL6guh-3.js → CollaborationTabs-C3jO5y5v.js} +1 -1
- package/dist/web/assets/{CommandMenu-hNQCm8mw.css → CommandMenu-Cb3vNGJr.css} +1 -1
- package/dist/web/assets/{CommandMenu-B-DEtpTp.js → CommandMenu-DqtJane1.js} +1 -1
- package/dist/web/assets/{CommunityView-DaIS0cHw.css → CommunityView-CnZqWEjK.css} +1 -1
- package/dist/web/assets/{CommunityView-DcEhEMm_.js → CommunityView-Dg02tZmL.js} +1 -1
- package/dist/web/assets/{ComposerCreateImproveStrip-C4mCZcKl.js → ComposerCreateImproveStrip-BTJhG8aU.js} +1 -1
- package/dist/web/assets/{GetStartedView-BUlaCO6a.js → GetStartedView-BlyP6VY8.js} +1 -1
- package/dist/web/assets/HostedModelLearningReview-BwSAO9y6.js +1 -0
- package/dist/web/assets/HostedModelLearningSettings-CiY2K8Fz.js +1 -0
- package/dist/web/assets/{LabModelVersionDetailPage-Bb1XRvo_.js → LabModelVersionDetailPage-cE1kuSWk.js} +1 -1
- package/dist/web/assets/{LabSkillSidebar-CPucMztm.js → LabSkillSidebar-BrSa3H3m.js} +1 -1
- package/dist/web/assets/{LabsRoute-C_HDADl0.js → LabsRoute-CY7rB25U.js} +4 -4
- package/dist/web/assets/MainChatThread-BM8l-LiB.js +2 -0
- package/dist/web/assets/MainPane-CsAYR_EF.js +10 -0
- package/dist/web/assets/{MarkdownText-_zVYW4pN.js → MarkdownText-8GA7g1qR.js} +1 -1
- package/dist/web/assets/{Messages-DxctstDI.js → Messages-CX08x24k.js} +6 -6
- package/dist/web/assets/{NativeSkillSidebar-DV4AGiCD.js → NativeSkillSidebar-mSz4GlxA.js} +1 -1
- package/dist/web/assets/{NewExperienceSwitcher-CZCLJj99.js → NewExperienceSwitcher-CHAC2Zid.js} +1 -1
- package/dist/web/assets/{NewProjectDialog-CQSipZ5d.js → NewProjectDialog-5B17C6Vh.js} +1 -1
- package/dist/web/assets/{OutputsPage-aPJP4mTV.js → OutputsPage-27Gp1K5N.js} +1 -1
- package/dist/web/assets/{ProjectsPage-CyThuXQv.js → ProjectsPage-DJpPuKBP.js} +1 -1
- package/dist/web/assets/RightChatPanelStack-C_4rbc1i.js +1 -0
- package/dist/web/assets/{RightSidebarHomePanel-CtH0vZ36.js → RightSidebarHomePanel-PHndCapL.js} +1 -1
- package/dist/web/assets/{ScheduledWorkPage-BY_4jFm7.js → ScheduledWorkPage-CYQZ0Zal.js} +1 -1
- package/dist/web/assets/{SettingsView-ZPnupcpg.js → SettingsView-DQPMLKNH.js} +7 -7
- package/dist/web/assets/{TeamChatView-DWjwVxMp.js → TeamChatView-DRvqhiOV.js} +2 -2
- package/dist/web/assets/{TeamChatView-Br3VdxhD.css → TeamChatView-dL6B0qib.css} +1 -1
- package/dist/web/assets/{TerminalOverlay-DxuUGKYH.js → TerminalOverlay-C8FbaVVP.js} +1 -1
- package/dist/web/assets/{TrainingCreationPanel-CjIPEoTX.js → TrainingCreationPanel-BGsd95vF.js} +1 -1
- package/dist/web/assets/{TrainingDraftPanel-CxevAlkr.js → TrainingDraftPanel-Bm6j-IuS.js} +1 -1
- package/dist/web/assets/{UsageSettingsSection-CY1lQB_g.js → UsageSettingsSection-CTCDOE-_.js} +3 -3
- package/dist/web/assets/{WorkSidebarPanel-DMsiwOSi.js → WorkSidebarPanel-UaymQC_e.js} +1 -1
- package/dist/web/assets/WorkspaceDiffPanel-D6mKLQha.js +14 -0
- package/dist/web/assets/{WorkspaceEnvironmentMenu-7DSF_BpI.js → WorkspaceEnvironmentMenu-C4Uw5qMA.js} +3 -3
- package/dist/web/assets/{WorkspaceGitDialogs-Ck8BzH11.js → WorkspaceGitDialogs--t9VpTCT.js} +1 -1
- package/dist/web/assets/{WorkspaceMonacoEditor-gsEP4W37.js → WorkspaceMonacoEditor-CElU0vIN.js} +3 -3
- package/dist/web/assets/{arrow-up-right-BK6EpHpC.js → arrow-up-right-C0HJHPjq.js} +1 -1
- package/dist/web/assets/{chat-file-links-BQe708gU.js → chat-file-links-D5q1as_h.js} +1 -1
- package/dist/web/assets/chevron-up-B3Cyo8SJ.js +1 -0
- package/dist/web/assets/{clipboard-DOmCP7eR.js → clipboard-wiphvxrN.js} +1 -1
- package/dist/web/assets/{cloud-upload-DLtawDYW.js → cloud-upload-Bgm5_SSr.js} +1 -1
- package/dist/web/assets/{cssMode-C0Qw8i_8.js → cssMode-DudNT1l3.js} +1 -1
- package/dist/web/assets/{folder-open-B_Ayxxo8.js → folder-open-DLuZSDXn.js} +1 -1
- package/dist/web/assets/{folder-plus-CPgtt3pN.js → folder-plus-DXN0q9GR.js} +1 -1
- package/dist/web/assets/{git-commit-horizontal-23xCJjd8.js → git-commit-horizontal-CdiI4K5M.js} +1 -1
- package/dist/web/assets/{htmlMode-DuQ7zaau.js → htmlMode-B2sAXhgB.js} +1 -1
- package/dist/web/assets/index-C5EoPZr0.css +1 -0
- package/dist/web/assets/{index-BoaTQ0Rb.js → index-DSK9XSir.js} +2 -1
- package/dist/web/assets/{info-CQ2kJJ5E.js → info-DcmIP9D3.js} +1 -1
- package/dist/web/assets/{jsonMode-DVQSEPUy.js → jsonMode-aQlrpuz5.js} +1 -1
- package/dist/web/assets/{lspLanguageFeatures-DWKH3min.js → lspLanguageFeatures-BMskOvs7.js} +1 -1
- package/dist/web/assets/{minimize-2-1M-fFBeP.js → minimize-2-CvKd6Q_r.js} +1 -1
- package/dist/web/assets/{monaco.contribution-jXX7-l5p.js → monaco.contribution-BHv_qQG9.js} +2 -2
- package/dist/web/assets/{monaco.contribution-ytVV-s22.js → monaco.contribution-BSRllZgB.js} +2 -2
- package/dist/web/assets/{monaco.contribution-B5Jz7f4W.js → monaco.contribution-VS3RCwFP.js} +2 -2
- package/dist/web/assets/{monaco.contribution-DB7pp5Y-.js → monaco.contribution-tZUXzebU.js} +2 -2
- package/dist/web/assets/{play-D9jaK5MP.js → play-BzfQJMmu.js} +1 -1
- package/dist/web/assets/{python-_yRitN2I.js → python-Bm9eN64d.js} +1 -1
- package/dist/web/assets/{refresh-cw-DZHqZGos.js → refresh-cw-Cvy0BqFv.js} +1 -1
- package/dist/web/assets/{save-DOT3oYfU.js → save-miVdIz56.js} +1 -1
- package/dist/web/assets/{square-D_1V6onE.js → square-DlJ_-dur.js} +1 -1
- package/dist/web/assets/{toggleHighContrast-C06C-luq.js → toggleHighContrast-B8jte8Lm.js} +1 -1
- package/dist/web/assets/{tsMode-CTMYvh-R.js → tsMode-CmAPBzqb.js} +1 -1
- package/dist/web/assets/{upload-EAAHd0Nx.js → upload-C71OnfRd.js} +1 -1
- package/dist/web/assets/{useLocalAgentSchedules-DBsx4aIY.js → useLocalAgentSchedules-D9hDhAba.js} +1 -1
- package/dist/web/assets/{wifi-off-DYRTrfYa.js → wifi-off-DhI7P9WW.js} +1 -1
- package/dist/web/assets/{workers-DAytqxd3.js → workers-BDI2xQio.js} +1 -1
- package/dist/web/assets/{yaml-iZnWWABr.js → yaml-DNSpZj5_.js} +1 -1
- package/dist/web/index.html +2 -2
- package/package.json +6 -2
- package/dist/chunks/app-server-runtime-FV4KHBTY.js +0 -2
- package/dist/chunks/chunk-CWQWV2T3.js +0 -2
- package/dist/chunks/chunk-DUA3QP6Y.js +0 -19
- package/dist/chunks/chunk-K4QLUFGX.js +0 -5
- package/dist/chunks/chunk-KDXLNQNF.js +0 -12
- package/dist/chunks/chunk-LYWUCJTV.js +0 -28
- package/dist/chunks/chunk-QUW7WK32.js +0 -24
- package/dist/chunks/chunk-VYUMTRB3.js +0 -5
- package/dist/chunks/cli-ZZTJVJRT.js +0 -2
- package/dist/chunks/extension-WY2RL5ZH.js +0 -5
- package/dist/chunks/src-4QYE5G3N.js +0 -319
- package/dist/web/assets/App-DNZ5VhFd.js +0 -176
- package/dist/web/assets/AppTerminalPanel-C1U1RKU6.js +0 -2
- package/dist/web/assets/BrowserSidebar-XgQLeXw1.js +0 -1
- package/dist/web/assets/HostedModelLearningReview-CZyb95R_.js +0 -1
- package/dist/web/assets/HostedModelLearningSettings-D2o7rh0w.js +0 -1
- package/dist/web/assets/MainChatThread-CnXHxCy3.js +0 -2
- package/dist/web/assets/MainPane-DjnT-kvm.js +0 -8
- package/dist/web/assets/RightChatPanelStack-jsP9CukH.js +0 -1
- package/dist/web/assets/WorkspaceDiffPanel-HdfItqu2.js +0 -14
- package/dist/web/assets/chevron-up-CHxYR4AX.js +0 -1
- package/dist/web/assets/index-BGMzUaup.css +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
3
|
-
import{o as vt,p as St}from"./chunk-
|
|
3
|
+
import{o as vt,p as St}from"./chunk-LLJI6QAY.js";import{Fa as yt}from"./chunk-DY5RF2YE.js";import{j as pe,k as ht,m as me}from"./chunk-S64WASAO.js";import"./chunk-6MI4KKWF.js";import"./chunk-SDO4FC4Q.js";import"./chunk-IR3YJWPW.js";import"./chunk-J2S7BOZU.js";import"./chunk-UW6ES5DM.js";import"./chunk-6FA3GG5B.js";import{J as He,K as ee,M as pt,N as mt,Q as ft,T as gt}from"./chunk-NNLI4OWY.js";import"./chunk-HZP5U2AA.js";import"./chunk-ES2ISFJC.js";import{f as dt,h as ct}from"./chunk-H7IWJN7L.js";import{a as i}from"./chunk-FTQLQJQV.js";import{createInterface as oo}from"node:readline/promises";import{stdin as Fe,stdout as k}from"node:process";import{pathToFileURL as io}from"node:url";function ge(){return{text:"",cursor:0,history:[],historyIndex:null}}i(ge,"createComposer");function wt(e,t){let r=e.text.slice(0,e.cursor),n=e.text.slice(e.cursor);return{...e,text:`${r}${t}${n}`,cursor:e.cursor+t.length,historyIndex:null}}i(wt,"insertText");function fe(e,t){return{...e,text:t,cursor:t.length}}i(fe,"replaceComposerText");function Rr(e){let t=e.text.trim();return t?{state:{text:"",cursor:0,history:[...e.history.filter(r=>r!==t),t].slice(-100),historyIndex:null},action:{type:"submit",text:t}}:{state:{...e,text:"",cursor:0,historyIndex:null},action:{type:"none"}}}i(Rr,"submitComposer");function Tt(e,t){if(t==="ctrl+c")return{state:e,action:{type:"cancel-or-exit"}};if(t==="ctrl+d")return{state:e,action:e.text?{type:"none"}:{type:"exit"}};if(t==="ctrl+l")return{state:e,action:{type:"rerender"}};if(t==="enter")return Rr(e);if(t==="alt+enter")return{state:wt(e,`
|
|
4
4
|
`),action:{type:"none"}};if(t==="backspace")return e.cursor<=0?{state:e,action:{type:"none"}}:{state:{...e,text:`${e.text.slice(0,e.cursor-1)}${e.text.slice(e.cursor)}`,cursor:e.cursor-1},action:{type:"none"}};if(t==="delete")return e.cursor>=e.text.length?{state:e,action:{type:"none"}}:{state:{...e,text:`${e.text.slice(0,e.cursor)}${e.text.slice(e.cursor+1)}`},action:{type:"none"}};if(t==="left")return{state:{...e,cursor:Math.max(0,e.cursor-1)},action:{type:"none"}};if(t==="right")return{state:{...e,cursor:Math.min(e.text.length,e.cursor+1)},action:{type:"none"}};if(t==="home"||t==="ctrl+a")return{state:{...e,cursor:0},action:{type:"none"}};if(t==="end"||t==="ctrl+e")return{state:{...e,cursor:e.text.length},action:{type:"none"}};if(t==="ctrl+u")return{state:{...e,text:e.text.slice(e.cursor),cursor:0},action:{type:"none"}};if(t==="ctrl+k")return{state:{...e,text:e.text.slice(0,e.cursor)},action:{type:"none"}};if(t==="up"){if(e.history.length===0)return{state:e,action:{type:"none"}};let r=e.historyIndex===null?e.history.length-1:Math.max(0,e.historyIndex-1);return{state:fe({...e,historyIndex:r},e.history[r]??""),action:{type:"none"}}}if(t==="down"){if(e.historyIndex===null)return{state:e,action:{type:"none"}};let r=e.historyIndex+1;return r>=e.history.length?{state:{...e,text:"",cursor:0,historyIndex:null},action:{type:"none"}}:{state:fe({...e,historyIndex:r},e.history[r]??""),action:{type:"none"}}}return t.length>0?{state:wt(e,t),action:{type:"none"}}:{state:e,action:{type:"none"}}}i(Tt,"handleComposerKey");var bt="A turn is already running. Wait for it to finish before sending another line.";function Mr(){let e=!1;return{isRunning(){return e},tryStartSubmission(){return e?!1:(e=!0,!0)},failSubmission(){e=!1},applyRuntimeEvent(t){t.name==="turn.started"&&(e=!0),(t.name==="turn.completed"||t.name==="turn.failed"||t.name==="turn.interrupted")&&(e=!1)}}}i(Mr,"createTerminalTurnSubmissionGuard");function Pt(){return Mr()}i(Pt,"createLineModeTurnGuard");var he=[{name:"help",usage:"/help",description:"show this help"},{name:"providers",usage:"/providers",description:"list providers"},{name:"provider",usage:"/provider [id]",description:"switch provider",requiresArgument:!0},{name:"model",usage:"/model [id]",description:"list or switch model"},{name:"apps",usage:"/apps",description:"list connectable apps"},{name:"install",usage:"/install <app>",description:"open app details",requiresArgument:!0},{name:"projects",usage:"/projects",description:"list projects"},{name:"project",usage:"/project <id>",description:"switch project",requiresArgument:!0},{name:"permissions",usage:"/permissions [ask|full-access]",description:"show or change command access"},{name:"profile",usage:"/profile [status|diff|catalog|check|push]",description:"show or sync profile"},{name:"agents",usage:"/agents",description:"list agents"},{name:"agent",usage:"/agent <id>",description:"select agent",requiresArgument:!0},{name:"run",usage:"/run <action> [json]",description:"run profile action",requiresArgument:!0},{name:"settings",usage:"/settings",description:"show settings"},{name:"logs",usage:"/logs",description:"show recent events"},{name:"compact",usage:"/compact",description:"compact current session"},{name:"clear",usage:"/clear",description:"clear terminal transcript"},{name:"exit",usage:"/exit",description:"exit"},{name:"hooks",usage:"/hooks",description:"show hook status"},{name:"start",usage:"/start",description:"start a new session"}];function ze(e){if(!e.startsWith("/"))return null;let[t="",...r]=e.slice(1).trim().split(/\s+/),n=t.toLowerCase();if(!n)return null;if(n==="exit"||n==="quit")return{type:"exit"};if(n==="help")return{type:"help"};if(n==="clear")return{type:"clear"};if(n==="agents")return{type:"agents"};if(n==="apps")return{type:"apps"};if(n==="agent")return{type:"agent",id:r.join(" ").trim()};if(n==="install")return{type:"install",id:r.join(" ").trim()};if(n==="projects")return{type:"projects"};if(n==="project")return{type:"project",id:r.join(" ").trim()};if(n==="model")return{type:"model",id:r.join(" ").trim()||null};if(n==="permissions")return{type:"permissions",args:r};if(n==="profile")return{type:"profile",args:r};if(n==="logs")return{type:"logs"};if(n==="providers")return{type:"providers"};if(n==="provider")return{type:"provider",id:r.join(" ").trim()||null};if(n==="compact")return{type:"compact"};if(n==="hooks")return{type:"hooks"};if(n==="start")return{type:"start"};if(n==="run"){let o=r[0]??"",s=r.slice(1).join(" ").trim();return s?{type:"run",action:o,input:JSON.parse(s)}:{type:"run",action:o,input:void 0}}return n==="settings"?{type:"settings",args:r}:{type:"unknown",command:n}}i(ze,"parseSlashCommand");function xt(e){let t=e.trim();if(!t.startsWith("!"))return null;let r=t.slice(1).trim();return r?{command:r}:null}i(xt,"parseDirectCommandPrompt");function Ct(){let e=Math.max(...he.map(t=>t.usage.length));return["Commands:",...he.map(t=>`${t.usage.padEnd(e+2)}${t.description}`)].join(`
|
|
5
5
|
`)}i(Ct,"helpText");var ye=class{static{i(this,"RawInput")}input;onKey;previousRawMode=!1;dataHandler=null;constructor(t,r){this.input=t,this.onKey=r}start(){this.previousRawMode=this.input.isRaw??!1,this.input.setRawMode(!0),this.input.resume(),this.dataHandler=t=>{for(let r of Or(t))this.onKey(r)},this.input.on("data",this.dataHandler)}stop(){this.dataHandler&&this.input.off("data",this.dataHandler),this.dataHandler=null,this.input.setRawMode(this.previousRawMode),this.input.pause()}};function Or(e){let t=e.toString("utf8"),r=[];for(let n=0;n<t.length;n+=1){let o=t[n],s=t[n+1];if(o==="\x1B"){let a=jr(t,n);r.push(a.key),n=a.end;continue}o===""?r.push("ctrl+c"):o===""?r.push("ctrl+d"):o==="\f"?r.push("ctrl+l"):o===""?r.push("ctrl+a"):o===""?r.push("ctrl+e"):o==="\v"?r.push("ctrl+k"):o===""?r.push("ctrl+u"):o==="\x7F"||o==="\b"?r.push("backspace"):o==="\r"||o===`
|
|
6
6
|
`?r.push("enter"):(o>=" "||o&&s)&&r.push(o)}return r}i(Or,"decodeKeys");function jr(e,t){let r=e.slice(t);return r.startsWith("\x1B\r")||r.startsWith(`\x1B
|