agent-relay 4.0.18 → 4.0.20

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.
Files changed (96) hide show
  1. package/dist/index.cjs +1407 -537
  2. package/dist/src/cli/commands/setup.d.ts +28 -10
  3. package/dist/src/cli/commands/setup.d.ts.map +1 -1
  4. package/dist/src/cli/commands/setup.js +103 -68
  5. package/dist/src/cli/commands/setup.js.map +1 -1
  6. package/node_modules/@agent-relay/cloud/package.json +2 -2
  7. package/node_modules/@agent-relay/config/package.json +1 -1
  8. package/node_modules/@agent-relay/hooks/package.json +4 -4
  9. package/node_modules/@agent-relay/sdk/dist/workflows/trajectory.d.ts +5 -35
  10. package/node_modules/@agent-relay/sdk/dist/workflows/trajectory.d.ts.map +1 -1
  11. package/node_modules/@agent-relay/sdk/dist/workflows/trajectory.js +158 -292
  12. package/node_modules/@agent-relay/sdk/dist/workflows/trajectory.js.map +1 -1
  13. package/node_modules/@agent-relay/sdk/package.json +3 -2
  14. package/node_modules/@agent-relay/telemetry/package.json +1 -1
  15. package/node_modules/@agent-relay/trajectory/package.json +2 -2
  16. package/node_modules/@agent-relay/user-directory/package.json +2 -2
  17. package/node_modules/@agent-relay/utils/package.json +2 -2
  18. package/node_modules/@clack/core/CHANGELOG.md +200 -0
  19. package/node_modules/@clack/core/LICENSE +9 -0
  20. package/node_modules/@clack/core/README.md +22 -0
  21. package/node_modules/@clack/core/dist/index.cjs +15 -0
  22. package/node_modules/@clack/core/dist/index.cjs.map +1 -0
  23. package/node_modules/@clack/core/dist/index.d.cts +151 -0
  24. package/node_modules/@clack/core/dist/index.d.mts +151 -0
  25. package/node_modules/@clack/core/dist/index.d.ts +151 -0
  26. package/node_modules/@clack/core/dist/index.mjs +15 -0
  27. package/node_modules/@clack/core/dist/index.mjs.map +1 -0
  28. package/node_modules/@clack/core/package.json +62 -0
  29. package/node_modules/@clack/prompts/CHANGELOG.md +256 -0
  30. package/node_modules/@clack/prompts/LICENSE +23 -0
  31. package/node_modules/@clack/prompts/README.md +158 -0
  32. package/node_modules/@clack/prompts/dist/index.cjs +77 -0
  33. package/node_modules/@clack/prompts/dist/index.d.ts +106 -0
  34. package/node_modules/@clack/prompts/dist/index.mjs +77 -0
  35. package/node_modules/@clack/prompts/node_modules/is-unicode-supported/index.d.ts +12 -0
  36. package/node_modules/@clack/prompts/node_modules/is-unicode-supported/index.js +17 -0
  37. package/node_modules/@clack/prompts/node_modules/is-unicode-supported/license +9 -0
  38. package/node_modules/@clack/prompts/node_modules/is-unicode-supported/package.json +43 -0
  39. package/node_modules/@clack/prompts/node_modules/is-unicode-supported/readme.md +35 -0
  40. package/node_modules/@clack/prompts/package.json +65 -0
  41. package/node_modules/agent-trajectories/README.md +562 -0
  42. package/node_modules/agent-trajectories/dist/chunk-W222QB6V.js +2036 -0
  43. package/node_modules/agent-trajectories/dist/chunk-W222QB6V.js.map +1 -0
  44. package/node_modules/agent-trajectories/dist/cli/index.d.ts +2 -0
  45. package/node_modules/agent-trajectories/dist/cli/index.js +4592 -0
  46. package/node_modules/agent-trajectories/dist/cli/index.js.map +1 -0
  47. package/node_modules/agent-trajectories/dist/index-7tzw_CMS.d.ts +1777 -0
  48. package/node_modules/agent-trajectories/dist/index.d.ts +90 -0
  49. package/node_modules/agent-trajectories/dist/index.js +73 -0
  50. package/node_modules/agent-trajectories/dist/index.js.map +1 -0
  51. package/node_modules/agent-trajectories/dist/sdk/index.d.ts +2 -0
  52. package/node_modules/agent-trajectories/dist/sdk/index.js +39 -0
  53. package/node_modules/agent-trajectories/dist/sdk/index.js.map +1 -0
  54. package/node_modules/agent-trajectories/package.json +72 -0
  55. package/node_modules/commander/LICENSE +22 -0
  56. package/node_modules/commander/Readme.md +1157 -0
  57. package/node_modules/commander/esm.mjs +16 -0
  58. package/node_modules/commander/index.js +24 -0
  59. package/node_modules/commander/lib/argument.js +149 -0
  60. package/node_modules/commander/lib/command.js +2509 -0
  61. package/node_modules/commander/lib/error.js +39 -0
  62. package/node_modules/commander/lib/help.js +520 -0
  63. package/node_modules/commander/lib/option.js +330 -0
  64. package/node_modules/commander/lib/suggestSimilar.js +101 -0
  65. package/node_modules/commander/package-support.json +16 -0
  66. package/node_modules/commander/package.json +84 -0
  67. package/node_modules/commander/typings/esm.d.mts +3 -0
  68. package/node_modules/commander/typings/index.d.ts +969 -0
  69. package/node_modules/follow-redirects/README.md +7 -5
  70. package/node_modules/follow-redirects/index.js +24 -1
  71. package/node_modules/follow-redirects/package.json +1 -1
  72. package/node_modules/picocolors/LICENSE +15 -0
  73. package/node_modules/picocolors/README.md +21 -0
  74. package/node_modules/picocolors/package.json +25 -0
  75. package/node_modules/picocolors/picocolors.browser.js +4 -0
  76. package/node_modules/picocolors/picocolors.d.ts +5 -0
  77. package/node_modules/picocolors/picocolors.js +75 -0
  78. package/node_modules/picocolors/types.d.ts +51 -0
  79. package/node_modules/sisteransi/license +21 -0
  80. package/node_modules/sisteransi/package.json +34 -0
  81. package/node_modules/sisteransi/readme.md +113 -0
  82. package/node_modules/sisteransi/src/index.js +58 -0
  83. package/node_modules/sisteransi/src/sisteransi.d.ts +35 -0
  84. package/package.json +10 -10
  85. package/packages/cloud/package.json +2 -2
  86. package/packages/config/package.json +1 -1
  87. package/packages/hooks/package.json +4 -4
  88. package/packages/sdk/dist/workflows/trajectory.d.ts +5 -35
  89. package/packages/sdk/dist/workflows/trajectory.d.ts.map +1 -1
  90. package/packages/sdk/dist/workflows/trajectory.js +158 -292
  91. package/packages/sdk/dist/workflows/trajectory.js.map +1 -1
  92. package/packages/sdk/package.json +3 -2
  93. package/packages/telemetry/package.json +1 -1
  94. package/packages/trajectory/package.json +2 -2
  95. package/packages/user-directory/package.json +2 -2
  96. package/packages/utils/package.json +2 -2
@@ -0,0 +1,77 @@
1
+ import{TextPrompt as V,PasswordPrompt as j,ConfirmPrompt as N,SelectPrompt as k,SelectKeyPrompt as W,MultiSelectPrompt as D,GroupMultiSelectPrompt as L,isCancel as G,block as F}from"@clack/core";export{isCancel}from"@clack/core";import h from"node:process";import e from"picocolors";import{cursor as T,erase as A}from"sisteransi";function q(){return h.platform!=="win32"?h.env.TERM!=="linux":Boolean(h.env.CI)||Boolean(h.env.WT_SESSION)||Boolean(h.env.TERMINUS_SUBLIME)||h.env.ConEmuTask==="{cmd::Cmder}"||h.env.TERM_PROGRAM==="Terminus-Sublime"||h.env.TERM_PROGRAM==="vscode"||h.env.TERM==="xterm-256color"||h.env.TERM==="alacritty"||h.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}const _=q(),o=(r,n)=>_?r:n,H=o("\u25C6","*"),I=o("\u25A0","x"),x=o("\u25B2","x"),S=o("\u25C7","o"),K=o("\u250C","T"),a=o("\u2502","|"),d=o("\u2514","\u2014"),b=o("\u25CF",">"),E=o("\u25CB"," "),C=o("\u25FB","[\u2022]"),w=o("\u25FC","[+]"),M=o("\u25FB","[ ]"),U=o("\u25AA","\u2022"),B=o("\u2500","-"),Z=o("\u256E","+"),z=o("\u251C","+"),X=o("\u256F","+"),J=o("\u25CF","\u2022"),Y=o("\u25C6","*"),Q=o("\u25B2","!"),ee=o("\u25A0","x"),y=r=>{switch(r){case"initial":case"active":return e.cyan(H);case"cancel":return e.red(I);case"error":return e.yellow(x);case"submit":return e.green(S)}},te=r=>new V({validate:r.validate,placeholder:r.placeholder,defaultValue:r.defaultValue,initialValue:r.initialValue,render(){const n=`${e.gray(a)}
2
+ ${y(this.state)} ${r.message}
3
+ `,i=r.placeholder?e.inverse(r.placeholder[0])+e.dim(r.placeholder.slice(1)):e.inverse(e.hidden("_")),t=this.value?this.valueWithCursor:i;switch(this.state){case"error":return`${n.trim()}
4
+ ${e.yellow(a)} ${t}
5
+ ${e.yellow(d)} ${e.yellow(this.error)}
6
+ `;case"submit":return`${n}${e.gray(a)} ${e.dim(this.value||r.placeholder)}`;case"cancel":return`${n}${e.gray(a)} ${e.strikethrough(e.dim(this.value??""))}${this.value?.trim()?`
7
+ `+e.gray(a):""}`;default:return`${n}${e.cyan(a)} ${t}
8
+ ${e.cyan(d)}
9
+ `}}}).prompt(),re=r=>new j({validate:r.validate,mask:r.mask??U,render(){const n=`${e.gray(a)}
10
+ ${y(this.state)} ${r.message}
11
+ `,i=this.valueWithCursor,t=this.masked;switch(this.state){case"error":return`${n.trim()}
12
+ ${e.yellow(a)} ${t}
13
+ ${e.yellow(d)} ${e.yellow(this.error)}
14
+ `;case"submit":return`${n}${e.gray(a)} ${e.dim(t)}`;case"cancel":return`${n}${e.gray(a)} ${e.strikethrough(e.dim(t??""))}${t?`
15
+ `+e.gray(a):""}`;default:return`${n}${e.cyan(a)} ${i}
16
+ ${e.cyan(d)}
17
+ `}}}).prompt(),se=r=>{const n=r.active??"Yes",i=r.inactive??"No";return new N({active:n,inactive:i,initialValue:r.initialValue??!0,render(){const t=`${e.gray(a)}
18
+ ${y(this.state)} ${r.message}
19
+ `,s=this.value?n:i;switch(this.state){case"submit":return`${t}${e.gray(a)} ${e.dim(s)}`;case"cancel":return`${t}${e.gray(a)} ${e.strikethrough(e.dim(s))}
20
+ ${e.gray(a)}`;default:return`${t}${e.cyan(a)} ${this.value?`${e.green(b)} ${n}`:`${e.dim(E)} ${e.dim(n)}`} ${e.dim("/")} ${this.value?`${e.dim(E)} ${e.dim(i)}`:`${e.green(b)} ${i}`}
21
+ ${e.cyan(d)}
22
+ `}}}).prompt()},ie=r=>{const n=(t,s)=>{const c=t.label??String(t.value);return s==="active"?`${e.green(b)} ${c} ${t.hint?e.dim(`(${t.hint})`):""}`:s==="selected"?`${e.dim(c)}`:s==="cancelled"?`${e.strikethrough(e.dim(c))}`:`${e.dim(E)} ${e.dim(c)}`};let i=0;return new k({options:r.options,initialValue:r.initialValue,render(){const t=`${e.gray(a)}
23
+ ${y(this.state)} ${r.message}
24
+ `;switch(this.state){case"submit":return`${t}${e.gray(a)} ${n(this.options[this.cursor],"selected")}`;case"cancel":return`${t}${e.gray(a)} ${n(this.options[this.cursor],"cancelled")}
25
+ ${e.gray(a)}`;default:{const s=r.maxItems===void 0?1/0:Math.max(r.maxItems,5);this.cursor>=i+s-3?i=Math.max(Math.min(this.cursor-s+3,this.options.length-s),0):this.cursor<i+2&&(i=Math.max(this.cursor-2,0));const c=s<this.options.length&&i>0,l=s<this.options.length&&i+s<this.options.length;return`${t}${e.cyan(a)} ${this.options.slice(i,i+s).map((u,m,$)=>m===0&&c?e.dim("..."):m===$.length-1&&l?e.dim("..."):n(u,m+i===this.cursor?"active":"inactive")).join(`
26
+ ${e.cyan(a)} `)}
27
+ ${e.cyan(d)}
28
+ `}}}}).prompt()},ne=r=>{const n=(i,t="inactive")=>{const s=i.label??String(i.value);return t==="selected"?`${e.dim(s)}`:t==="cancelled"?`${e.strikethrough(e.dim(s))}`:t==="active"?`${e.bgCyan(e.gray(` ${i.value} `))} ${s} ${i.hint?e.dim(`(${i.hint})`):""}`:`${e.gray(e.bgWhite(e.inverse(` ${i.value} `)))} ${s} ${i.hint?e.dim(`(${i.hint})`):""}`};return new W({options:r.options,initialValue:r.initialValue,render(){const i=`${e.gray(a)}
29
+ ${y(this.state)} ${r.message}
30
+ `;switch(this.state){case"submit":return`${i}${e.gray(a)} ${n(this.options.find(t=>t.value===this.value),"selected")}`;case"cancel":return`${i}${e.gray(a)} ${n(this.options[0],"cancelled")}
31
+ ${e.gray(a)}`;default:return`${i}${e.cyan(a)} ${this.options.map((t,s)=>n(t,s===this.cursor?"active":"inactive")).join(`
32
+ ${e.cyan(a)} `)}
33
+ ${e.cyan(d)}
34
+ `}}}).prompt()},ae=r=>{const n=(i,t)=>{const s=i.label??String(i.value);return t==="active"?`${e.cyan(C)} ${s} ${i.hint?e.dim(`(${i.hint})`):""}`:t==="selected"?`${e.green(w)} ${e.dim(s)}`:t==="cancelled"?`${e.strikethrough(e.dim(s))}`:t==="active-selected"?`${e.green(w)} ${s} ${i.hint?e.dim(`(${i.hint})`):""}`:t==="submitted"?`${e.dim(s)}`:`${e.dim(M)} ${e.dim(s)}`};return new D({options:r.options,initialValues:r.initialValues,required:r.required??!0,cursorAt:r.cursorAt,validate(i){if(this.required&&i.length===0)return`Please select at least one option.
35
+ ${e.reset(e.dim(`Press ${e.gray(e.bgWhite(e.inverse(" space ")))} to select, ${e.gray(e.bgWhite(e.inverse(" enter ")))} to submit`))}`},render(){let i=`${e.gray(a)}
36
+ ${y(this.state)} ${r.message}
37
+ `;switch(this.state){case"submit":return`${i}${e.gray(a)} ${this.options.filter(({value:t})=>this.value.includes(t)).map(t=>n(t,"submitted")).join(e.dim(", "))||e.dim("none")}`;case"cancel":{const t=this.options.filter(({value:s})=>this.value.includes(s)).map(s=>n(s,"cancelled")).join(e.dim(", "));return`${i}${e.gray(a)} ${t.trim()?`${t}
38
+ ${e.gray(a)}`:""}`}case"error":{const t=this.error.split(`
39
+ `).map((s,c)=>c===0?`${e.yellow(d)} ${e.yellow(s)}`:` ${s}`).join(`
40
+ `);return i+e.yellow(a)+" "+this.options.map((s,c)=>{const l=this.value.includes(s.value),u=c===this.cursor;return u&&l?n(s,"active-selected"):l?n(s,"selected"):n(s,u?"active":"inactive")}).join(`
41
+ ${e.yellow(a)} `)+`
42
+ `+t+`
43
+ `}default:return`${i}${e.cyan(a)} ${this.options.map((t,s)=>{const c=this.value.includes(t.value),l=s===this.cursor;return l&&c?n(t,"active-selected"):c?n(t,"selected"):n(t,l?"active":"inactive")}).join(`
44
+ ${e.cyan(a)} `)}
45
+ ${e.cyan(d)}
46
+ `}}}).prompt()},ce=r=>{const n=(i,t,s=[])=>{const c=i.label??String(i.value),l=typeof i.group=="string",u=l&&(s[s.indexOf(i)+1]??{group:!0}),m=l&&u.group===!0,$=l?`${m?d:a} `:"";return t==="active"?`${e.dim($)}${e.cyan(C)} ${c} ${i.hint?e.dim(`(${i.hint})`):""}`:t==="group-active"?`${$}${e.cyan(C)} ${e.dim(c)}`:t==="group-active-selected"?`${$}${e.green(w)} ${e.dim(c)}`:t==="selected"?`${e.dim($)}${e.green(w)} ${e.dim(c)}`:t==="cancelled"?`${e.strikethrough(e.dim(c))}`:t==="active-selected"?`${e.dim($)}${e.green(w)} ${c} ${i.hint?e.dim(`(${i.hint})`):""}`:t==="submitted"?`${e.dim(c)}`:`${e.dim($)}${e.dim(M)} ${e.dim(c)}`};return new L({options:r.options,initialValues:r.initialValues,required:r.required??!0,cursorAt:r.cursorAt,validate(i){if(this.required&&i.length===0)return`Please select at least one option.
47
+ ${e.reset(e.dim(`Press ${e.gray(e.bgWhite(e.inverse(" space ")))} to select, ${e.gray(e.bgWhite(e.inverse(" enter ")))} to submit`))}`},render(){let i=`${e.gray(a)}
48
+ ${y(this.state)} ${r.message}
49
+ `;switch(this.state){case"submit":return`${i}${e.gray(a)} ${this.options.filter(({value:t})=>this.value.includes(t)).map(t=>n(t,"submitted")).join(e.dim(", "))}`;case"cancel":{const t=this.options.filter(({value:s})=>this.value.includes(s)).map(s=>n(s,"cancelled")).join(e.dim(", "));return`${i}${e.gray(a)} ${t.trim()?`${t}
50
+ ${e.gray(a)}`:""}`}case"error":{const t=this.error.split(`
51
+ `).map((s,c)=>c===0?`${e.yellow(d)} ${e.yellow(s)}`:` ${s}`).join(`
52
+ `);return`${i}${e.yellow(a)} ${this.options.map((s,c,l)=>{const u=this.value.includes(s.value)||s.group===!0&&this.isGroupSelected(`${s.value}`),m=c===this.cursor;return!m&&typeof s.group=="string"&&this.options[this.cursor].value===s.group?n(s,u?"group-active-selected":"group-active",l):m&&u?n(s,"active-selected",l):u?n(s,"selected",l):n(s,m?"active":"inactive",l)}).join(`
53
+ ${e.yellow(a)} `)}
54
+ ${t}
55
+ `}default:return`${i}${e.cyan(a)} ${this.options.map((t,s,c)=>{const l=this.value.includes(t.value)||t.group===!0&&this.isGroupSelected(`${t.value}`),u=s===this.cursor;return!u&&typeof t.group=="string"&&this.options[this.cursor].value===t.group?n(t,l?"group-active-selected":"group-active",c):u&&l?n(t,"active-selected",c):l?n(t,"selected",c):n(t,u?"active":"inactive",c)}).join(`
56
+ ${e.cyan(a)} `)}
57
+ ${e.cyan(d)}
58
+ `}}}).prompt()},R=r=>r.replace(me(),""),le=(r="",n="")=>{const i=`
59
+ ${r}
60
+ `.split(`
61
+ `),t=R(n).length,s=Math.max(i.reduce((l,u)=>(u=R(u),u.length>l?u.length:l),0),t)+2,c=i.map(l=>`${e.gray(a)} ${e.dim(l)}${" ".repeat(s-R(l).length)}${e.gray(a)}`).join(`
62
+ `);process.stdout.write(`${e.gray(a)}
63
+ ${e.green(S)} ${e.reset(n)} ${e.gray(B.repeat(Math.max(s-t-1,1))+Z)}
64
+ ${c}
65
+ ${e.gray(z+B.repeat(s+2)+X)}
66
+ `)},ue=(r="")=>{process.stdout.write(`${e.gray(d)} ${e.red(r)}
67
+
68
+ `)},oe=(r="")=>{process.stdout.write(`${e.gray(K)} ${r}
69
+ `)},$e=(r="")=>{process.stdout.write(`${e.gray(a)}
70
+ ${e.gray(d)} ${r}
71
+
72
+ `)},f={message:(r="",{symbol:n=e.gray(a)}={})=>{const i=[`${e.gray(a)}`];if(r){const[t,...s]=r.split(`
73
+ `);i.push(`${n} ${t}`,...s.map(c=>`${e.gray(a)} ${c}`))}process.stdout.write(`${i.join(`
74
+ `)}
75
+ `)},info:r=>{f.message(r,{symbol:e.blue(J)})},success:r=>{f.message(r,{symbol:e.green(Y)})},step:r=>{f.message(r,{symbol:e.green(S)})},warn:r=>{f.message(r,{symbol:e.yellow(Q)})},warning:r=>{f.warn(r)},error:r=>{f.message(r,{symbol:e.red(ee)})}},de=()=>{const r=_?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],n=_?80:120;let i,t,s=!1,c="";const l=(v="")=>{s=!0,i=F(),c=v.replace(/\.+$/,""),process.stdout.write(`${e.gray(a)}
76
+ `);let g=0,p=0;t=setInterval(()=>{const O=e.magenta(r[g]),P=".".repeat(Math.floor(p)).slice(0,3);process.stdout.write(T.move(-999,0)),process.stdout.write(A.down(1)),process.stdout.write(`${O} ${c}${P}`),g=g+1<r.length?g+1:0,p=p<r.length?p+.125:0},n)},u=(v="",g=0)=>{c=v??c,s=!1,clearInterval(t);const p=g===0?e.green(S):g===1?e.red(I):e.red(x);process.stdout.write(T.move(-999,0)),process.stdout.write(A.down(1)),process.stdout.write(`${p} ${c}
77
+ `),i()},m=(v="")=>{c=v??c},$=v=>{const g=v>1?"Something went wrong":"Canceled";s&&u(g,v)};return process.on("uncaughtExceptionMonitor",()=>$(2)),process.on("unhandledRejection",()=>$(2)),process.on("SIGINT",()=>$(1)),process.on("SIGTERM",()=>$(1)),process.on("exit",$),{start:l,stop:u,message:m}};function me(){const r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,"g")}const he=async(r,n)=>{const i={},t=Object.keys(r);for(const s of t){const c=r[s],l=await c({results:i})?.catch(u=>{throw u});if(typeof n?.onCancel=="function"&&G(l)){i[s]="canceled",n.onCancel({results:i});continue}i[s]=l}return i};export{ue as cancel,se as confirm,he as group,ce as groupMultiselect,oe as intro,f as log,ae as multiselect,le as note,$e as outro,re as password,ie as select,ne as selectKey,de as spinner,te as text};
@@ -0,0 +1,12 @@
1
+ /**
2
+ Detect whether the terminal supports Unicode.
3
+
4
+ @example
5
+ ```
6
+ import isUnicodeSupported from 'is-unicode-supported';
7
+
8
+ isUnicodeSupported();
9
+ //=> true
10
+ ```
11
+ */
12
+ export default function isUnicodeSupported(): boolean;
@@ -0,0 +1,17 @@
1
+ import process from 'node:process';
2
+
3
+ export default function isUnicodeSupported() {
4
+ if (process.platform !== 'win32') {
5
+ return process.env.TERM !== 'linux'; // Linux console (kernel)
6
+ }
7
+
8
+ return Boolean(process.env.CI)
9
+ || Boolean(process.env.WT_SESSION) // Windows Terminal
10
+ || Boolean(process.env.TERMINUS_SUBLIME) // Terminus (<0.2.27)
11
+ || process.env.ConEmuTask === '{cmd::Cmder}' // ConEmu and cmder
12
+ || process.env.TERM_PROGRAM === 'Terminus-Sublime'
13
+ || process.env.TERM_PROGRAM === 'vscode'
14
+ || process.env.TERM === 'xterm-256color'
15
+ || process.env.TERM === 'alacritty'
16
+ || process.env.TERMINAL_EMULATOR === 'JetBrains-JediTerm';
17
+ }
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "is-unicode-supported",
3
+ "version": "1.3.0",
4
+ "description": "Detect whether the terminal supports Unicode",
5
+ "license": "MIT",
6
+ "repository": "sindresorhus/is-unicode-supported",
7
+ "funding": "https://github.com/sponsors/sindresorhus",
8
+ "author": {
9
+ "name": "Sindre Sorhus",
10
+ "email": "sindresorhus@gmail.com",
11
+ "url": "https://sindresorhus.com"
12
+ },
13
+ "type": "module",
14
+ "exports": "./index.js",
15
+ "engines": {
16
+ "node": ">=12"
17
+ },
18
+ "scripts": {
19
+ "test": "xo && ava && tsd"
20
+ },
21
+ "files": [
22
+ "index.js",
23
+ "index.d.ts"
24
+ ],
25
+ "keywords": [
26
+ "terminal",
27
+ "unicode",
28
+ "detect",
29
+ "utf8",
30
+ "console",
31
+ "shell",
32
+ "support",
33
+ "supports",
34
+ "supported",
35
+ "check",
36
+ "detection"
37
+ ],
38
+ "devDependencies": {
39
+ "ava": "^4.0.1",
40
+ "tsd": "^0.19.1",
41
+ "xo": "^0.47.0"
42
+ }
43
+ }
@@ -0,0 +1,35 @@
1
+ # is-unicode-supported
2
+
3
+ > Detect whether the terminal supports Unicode
4
+
5
+ This can be useful to decide whether to use Unicode characters or fallback ASCII characters in command-line output.
6
+
7
+ Note that the check is quite naive. It just assumes all non-Windows terminals support Unicode and hard-codes which Windows terminals that do support Unicode. However, I have been using this logic in some popular packages for years without problems.
8
+
9
+ ## Install
10
+
11
+ ```sh
12
+ npm install is-unicode-supported
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ```js
18
+ import isUnicodeSupported from 'is-unicode-supported';
19
+
20
+ isUnicodeSupported();
21
+ //=> true
22
+ ```
23
+
24
+ ## API
25
+
26
+ ### isUnicodeSupported()
27
+
28
+ Returns a `boolean` for whether the terminal supports Unicode.
29
+
30
+ ## Related
31
+
32
+ - [is-interactive](https://github.com/sindresorhus/is-interactive) - Check if stdout or stderr is interactive
33
+ - [supports-color](https://github.com/chalk/supports-color) - Detect whether a terminal supports color
34
+ - [figures](https://github.com/sindresorhus/figures) - Unicode symbols with Windows fallbacks
35
+ - [log-symbols](https://github.com/sindresorhus/log-symbols) - Colored symbols for various log levels
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "@clack/prompts",
3
+ "version": "0.7.0",
4
+ "type": "module",
5
+ "main": "./dist/index.cjs",
6
+ "module": "./dist/index.mjs",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.mjs",
11
+ "require": "./dist/index.cjs"
12
+ },
13
+ "./package.json": "./package.json"
14
+ },
15
+ "types": "./dist/index.d.ts",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/natemoo-re/clack",
19
+ "directory": "packages/prompts"
20
+ },
21
+ "bugs": {
22
+ "url": "https://github.com/natemoo-re/clack/issues"
23
+ },
24
+ "homepage": "https://github.com/natemoo-re/clack/tree/main/packages/prompts#readme",
25
+ "files": [
26
+ "dist",
27
+ "CHANGELOG.md"
28
+ ],
29
+ "author": {
30
+ "name": "Nate Moore",
31
+ "email": "nate@natemoo.re",
32
+ "url": "https://twitter.com/n_moore"
33
+ },
34
+ "license": "MIT",
35
+ "keywords": [
36
+ "ask",
37
+ "clack",
38
+ "cli",
39
+ "command-line",
40
+ "command",
41
+ "input",
42
+ "interact",
43
+ "interface",
44
+ "menu",
45
+ "prompt",
46
+ "prompts",
47
+ "stdin",
48
+ "ui"
49
+ ],
50
+ "packageManager": "pnpm@7.6.0",
51
+ "dependencies": {
52
+ "@clack/core": "^0.3.3",
53
+ "picocolors": "^1.0.0",
54
+ "sisteransi": "^1.0.5"
55
+ },
56
+ "devDependencies": {
57
+ "is-unicode-supported": "^1.3.0"
58
+ },
59
+ "bundledDependencies": [
60
+ "is-unicode-supported"
61
+ ],
62
+ "scripts": {
63
+ "build": "unbuild"
64
+ }
65
+ }