
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
metro-agent
Advanced tools
// tts服务
const ttsClient = {
tts: async ({ text }) => {
return ttsServe(text)
}
}
new MetroAgent({
// tts
ttsClient,
// [选填] tts播放结束状态更新延迟,毫秒
ttsDelay: 100,
// 是否开启流式
stream: false,
// openai baseURL
baseURL: 'https://dashscope.aliyuncs.com/compatible-mode/v1',
// openai model
model: 'qwq-32b',
// openai apiKey
apiKey: 'Bearer $DASHSCOPE_API_KEY',
// 音频转文本实时接口(ws)
asrWsUrl: '/api/ws',
// 唤醒词
wakeupWord: ['小爱同学'],
// 休眠词
dormancyWord: ['再见'],
// 唤醒后欢迎词,配置tts服务后自动调用
welcomeWord: '你好,我在。',
// 休眠后提示词,配置tts服务后自动调用
goodbyeWord: '好的,再见。',
// [选用] 支持重写openai fetch
fetch: async (url, options) => {
if (url.includes("/chat/completions")) {
return fetch('/xxxx/chat-completions', options);
}
},
// 唤醒超时
wakeTimeout: 20 * 1000,
// 向ws发送数据
onSend: (client, sample) => {},
// 唤醒后回调
onWake: (welcomeWord) => {},
// 休眠后回调
onDormancy: (dormancyWord) => {},
// asr转换后消息回调
onMessage: (data, wakeStatus, ttsStatus) => {},
// 开始调用模型回调
onStart: () => {},
// 模型流式回调
onStream: (chunk) => {},
// 模型调用完成回调
onCompleted: (res) => {},
// [选填] 录音数据处理回调,默认使用:https://github.com/modelscope/FunASR/blob/main/runtime/docs/SDK_advanced_guide_offline_en_zh.md#Html%E7%BD%91%E9%A1%B5%E7%89%88
onRecProcess: (buffer, powerLevel, bufferDuration, bufferSampleRate) => {},
// 部分状态变化回调
onChange: () => {},
// 音频波形回调
onAudioWaveform: (powerLevel: number) => {},
// 错误回调
onError: (error) => {}
})
FAQs
Metro Agent
The npm package metro-agent receives a total of 52 weekly downloads. As such, metro-agent popularity was classified as not popular.
We found that metro-agent demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.