@audiofool/moondog 0.2.0-beta.7 → 0.2.0
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 +3 -2
- package/package.json +1 -1
- package/scripts/moondog.mjs +30 -6
- package/src/core/application-update.mjs +5 -3
- package/src/core/first-run.mjs +53 -0
- package/src/i18n/screen/es.mjs +62 -4
- package/src/i18n/screen/ja.mjs +62 -4
- package/src/i18n/screen/pt.mjs +62 -4
- package/src/i18n/screen/zh.mjs +62 -4
- package/src/integrations/netease/ncm-cli-player.mjs +29 -13
- package/src/memory/reflection-worker.mjs +1 -1
- package/src/runtime/pi/authentication.mjs +31 -10
- package/src/runtime/pi/configured-runtime.mjs +3 -3
- package/src/runtime/pi/custom-endpoints.mjs +229 -0
- package/src/runtime/pi/model-catalog.mjs +7 -3
- package/src/runtime/pi/model-list.mjs +122 -0
- package/src/runtime/pi/model-settings.mjs +131 -20
- package/src/runtime/pi/model-transport.mjs +2 -2
- package/src/runtime/pi/persistent-credential-store.mjs +31 -0
- package/src/runtime/pi/provider-registry.mjs +3 -9
- package/src/runtime/pi/public-model-catalog.mjs +12 -4
- package/src/runtime/pi/runtime-selection.mjs +9 -0
- package/src/runtime/pi/runtime-settings.mjs +37 -0
- package/src/surfaces/cli/auth-command.mjs +25 -56
- package/src/surfaces/cli/brand-components.mjs +1 -1
- package/src/surfaces/cli/command-completions.mjs +14 -0
- package/src/surfaces/cli/endpoint-command.mjs +106 -0
- package/src/surfaces/cli/first-run-view.mjs +138 -0
- package/src/surfaces/cli/format-output.mjs +1 -1
- package/src/surfaces/cli/tui.mjs +320 -33
package/src/i18n/screen/pt.mjs
CHANGED
|
@@ -22,7 +22,7 @@ export default {
|
|
|
22
22
|
"What have you been listening to?": "O que você tem ouvido?",
|
|
23
23
|
"A song, a playlist, or what to play next.": "Uma música, uma playlist ou o que tocar depois.",
|
|
24
24
|
"Your personal music agent.": "Seu agente pessoal de música.",
|
|
25
|
-
"# Your listening room\n\n## 01 / Listen and discover\n\nJust type to talk about music, ask for a playlist, or go exploring.\nTo talk, Moondog needs a model: `/auth` signs you in, then `/model` picks one.\nWhile an answer is coming, each step shows in the conversation, and the footer names the one in progress.\n\n- `/taste` - your profile: open any song or artist to see why it's there\n- `/taste report` - the whole picture on one page\n- `/import` - bring in your history, your library, or a playlist\n- `/lyrics` - the lyrics on the sleeve; `/lyrics sync` finds more\n- `/spotify` - play, queue, and make playlists in Spotify\n- Ask to move playback onto your iPhone, computer, or another Spotify device by name\n- `/web search <query>` or `/web read <url>` - look things up on public music sites\n\n## 02 / Make it yours\n\n- `/profile` - the same profile as `/taste`\n- `/profile corrections` - everything you've told me\n- `/profile retract <id>` - undo one of those\n- `/profile help` - the full set of profile commands\n- `/remember <text>`, `/memory`, `/forget <id>` - what I remember between conversations\n\n## 03 / Around the room\n\n- `/home` - back to the record sleeve; the conversation stays\n- `/theme paper|charcoal|terminal|auto` - change the look\n- `/art braille|ascii|off` - change the artwork\n- `/motion on|off` - turn the animation on or off\n- `/commands` or Ctrl+P - search every command; your message stays put\n- Page Up and Page Down scroll the conversation. The header and your draft stay put\n- Up and Down in the draft recall what you typed in this conversation\n- `/resume` - pick up a saved conversation (type to filter, Enter opens)\n- `/new` - start fresh; this conversation stays saved\n- `/status`, `/sources`, `/tools`, `/doctor` - see what's connected and working\n- `/reload` - reload model settings and sign-ins\n- `/update [--check] [--channel latest|beta]` - check for a release, or close this room and install it\n- `/help all` - every command, including the ones for the shell\n- `/language` - choose the language Moondog uses\n- `/quit` - leave\n\nTab moves to the menu on the home screen. Esc goes back to typing.\nEnter sends, and Shift+Enter starts a new line.\nTab or Enter accepts a suggestion.\nCtrl+C stops a model or web request, or leaves when nothing is running.\nIn the profile, type to filter, Tab switches lists, and Enter shows what you can do.\nCtrl+R refreshes it and Ctrl+O opens the full report.\nYour profile works without a model.\nPut quotes around paths, titles, and names that have spaces.": "# Sua sala de escuta\n\n## 01 / Ouça e descubra\n\nDigite para conversar sobre música, pedir uma playlist ou explorar.\nPara conversar, o Moondog precisa de um modelo: `/auth` faz o login e `/model` escolhe um.\nEnquanto a resposta chega, cada passo aparece na conversa, e o rodapé mostra o que está em andamento.\n\n- `/taste` - seu perfil: abra qualquer música ou artista para ver por que está ali\n- `/taste report` - o panorama completo em uma página\n- `/import` - traga seu histórico, sua biblioteca ou uma playlist\n- `/lyrics` - a letra na capa; `/lyrics sync` busca mais\n- `/spotify` - toque, adicione à fila e crie playlists no Spotify\n- Peça para passar a reprodução para o seu iPhone, computador ou outro dispositivo do Spotify pelo nome\n- `/web search <busca>` ou `/web read <url>` - pesquise em sites públicos de música\n\n## 02 / Deixe com a sua cara\n\n- `/profile` - o mesmo perfil de `/taste`\n- `/profile corrections` - tudo o que você me disse\n- `/profile retract <id>` - desfaça uma dessas escolhas\n- `/profile help` - todos os comandos do perfil\n- `/remember <texto>`, `/memory`, `/forget <id>` - o que eu lembro entre conversas\n\n## 03 / Pela sala\n\n- `/home` - volta para a capa do disco; a conversa continua\n- `/theme paper|charcoal|terminal|auto` - muda o visual\n- `/art braille|ascii|off` - muda a ilustração\n- `/motion on|off` - liga ou desliga a animação\n- `/commands` ou Ctrl+P - busca qualquer comando; sua mensagem não se perde\n- Page Up e Page Down rolam a conversa. O cabeçalho e o rascunho ficam no lugar\n- Para cima e para baixo no rascunho recuperam o que você digitou nesta conversa\n- `/resume` - retome uma conversa salva (digite para filtrar, Enter abre)\n- `/new` - comece do zero; esta conversa fica salva\n- `/status`, `/sources`, `/tools`, `/doctor` - veja o que está conectado e funcionando\n- `/reload` - recarrega as configurações do modelo e os logins\n- `/update [--check] [--channel latest|beta]` - procura uma versão nova, ou fecha esta sala e instala\n- `/help all` - todos os comandos, inclusive os do terminal\n- `/language` - escolha o idioma do Moondog\n- `/quit` - sair\n\nNa tela inicial, Tab vai para o menu. Esc volta para a digitação.\nEnter envia, e Shift+Enter começa uma nova linha.\nTab ou Enter aceitam uma sugestão.\nCtrl+C interrompe um pedido ao modelo ou à web, ou sai quando nada está rodando.\nNo perfil, digite para filtrar, Tab troca de lista e Enter mostra o que você pode fazer.\nCtrl+R atualiza e Ctrl+O abre o relatório completo.\nSeu perfil funciona sem modelo.\nColoque entre aspas caminhos, títulos e nomes com espaços.",
|
|
25
|
+
"# Your listening room\n\n## 01 / Listen and discover\n\nJust type to talk about music, ask for a playlist, or go exploring.\nTo talk, Moondog needs a model: `/auth` signs you in, then `/model` picks one.\nWhile an answer is coming, each step shows in the conversation, and the footer names the one in progress.\n\n- `/taste` - your profile: open any song or artist to see why it's there\n- `/taste report` - the whole picture on one page\n- `/import` - bring in your history, your library, or a playlist\n- `/lyrics` - the lyrics on the sleeve; `/lyrics sync` finds more\n- `/service` - choose where I play music: Spotify, Apple Music, or NetEase\n- `/spotify` - play, queue, and make playlists in Spotify\n- Ask to move playback onto your iPhone, computer, or another Spotify device by name\n- `/web search <query>` or `/web read <url>` - look things up on public music sites\n\n## 02 / Make it yours\n\n- `/profile` - the same profile as `/taste`\n- `/profile corrections` - everything you've told me\n- `/profile retract <id>` - undo one of those\n- `/profile help` - the full set of profile commands\n- `/remember <text>`, `/memory`, `/forget <id>` - what I remember between conversations\n\n## 03 / Around the room\n\n- `/home` - back to the record sleeve; the conversation stays\n- `/theme paper|charcoal|terminal|auto` - change the look\n- `/art braille|ascii|off` - change the artwork\n- `/motion on|off` - turn the animation on or off\n- `/commands` or Ctrl+P - search every command; your message stays put\n- Page Up and Page Down scroll the conversation. The header and your draft stay put\n- Up and Down in the draft recall what you typed in this conversation\n- `/resume` - pick up a saved conversation (type to filter, Enter opens)\n- `/new` - start fresh; this conversation stays saved\n- `/status`, `/sources`, `/tools`, `/doctor` - see what's connected and working\n- `/reload` - reload model settings and sign-ins\n- `/update [--check] [--channel latest|beta]` - check for a release, or close this room and install it\n- `/help all` - every command, including the ones for the shell\n- `/language` - choose the language Moondog uses\n- `/quit` - leave\n\nTab moves to the menu on the home screen. Esc goes back to typing.\nEnter sends, and Shift+Enter starts a new line.\nTab or Enter accepts a suggestion.\nCtrl+C stops a model or web request, or leaves when nothing is running.\nIn the profile, type to filter, Tab switches lists, and Enter shows what you can do.\nCtrl+R refreshes it and Ctrl+O opens the full report.\nYour profile works without a model.\nPut quotes around paths, titles, and names that have spaces.": "# Sua sala de escuta\n\n## 01 / Ouça e descubra\n\nDigite para conversar sobre música, pedir uma playlist ou explorar.\nPara conversar, o Moondog precisa de um modelo: `/auth` faz o login e `/model` escolhe um.\nEnquanto a resposta chega, cada passo aparece na conversa, e o rodapé mostra o que está em andamento.\n\n- `/taste` - seu perfil: abra qualquer música ou artista para ver por que está ali\n- `/taste report` - o panorama completo em uma página\n- `/import` - traga seu histórico, sua biblioteca ou uma playlist\n- `/lyrics` - a letra na capa; `/lyrics sync` busca mais\n- `/service` - escolha onde eu toco a música: Spotify, Apple Music ou NetEase\n- `/spotify` - toque, adicione à fila e crie playlists no Spotify\n- Peça para passar a reprodução para o seu iPhone, computador ou outro dispositivo do Spotify pelo nome\n- `/web search <busca>` ou `/web read <url>` - pesquise em sites públicos de música\n\n## 02 / Deixe com a sua cara\n\n- `/profile` - o mesmo perfil de `/taste`\n- `/profile corrections` - tudo o que você me disse\n- `/profile retract <id>` - desfaça uma dessas escolhas\n- `/profile help` - todos os comandos do perfil\n- `/remember <texto>`, `/memory`, `/forget <id>` - o que eu lembro entre conversas\n\n## 03 / Pela sala\n\n- `/home` - volta para a capa do disco; a conversa continua\n- `/theme paper|charcoal|terminal|auto` - muda o visual\n- `/art braille|ascii|off` - muda a ilustração\n- `/motion on|off` - liga ou desliga a animação\n- `/commands` ou Ctrl+P - busca qualquer comando; sua mensagem não se perde\n- Page Up e Page Down rolam a conversa. O cabeçalho e o rascunho ficam no lugar\n- Para cima e para baixo no rascunho recuperam o que você digitou nesta conversa\n- `/resume` - retome uma conversa salva (digite para filtrar, Enter abre)\n- `/new` - comece do zero; esta conversa fica salva\n- `/status`, `/sources`, `/tools`, `/doctor` - veja o que está conectado e funcionando\n- `/reload` - recarrega as configurações do modelo e os logins\n- `/update [--check] [--channel latest|beta]` - procura uma versão nova, ou fecha esta sala e instala\n- `/help all` - todos os comandos, inclusive os do terminal\n- `/language` - escolha o idioma do Moondog\n- `/quit` - sair\n\nNa tela inicial, Tab vai para o menu. Esc volta para a digitação.\nEnter envia, e Shift+Enter começa uma nova linha.\nTab ou Enter aceitam uma sugestão.\nCtrl+C interrompe um pedido ao modelo ou à web, ou sai quando nada está rodando.\nNo perfil, digite para filtrar, Tab troca de lista e Enter mostra o que você pode fazer.\nCtrl+R atualiza e Ctrl+O abre o relatório completo.\nSeu perfil funciona sem modelo.\nColoque entre aspas caminhos, títulos e nomes com espaços.",
|
|
26
26
|
"Listening profile": "Perfil de escuta",
|
|
27
27
|
"Profile": "Perfil",
|
|
28
28
|
"See what your listening reveals. Tell me what I missed.": "Veja o que a sua escuta revela. Me diga o que eu deixei passar.",
|
|
@@ -176,7 +176,7 @@ export default {
|
|
|
176
176
|
"Memory": "Memória",
|
|
177
177
|
"Right now I can't change anything in your music accounts.": "No momento não consigo mudar nada nas suas contas de música.",
|
|
178
178
|
"I can make changes in your connected accounts, and I always ask first.": "Posso fazer mudanças nas suas contas conectadas, e sempre pergunto antes.",
|
|
179
|
-
"# Every command\n\nFrom your shell:\n\n- `moondog --version` - show the installed version\n- `moondog update [--check] [--channel latest|beta]` - check for or install a published release\n- `moondog web status|search|read [arguments] [--json]` - look things up on public music sites through DeepSeek, Brave Search or the Codex CLI\n- `moondog demo-history --output <absolute-file.zip> [--json]` - make a fictional Spotify history ZIP to try the importer with\n- `moondog auth login <provider>` - sign in to a model provider; the key is typed out of sight, and openai-codex uses your ChatGPT sign-in\n- `moondog auth status [provider]` - see which sign-ins are saved\n- `moondog auth logout <provider>` - sign out of a provider\n- `moondog spotify help` - set up and control Spotify\n- `moondog spotify login [client-id]` - connect Spotify in your browser\n- `moondog spotify now|devices|queue` - see what Spotify is playing, where, and what's next\n- `moondog spotify recent` - see what you played lately\n- `moondog spotify sync-recent` - add your latest plays to your profile\n- `moondog spotify sync-library` - add your Spotify library to your profile\n- `moondog spotify play|pause|next|previous` - control Spotify playback\n- `moondog listenbrainz import-history <listen-history.json>` - add a ListenBrainz listens file to your profile\n- `moondog catalog latest-single --artist <name> [--known-release <title> | --from <spotify-history.zip>]` - find an artist's latest single on Apple Music (US), no model needed\n- `moondog status [--json]` - see where things stand\n- `moondog taste [--json]` - your listening report\n- `moondog taste --html [--output <file.html>]` - save your report as a web page that works offline\n- `moondog taste --card [--output <file.html>]` - save a short recap you can check before sharing\n- `moondog taste --from <spotify-history.zip> --html` - a one-off report from a Spotify ZIP, without saving it\n- `moondog taste --from <account-data.zip> --from <extended-history.zip> --html` - a one-off report from both Spotify exports together\n- `moondog taste --from <spotify-history.zip> --save --html` - save the Spotify history, then show your full report\n- `moondog data inspect --scope <listening|apple|profile>` - see what's stored, and get the code needed to reset it\n- `moondog data export --scope <listening|apple|profile> --output <directory>` - export a copy, leaving the original alone\n- `moondog data reset --scope <listening|apple|profile> --confirm <token>` - set stored data aside (it is archived, not deleted)\n- `moondog profile build [--force]` - build or resume a saved profile with your connected model\n- `moondog profile saved [offset]` - read your saved profile\n- `moondog profile explain <number>` - trace a saved finding to its evidence\n- `moondog profile corrections [--all]` - everything you've told me, including earlier choices\n- `moondog profile correct --artist <name> (--like|--avoid)` - like an artist, or keep them out\n- `moondog profile correct --track <title> --by <artist> (--like|--avoid)` - like a track, or keep it out\n- `moondog profile retract <correction-id>` - undo one of your choices\n- `moondog demo --offline [--json]` - a demo with made-up data, no sign-in needed\n- `moondog demo [prompt] [--json]` - the same demo, talking through your model\n- `moondog ask <prompt>` - ask one question and exit\n- `moondog remember <text>` - ask me to remember something\n- `moondog forget <memory-id>` - forget something\n- `moondog memory reflect [--dry-run] [--json]` - let me think over recent conversations now\n- `moondog` - open the listening room\n\nInside the listening room:\n\n- `/update [--check] [--channel latest|beta]` - check for updates, or save and close this session to install one\n- `/status` or `/sources` - see where things stand\n- `/profile` or `/taste` - your profile, and why each song or artist is there\n- `/taste report` - the whole report on one page\n- `/profile build [--force]` - build or resume a saved reading; Ctrl+C keeps progress\n- `/profile saved [offset]` - read your saved profile\n- `/profile explain <number>` - inspect a saved finding's evidence\n- `/profile corrections [--all]` - everything you've told me\n- `/profile correct --track \"<title>\" --by \"<artist>\" (--like|--avoid)` - like a track, or keep it out\n- `/profile correct --artist \"<name>\" (--like|--avoid)` - like an artist, or keep them out\n- `/profile retract <correction-id>` - undo a choice\n- `/memory` - what I remember\n- `/tools` - what I can do right now\n- `/doctor` - check your setup\n- `/model` - pick the model I talk through\n- `/model <provider> <model>` - switch straight to a model\n- `/model refresh [provider]` - update public model choices; keep the selected model\n- `/auth [provider]` - sign in to a model provider\n- `/web status|search|read` - look things up on public music sites\n- `/import [path]` - bring in your history, library, or a playlist\n- `/language` - choose the language Moondog uses\n- `/spotify` - Spotify commands\n- `/spotify login [client-id]` - connect Spotify\n- `/spotify now|devices|queue` - see what's playing, where, and what's next\n- `/spotify recent|sync-recent` - see or save your latest plays\n- `/spotify import-history \"/path/to/spotify-history.zip\"` - add a Spotify ZIP, no sign-in needed\n- `/skip` or `/stop` - move to the next song preview, or stop them\n- `/reload` - reload model settings and sign-ins\n- `/remember [kind] <text>` - ask me to remember something\n- `/forget <memory-id>` - forget something\n- `/rewind` or Alt+R - edit an earlier message in place; the messages after it are replaced\n- `/branch` - go on from here in a new conversation; this one stays saved\n- `/rewind latest` - edit the most recent message\n- `/resume` - pick up a saved conversation\n- `/resume <session-id>` - go straight to one\n- `/new` - start fresh; the last one stays saved\n- `/quit` - exit\n\nAnything you type that isn't a command goes to the model you picked with `/model`, or the one set in `MOONDOG_PROVIDER` and `MOONDOG_MODEL`.\nSign in with `/auth`, or set the provider's API key in your environment. `/auth openai-codex` uses your ChatGPT sign-in.\nOnce your profile is ready, I can search your library, explain what I see, and plan playlists with you.\nI can only control Spotify after `moondog spotify login`, and I never post, send messages, delete anything, or spend money.\nAsk me to move playback onto a device by name, such as your iPhone.": "# Todos os comandos\n\nNo seu terminal:\n\n- `moondog --version` - mostra a versão instalada\n- `moondog update [--check] [--channel latest|beta]` - procura ou instala uma versão publicada\n- `moondog web status|search|read [argumentos] [--json]` - pesquisa em sites públicos de música pelo DeepSeek, pelo Brave Search ou pelo Codex CLI\n- `moondog demo-history --output <arquivo-absoluto.zip> [--json]` - cria um ZIP fictício de histórico do Spotify para testar a importação\n- `moondog auth login <provedor>` - faz login em um provedor de modelos; a chave é digitada sem aparecer, e o openai-codex usa seu login do ChatGPT\n- `moondog auth status [provedor]` - mostra quais logins estão salvos\n- `moondog auth logout <provedor>` - sai de um provedor\n- `moondog spotify help` - configura e controla o Spotify\n- `moondog spotify login [client-id]` - conecta o Spotify no navegador\n- `moondog spotify now|devices|queue` - mostra o que o Spotify está tocando, onde e o que vem depois\n- `moondog spotify recent` - mostra o que você ouviu ultimamente\n- `moondog spotify sync-recent` - adiciona suas últimas reproduções ao perfil\n- `moondog spotify sync-library` - adiciona sua biblioteca do Spotify ao perfil\n- `moondog spotify play|pause|next|previous` - controla a reprodução do Spotify\n- `moondog listenbrainz import-history <listen-history.json>` - adiciona um arquivo de escutas do ListenBrainz ao perfil\n- `moondog catalog latest-single --artist <nome> [--known-release <título> | --from <spotify-history.zip>]` - encontra o último single de um artista no Apple Music (EUA), sem modelo\n- `moondog status [--json]` - mostra como estão as coisas\n- `moondog taste [--json]` - seu relatório de escuta\n- `moondog taste --html [--output <arquivo.html>]` - salva o relatório como página web que funciona offline\n- `moondog taste --card [--output <arquivo.html>]` - salva um resumo curto que você pode conferir antes de compartilhar\n- `moondog taste --from <spotify-history.zip> --html` - um relatório único de um ZIP do Spotify, sem salvar\n- `moondog taste --from <account-data.zip> --from <extended-history.zip> --html` - um relatório único das duas exportações do Spotify juntas\n- `moondog taste --from <spotify-history.zip> --save --html` - salva o histórico do Spotify e mostra o relatório completo\n- `moondog data inspect --scope <listening|apple|profile>` - mostra o que está guardado e o código para redefinir\n- `moondog data export --scope <listening|apple|profile> --output <pasta>` - exporta uma cópia sem mexer no original\n- `moondog data reset --scope <listening|apple|profile> --confirm <código>` - deixa de lado os dados guardados (são arquivados, não apagados)\n- `moondog profile build [--force]` - cria ou retoma um perfil salvo com o modelo conectado\n- `moondog profile saved [deslocamento]` - lê seu perfil salvo\n- `moondog profile explain <número>` - rastreia uma descoberta salva até a evidência\n- `moondog profile corrections [--all]` - tudo o que você me disse, inclusive escolhas anteriores\n- `moondog profile correct --artist <nome> (--like|--avoid)` - marca que você curte um artista, ou tira ele das sugestões\n- `moondog profile correct --track <título> --by <artista> (--like|--avoid)` - marca que você curte uma música, ou tira ela das sugestões\n- `moondog profile retract <correction-id>` - desfaz uma das suas escolhas\n- `moondog demo --offline [--json]` - uma demonstração com dados inventados, sem login\n- `moondog demo [pedido] [--json]` - a mesma demonstração, conversando pelo seu modelo\n- `moondog ask <pedido>` - faz uma pergunta e sai\n- `moondog remember <texto>` - pede para eu lembrar de algo\n- `moondog forget <memory-id>` - esquece algo\n- `moondog memory reflect [--dry-run] [--json]` - me deixa repassar agora as conversas recentes\n- `moondog` - abre a sala de escuta\n\nDentro da sala de escuta:\n\n- `/update [--check] [--channel latest|beta]` - procura atualizações, ou salva e fecha esta sessão para instalar uma\n- `/status` ou `/sources` - mostra como estão as coisas\n- `/profile` ou `/taste` - seu perfil, e por que cada música ou artista está ali\n- `/taste report` - o relatório completo em uma página\n- `/profile build [--force]` - cria ou retoma uma leitura salva; Ctrl+C guarda o progresso\n- `/profile saved [deslocamento]` - lê seu perfil salvo\n- `/profile explain <número>` - mostra a evidência de uma descoberta salva\n- `/profile corrections [--all]` - tudo o que você me disse\n- `/profile correct --track \"<título>\" --by \"<artista>\" (--like|--avoid)` - marca que você curte uma música, ou tira ela das sugestões\n- `/profile correct --artist \"<nome>\" (--like|--avoid)` - marca que você curte um artista, ou tira ele das sugestões\n- `/profile retract <correction-id>` - desfaz uma escolha\n- `/memory` - o que eu lembro\n- `/tools` - o que eu consigo fazer agora\n- `/doctor` - verifica sua configuração\n- `/model` - escolhe o modelo com que eu converso\n- `/model <provedor> <modelo>` - troca direto para um modelo\n- `/model refresh [provedor]` - atualiza as opções públicas de modelos; mantém o modelo escolhido\n- `/auth [provedor]` - faz login em um provedor de modelos\n- `/web status|search|read` - pesquisa em sites públicos de música\n- `/import [caminho]` - traz seu histórico, sua biblioteca ou uma playlist\n- `/language` - escolha o idioma do Moondog\n- `/spotify` - comandos do Spotify\n- `/spotify login [client-id]` - conecta o Spotify\n- `/spotify now|devices|queue` - mostra o que está tocando, onde e o que vem depois\n- `/spotify recent|sync-recent` - mostra ou salva suas últimas reproduções\n- `/spotify import-history \"/caminho/para/spotify-history.zip\"` - adiciona um ZIP do Spotify, sem login\n- `/skip` ou `/stop` - pula para a próxima prévia, ou interrompe as prévias\n- `/reload` - recarrega as configurações do modelo e os logins\n- `/remember [tipo] <texto>` - pede para eu lembrar de algo\n- `/forget <memory-id>` - esquece algo\n- `/rewind` ou Alt+R - edita uma mensagem anterior nesta conversa; as mensagens seguintes são substituídas\n- `/branch` - continua daqui em uma conversa nova; esta fica salva\n- `/rewind latest` - edita a mensagem mais recente\n- `/resume` - retoma uma conversa salva\n- `/resume <session-id>` - vai direto para uma\n- `/new` - começa do zero; a anterior fica salva\n- `/quit` - sair\n\nTudo o que você digitar que não for comando vai para o modelo escolhido com `/model`, ou o definido em `MOONDOG_PROVIDER` e `MOONDOG_MODEL`.\nFaça login com `/auth`, ou defina a chave de API do provedor no seu ambiente. `/auth openai-codex` usa seu login do ChatGPT.\nQuando seu perfil estiver pronto, posso buscar na sua biblioteca, explicar o que vejo e planejar playlists com você.\nSó consigo controlar o Spotify depois de `moondog spotify login`, e nunca publico, mando mensagens, apago nada ou gasto dinheiro.\nPeça para eu passar a reprodução para um dispositivo pelo nome, como o seu iPhone.",
|
|
179
|
+
"# Every command\n\nFrom your shell:\n\n- `moondog --version` - show the installed version\n- `moondog update [--check] [--channel latest|beta]` - check for or install a published release\n- `moondog web status|search|read [arguments] [--json]` - look things up on public music sites through DeepSeek, Brave Search or the Codex CLI\n- `moondog demo-history --output <absolute-file.zip> [--json]` - make a fictional Spotify history ZIP to try the importer with\n- `moondog auth login <provider>` - sign in to a model provider; the key is typed out of sight; `openai --chatgpt` signs in with your ChatGPT subscription\n- `moondog auth status [provider]` - see which sign-ins are saved\n- `moondog auth logout <provider>` - sign out of a provider\n- `moondog spotify help` - set up and control Spotify\n- `moondog spotify login [client-id]` - connect Spotify in your browser\n- `moondog spotify now|devices|queue` - see what Spotify is playing, where, and what's next\n- `moondog spotify recent` - see what you played lately\n- `moondog spotify sync-recent` - add your latest plays to your profile\n- `moondog spotify sync-library` - add your Spotify library to your profile\n- `moondog spotify play|pause|next|previous` - control Spotify playback\n- `moondog listenbrainz import-history <listen-history.json>` - add a ListenBrainz listens file to your profile\n- `moondog catalog latest-single --artist <name> [--known-release <title> | --from <spotify-history.zip>]` - find an artist's latest single on Apple Music (US), no model needed\n- `moondog status [--json]` - see where things stand\n- `moondog taste [--json]` - your listening report\n- `moondog taste --html [--output <file.html>]` - save your report as a web page that works offline\n- `moondog taste --card [--output <file.html>]` - save a short recap you can check before sharing\n- `moondog taste --from <spotify-history.zip> --html` - a one-off report from a Spotify ZIP, without saving it\n- `moondog taste --from <account-data.zip> --from <extended-history.zip> --html` - a one-off report from both Spotify exports together\n- `moondog taste --from <spotify-history.zip> --save --html` - save the Spotify history, then show your full report\n- `moondog data inspect --scope <listening|apple|profile>` - see what's stored, and get the code needed to reset it\n- `moondog data export --scope <listening|apple|profile> --output <directory>` - export a copy, leaving the original alone\n- `moondog data reset --scope <listening|apple|profile> --confirm <token>` - set stored data aside (it is archived, not deleted)\n- `moondog profile build [--force]` - build or resume a saved profile with your connected model\n- `moondog profile saved [offset]` - read your saved profile\n- `moondog profile explain <number>` - trace a saved finding to its evidence\n- `moondog profile corrections [--all]` - everything you've told me, including earlier choices\n- `moondog profile correct --artist <name> (--like|--avoid)` - like an artist, or keep them out\n- `moondog profile correct --track <title> --by <artist> (--like|--avoid)` - like a track, or keep it out\n- `moondog profile retract <correction-id>` - undo one of your choices\n- `moondog demo --offline [--json]` - a demo with made-up data, no sign-in needed\n- `moondog demo [prompt] [--json]` - the same demo, talking through your model\n- `moondog ask <prompt>` - ask one question and exit\n- `moondog remember <text>` - ask me to remember something\n- `moondog forget <memory-id>` - forget something\n- `moondog memory reflect [--dry-run] [--json]` - let me think over recent conversations now\n- `moondog` - open the listening room\n\nInside the listening room:\n\n- `/update [--check] [--channel latest|beta]` - check for updates, or save and close this session to install one\n- `/status` or `/sources` - see where things stand\n- `/profile` or `/taste` - your profile, and why each song or artist is there\n- `/taste report` - the whole report on one page\n- `/profile build [--force]` - build or resume a saved reading; Ctrl+C keeps progress\n- `/profile saved [offset]` - read your saved profile\n- `/profile explain <number>` - inspect a saved finding's evidence\n- `/profile corrections [--all]` - everything you've told me\n- `/profile correct --track \"<title>\" --by \"<artist>\" (--like|--avoid)` - like a track, or keep it out\n- `/profile correct --artist \"<name>\" (--like|--avoid)` - like an artist, or keep them out\n- `/profile retract <correction-id>` - undo a choice\n- `/memory` - what I remember\n- `/tools` - what I can do right now\n- `/doctor` - check your setup\n- `/model` - pick the model I talk through\n- `/model <provider> <model>` - switch straight to a model\n- `/model refresh [provider]` - update public model choices; keep the selected model\n- `/auth [provider]` - sign in to a model provider\n- `/web status|search|read` - look things up on public music sites\n- `/import [path]` - bring in your history, library, or a playlist\n- `/language` - choose the language Moondog uses\n- `/service [spotify|apple_music|netease]` - choose where I play music\n- `/spotify` - Spotify commands\n- `/spotify login [client-id]` - connect Spotify\n- `/spotify now|devices|queue` - see what's playing, where, and what's next\n- `/spotify recent|sync-recent` - see or save your latest plays\n- `/spotify import-history \"/path/to/spotify-history.zip\"` - add a Spotify ZIP, no sign-in needed\n- `/skip` or `/stop` - move to the next song preview, or stop them\n- `/reload` - reload model settings and sign-ins\n- `/remember [kind] <text>` - ask me to remember something\n- `/forget <memory-id>` - forget something\n- `/rewind` or Alt+R - edit an earlier message in place; the messages after it are replaced\n- `/branch` - go on from here in a new conversation; this one stays saved\n- `/rewind latest` - edit the most recent message\n- `/resume` - pick up a saved conversation\n- `/resume <session-id>` - go straight to one\n- `/new` - start fresh; the last one stays saved\n- `/quit` - exit\n\nAnything you type that isn't a command goes to the model you picked with `/model`, or the one set in `MOONDOG_PROVIDER` and `MOONDOG_MODEL`.\nSign in with `/auth`, or set the provider's API key in your environment. `/auth openai` signs in with your ChatGPT subscription or an API key.\nOnce your profile is ready, I can search your library, explain what I see, and plan playlists with you.\nI can only control Spotify after `moondog spotify login`, and I never post, send messages, delete anything, or spend money.\nAsk me to move playback onto a device by name, such as your iPhone.": "# Todos os comandos\n\nNo seu terminal:\n\n- `moondog --version` - mostra a versão instalada\n- `moondog update [--check] [--channel latest|beta]` - procura ou instala uma versão publicada\n- `moondog web status|search|read [argumentos] [--json]` - pesquisa em sites públicos de música pelo DeepSeek, pelo Brave Search ou pelo Codex CLI\n- `moondog demo-history --output <arquivo-absoluto.zip> [--json]` - cria um ZIP fictício de histórico do Spotify para testar a importação\n- `moondog auth login <provedor>` - faz login em um provedor de modelos; a chave é digitada sem aparecer, e o `openai --chatgpt` entra com sua assinatura do ChatGPT\n- `moondog auth status [provedor]` - mostra quais logins estão salvos\n- `moondog auth logout <provedor>` - sai de um provedor\n- `moondog spotify help` - configura e controla o Spotify\n- `moondog spotify login [client-id]` - conecta o Spotify no navegador\n- `moondog spotify now|devices|queue` - mostra o que o Spotify está tocando, onde e o que vem depois\n- `moondog spotify recent` - mostra o que você ouviu ultimamente\n- `moondog spotify sync-recent` - adiciona suas últimas reproduções ao perfil\n- `moondog spotify sync-library` - adiciona sua biblioteca do Spotify ao perfil\n- `moondog spotify play|pause|next|previous` - controla a reprodução do Spotify\n- `moondog listenbrainz import-history <listen-history.json>` - adiciona um arquivo de escutas do ListenBrainz ao perfil\n- `moondog catalog latest-single --artist <nome> [--known-release <título> | --from <spotify-history.zip>]` - encontra o último single de um artista no Apple Music (EUA), sem modelo\n- `moondog status [--json]` - mostra como estão as coisas\n- `moondog taste [--json]` - seu relatório de escuta\n- `moondog taste --html [--output <arquivo.html>]` - salva o relatório como página web que funciona offline\n- `moondog taste --card [--output <arquivo.html>]` - salva um resumo curto que você pode conferir antes de compartilhar\n- `moondog taste --from <spotify-history.zip> --html` - um relatório único de um ZIP do Spotify, sem salvar\n- `moondog taste --from <account-data.zip> --from <extended-history.zip> --html` - um relatório único das duas exportações do Spotify juntas\n- `moondog taste --from <spotify-history.zip> --save --html` - salva o histórico do Spotify e mostra o relatório completo\n- `moondog data inspect --scope <listening|apple|profile>` - mostra o que está guardado e o código para redefinir\n- `moondog data export --scope <listening|apple|profile> --output <pasta>` - exporta uma cópia sem mexer no original\n- `moondog data reset --scope <listening|apple|profile> --confirm <código>` - deixa de lado os dados guardados (são arquivados, não apagados)\n- `moondog profile build [--force]` - cria ou retoma um perfil salvo com o modelo conectado\n- `moondog profile saved [deslocamento]` - lê seu perfil salvo\n- `moondog profile explain <número>` - rastreia uma descoberta salva até a evidência\n- `moondog profile corrections [--all]` - tudo o que você me disse, inclusive escolhas anteriores\n- `moondog profile correct --artist <nome> (--like|--avoid)` - marca que você curte um artista, ou tira ele das sugestões\n- `moondog profile correct --track <título> --by <artista> (--like|--avoid)` - marca que você curte uma música, ou tira ela das sugestões\n- `moondog profile retract <correction-id>` - desfaz uma das suas escolhas\n- `moondog demo --offline [--json]` - uma demonstração com dados inventados, sem login\n- `moondog demo [pedido] [--json]` - a mesma demonstração, conversando pelo seu modelo\n- `moondog ask <pedido>` - faz uma pergunta e sai\n- `moondog remember <texto>` - pede para eu lembrar de algo\n- `moondog forget <memory-id>` - esquece algo\n- `moondog memory reflect [--dry-run] [--json]` - me deixa repassar agora as conversas recentes\n- `moondog` - abre a sala de escuta\n\nDentro da sala de escuta:\n\n- `/update [--check] [--channel latest|beta]` - procura atualizações, ou salva e fecha esta sessão para instalar uma\n- `/status` ou `/sources` - mostra como estão as coisas\n- `/profile` ou `/taste` - seu perfil, e por que cada música ou artista está ali\n- `/taste report` - o relatório completo em uma página\n- `/profile build [--force]` - cria ou retoma uma leitura salva; Ctrl+C guarda o progresso\n- `/profile saved [deslocamento]` - lê seu perfil salvo\n- `/profile explain <número>` - mostra a evidência de uma descoberta salva\n- `/profile corrections [--all]` - tudo o que você me disse\n- `/profile correct --track \"<título>\" --by \"<artista>\" (--like|--avoid)` - marca que você curte uma música, ou tira ela das sugestões\n- `/profile correct --artist \"<nome>\" (--like|--avoid)` - marca que você curte um artista, ou tira ele das sugestões\n- `/profile retract <correction-id>` - desfaz uma escolha\n- `/memory` - o que eu lembro\n- `/tools` - o que eu consigo fazer agora\n- `/doctor` - verifica sua configuração\n- `/model` - escolhe o modelo com que eu converso\n- `/model <provedor> <modelo>` - troca direto para um modelo\n- `/model refresh [provedor]` - atualiza as opções públicas de modelos; mantém o modelo escolhido\n- `/auth [provedor]` - faz login em um provedor de modelos\n- `/web status|search|read` - pesquisa em sites públicos de música\n- `/import [caminho]` - traz seu histórico, sua biblioteca ou uma playlist\n- `/language` - escolha o idioma do Moondog\n- `/service [spotify|apple_music|netease]` - escolha onde eu toco a música\n- `/spotify` - comandos do Spotify\n- `/spotify login [client-id]` - conecta o Spotify\n- `/spotify now|devices|queue` - mostra o que está tocando, onde e o que vem depois\n- `/spotify recent|sync-recent` - mostra ou salva suas últimas reproduções\n- `/spotify import-history \"/caminho/para/spotify-history.zip\"` - adiciona um ZIP do Spotify, sem login\n- `/skip` ou `/stop` - pula para a próxima prévia, ou interrompe as prévias\n- `/reload` - recarrega as configurações do modelo e os logins\n- `/remember [tipo] <texto>` - pede para eu lembrar de algo\n- `/forget <memory-id>` - esquece algo\n- `/rewind` ou Alt+R - edita uma mensagem anterior nesta conversa; as mensagens seguintes são substituídas\n- `/branch` - continua daqui em uma conversa nova; esta fica salva\n- `/rewind latest` - edita a mensagem mais recente\n- `/resume` - retoma uma conversa salva\n- `/resume <session-id>` - vai direto para uma\n- `/new` - começa do zero; a anterior fica salva\n- `/quit` - sair\n\nTudo o que você digitar que não for comando vai para o modelo escolhido com `/model`, ou o definido em `MOONDOG_PROVIDER` e `MOONDOG_MODEL`.\nFaça login com `/auth`, ou defina a chave de API do provedor no seu ambiente. `/auth openai` entra com sua assinatura do ChatGPT ou com uma chave de API.\nQuando seu perfil estiver pronto, posso buscar na sua biblioteca, explicar o que vejo e planejar playlists com você.\nSó consigo controlar o Spotify depois de `moondog spotify login`, e nunca publico, mando mensagens, apago nada ou gasto dinheiro.\nPeça para eu passar a reprodução para um dispositivo pelo nome, como o seu iPhone.",
|
|
180
180
|
"Apple Music library": "Biblioteca do Apple Music",
|
|
181
181
|
"Model": "Modelo",
|
|
182
182
|
"Finding similar music": "Encontrar música parecida",
|
|
@@ -615,7 +615,6 @@ export default {
|
|
|
615
615
|
"Use /auth or /auth <provider>. Type API keys only into the hidden prompt that follows.": "Use /auth ou /auth <provedor>. Digite chaves de API só no campo oculto que aparece em seguida.",
|
|
616
616
|
"Sign-in isn't available when Moondog is started this way.": "O login não está disponível quando o Moondog é aberto deste jeito.",
|
|
617
617
|
"I can't sign in to that provider. Type /auth to see the ones I can.": "Não consigo fazer login nesse provedor. Digite /auth para ver os que eu consigo.",
|
|
618
|
-
"ChatGPT sign-in": "Login do ChatGPT",
|
|
619
618
|
"API key": "Chave de API",
|
|
620
619
|
"Sign in to a model or web search service": "Faça login em um provedor de modelos ou de pesquisa na web",
|
|
621
620
|
"Sign-in cancelled.": "Login cancelado.",
|
|
@@ -771,7 +770,14 @@ export default {
|
|
|
771
770
|
"Cancelled.": "Cancelado.",
|
|
772
771
|
"/{command} didn't work.": "/{command} não deu certo.",
|
|
773
772
|
"Your request is still here · /model connects a model first.": "Seu pedido continua aqui · /model conecta um modelo primeiro.",
|
|
774
|
-
"
|
|
773
|
+
"Reading the room": "Sentindo o clima",
|
|
774
|
+
"Checking the request line": "Conferindo os pedidos",
|
|
775
|
+
"Finding the groove": "Procurando o groove",
|
|
776
|
+
"Working the decks": "Fazendo scratch",
|
|
777
|
+
"Planning the segue": "Pensando na transição",
|
|
778
|
+
"Mic check": "Testando o som",
|
|
779
|
+
"Riding the faders": "Ajustando os faders",
|
|
780
|
+
"Finding the cue": "Procurando a entrada",
|
|
775
781
|
"{count} running · {label}": "{count} em andamento · {label}",
|
|
776
782
|
"{label} didn't work · carrying on...": "{label} não deu certo · seguindo em frente...",
|
|
777
783
|
"Can't reach the model. Trying again ({attempt}/{max})...": "Não consigo acessar o modelo. Tentando de novo ({attempt}/{max})...",
|
|
@@ -969,4 +975,56 @@ export default {
|
|
|
969
975
|
"Web search key": "Chave de pesquisa na web",
|
|
970
976
|
"Saved the {service} key. Web search goes through {provider}.": "Salvei a chave do {service}. A pesquisa na web passa pelo {provider}.",
|
|
971
977
|
"Saved the {service} key, but web search still isn't ready. Run `/web status` to see why.": "Salvei a chave do {service}, mas a pesquisa na web ainda não está pronta. Use `/web status` para ver o motivo.",
|
|
978
|
+
"Add an endpoint by its address": "Adicionar um endpoint pelo endereço",
|
|
979
|
+
"Remove an endpoint and its key": "Remover um endpoint e a chave dele",
|
|
980
|
+
"ChatGPT sign-in or API key": "Login do ChatGPT ou chave de API",
|
|
981
|
+
"ChatGPT subscription": "Assinatura do ChatGPT",
|
|
982
|
+
"Sign in with ChatGPT in your browser": "Entre com o ChatGPT no navegador",
|
|
983
|
+
"Paste an OpenAI API key": "Cole uma chave de API da OpenAI",
|
|
984
|
+
"How do you want to use OpenAI?": "Como você quer usar a OpenAI?",
|
|
985
|
+
"Endpoints aren't available when Moondog is started this way.": "Os endpoints não estão disponíveis quando o Moondog é iniciado assim.",
|
|
986
|
+
"Use /endpoint, /endpoint add, or /endpoint remove <id>.": "Use /endpoint, /endpoint add ou /endpoint remove <id>.",
|
|
987
|
+
"Type `/model <id>` to talk through one, or `/endpoint add` to add another.": "Digite `/model <id>` para conversar por um deles, ou `/endpoint add` para adicionar outro.",
|
|
988
|
+
"No endpoints yet. `/endpoint add` adds any service that speaks OpenAI's or Anthropic's API, by its address.": "Ainda não há endpoints. `/endpoint add` adiciona, pelo endereço, qualquer serviço que fale a API da OpenAI ou da Anthropic.",
|
|
989
|
+
"Endpoints listed.": "Endpoints listados.",
|
|
990
|
+
"Saved {name}. Type `/model {id}` to pick one of its models.": "{name} salvo. Digite `/model {id}` para escolher um dos modelos dele.",
|
|
991
|
+
"Endpoint saved.": "Endpoint salvo.",
|
|
992
|
+
"Removed {name} and its key.": "{name} e a chave dele foram removidos.",
|
|
993
|
+
"Endpoint removed.": "Endpoint removido.",
|
|
994
|
+
"Add a model service by its address": "Adicione um serviço de modelos pelo endereço",
|
|
995
|
+
"Whole songs on your Spotify devices": "Músicas inteiras nos seus dispositivos do Spotify",
|
|
996
|
+
"30-second previews, played here": "Prévias de 30 segundos, tocadas aqui",
|
|
997
|
+
"Whole songs through ncm-cli": "Músicas inteiras pelo ncm-cli",
|
|
998
|
+
"NetEase Music": "NetEase Music",
|
|
999
|
+
"Set up ncm-cli first": "Configure o ncm-cli primeiro",
|
|
1000
|
+
"Sign in to {provider}": "Fazer login em {provider}",
|
|
1001
|
+
"Choose another model": "Escolher outro modelo",
|
|
1002
|
+
"Choose a model": "Escolher um modelo",
|
|
1003
|
+
"Pick a provider and model, then sign in": "Escolha um provedor e um modelo, depois faça login",
|
|
1004
|
+
"Two things before we start: where I play your music, and the model I talk through.": "Duas coisas antes de começar: onde eu toco sua música e o modelo com que eu falo.",
|
|
1005
|
+
"One thing before we start: where I play your music.": "Uma coisa antes de começar: onde eu toco sua música.",
|
|
1006
|
+
"One thing before we start: the model I talk through.": "Uma coisa antes de começar: o modelo com que eu falo.",
|
|
1007
|
+
"Where should I play music?": "Onde eu toco a música?",
|
|
1008
|
+
"Which model should I talk through?": "Com qual modelo eu falo?",
|
|
1009
|
+
"/service changes it any time.": "/service muda isso quando você quiser.",
|
|
1010
|
+
"{model} is saved, but you're not signed in to {provider} yet.": "{model} está salvo, mas você ainda não fez login em {provider}.",
|
|
1011
|
+
"Sign in with ChatGPT, or use an API key from another provider. Your profile works without one.": "Faça login com o ChatGPT ou use uma chave de API de outro provedor. Seu perfil funciona sem modelo.",
|
|
1012
|
+
"NetEase plays through its own command line tool. Run this in another terminal, then choose it again:": "O NetEase toca pela própria ferramenta de linha de comando. Execute isto em outro terminal e escolha de novo:",
|
|
1013
|
+
"Welcome to the machine.": "Welcome to the machine.",
|
|
1014
|
+
"↑↓ ↵ choose · esc skip setup": "↑↓ ↵ escolher · esc pula a configuração",
|
|
1015
|
+
"↑↓ choose · enter select · esc skip setup": "↑↓ escolher · enter seleciona · esc pula a configuração",
|
|
1016
|
+
"Spotify it is. /spotify help shows how to connect your account.": "Spotify, então. /spotify help mostra como conectar sua conta.",
|
|
1017
|
+
"{service} it is.": "{service}, então.",
|
|
1018
|
+
"Choosing a music service isn't available when Moondog is started this way.": "Escolher um serviço de música não está disponível quando o Moondog é aberto deste jeito.",
|
|
1019
|
+
"Use /service, or /service spotify, apple_music, or netease.": "Use /service, ou /service spotify, apple_music ou netease.",
|
|
1020
|
+
"Music service unchanged.": "Serviço de música sem mudança.",
|
|
1021
|
+
"NetEase Music plays through its own command line tool. Run this in another terminal, then choose it again with `/service`:\n\n```\n{command}\n```": "O NetEase Music toca pela própria ferramenta de linha de comando. Execute isto em outro terminal e escolha de novo com `/service`:\n\n```\n{command}\n```",
|
|
1022
|
+
"NetEase needs ncm-cli first.": "O NetEase precisa do ncm-cli primeiro.",
|
|
1023
|
+
"Setup · music service": "Configuração · serviço de música",
|
|
1024
|
+
"Setup · model": "Configuração · modelo",
|
|
1025
|
+
"All set. /spotify help shows how to connect Spotify.": "Tudo pronto. /spotify help mostra como conectar o Spotify.",
|
|
1026
|
+
"All set. Say anything, or press Tab to look around.": "Tudo pronto. Diga qualquer coisa, ou aperte Tab para dar uma olhada.",
|
|
1027
|
+
"Skipped. /service and /model are here when you want them.": "Pulado. /service e /model continuam aqui quando você quiser.",
|
|
1028
|
+
"Saving your music service...": "Salvando seu serviço de música...",
|
|
1029
|
+
"Choose where Moondog plays music": "Escolha onde o Moondog toca música",
|
|
972
1030
|
};
|
package/src/i18n/screen/zh.mjs
CHANGED
|
@@ -22,7 +22,7 @@ export default {
|
|
|
22
22
|
"What have you been listening to?": "最近在听什么?",
|
|
23
23
|
"A song, a playlist, or what to play next.": "一首歌、一个歌单,或者接下来放什么。",
|
|
24
24
|
"Your personal music agent.": "你的私人音乐助手。",
|
|
25
|
-
"# Your listening room\n\n## 01 / Listen and discover\n\nJust type to talk about music, ask for a playlist, or go exploring.\nTo talk, Moondog needs a model: `/auth` signs you in, then `/model` picks one.\nWhile an answer is coming, each step shows in the conversation, and the footer names the one in progress.\n\n- `/taste` - your profile: open any song or artist to see why it's there\n- `/taste report` - the whole picture on one page\n- `/import` - bring in your history, your library, or a playlist\n- `/lyrics` - the lyrics on the sleeve; `/lyrics sync` finds more\n- `/spotify` - play, queue, and make playlists in Spotify\n- Ask to move playback onto your iPhone, computer, or another Spotify device by name\n- `/web search <query>` or `/web read <url>` - look things up on public music sites\n\n## 02 / Make it yours\n\n- `/profile` - the same profile as `/taste`\n- `/profile corrections` - everything you've told me\n- `/profile retract <id>` - undo one of those\n- `/profile help` - the full set of profile commands\n- `/remember <text>`, `/memory`, `/forget <id>` - what I remember between conversations\n\n## 03 / Around the room\n\n- `/home` - back to the record sleeve; the conversation stays\n- `/theme paper|charcoal|terminal|auto` - change the look\n- `/art braille|ascii|off` - change the artwork\n- `/motion on|off` - turn the animation on or off\n- `/commands` or Ctrl+P - search every command; your message stays put\n- Page Up and Page Down scroll the conversation. The header and your draft stay put\n- Up and Down in the draft recall what you typed in this conversation\n- `/resume` - pick up a saved conversation (type to filter, Enter opens)\n- `/new` - start fresh; this conversation stays saved\n- `/status`, `/sources`, `/tools`, `/doctor` - see what's connected and working\n- `/reload` - reload model settings and sign-ins\n- `/update [--check] [--channel latest|beta]` - check for a release, or close this room and install it\n- `/help all` - every command, including the ones for the shell\n- `/language` - choose the language Moondog uses\n- `/quit` - leave\n\nTab moves to the menu on the home screen. Esc goes back to typing.\nEnter sends, and Shift+Enter starts a new line.\nTab or Enter accepts a suggestion.\nCtrl+C stops a model or web request, or leaves when nothing is running.\nIn the profile, type to filter, Tab switches lists, and Enter shows what you can do.\nCtrl+R refreshes it and Ctrl+O opens the full report.\nYour profile works without a model.\nPut quotes around paths, titles, and names that have spaces.": "# 你的聆听室\n\n## 01 / 听歌与发现\n\n直接输入就能聊音乐、要一个歌单,或者随便逛逛。\n对话需要一个模型:`/auth` 登录,然后用 `/model` 选一个。\n回答生成时,每一步都会显示在对话里,底栏会标出正在进行的那一步。\n\n- `/taste` - 你的资料:打开任意歌曲或艺人,看看它为什么在这里\n- `/taste report` - 一页看完整体情况\n- `/import` - 导入你的历史、曲库或一个歌单\n- `/lyrics` - 封套上的歌词;`/lyrics sync` 找更多\n- `/spotify` - 在 Spotify 里播放、加入队列、建歌单\n- 说出设备名,就能把播放切到你的 iPhone、电脑或其他 Spotify 设备\n- `/web search <关键词>` 或 `/web read <网址>` - 在公开音乐网站上查资料\n\n## 02 / 变成你的\n\n- `/profile` - 和 `/taste` 是同一份资料\n- `/profile corrections` - 你告诉过我的所有选择\n- `/profile retract <id>` - 撤销其中一项\n- `/profile help` - 资料相关的全部命令\n- `/remember <内容>`、`/memory`、`/forget <id>` - 我在对话之间记住的内容\n\n## 03 / 在房间里转转\n\n- `/home` - 回到唱片封套;对话还在\n- `/theme paper|charcoal|terminal|auto` - 换外观\n- `/art braille|ascii|off` - 换插画\n- `/motion on|off` - 打开或关闭动画\n- `/commands` 或 Ctrl+P - 搜索全部命令;你正在写的消息不会丢\n- Page Up 和 Page Down 滚动对话,顶栏和草稿保持不动\n- 在草稿里按上下键,可以找回本次对话中输入过的内容\n- `/resume` - 继续一段保存的对话(输入筛选,Enter 打开)\n- `/new` - 重新开始;这段对话会保存下来\n- `/status`、`/sources`、`/tools`、`/doctor` - 看看哪些已连接、正常工作\n- `/reload` - 重新加载模型设置和登录\n- `/update [--check] [--channel latest|beta]` - 检查新版本,或关闭聆听室并安装\n- `/help all` - 全部命令,包括终端里的\n- `/language` - 选择 Moondog 使用的语言\n- `/quit` - 离开\n\n在首页按 Tab 进入菜单,按 Esc 回到输入。\nEnter 发送,Shift+Enter 换行。\nTab 或 Enter 接受补全建议。\nCtrl+C 停止模型或网页请求;没有任务在运行时则退出。\n在资料页里,输入即可筛选,Tab 切换列表,Enter 查看可做的操作。\nCtrl+R 刷新,Ctrl+O 打开完整报告。\n没有模型,资料页也能用。\n路径、标题和名字里有空格时,请加上引号。",
|
|
25
|
+
"# Your listening room\n\n## 01 / Listen and discover\n\nJust type to talk about music, ask for a playlist, or go exploring.\nTo talk, Moondog needs a model: `/auth` signs you in, then `/model` picks one.\nWhile an answer is coming, each step shows in the conversation, and the footer names the one in progress.\n\n- `/taste` - your profile: open any song or artist to see why it's there\n- `/taste report` - the whole picture on one page\n- `/import` - bring in your history, your library, or a playlist\n- `/lyrics` - the lyrics on the sleeve; `/lyrics sync` finds more\n- `/service` - choose where I play music: Spotify, Apple Music, or NetEase\n- `/spotify` - play, queue, and make playlists in Spotify\n- Ask to move playback onto your iPhone, computer, or another Spotify device by name\n- `/web search <query>` or `/web read <url>` - look things up on public music sites\n\n## 02 / Make it yours\n\n- `/profile` - the same profile as `/taste`\n- `/profile corrections` - everything you've told me\n- `/profile retract <id>` - undo one of those\n- `/profile help` - the full set of profile commands\n- `/remember <text>`, `/memory`, `/forget <id>` - what I remember between conversations\n\n## 03 / Around the room\n\n- `/home` - back to the record sleeve; the conversation stays\n- `/theme paper|charcoal|terminal|auto` - change the look\n- `/art braille|ascii|off` - change the artwork\n- `/motion on|off` - turn the animation on or off\n- `/commands` or Ctrl+P - search every command; your message stays put\n- Page Up and Page Down scroll the conversation. The header and your draft stay put\n- Up and Down in the draft recall what you typed in this conversation\n- `/resume` - pick up a saved conversation (type to filter, Enter opens)\n- `/new` - start fresh; this conversation stays saved\n- `/status`, `/sources`, `/tools`, `/doctor` - see what's connected and working\n- `/reload` - reload model settings and sign-ins\n- `/update [--check] [--channel latest|beta]` - check for a release, or close this room and install it\n- `/help all` - every command, including the ones for the shell\n- `/language` - choose the language Moondog uses\n- `/quit` - leave\n\nTab moves to the menu on the home screen. Esc goes back to typing.\nEnter sends, and Shift+Enter starts a new line.\nTab or Enter accepts a suggestion.\nCtrl+C stops a model or web request, or leaves when nothing is running.\nIn the profile, type to filter, Tab switches lists, and Enter shows what you can do.\nCtrl+R refreshes it and Ctrl+O opens the full report.\nYour profile works without a model.\nPut quotes around paths, titles, and names that have spaces.": "# 你的聆听室\n\n## 01 / 听歌与发现\n\n直接输入就能聊音乐、要一个歌单,或者随便逛逛。\n对话需要一个模型:`/auth` 登录,然后用 `/model` 选一个。\n回答生成时,每一步都会显示在对话里,底栏会标出正在进行的那一步。\n\n- `/taste` - 你的资料:打开任意歌曲或艺人,看看它为什么在这里\n- `/taste report` - 一页看完整体情况\n- `/import` - 导入你的历史、曲库或一个歌单\n- `/lyrics` - 封套上的歌词;`/lyrics sync` 找更多\n- `/service` - 选择我在哪里放音乐:Spotify、Apple Music 或网易云音乐\n- `/spotify` - 在 Spotify 里播放、加入队列、建歌单\n- 说出设备名,就能把播放切到你的 iPhone、电脑或其他 Spotify 设备\n- `/web search <关键词>` 或 `/web read <网址>` - 在公开音乐网站上查资料\n\n## 02 / 变成你的\n\n- `/profile` - 和 `/taste` 是同一份资料\n- `/profile corrections` - 你告诉过我的所有选择\n- `/profile retract <id>` - 撤销其中一项\n- `/profile help` - 资料相关的全部命令\n- `/remember <内容>`、`/memory`、`/forget <id>` - 我在对话之间记住的内容\n\n## 03 / 在房间里转转\n\n- `/home` - 回到唱片封套;对话还在\n- `/theme paper|charcoal|terminal|auto` - 换外观\n- `/art braille|ascii|off` - 换插画\n- `/motion on|off` - 打开或关闭动画\n- `/commands` 或 Ctrl+P - 搜索全部命令;你正在写的消息不会丢\n- Page Up 和 Page Down 滚动对话,顶栏和草稿保持不动\n- 在草稿里按上下键,可以找回本次对话中输入过的内容\n- `/resume` - 继续一段保存的对话(输入筛选,Enter 打开)\n- `/new` - 重新开始;这段对话会保存下来\n- `/status`、`/sources`、`/tools`、`/doctor` - 看看哪些已连接、正常工作\n- `/reload` - 重新加载模型设置和登录\n- `/update [--check] [--channel latest|beta]` - 检查新版本,或关闭聆听室并安装\n- `/help all` - 全部命令,包括终端里的\n- `/language` - 选择 Moondog 使用的语言\n- `/quit` - 离开\n\n在首页按 Tab 进入菜单,按 Esc 回到输入。\nEnter 发送,Shift+Enter 换行。\nTab 或 Enter 接受补全建议。\nCtrl+C 停止模型或网页请求;没有任务在运行时则退出。\n在资料页里,输入即可筛选,Tab 切换列表,Enter 查看可做的操作。\nCtrl+R 刷新,Ctrl+O 打开完整报告。\n没有模型,资料页也能用。\n路径、标题和名字里有空格时,请加上引号。",
|
|
26
26
|
"Listening profile": "聆听资料",
|
|
27
27
|
"Profile": "资料",
|
|
28
28
|
"See what your listening reveals. Tell me what I missed.": "看看你的聆听透露了什么,告诉我哪里没看到。",
|
|
@@ -176,7 +176,7 @@ export default {
|
|
|
176
176
|
"Memory": "记忆",
|
|
177
177
|
"Right now I can't change anything in your music accounts.": "目前我不能修改你音乐账号里的任何内容。",
|
|
178
178
|
"I can make changes in your connected accounts, and I always ask first.": "我可以修改你已连接的账号,并且每次都会先问你。",
|
|
179
|
-
"# Every command\n\nFrom your shell:\n\n- `moondog --version` - show the installed version\n- `moondog update [--check] [--channel latest|beta]` - check for or install a published release\n- `moondog web status|search|read [arguments] [--json]` - look things up on public music sites through DeepSeek, Brave Search or the Codex CLI\n- `moondog demo-history --output <absolute-file.zip> [--json]` - make a fictional Spotify history ZIP to try the importer with\n- `moondog auth login <provider>` - sign in to a model provider; the key is typed out of sight, and openai-codex uses your ChatGPT sign-in\n- `moondog auth status [provider]` - see which sign-ins are saved\n- `moondog auth logout <provider>` - sign out of a provider\n- `moondog spotify help` - set up and control Spotify\n- `moondog spotify login [client-id]` - connect Spotify in your browser\n- `moondog spotify now|devices|queue` - see what Spotify is playing, where, and what's next\n- `moondog spotify recent` - see what you played lately\n- `moondog spotify sync-recent` - add your latest plays to your profile\n- `moondog spotify sync-library` - add your Spotify library to your profile\n- `moondog spotify play|pause|next|previous` - control Spotify playback\n- `moondog listenbrainz import-history <listen-history.json>` - add a ListenBrainz listens file to your profile\n- `moondog catalog latest-single --artist <name> [--known-release <title> | --from <spotify-history.zip>]` - find an artist's latest single on Apple Music (US), no model needed\n- `moondog status [--json]` - see where things stand\n- `moondog taste [--json]` - your listening report\n- `moondog taste --html [--output <file.html>]` - save your report as a web page that works offline\n- `moondog taste --card [--output <file.html>]` - save a short recap you can check before sharing\n- `moondog taste --from <spotify-history.zip> --html` - a one-off report from a Spotify ZIP, without saving it\n- `moondog taste --from <account-data.zip> --from <extended-history.zip> --html` - a one-off report from both Spotify exports together\n- `moondog taste --from <spotify-history.zip> --save --html` - save the Spotify history, then show your full report\n- `moondog data inspect --scope <listening|apple|profile>` - see what's stored, and get the code needed to reset it\n- `moondog data export --scope <listening|apple|profile> --output <directory>` - export a copy, leaving the original alone\n- `moondog data reset --scope <listening|apple|profile> --confirm <token>` - set stored data aside (it is archived, not deleted)\n- `moondog profile build [--force]` - build or resume a saved profile with your connected model\n- `moondog profile saved [offset]` - read your saved profile\n- `moondog profile explain <number>` - trace a saved finding to its evidence\n- `moondog profile corrections [--all]` - everything you've told me, including earlier choices\n- `moondog profile correct --artist <name> (--like|--avoid)` - like an artist, or keep them out\n- `moondog profile correct --track <title> --by <artist> (--like|--avoid)` - like a track, or keep it out\n- `moondog profile retract <correction-id>` - undo one of your choices\n- `moondog demo --offline [--json]` - a demo with made-up data, no sign-in needed\n- `moondog demo [prompt] [--json]` - the same demo, talking through your model\n- `moondog ask <prompt>` - ask one question and exit\n- `moondog remember <text>` - ask me to remember something\n- `moondog forget <memory-id>` - forget something\n- `moondog memory reflect [--dry-run] [--json]` - let me think over recent conversations now\n- `moondog` - open the listening room\n\nInside the listening room:\n\n- `/update [--check] [--channel latest|beta]` - check for updates, or save and close this session to install one\n- `/status` or `/sources` - see where things stand\n- `/profile` or `/taste` - your profile, and why each song or artist is there\n- `/taste report` - the whole report on one page\n- `/profile build [--force]` - build or resume a saved reading; Ctrl+C keeps progress\n- `/profile saved [offset]` - read your saved profile\n- `/profile explain <number>` - inspect a saved finding's evidence\n- `/profile corrections [--all]` - everything you've told me\n- `/profile correct --track \"<title>\" --by \"<artist>\" (--like|--avoid)` - like a track, or keep it out\n- `/profile correct --artist \"<name>\" (--like|--avoid)` - like an artist, or keep them out\n- `/profile retract <correction-id>` - undo a choice\n- `/memory` - what I remember\n- `/tools` - what I can do right now\n- `/doctor` - check your setup\n- `/model` - pick the model I talk through\n- `/model <provider> <model>` - switch straight to a model\n- `/model refresh [provider]` - update public model choices; keep the selected model\n- `/auth [provider]` - sign in to a model provider\n- `/web status|search|read` - look things up on public music sites\n- `/import [path]` - bring in your history, library, or a playlist\n- `/language` - choose the language Moondog uses\n- `/spotify` - Spotify commands\n- `/spotify login [client-id]` - connect Spotify\n- `/spotify now|devices|queue` - see what's playing, where, and what's next\n- `/spotify recent|sync-recent` - see or save your latest plays\n- `/spotify import-history \"/path/to/spotify-history.zip\"` - add a Spotify ZIP, no sign-in needed\n- `/skip` or `/stop` - move to the next song preview, or stop them\n- `/reload` - reload model settings and sign-ins\n- `/remember [kind] <text>` - ask me to remember something\n- `/forget <memory-id>` - forget something\n- `/rewind` or Alt+R - edit an earlier message in place; the messages after it are replaced\n- `/branch` - go on from here in a new conversation; this one stays saved\n- `/rewind latest` - edit the most recent message\n- `/resume` - pick up a saved conversation\n- `/resume <session-id>` - go straight to one\n- `/new` - start fresh; the last one stays saved\n- `/quit` - exit\n\nAnything you type that isn't a command goes to the model you picked with `/model`, or the one set in `MOONDOG_PROVIDER` and `MOONDOG_MODEL`.\nSign in with `/auth`, or set the provider's API key in your environment. `/auth openai-codex` uses your ChatGPT sign-in.\nOnce your profile is ready, I can search your library, explain what I see, and plan playlists with you.\nI can only control Spotify after `moondog spotify login`, and I never post, send messages, delete anything, or spend money.\nAsk me to move playback onto a device by name, such as your iPhone.": "# 全部命令\n\n在终端里:\n\n- `moondog --version` - 显示已安装的版本\n- `moondog update [--check] [--channel latest|beta]` - 检查或安装已发布的版本\n- `moondog web status|search|read [参数] [--json]` - 通过 DeepSeek、Brave Search 或 Codex CLI 在公开音乐网站上查资料\n- `moondog demo-history --output <绝对路径.zip> [--json]` - 生成一个虚构的 Spotify 历史 ZIP,用来试用导入\n- `moondog auth login <provider>` - 登录模型服务商;密钥输入时不显示,openai-codex 使用你的 ChatGPT 登录\n- `moondog auth status [provider]` - 查看保存了哪些登录\n- `moondog auth logout <provider>` - 退出某个服务商\n- `moondog spotify help` - 设置并控制 Spotify\n- `moondog spotify login [client-id]` - 在浏览器里连接 Spotify\n- `moondog spotify now|devices|queue` - 查看 Spotify 正在放什么、在哪放、接下来是什么\n- `moondog spotify recent` - 查看你最近听了什么\n- `moondog spotify sync-recent` - 把最近的播放加入你的资料\n- `moondog spotify sync-library` - 把你的 Spotify 曲库加入你的资料\n- `moondog spotify play|pause|next|previous` - 控制 Spotify 播放\n- `moondog listenbrainz import-history <listen-history.json>` - 把 ListenBrainz 收听文件加入你的资料\n- `moondog catalog latest-single --artist <名字> [--known-release <标题> | --from <spotify-history.zip>]` - 在 Apple Music(美区)查找某位艺人的最新单曲,无需模型\n- `moondog status [--json]` - 查看当前状态\n- `moondog taste [--json]` - 你的聆听报告\n- `moondog taste --html [--output <文件.html>]` - 把报告保存为可离线打开的网页\n- `moondog taste --card [--output <文件.html>]` - 保存一份简短回顾,分享前可以先检查\n- `moondog taste --from <spotify-history.zip> --html` - 从一个 Spotify ZIP 生成一次性报告,不保存\n- `moondog taste --from <account-data.zip> --from <extended-history.zip> --html` - 从两份 Spotify 导出一起生成一次性报告\n- `moondog taste --from <spotify-history.zip> --save --html` - 保存 Spotify 历史,然后显示完整报告\n- `moondog data inspect --scope <listening|apple|profile>` - 查看保存了什么,并获取重置所需的代码\n- `moondog data export --scope <listening|apple|profile> --output <目录>` - 导出一份副本,原件保持不变\n- `moondog data reset --scope <listening|apple|profile> --confirm <代码>` - 把保存的数据移到一边(归档,不删除)\n- `moondog profile build [--force]` - 用已连接的模型生成或继续生成保存的资料\n- `moondog profile saved [偏移]` - 阅读你保存的资料\n- `moondog profile explain <编号>` - 追溯一条已保存发现的证据\n- `moondog profile corrections [--all]` - 你告诉过我的所有选择,包括早先的\n- `moondog profile correct --artist <名字> (--like|--avoid)` - 标记喜欢某位艺人,或不再推荐\n- `moondog profile correct --track <歌名> --by <艺人> (--like|--avoid)` - 标记喜欢某首歌,或不再推荐\n- `moondog profile retract <correction-id>` - 撤销你的一项选择\n- `moondog demo --offline [--json]` - 用虚构数据的演示,无需登录\n- `moondog demo [提示] [--json]` - 同样的演示,通过你的模型对话\n- `moondog ask <提示>` - 问一个问题后退出\n- `moondog remember <内容>` - 让我记住一件事\n- `moondog forget <memory-id>` - 忘掉一件事\n- `moondog memory reflect [--dry-run] [--json]` - 让我现在回顾最近的对话\n- `moondog` - 打开聆听室\n\n在聆听室里:\n\n- `/update [--check] [--channel latest|beta]` - 检查更新,或保存并关闭本次会话来安装\n- `/status` 或 `/sources` - 查看当前状态\n- `/profile` 或 `/taste` - 你的资料,以及每首歌、每位艺人为什么在这里\n- `/taste report` - 一页看完整份报告\n- `/profile build [--force]` - 生成或继续生成保存的解读;Ctrl+C 会保留进度\n- `/profile saved [偏移]` - 阅读你保存的资料\n- `/profile explain <编号>` - 查看一条已保存发现的证据\n- `/profile corrections [--all]` - 你告诉过我的所有选择\n- `/profile correct --track \"<歌名>\" --by \"<艺人>\" (--like|--avoid)` - 标记喜欢某首歌,或不再推荐\n- `/profile correct --artist \"<名字>\" (--like|--avoid)` - 标记喜欢某位艺人,或不再推荐\n- `/profile retract <correction-id>` - 撤销一项选择\n- `/memory` - 我记住的内容\n- `/tools` - 我现在能做什么\n- `/doctor` - 检查你的设置\n- `/model` - 选择我用来对话的模型\n- `/model <provider> <model>` - 直接切换到某个模型\n- `/model refresh [provider]` - 更新公开的模型列表;保留当前选择\n- `/auth [provider]` - 登录模型服务商\n- `/web status|search|read` - 在公开音乐网站上查资料\n- `/import [路径]` - 导入你的历史、曲库或一个歌单\n- `/language` - 选择 Moondog 使用的语言\n- `/spotify` - Spotify 命令\n- `/spotify login [client-id]` - 连接 Spotify\n- `/spotify now|devices|queue` - 查看正在放什么、在哪放、接下来是什么\n- `/spotify recent|sync-recent` - 查看或保存你最近的播放\n- `/spotify import-history \"/path/to/spotify-history.zip\"` - 加入一个 Spotify ZIP,无需登录\n- `/skip` 或 `/stop` - 跳到下一首试听,或停止试听\n- `/reload` - 重新加载模型设置和登录\n- `/remember [类型] <内容>` - 让我记住一件事\n- `/forget <memory-id>` - 忘掉一件事\n- `/rewind` 或 Alt+R - 就地编辑之前的一条消息;之后的消息会被替换\n- `/branch` - 从这里在新对话中继续;这段对话会保留\n- `/rewind latest` - 编辑最近的一条消息\n- `/resume` - 继续一段保存的对话\n- `/resume <session-id>` - 直接打开某一段\n- `/new` - 重新开始;上一段会保存下来\n- `/quit` - 退出\n\n你输入的非命令内容,会发给你用 `/model` 选的模型,或 `MOONDOG_PROVIDER` 和 `MOONDOG_MODEL` 指定的模型。\n用 `/auth` 登录,或在环境变量里设置服务商的 API 密钥。`/auth openai-codex` 使用你的 ChatGPT 登录。\n资料准备好之后,我可以搜索你的曲库、解释我看到的内容,并和你一起规划歌单。\n只有在 `moondog spotify login` 之后我才能控制 Spotify,而且我从不发帖、不发消息、不删除任何东西,也不花钱。\n说出设备名,比如你的 iPhone,我就能把播放切过去。",
|
|
179
|
+
"# Every command\n\nFrom your shell:\n\n- `moondog --version` - show the installed version\n- `moondog update [--check] [--channel latest|beta]` - check for or install a published release\n- `moondog web status|search|read [arguments] [--json]` - look things up on public music sites through DeepSeek, Brave Search or the Codex CLI\n- `moondog demo-history --output <absolute-file.zip> [--json]` - make a fictional Spotify history ZIP to try the importer with\n- `moondog auth login <provider>` - sign in to a model provider; the key is typed out of sight; `openai --chatgpt` signs in with your ChatGPT subscription\n- `moondog auth status [provider]` - see which sign-ins are saved\n- `moondog auth logout <provider>` - sign out of a provider\n- `moondog spotify help` - set up and control Spotify\n- `moondog spotify login [client-id]` - connect Spotify in your browser\n- `moondog spotify now|devices|queue` - see what Spotify is playing, where, and what's next\n- `moondog spotify recent` - see what you played lately\n- `moondog spotify sync-recent` - add your latest plays to your profile\n- `moondog spotify sync-library` - add your Spotify library to your profile\n- `moondog spotify play|pause|next|previous` - control Spotify playback\n- `moondog listenbrainz import-history <listen-history.json>` - add a ListenBrainz listens file to your profile\n- `moondog catalog latest-single --artist <name> [--known-release <title> | --from <spotify-history.zip>]` - find an artist's latest single on Apple Music (US), no model needed\n- `moondog status [--json]` - see where things stand\n- `moondog taste [--json]` - your listening report\n- `moondog taste --html [--output <file.html>]` - save your report as a web page that works offline\n- `moondog taste --card [--output <file.html>]` - save a short recap you can check before sharing\n- `moondog taste --from <spotify-history.zip> --html` - a one-off report from a Spotify ZIP, without saving it\n- `moondog taste --from <account-data.zip> --from <extended-history.zip> --html` - a one-off report from both Spotify exports together\n- `moondog taste --from <spotify-history.zip> --save --html` - save the Spotify history, then show your full report\n- `moondog data inspect --scope <listening|apple|profile>` - see what's stored, and get the code needed to reset it\n- `moondog data export --scope <listening|apple|profile> --output <directory>` - export a copy, leaving the original alone\n- `moondog data reset --scope <listening|apple|profile> --confirm <token>` - set stored data aside (it is archived, not deleted)\n- `moondog profile build [--force]` - build or resume a saved profile with your connected model\n- `moondog profile saved [offset]` - read your saved profile\n- `moondog profile explain <number>` - trace a saved finding to its evidence\n- `moondog profile corrections [--all]` - everything you've told me, including earlier choices\n- `moondog profile correct --artist <name> (--like|--avoid)` - like an artist, or keep them out\n- `moondog profile correct --track <title> --by <artist> (--like|--avoid)` - like a track, or keep it out\n- `moondog profile retract <correction-id>` - undo one of your choices\n- `moondog demo --offline [--json]` - a demo with made-up data, no sign-in needed\n- `moondog demo [prompt] [--json]` - the same demo, talking through your model\n- `moondog ask <prompt>` - ask one question and exit\n- `moondog remember <text>` - ask me to remember something\n- `moondog forget <memory-id>` - forget something\n- `moondog memory reflect [--dry-run] [--json]` - let me think over recent conversations now\n- `moondog` - open the listening room\n\nInside the listening room:\n\n- `/update [--check] [--channel latest|beta]` - check for updates, or save and close this session to install one\n- `/status` or `/sources` - see where things stand\n- `/profile` or `/taste` - your profile, and why each song or artist is there\n- `/taste report` - the whole report on one page\n- `/profile build [--force]` - build or resume a saved reading; Ctrl+C keeps progress\n- `/profile saved [offset]` - read your saved profile\n- `/profile explain <number>` - inspect a saved finding's evidence\n- `/profile corrections [--all]` - everything you've told me\n- `/profile correct --track \"<title>\" --by \"<artist>\" (--like|--avoid)` - like a track, or keep it out\n- `/profile correct --artist \"<name>\" (--like|--avoid)` - like an artist, or keep them out\n- `/profile retract <correction-id>` - undo a choice\n- `/memory` - what I remember\n- `/tools` - what I can do right now\n- `/doctor` - check your setup\n- `/model` - pick the model I talk through\n- `/model <provider> <model>` - switch straight to a model\n- `/model refresh [provider]` - update public model choices; keep the selected model\n- `/auth [provider]` - sign in to a model provider\n- `/web status|search|read` - look things up on public music sites\n- `/import [path]` - bring in your history, library, or a playlist\n- `/language` - choose the language Moondog uses\n- `/service [spotify|apple_music|netease]` - choose where I play music\n- `/spotify` - Spotify commands\n- `/spotify login [client-id]` - connect Spotify\n- `/spotify now|devices|queue` - see what's playing, where, and what's next\n- `/spotify recent|sync-recent` - see or save your latest plays\n- `/spotify import-history \"/path/to/spotify-history.zip\"` - add a Spotify ZIP, no sign-in needed\n- `/skip` or `/stop` - move to the next song preview, or stop them\n- `/reload` - reload model settings and sign-ins\n- `/remember [kind] <text>` - ask me to remember something\n- `/forget <memory-id>` - forget something\n- `/rewind` or Alt+R - edit an earlier message in place; the messages after it are replaced\n- `/branch` - go on from here in a new conversation; this one stays saved\n- `/rewind latest` - edit the most recent message\n- `/resume` - pick up a saved conversation\n- `/resume <session-id>` - go straight to one\n- `/new` - start fresh; the last one stays saved\n- `/quit` - exit\n\nAnything you type that isn't a command goes to the model you picked with `/model`, or the one set in `MOONDOG_PROVIDER` and `MOONDOG_MODEL`.\nSign in with `/auth`, or set the provider's API key in your environment. `/auth openai` signs in with your ChatGPT subscription or an API key.\nOnce your profile is ready, I can search your library, explain what I see, and plan playlists with you.\nI can only control Spotify after `moondog spotify login`, and I never post, send messages, delete anything, or spend money.\nAsk me to move playback onto a device by name, such as your iPhone.": "# 全部命令\n\n在终端里:\n\n- `moondog --version` - 显示已安装的版本\n- `moondog update [--check] [--channel latest|beta]` - 检查或安装已发布的版本\n- `moondog web status|search|read [参数] [--json]` - 通过 DeepSeek、Brave Search 或 Codex CLI 在公开音乐网站上查资料\n- `moondog demo-history --output <绝对路径.zip> [--json]` - 生成一个虚构的 Spotify 历史 ZIP,用来试用导入\n- `moondog auth login <provider>` - 登录模型服务商;密钥输入时不显示,`openai --chatgpt` 用你的 ChatGPT 订阅登录\n- `moondog auth status [provider]` - 查看保存了哪些登录\n- `moondog auth logout <provider>` - 退出某个服务商\n- `moondog spotify help` - 设置并控制 Spotify\n- `moondog spotify login [client-id]` - 在浏览器里连接 Spotify\n- `moondog spotify now|devices|queue` - 查看 Spotify 正在放什么、在哪放、接下来是什么\n- `moondog spotify recent` - 查看你最近听了什么\n- `moondog spotify sync-recent` - 把最近的播放加入你的资料\n- `moondog spotify sync-library` - 把你的 Spotify 曲库加入你的资料\n- `moondog spotify play|pause|next|previous` - 控制 Spotify 播放\n- `moondog listenbrainz import-history <listen-history.json>` - 把 ListenBrainz 收听文件加入你的资料\n- `moondog catalog latest-single --artist <名字> [--known-release <标题> | --from <spotify-history.zip>]` - 在 Apple Music(美区)查找某位艺人的最新单曲,无需模型\n- `moondog status [--json]` - 查看当前状态\n- `moondog taste [--json]` - 你的聆听报告\n- `moondog taste --html [--output <文件.html>]` - 把报告保存为可离线打开的网页\n- `moondog taste --card [--output <文件.html>]` - 保存一份简短回顾,分享前可以先检查\n- `moondog taste --from <spotify-history.zip> --html` - 从一个 Spotify ZIP 生成一次性报告,不保存\n- `moondog taste --from <account-data.zip> --from <extended-history.zip> --html` - 从两份 Spotify 导出一起生成一次性报告\n- `moondog taste --from <spotify-history.zip> --save --html` - 保存 Spotify 历史,然后显示完整报告\n- `moondog data inspect --scope <listening|apple|profile>` - 查看保存了什么,并获取重置所需的代码\n- `moondog data export --scope <listening|apple|profile> --output <目录>` - 导出一份副本,原件保持不变\n- `moondog data reset --scope <listening|apple|profile> --confirm <代码>` - 把保存的数据移到一边(归档,不删除)\n- `moondog profile build [--force]` - 用已连接的模型生成或继续生成保存的资料\n- `moondog profile saved [偏移]` - 阅读你保存的资料\n- `moondog profile explain <编号>` - 追溯一条已保存发现的证据\n- `moondog profile corrections [--all]` - 你告诉过我的所有选择,包括早先的\n- `moondog profile correct --artist <名字> (--like|--avoid)` - 标记喜欢某位艺人,或不再推荐\n- `moondog profile correct --track <歌名> --by <艺人> (--like|--avoid)` - 标记喜欢某首歌,或不再推荐\n- `moondog profile retract <correction-id>` - 撤销你的一项选择\n- `moondog demo --offline [--json]` - 用虚构数据的演示,无需登录\n- `moondog demo [提示] [--json]` - 同样的演示,通过你的模型对话\n- `moondog ask <提示>` - 问一个问题后退出\n- `moondog remember <内容>` - 让我记住一件事\n- `moondog forget <memory-id>` - 忘掉一件事\n- `moondog memory reflect [--dry-run] [--json]` - 让我现在回顾最近的对话\n- `moondog` - 打开聆听室\n\n在聆听室里:\n\n- `/update [--check] [--channel latest|beta]` - 检查更新,或保存并关闭本次会话来安装\n- `/status` 或 `/sources` - 查看当前状态\n- `/profile` 或 `/taste` - 你的资料,以及每首歌、每位艺人为什么在这里\n- `/taste report` - 一页看完整份报告\n- `/profile build [--force]` - 生成或继续生成保存的解读;Ctrl+C 会保留进度\n- `/profile saved [偏移]` - 阅读你保存的资料\n- `/profile explain <编号>` - 查看一条已保存发现的证据\n- `/profile corrections [--all]` - 你告诉过我的所有选择\n- `/profile correct --track \"<歌名>\" --by \"<艺人>\" (--like|--avoid)` - 标记喜欢某首歌,或不再推荐\n- `/profile correct --artist \"<名字>\" (--like|--avoid)` - 标记喜欢某位艺人,或不再推荐\n- `/profile retract <correction-id>` - 撤销一项选择\n- `/memory` - 我记住的内容\n- `/tools` - 我现在能做什么\n- `/doctor` - 检查你的设置\n- `/model` - 选择我用来对话的模型\n- `/model <provider> <model>` - 直接切换到某个模型\n- `/model refresh [provider]` - 更新公开的模型列表;保留当前选择\n- `/auth [provider]` - 登录模型服务商\n- `/web status|search|read` - 在公开音乐网站上查资料\n- `/import [路径]` - 导入你的历史、曲库或一个歌单\n- `/language` - 选择 Moondog 使用的语言\n- `/service [spotify|apple_music|netease]` - 选择我在哪里放音乐\n- `/spotify` - Spotify 命令\n- `/spotify login [client-id]` - 连接 Spotify\n- `/spotify now|devices|queue` - 查看正在放什么、在哪放、接下来是什么\n- `/spotify recent|sync-recent` - 查看或保存你最近的播放\n- `/spotify import-history \"/path/to/spotify-history.zip\"` - 加入一个 Spotify ZIP,无需登录\n- `/skip` 或 `/stop` - 跳到下一首试听,或停止试听\n- `/reload` - 重新加载模型设置和登录\n- `/remember [类型] <内容>` - 让我记住一件事\n- `/forget <memory-id>` - 忘掉一件事\n- `/rewind` 或 Alt+R - 就地编辑之前的一条消息;之后的消息会被替换\n- `/branch` - 从这里在新对话中继续;这段对话会保留\n- `/rewind latest` - 编辑最近的一条消息\n- `/resume` - 继续一段保存的对话\n- `/resume <session-id>` - 直接打开某一段\n- `/new` - 重新开始;上一段会保存下来\n- `/quit` - 退出\n\n你输入的非命令内容,会发给你用 `/model` 选的模型,或 `MOONDOG_PROVIDER` 和 `MOONDOG_MODEL` 指定的模型。\n用 `/auth` 登录,或在环境变量里设置服务商的 API 密钥。`/auth openai` 可以用 ChatGPT 订阅登录,也可以填 API 密钥。\n资料准备好之后,我可以搜索你的曲库、解释我看到的内容,并和你一起规划歌单。\n只有在 `moondog spotify login` 之后我才能控制 Spotify,而且我从不发帖、不发消息、不删除任何东西,也不花钱。\n说出设备名,比如你的 iPhone,我就能把播放切过去。",
|
|
180
180
|
"Apple Music library": "Apple Music 曲库",
|
|
181
181
|
"Model": "模型",
|
|
182
182
|
"Finding similar music": "查找相似的音乐",
|
|
@@ -615,7 +615,6 @@ export default {
|
|
|
615
615
|
"Use /auth or /auth <provider>. Type API keys only into the hidden prompt that follows.": "使用 /auth 或 /auth <provider>。API 密钥只在随后出现的隐藏输入框里输入。",
|
|
616
616
|
"Sign-in isn't available when Moondog is started this way.": "这种启动方式不支持登录。",
|
|
617
617
|
"I can't sign in to that provider. Type /auth to see the ones I can.": "我无法登录这个服务商。输入 /auth 查看支持的服务商。",
|
|
618
|
-
"ChatGPT sign-in": "ChatGPT 登录",
|
|
619
618
|
"API key": "API 密钥",
|
|
620
619
|
"Sign in to a model or web search service": "登录模型或网页搜索服务商",
|
|
621
620
|
"Sign-in cancelled.": "已取消登录。",
|
|
@@ -771,7 +770,14 @@ export default {
|
|
|
771
770
|
"Cancelled.": "已取消。",
|
|
772
771
|
"/{command} didn't work.": "/{command} 没成功。",
|
|
773
772
|
"Your request is still here · /model connects a model first.": "你的请求还在 · 先用 /model 连接模型。",
|
|
774
|
-
"
|
|
773
|
+
"Reading the room": "看看现场气氛",
|
|
774
|
+
"Checking the request line": "看看点歌单",
|
|
775
|
+
"Finding the groove": "找找律动",
|
|
776
|
+
"Working the decks": "搓碟中",
|
|
777
|
+
"Planning the segue": "琢磨怎么接歌",
|
|
778
|
+
"Mic check": "试麦中",
|
|
779
|
+
"Riding the faders": "调调推子",
|
|
780
|
+
"Finding the cue": "找切入点",
|
|
775
781
|
"{count} running · {label}": "{count} 项进行中 · {label}",
|
|
776
782
|
"{label} didn't work · carrying on...": "{label} 没成功 · 继续中...",
|
|
777
783
|
"Can't reach the model. Trying again ({attempt}/{max})...": "连不上模型。正在重试({attempt}/{max})...",
|
|
@@ -969,4 +975,56 @@ export default {
|
|
|
969
975
|
"Web search key": "网页搜索密钥",
|
|
970
976
|
"Saved the {service} key. Web search goes through {provider}.": "已保存 {service} 密钥。网页搜索使用 {provider}。",
|
|
971
977
|
"Saved the {service} key, but web search still isn't ready. Run `/web status` to see why.": "已保存 {service} 密钥,但网页搜索还不能用。运行 `/web status` 查看原因。",
|
|
978
|
+
"Add an endpoint by its address": "按地址添加接口",
|
|
979
|
+
"Remove an endpoint and its key": "移除接口和它的密钥",
|
|
980
|
+
"ChatGPT sign-in or API key": "ChatGPT 登录或 API 密钥",
|
|
981
|
+
"ChatGPT subscription": "ChatGPT 订阅",
|
|
982
|
+
"Sign in with ChatGPT in your browser": "在浏览器里用 ChatGPT 登录",
|
|
983
|
+
"Paste an OpenAI API key": "粘贴 OpenAI API 密钥",
|
|
984
|
+
"How do you want to use OpenAI?": "你想怎样使用 OpenAI?",
|
|
985
|
+
"Endpoints aren't available when Moondog is started this way.": "用这种方式启动 Moondog 时不能使用接口。",
|
|
986
|
+
"Use /endpoint, /endpoint add, or /endpoint remove <id>.": "用 /endpoint、/endpoint add 或 /endpoint remove <id>。",
|
|
987
|
+
"Type `/model <id>` to talk through one, or `/endpoint add` to add another.": "输入 `/model <id>` 用其中一个对话,或用 `/endpoint add` 再添加一个。",
|
|
988
|
+
"No endpoints yet. `/endpoint add` adds any service that speaks OpenAI's or Anthropic's API, by its address.": "还没有接口。`/endpoint add` 可以按地址添加任何兼容 OpenAI 或 Anthropic API 的服务。",
|
|
989
|
+
"Endpoints listed.": "已列出接口。",
|
|
990
|
+
"Saved {name}. Type `/model {id}` to pick one of its models.": "已保存 {name}。输入 `/model {id}` 选它的一个模型。",
|
|
991
|
+
"Endpoint saved.": "接口已保存。",
|
|
992
|
+
"Removed {name} and its key.": "已移除 {name} 和它的密钥。",
|
|
993
|
+
"Endpoint removed.": "接口已移除。",
|
|
994
|
+
"Add a model service by its address": "按地址添加模型服务",
|
|
995
|
+
"Whole songs on your Spotify devices": "在你的 Spotify 设备上播放完整歌曲",
|
|
996
|
+
"30-second previews, played here": "30 秒试听,就在这里播放",
|
|
997
|
+
"Whole songs through ncm-cli": "通过 ncm-cli 播放完整歌曲",
|
|
998
|
+
"NetEase Music": "网易云音乐",
|
|
999
|
+
"Set up ncm-cli first": "先设置 ncm-cli",
|
|
1000
|
+
"Sign in to {provider}": "登录 {provider}",
|
|
1001
|
+
"Choose another model": "换一个模型",
|
|
1002
|
+
"Choose a model": "选择模型",
|
|
1003
|
+
"Pick a provider and model, then sign in": "选一个服务商和模型,然后登录",
|
|
1004
|
+
"Two things before we start: where I play your music, and the model I talk through.": "开始之前有两件事:在哪里放你的音乐,以及我用哪个模型说话。",
|
|
1005
|
+
"One thing before we start: where I play your music.": "开始之前有一件事:在哪里放你的音乐。",
|
|
1006
|
+
"One thing before we start: the model I talk through.": "开始之前有一件事:我用哪个模型说话。",
|
|
1007
|
+
"Where should I play music?": "在哪里放音乐?",
|
|
1008
|
+
"Which model should I talk through?": "我用哪个模型说话?",
|
|
1009
|
+
"/service changes it any time.": "随时可以用 /service 更改。",
|
|
1010
|
+
"{model} is saved, but you're not signed in to {provider} yet.": "已保存 {model},但你还没有登录 {provider}。",
|
|
1011
|
+
"Sign in with ChatGPT, or use an API key from another provider. Your profile works without one.": "用 ChatGPT 登录,或者使用其他服务商的 API 密钥。没有模型,资料页也能用。",
|
|
1012
|
+
"NetEase plays through its own command line tool. Run this in another terminal, then choose it again:": "网易云通过它自己的命令行工具播放。在另一个终端里运行这行命令,然后再选一次:",
|
|
1013
|
+
"Welcome to the machine.": "Welcome to the machine。",
|
|
1014
|
+
"↑↓ ↵ choose · esc skip setup": "↑↓ ↵ 选择 · esc 跳过设置",
|
|
1015
|
+
"↑↓ choose · enter select · esc skip setup": "↑↓ 选择 · enter 确定 · esc 跳过设置",
|
|
1016
|
+
"Spotify it is. /spotify help shows how to connect your account.": "就用 Spotify。/spotify help 会告诉你怎么连接账号。",
|
|
1017
|
+
"{service} it is.": "就用 {service}。",
|
|
1018
|
+
"Choosing a music service isn't available when Moondog is started this way.": "这种启动方式不支持选择音乐服务。",
|
|
1019
|
+
"Use /service, or /service spotify, apple_music, or netease.": "使用 /service,或 /service spotify、apple_music 或 netease。",
|
|
1020
|
+
"Music service unchanged.": "音乐服务未更改。",
|
|
1021
|
+
"NetEase Music plays through its own command line tool. Run this in another terminal, then choose it again with `/service`:\n\n```\n{command}\n```": "网易云音乐通过它自己的命令行工具播放。在另一个终端里运行这行命令,然后用 `/service` 再选一次:\n\n```\n{command}\n```",
|
|
1022
|
+
"NetEase needs ncm-cli first.": "网易云需要先设置 ncm-cli。",
|
|
1023
|
+
"Setup · music service": "设置 · 音乐服务",
|
|
1024
|
+
"Setup · model": "设置 · 模型",
|
|
1025
|
+
"All set. /spotify help shows how to connect Spotify.": "都好了。/spotify help 会告诉你怎么连接 Spotify。",
|
|
1026
|
+
"All set. Say anything, or press Tab to look around.": "都好了。随便说点什么,或按 Tab 四处看看。",
|
|
1027
|
+
"Skipped. /service and /model are here when you want them.": "已跳过。需要时随时可以用 /service 和 /model。",
|
|
1028
|
+
"Saving your music service...": "正在保存音乐服务...",
|
|
1029
|
+
"Choose where Moondog plays music": "选择 Moondog 在哪里放音乐",
|
|
972
1030
|
};
|
|
@@ -21,14 +21,11 @@ const KNOWN_SONGS = 300;
|
|
|
21
21
|
|
|
22
22
|
const failure = (code, message) => Object.assign(new Error(message), { code });
|
|
23
23
|
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
...EXTRA_FOLDERS,
|
|
27
|
-
])];
|
|
24
|
+
const folders = (value) => String(value ?? "").split(path.delimiter).filter((folder) => path.isAbsolute(folder));
|
|
25
|
+
const searchPath = (environment) => [...new Set([...folders(environment.PATH), ...EXTRA_FOLDERS])];
|
|
28
26
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
for (const folder of searchPath(environment)) {
|
|
27
|
+
async function findIn(places) {
|
|
28
|
+
for (const folder of places) {
|
|
32
29
|
const file = path.join(folder, "ncm-cli");
|
|
33
30
|
try {
|
|
34
31
|
if (!(await stat(file)).isFile()) continue;
|
|
@@ -39,18 +36,37 @@ export async function findNcmCli({ environment = process.env } = {}) {
|
|
|
39
36
|
return null;
|
|
40
37
|
}
|
|
41
38
|
|
|
39
|
+
// Opened from Finder, the app has its login shell's PATH, which lacks the folders ~/.zshrc adds,
|
|
40
|
+
// such as nvm's for npm's global commands. There, the listener's shell as Terminal opens it says.
|
|
41
|
+
function terminalPath(environment) {
|
|
42
|
+
return new Promise((resolve) => {
|
|
43
|
+
execFile(environment.SHELL || "/bin/zsh", ["-ilc", 'printf "\\n__MOONDOG_PATH__%s\\n" "$PATH"'], { env: environment, timeout: 5_000 },
|
|
44
|
+
(_error, stdout) => resolve(folders(String(stdout ?? "").match(/__MOONDOG_PATH__(.+)/u)?.[1])));
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** ncm-cli and the PATH to run it with, which has the node it runs on, or null. */
|
|
49
|
+
async function findNcmCli(environment) {
|
|
50
|
+
const places = searchPath(environment);
|
|
51
|
+
const file = await findIn(places);
|
|
52
|
+
if (file) return { file, places };
|
|
53
|
+
const terminal = await terminalPath(environment);
|
|
54
|
+
const found = await findIn(terminal);
|
|
55
|
+
return found ? { file: found, places: [...new Set([...terminal, ...places])] } : null;
|
|
56
|
+
}
|
|
57
|
+
|
|
42
58
|
// Runs one ncm-cli command and parses its JSON. ncm-cli reports most failures as
|
|
43
59
|
// { success: false, message } with exit status 0. play prints no JSON when it starts a song,
|
|
44
60
|
// so its answer is {}; the player's state says whether the song started.
|
|
45
61
|
function cliRunner({ environment }) {
|
|
46
|
-
|
|
62
|
+
// Kept once found. The listener may install ncm-cli while Moondog runs, so a miss is looked for again.
|
|
63
|
+
let found = null;
|
|
47
64
|
return async (args) => {
|
|
48
|
-
found ??= findNcmCli(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const env = { ...environment, PATH: searchPath(environment).join(path.delimiter) };
|
|
65
|
+
found ??= await findNcmCli(environment);
|
|
66
|
+
if (!found) throw failure("netease_cli_missing", "ncm-cli is not installed. Install it with: npm install -g @music163/ncm-cli");
|
|
67
|
+
const env = { ...environment, PATH: found.places.join(path.delimiter) };
|
|
52
68
|
const stdout = await new Promise((resolve, reject) => {
|
|
53
|
-
execFile(
|
|
69
|
+
execFile(found.file, args, { env, timeout: COMMAND_TIMEOUT_MS, maxBuffer: 8 * 1024 * 1024 }, (error, out) =>
|
|
54
70
|
(error && !out ? reject(failure("netease_failed", `ncm-cli ${args[0]} failed: ${String(error.message).slice(0, 200)}`)) : resolve(String(out ?? ""))));
|
|
55
71
|
});
|
|
56
72
|
const start = stdout.indexOf("{");
|
|
@@ -16,7 +16,7 @@ function reflectionErrorCode(error) {
|
|
|
16
16
|
function offlineRuntimeError(reason) {
|
|
17
17
|
if (reason === "provider_authentication_required") {
|
|
18
18
|
return new Error(
|
|
19
|
-
"The Memory Agent
|
|
19
|
+
"The Memory Agent's model needs a sign-in. Run /auth, or moondog auth login <provider>, first.",
|
|
20
20
|
);
|
|
21
21
|
}
|
|
22
22
|
return new Error(
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { access, mkdir, readFile, writeFile } from "node:fs/promises";
|
|
2
3
|
import { homedir } from "node:os";
|
|
4
|
+
import path from "node:path";
|
|
3
5
|
|
|
4
6
|
import { createModels } from "@earendil-works/pi-ai";
|
|
5
7
|
|
|
6
|
-
import { createPersistentCredentialStore, serviceApiKeyIds } from "./persistent-credential-store.mjs";
|
|
7
|
-
import { apiKeyPiProviderIds, loadPiProvider } from "./provider-registry.mjs";
|
|
8
|
+
import { createPersistentCredentialStore, resolveMoondogAuthFile, serviceApiKeyIds } from "./persistent-credential-store.mjs";
|
|
9
|
+
import { apiKeyPiProviderIds, chatgptProviderId, loadPiProvider } from "./provider-registry.mjs";
|
|
8
10
|
|
|
9
11
|
// Keys for services that are not models share the same sign-in and private store;
|
|
10
12
|
// each one also needs its id in the store's serviceApiKeyIds.
|
|
@@ -13,11 +15,25 @@ export const serviceKeyProviders = Object.freeze([
|
|
|
13
15
|
]);
|
|
14
16
|
|
|
15
17
|
export const supportedAuthProviderIds = Object.freeze([
|
|
16
|
-
"openai-codex",
|
|
17
18
|
...apiKeyPiProviderIds,
|
|
18
19
|
...serviceApiKeyIds,
|
|
19
20
|
]);
|
|
20
21
|
|
|
22
|
+
// Sign in with ChatGPT names this installation to OpenAI by a lasting random ID, kept beside auth.json.
|
|
23
|
+
async function installationId(directory) {
|
|
24
|
+
const file = path.join(directory, "installation-id");
|
|
25
|
+
try {
|
|
26
|
+
const saved = (await readFile(file, "utf8")).trim();
|
|
27
|
+
if (/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/u.test(saved)) return saved;
|
|
28
|
+
} catch (error) {
|
|
29
|
+
if (error?.code !== "ENOENT") throw error;
|
|
30
|
+
}
|
|
31
|
+
const id = randomUUID();
|
|
32
|
+
await mkdir(path.dirname(file), { recursive: true, mode: 0o700 });
|
|
33
|
+
await writeFile(file, `${id}\n`, { encoding: "utf8", mode: 0o600 });
|
|
34
|
+
return id;
|
|
35
|
+
}
|
|
36
|
+
|
|
21
37
|
export function createPiAuthContext(environment = process.env) {
|
|
22
38
|
return {
|
|
23
39
|
async env(name) {
|
|
@@ -104,7 +120,8 @@ export async function createPiAuthentication({
|
|
|
104
120
|
};
|
|
105
121
|
|
|
106
122
|
return {
|
|
107
|
-
|
|
123
|
+
// method "oauth" signs in with ChatGPT, for OpenAI only; any other login saves an API key.
|
|
124
|
+
async login(providerId, interaction, { method = "api_key" } = {}) {
|
|
108
125
|
const entry = service(providerId);
|
|
109
126
|
if (entry) {
|
|
110
127
|
interaction.signal?.throwIfAborted();
|
|
@@ -113,12 +130,16 @@ export async function createPiAuthentication({
|
|
|
113
130
|
await credentials.modify(entry.id, async () => ({ type: "api_key", key: typeof key === "string" ? key.trim() : key }));
|
|
114
131
|
return serviceStatus(entry);
|
|
115
132
|
}
|
|
133
|
+
if (method === "oauth" && providerId !== chatgptProviderId) {
|
|
134
|
+
const error = new Error("Only OpenAI signs in with ChatGPT.");
|
|
135
|
+
error.code = "auth_provider_unsupported";
|
|
136
|
+
throw error;
|
|
137
|
+
}
|
|
116
138
|
await ensureProvider(providerId);
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
);
|
|
139
|
+
const deviceId = method === "oauth"
|
|
140
|
+
? await installationId(credentials.directory ?? path.dirname(resolveMoondogAuthFile(environment))) : null;
|
|
141
|
+
await models.login(providerId, method === "oauth" ? "oauth" : "api_key", interaction,
|
|
142
|
+
method === "oauth" ? { getDeviceId: () => deviceId } : undefined);
|
|
122
143
|
return status(providerId);
|
|
123
144
|
},
|
|
124
145
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getSupportedThinkingLevels } from "@earendil-works/pi-ai";
|
|
2
2
|
|
|
3
3
|
import { PiAgentRuntime } from "./agent-runtime.mjs";
|
|
4
4
|
import { createPiAuthContext } from "./authentication.mjs";
|
|
5
5
|
import { getPublicPiModelCatalog } from "./public-model-catalog.mjs";
|
|
6
6
|
import { createPersistentCredentialStore } from "./persistent-credential-store.mjs";
|
|
7
|
-
import { EFFORT_LEVELS, readPiRuntimeSelection } from "./runtime-settings.mjs";
|
|
7
|
+
import { clampEffort, EFFORT_LEVELS, readPiRuntimeSelection } from "./runtime-settings.mjs";
|
|
8
8
|
|
|
9
9
|
export class OfflineAgentRuntime {
|
|
10
10
|
constructor(reason = "model_not_configured", selection) {
|
|
@@ -108,7 +108,7 @@ export async function createConfiguredRuntime(
|
|
|
108
108
|
// Without a saved effort, keep Pi's default and send no effort setting.
|
|
109
109
|
effort,
|
|
110
110
|
effortLevels: getSupportedThinkingLevels(model),
|
|
111
|
-
thinkingLevel: effort ?
|
|
111
|
+
thinkingLevel: effort ? clampEffort(model, effort) : undefined,
|
|
112
112
|
...(toolTrace ? { toolTrace } : {}),
|
|
113
113
|
});
|
|
114
114
|
}
|