@audiofool/moondog 0.3.1 → 0.3.3
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/NOTICE +4 -0
- package/README.md +8 -4
- package/licenses/dawn-sdk-mit.md +27 -0
- package/package.json +2 -1
- package/src/core/capability-catalog.mjs +28 -5
- package/src/core/moondog-application.mjs +54 -3
- package/src/i18n/messages/de.mjs +3 -2
- package/src/i18n/messages/en.mjs +3 -2
- package/src/i18n/messages/es.mjs +3 -2
- package/src/i18n/messages/fr.mjs +3 -2
- package/src/i18n/messages/it.mjs +3 -2
- package/src/i18n/messages/ja.mjs +3 -2
- package/src/i18n/messages/ko.mjs +3 -2
- package/src/i18n/messages/pt.mjs +3 -2
- package/src/i18n/messages/zh-Hant.mjs +3 -2
- package/src/i18n/messages/zh.mjs +3 -2
- package/src/i18n/screen/es.mjs +36 -16
- package/src/i18n/screen/ja.mjs +36 -16
- package/src/i18n/screen/pt.mjs +36 -16
- package/src/i18n/screen/zh.mjs +36 -16
- package/src/integrations/score/render-score.mjs +105 -0
- package/src/integrations/score/sheet.mjs +31 -0
- package/src/integrations/score/track-score.mjs +325 -0
- package/src/integrations/score/vendor/dawn-sdk.mjs +561 -0
- package/src/integrations/stable-audio/local-generator.mjs +139 -42
- package/src/integrations/stable-audio/setup.mjs +95 -46
- package/src/integrations/stable-audio/sources.mjs +151 -2
- package/src/runtime/pi/agent-runtime.mjs +148 -16
- package/src/runtime/pi/model-settings.mjs +13 -7
- package/src/surfaces/cli/brand-components.mjs +1 -1
- package/src/surfaces/cli/command-completions.mjs +11 -3
- package/src/surfaces/cli/format-output.mjs +2 -2
- package/src/surfaces/cli/tui.mjs +54 -25
|
@@ -6,6 +6,7 @@ import { LOCALES, messageLocale, translator } from "../../i18n/index.mjs";
|
|
|
6
6
|
import { PROFILE_SECTIONS, TRAJECTORIES } from "../../profile/profile-exploration.mjs";
|
|
7
7
|
import { compactListenerProfile } from "../../profile/listener-profile-build.mjs";
|
|
8
8
|
import { BPM_RANGE, DESCRIPTOR_FACETS, DESCRIPTOR_LIMITS, DESCRIPTOR_SOURCES } from "../../profile/taste-compiler.mjs";
|
|
9
|
+
import { SCORE_DRUM_VOICES, SCORE_LIMITS, SCORE_ROLES, SCORE_SOUNDS, SCORE_STYLES } from "../../integrations/score/sheet.mjs";
|
|
9
10
|
import { GENERATION_SECONDS } from "../../integrations/stable-audio/local-generator.mjs";
|
|
10
11
|
import { avoidKey } from "../../core/listener-avoids.mjs";
|
|
11
12
|
import { foldedWords, isCjkText, textNames, textNamesArtist } from "../../core/track-title.mjs";
|
|
@@ -188,7 +189,7 @@ function agentCapabilityAllowed(descriptor) {
|
|
|
188
189
|
(descriptor.capability_id === "music.preview.play" && descriptor.effect === "play_preview") ||
|
|
189
190
|
(descriptor.capability_id === "collection.play" && descriptor.effect === "play_library") ||
|
|
190
191
|
(["collection.export", "collection.plan_save"].includes(descriptor.capability_id) && descriptor.effect === "write_external") ||
|
|
191
|
-
(["music.generate.local", "music.generate.replay", "music.generate.stream", "music.generate.stream.stop"].includes(descriptor.capability_id) &&
|
|
192
|
+
(["music.generate.local", "music.generate.score", "music.generate.replay", "music.generate.stream", "music.generate.stream.stop"].includes(descriptor.capability_id) &&
|
|
192
193
|
descriptor.effect === "generate_local")
|
|
193
194
|
);
|
|
194
195
|
}
|
|
@@ -3208,7 +3209,14 @@ function projectGeneratedTrack(value) {
|
|
|
3208
3209
|
term: cleanOutputText(entry?.term || "-", 64, "generated_left_out_term"),
|
|
3209
3210
|
reason: cleanOutputText(entry?.reason, 32, "generated_left_out_reason"),
|
|
3210
3211
|
}));
|
|
3211
|
-
|
|
3212
|
+
// A score that could not be played, or whose notes the lint heard as wrong: what to fix, in plain sentences.
|
|
3213
|
+
const problems = (Array.isArray(value.problems) ? value.problems : []).slice(0, 8).map((entry) => ({
|
|
3214
|
+
where: cleanOutputText(entry?.where || "score", 64, "generated_problem_where"),
|
|
3215
|
+
problem: cleanOutputText(entry?.problem, 320, "generated_problem"),
|
|
3216
|
+
}));
|
|
3217
|
+
if (value.state === "not_made") {
|
|
3218
|
+
return { state: "not_made", reason: cleanOutputText(value.reason, 64, "generated_reason"), left_out: leftOut, ...(problems.length ? { problems } : {}) };
|
|
3219
|
+
}
|
|
3212
3220
|
const source = (entry) => ({
|
|
3213
3221
|
kind: cleanOutputText(entry?.kind, 16, "generated_source_kind"),
|
|
3214
3222
|
...(entry?.claim_id ? { claim_id: cleanOutputText(entry.claim_id, 64, "generated_claim") } : {}),
|
|
@@ -3216,9 +3224,39 @@ function projectGeneratedTrack(value) {
|
|
|
3216
3224
|
...(entry?.artist ? { artist: cleanOutputText(entry.artist, 256, "generated_artist") } : {}),
|
|
3217
3225
|
...(entry?.part_of_day ? { part_of_day: cleanOutputText(entry.part_of_day, 32, "generated_part_of_day") } : {}),
|
|
3218
3226
|
});
|
|
3227
|
+
const shapedBy = (Array.isArray(value.shaped_by) ? value.shaped_by : []).slice(0, DESCRIPTOR_LIMITS.total).map((entry) => ({
|
|
3228
|
+
term: cleanOutputText(entry?.term, 64, "generated_term"), facet: cleanOutputText(entry?.facet, 16, "generated_facet"), source: source(entry?.source),
|
|
3229
|
+
}));
|
|
3230
|
+
if (value.written_as_score === true) {
|
|
3231
|
+
const score = isPlainObject(value.score) ? value.score : {};
|
|
3232
|
+
return {
|
|
3233
|
+
state: "playing",
|
|
3234
|
+
written_as_score: true,
|
|
3235
|
+
made_with: "Moondog's own score, played by its built-in synthesizer on this machine",
|
|
3236
|
+
track: {
|
|
3237
|
+
id: cleanOutputText(value.track?.id, 64, "generated_id"),
|
|
3238
|
+
title: cleanOutputText(value.track?.title, 128, "generated_title"),
|
|
3239
|
+
seconds: safeNonnegativeInteger(Math.round(value.track?.seconds ?? 0), "generated_seconds"),
|
|
3240
|
+
},
|
|
3241
|
+
score: {
|
|
3242
|
+
key: cleanOutputText(score.key, 32, "generated_score_key"),
|
|
3243
|
+
tempo: safeNonnegativeInteger(Math.round(score.tempo ?? 0), "generated_score_tempo"),
|
|
3244
|
+
bars: safeNonnegativeInteger(score.bars ?? 0, "generated_score_bars"),
|
|
3245
|
+
form: cleanOutputText(score.form || "-", 400, "generated_score_form"),
|
|
3246
|
+
sounds: (Array.isArray(score.parts) ? score.parts : []).slice(0, SCORE_LIMITS.parts).map((part) => cleanOutputText(part?.sound, 24, "generated_score_sound")),
|
|
3247
|
+
},
|
|
3248
|
+
// What the lint still hears in it, for the next track; the listener is not told.
|
|
3249
|
+
score_notes: (Array.isArray(value.score_notes) ? value.score_notes : []).slice(0, 6).map((entry) => ({
|
|
3250
|
+
where: cleanOutputText(entry?.where || "score", 64, "generated_note_where"), problem: cleanOutputText(entry?.problem, 200, "generated_note"),
|
|
3251
|
+
})),
|
|
3252
|
+
shaped_by: shapedBy,
|
|
3253
|
+
left_out: leftOut,
|
|
3254
|
+
seconds_to_make: Math.round((value.elapsed_ms ?? 0) / 100) / 10,
|
|
3255
|
+
};
|
|
3256
|
+
}
|
|
3219
3257
|
return {
|
|
3220
3258
|
state: "playing",
|
|
3221
|
-
made_with: "Stable Audio 3
|
|
3259
|
+
made_with: "Stable Audio 3, generated locally",
|
|
3222
3260
|
track: {
|
|
3223
3261
|
id: cleanOutputText(value.track?.id, 64, "generated_id"),
|
|
3224
3262
|
title: cleanOutputText(value.track?.title, 128, "generated_title"),
|
|
@@ -3226,9 +3264,7 @@ function projectGeneratedTrack(value) {
|
|
|
3226
3264
|
seed: safeNonnegativeInteger(value.track?.seed ?? 0, "generated_seed"),
|
|
3227
3265
|
},
|
|
3228
3266
|
prompt: cleanOutputText(value.prompt, 1_024, "generated_prompt"),
|
|
3229
|
-
shaped_by:
|
|
3230
|
-
term: cleanOutputText(entry?.term, 64, "generated_term"), facet: cleanOutputText(entry?.facet, 16, "generated_facet"), source: source(entry?.source),
|
|
3231
|
-
})),
|
|
3267
|
+
shaped_by: shapedBy,
|
|
3232
3268
|
left_out: leftOut,
|
|
3233
3269
|
...(Number.isInteger(value.bpm) ? { bpm: value.bpm } : {}),
|
|
3234
3270
|
seconds_to_make: Math.round((value.elapsed_ms ?? 0) / 100) / 10,
|
|
@@ -3242,6 +3278,7 @@ function renderGeneratedTrack(value, t) {
|
|
|
3242
3278
|
return [t("generate.made", { title: value.track.title, length: trackLength(value.track.seconds), seed: value.track.seed }),
|
|
3243
3279
|
t("generate.stream", { minutes: value.minutes })].join("\n");
|
|
3244
3280
|
}
|
|
3281
|
+
if (value?.state === "playing" && value.track && value.written_as_score) return t("generate.written", { title: value.track.title, length: trackLength(value.track.seconds) });
|
|
3245
3282
|
return value?.state === "playing" && value.track
|
|
3246
3283
|
? t("generate.made", { title: value.track.title, length: trackLength(value.track.seconds), seed: value.track.seed }) : null;
|
|
3247
3284
|
}
|
|
@@ -5294,7 +5331,7 @@ function createToolFactories(
|
|
|
5294
5331
|
name: descriptor.tool_name,
|
|
5295
5332
|
label: descriptor.label,
|
|
5296
5333
|
description:
|
|
5297
|
-
"Make one instrumental track on this
|
|
5334
|
+
"Make one instrumental track on this computer with the listener's own Stable Audio 3, and play it at once in Moondog's player, whatever the music service. Use it only when the listener asks Moondog to make, compose or generate music; never to play existing songs. It needs no web research, search, candidate set or playlist plan: read the profile if it helps, then call this tool. Translate their taste into plain sound descriptors and give each its source: reading (from = a claim_id of the saved reading; none without one), choice (from = an artist or song they marked Like), recent (from = an artist in recent_attention.stored_plays, the last four weeks; not the profile's longer recent lists or Spotify's own top artists), moment (the listener_clock), or request (their words in this message). A term is one idea in a few plain words for a genre, instrument, texture, mood or rhythm, such as dream pop, rhodes piano, tape saturation, unhurried, brushed drums. Say what is in the sound, never what is absent (no drums): the model can't leave a named sound out, so naming it brings it in. moment is the listener's local day and hour as listener_clock gives them; a time the listener names, such as tonight, is request. Never put an artist or song name in a term or the title. The host leaves out any term that names one, cannot be traced, comes from something they Avoid, or asks for singing (the model makes instrumentals only); left_out says which and why. A track needs at least one genre, instrument, texture or mood. If state is not_made, fix the descriptors once from left_out and reason, or tell the listener what was missing. bpm is optional. seconds is 15 to 380, 120 when left out. title is Moondog's own name for the record. " + RECORD_NAME_RULES.join(" ") + " Write it in product.record_name_language, even when the listener writes in another language or mixes languages. product.made_tracks has the names Moondog gave before. Generation time depends on the model and hardware. Make at most one track per message. Making one ends Moondog's stream if one runs. product.made_tracks lists Moondog's newest tracks with their sound and outcomes: lean away from the sound of tracks the listener skipped and toward what they played through or asked for again by name (asked_for_again). replayed_by_moondog counts Moondog's own replays and says nothing about the listener. A track with stream: true played in the background: its completions say little, but its skips still count. These are outcomes of Moondog's own picks, not the listener's taste; never call them likes. Call the record by the result's track.title, never by the title you proposed: the host names it again when your title is not in product.record_name_language. Once it plays, say in one or two sentences what shaped it in everyday words (their reading, a Like, what they play lately, the hour). Describe only what the result's prompt and shaped_by hold: the model takes no key, chord or melody, so never name one. Do not recite the descriptors, the prompt or the seed; the host writes its own line under the reply.",
|
|
5298
5335
|
parameters: Type.Object(
|
|
5299
5336
|
{
|
|
5300
5337
|
descriptors: Type.Array(descriptorSchema, { minItems: 1, maxItems: DESCRIPTOR_LIMITS.total }),
|
|
@@ -5322,6 +5359,93 @@ function createToolFactories(
|
|
|
5322
5359
|
};
|
|
5323
5360
|
},
|
|
5324
5361
|
],
|
|
5362
|
+
[
|
|
5363
|
+
"music.generate.score",
|
|
5364
|
+
(descriptor) => {
|
|
5365
|
+
const literals = (values) => Type.Union(values.map((value) => Type.Literal(value)));
|
|
5366
|
+
const descriptorSchema = Type.Object(
|
|
5367
|
+
{
|
|
5368
|
+
term: Type.String({ minLength: 1, maxLength: DESCRIPTOR_LIMITS.characters }),
|
|
5369
|
+
facet: literals(DESCRIPTOR_FACETS),
|
|
5370
|
+
source: literals(DESCRIPTOR_SOURCES),
|
|
5371
|
+
from: Type.Optional(Type.String({ minLength: 1, maxLength: 256 })),
|
|
5372
|
+
},
|
|
5373
|
+
{ additionalProperties: false },
|
|
5374
|
+
);
|
|
5375
|
+
const grid = Type.Optional(Type.String({ minLength: 1, maxLength: 80 }));
|
|
5376
|
+
const partSchema = Type.Object(
|
|
5377
|
+
{
|
|
5378
|
+
name: Type.String({ minLength: 1, maxLength: 24 }),
|
|
5379
|
+
role: literals(SCORE_ROLES),
|
|
5380
|
+
sound: literals([...new Set(Object.values(SCORE_SOUNDS).flat())]),
|
|
5381
|
+
style: Type.Optional(literals([...SCORE_STYLES.chords, ...SCORE_STYLES.bass])),
|
|
5382
|
+
beat: Type.Optional(Type.Object(Object.fromEntries(SCORE_DRUM_VOICES.map((voice) => [voice, grid])), { additionalProperties: false })),
|
|
5383
|
+
level: Type.Optional(Type.Number({ minimum: 0.2, maximum: 1.2 })),
|
|
5384
|
+
},
|
|
5385
|
+
{ additionalProperties: false },
|
|
5386
|
+
);
|
|
5387
|
+
const sectionSchema = Type.Object(
|
|
5388
|
+
{
|
|
5389
|
+
name: Type.String({ minLength: 1, maxLength: 32 }),
|
|
5390
|
+
chords: Type.String({ minLength: 1, maxLength: 240 }),
|
|
5391
|
+
plays: Type.Optional(Type.Array(Type.String({ minLength: 1, maxLength: 24 }), { minItems: 1, maxItems: SCORE_LIMITS.parts })),
|
|
5392
|
+
repeat: Type.Optional(Type.Integer({ minimum: 1, maximum: SCORE_LIMITS.repeat })),
|
|
5393
|
+
lines: Type.Optional(Type.Array(
|
|
5394
|
+
Type.Object({ part: Type.String({ minLength: 1, maxLength: 24 }), notes: Type.String({ minLength: 1, maxLength: SCORE_LIMITS.lineCharacters }) }, { additionalProperties: false }),
|
|
5395
|
+
{ maxItems: SCORE_LIMITS.parts },
|
|
5396
|
+
)),
|
|
5397
|
+
},
|
|
5398
|
+
{ additionalProperties: false },
|
|
5399
|
+
);
|
|
5400
|
+
return {
|
|
5401
|
+
name: descriptor.tool_name,
|
|
5402
|
+
label: descriptor.label,
|
|
5403
|
+
description:
|
|
5404
|
+
"Write one instrumental track as a score and play it at once in Moondog's player, whatever the music service. Use it only when the listener asks Moondog to make, compose or generate music; never to play existing songs. No music model runs here, so you are the composer: Moondog's own synthesizer plays exactly what you write. It needs no web research, search, candidate set or playlist plan: read the profile if it helps, then call this tool once. " +
|
|
5405
|
+
`sheet is a lead sheet. tempo is beats a minute (${SCORE_LIMITS.tempo.min} to ${SCORE_LIMITS.tempo.max}). key is a tonic and a scale, such as Db major, A minor or D dorian. beats_per_bar is 4, or 3 for a waltz. ` +
|
|
5406
|
+
`parts are the instruments, 1 to ${SCORE_LIMITS.parts}, each with a name, a role and a sound. role chords plays each bar's chord (sound ${SCORE_SOUNDS.chords.join(", ")}; style ${SCORE_STYLES.chords.join(", ")}). role bass plays the chord's root (sound ${SCORE_SOUNDS.bass.join(", ")}; style long for one note a bar, push for the root and a pickup, pulse for every beat, root-fifth). role drums plays its beat (sound, the kit: ${SCORE_SOUNDS.drums.join(", ")}): beat gives a grid of sixteenth steps for each drum (${SCORE_DRUM_VOICES.join(", ")}), 16 steps for a bar of 4 beats or 12 for 3, where x is a hit, X an accent, o a soft hit and . a rest, such as kick x.........x....., rim ....x.......x..., hat x.o.x.o.x.o.x.o.; a grid of 1 to ${SCORE_LIMITS.drumBars} bars loops. role line plays the notes you write (sound ${SCORE_SOUNDS.line.join(", ")}). level is a part's loudness, 1 when left out. ` +
|
|
5407
|
+
`sections play in order, 1 to ${SCORE_LIMITS.sections}. chords has one chord symbol for each bar, 1 to ${SCORE_LIMITS.sectionBars} bars, separated by spaces, such as Dbmaj7 Bbm7 Gbmaj7 Ab7sus4; repeat a symbol to hold a chord for more bars. plays names the parts that sound in the section, all of them when left out. repeat plays the section again, up to ${SCORE_LIMITS.repeat} times in all. lines gives each line part its notes for the section as pitch:beats, one after another, with - for a rest: Ab4:1 F5:1.5 -:0.5 Eb5:1 is three notes and a rest over four beats. A line may be shorter than its section and never longer; count its beats. ` +
|
|
5408
|
+
`The whole track runs ${SCORE_LIMITS.seconds.min} to ${SCORE_LIMITS.seconds.max} seconds, which is bars times beats_per_bar times 60 divided by tempo. Aim for 60 to 120 seconds unless they ask for another length. ` +
|
|
5409
|
+
"Write real music, not a loop: give it a form with an opening, a change and an ending, such as intro, A, B, A, ending; thin the parts out in the quiet sections; let the last section end on the home chord with a long note. Write a melody a person could hum: mostly chord tones on the strong beats, steps between them, rests to breathe, and a short motif that comes back with a small change. Keep every written note in the key unless the bar's chord holds it. Choose the tempo, the key, the sounds and the beat for the listener: their reading, what they play lately, the hour, and their words in this message. " +
|
|
5410
|
+
"descriptors is optional and shapes no sound: it records what of the listener's taste you wrote toward, each in a few plain words with its source, as reading (from = a claim_id of the saved reading), choice (from = an artist or song they marked Like), recent (from = an artist in recent_attention.stored_plays), moment (the listener_clock) or request (their words in this message). Never put an artist or song name in a term or the title. " +
|
|
5411
|
+
"title is Moondog's own name for the record. " + RECORD_NAME_RULES.join(" ") + " Write it in product.record_name_language, even when the listener writes in another language or mixes languages. product.made_tracks has the names Moondog gave before, and how those tracks landed: lean away from the sound of tracks the listener skipped. " +
|
|
5412
|
+
"If state is not_made, problems says exactly what to fix: change those places, keep the rest, and call the tool once more. Writing a track takes a few seconds; write at most one per message. Call the record by the result's track.title, never by the title you proposed. Once it plays, say in one or two sentences what you wrote and why it suits them, in everyday words; you chose the key, the tempo and the instruments, so you may name them. Do not recite the sheet or the score_notes; the host writes its own line under the reply. If they ask how it was made, say plainly that Moondog wrote the notes and its own synthesizer played them, so it sounds simpler than a recording.",
|
|
5413
|
+
parameters: Type.Object(
|
|
5414
|
+
{
|
|
5415
|
+
sheet: Type.Object(
|
|
5416
|
+
{
|
|
5417
|
+
tempo: Type.Integer({ minimum: SCORE_LIMITS.tempo.min, maximum: SCORE_LIMITS.tempo.max }),
|
|
5418
|
+
key: Type.String({ minLength: 3, maxLength: 32 }),
|
|
5419
|
+
beats_per_bar: Type.Optional(Type.Integer({ minimum: 3, maximum: 4 })),
|
|
5420
|
+
parts: Type.Array(partSchema, { minItems: 1, maxItems: SCORE_LIMITS.parts }),
|
|
5421
|
+
sections: Type.Array(sectionSchema, { minItems: 1, maxItems: SCORE_LIMITS.sections }),
|
|
5422
|
+
},
|
|
5423
|
+
{ additionalProperties: false },
|
|
5424
|
+
),
|
|
5425
|
+
descriptors: Type.Optional(Type.Array(descriptorSchema, { maxItems: DESCRIPTOR_LIMITS.total })),
|
|
5426
|
+
title: Type.Optional(Type.String({ minLength: 1, maxLength: 60 })),
|
|
5427
|
+
},
|
|
5428
|
+
{ additionalProperties: false },
|
|
5429
|
+
),
|
|
5430
|
+
executionMode: "sequential",
|
|
5431
|
+
execute: executeDomain(
|
|
5432
|
+
async (_toolCallId, parameters, signal, onUpdate) => {
|
|
5433
|
+
// The moment and the listener's words come from the host, never from the model.
|
|
5434
|
+
const context = generationContext?.() ?? {};
|
|
5435
|
+
return application.writeTrack({ sheet: parameters.sheet, descriptors: parameters.descriptors ?? [], title: parameters.title }, {
|
|
5436
|
+
...context,
|
|
5437
|
+
// A first score with wrong notes goes back to be fixed; the second plays as written.
|
|
5438
|
+
lenient: (context.attempt ?? 1) >= 2,
|
|
5439
|
+
signal,
|
|
5440
|
+
onProgress: ({ stage }) => onUpdate?.({ content: [{ type: "text", text: stage }], details: { stage } }),
|
|
5441
|
+
});
|
|
5442
|
+
},
|
|
5443
|
+
projectGeneratedTrack,
|
|
5444
|
+
onGeneratedTrack,
|
|
5445
|
+
),
|
|
5446
|
+
};
|
|
5447
|
+
},
|
|
5448
|
+
],
|
|
5325
5449
|
[
|
|
5326
5450
|
"music.generate.stream",
|
|
5327
5451
|
(descriptor) => {
|
|
@@ -5339,7 +5463,7 @@ function createToolFactories(
|
|
|
5339
5463
|
name: descriptor.tool_name,
|
|
5340
5464
|
label: descriptor.label,
|
|
5341
5465
|
description:
|
|
5342
|
-
"Start Moondog's stream: instrumental tracks made on this
|
|
5466
|
+
"Start Moondog's stream: instrumental tracks made on this computer from the listener's taste, one after another, for background listening (work, reading, a long evening). The first plays at once; each next one is made while the last plays, and features a different few of the descriptors, so give a broad set: genres, plus several instruments, textures, moods and rhythms. Descriptors, sources and rules are the same as moondog_make_track. A track the listener skips within 30 seconds steers the stream away from what it featured. seconds is each track's length, 60 to 380, 150 when left out; minutes is how long the stream runs, 10 to 180, 60 when left out. Starting one replaces a stream already running, and making a single track ends it. Use it only when the listener asks for music to keep going in the background; for one track, use moondog_make_track. title names the stream and its first track, by the same naming rules as moondog_make_track; Moondog names each later track itself. Call the first record by the result's track.title, never by the title you proposed. Say in one or two sentences what shapes it, and that they can stop it any time; the host writes its own line under the reply. If state is not_made with reason stopped_by_listener, the listener turned the stream off while its first track was made: that is their choice, not a failure, so do not start it again in this turn; acknowledge it in a few words.",
|
|
5343
5467
|
parameters: Type.Object(
|
|
5344
5468
|
{
|
|
5345
5469
|
descriptors: Type.Array(descriptorSchema, { minItems: 1, maxItems: DESCRIPTOR_LIMITS.total }),
|
|
@@ -5376,7 +5500,7 @@ function createToolFactories(
|
|
|
5376
5500
|
(descriptor) => ({
|
|
5377
5501
|
name: descriptor.tool_name,
|
|
5378
5502
|
label: descriptor.label,
|
|
5379
|
-
description: "Stop Moondog's stream of tracks made on this
|
|
5503
|
+
description: "Stop Moondog's stream of tracks made on this computer when the listener asks to stop it. The track playing stops too.",
|
|
5380
5504
|
parameters: emptyParameters,
|
|
5381
5505
|
executionMode: "sequential",
|
|
5382
5506
|
execute: executeDomain(
|
|
@@ -5392,7 +5516,7 @@ function createToolFactories(
|
|
|
5392
5516
|
name: descriptor.tool_name,
|
|
5393
5517
|
label: descriptor.label,
|
|
5394
5518
|
description:
|
|
5395
|
-
"Play again a track Moondog made on this
|
|
5519
|
+
"Play again a track Moondog made on this computer, by its id from product.made_tracks, in Moondog's own player. Use it when the listener asks to hear one of Moondog's tracks again; to make a new one, use moondog_make_track. A track with audio_kept: false has only its receipt left, so it can't play again. Playing one again ends Moondog's stream if one runs. chosen_by says whether the listener named it (their own pick) or Moondog chose it.",
|
|
5396
5520
|
parameters: Type.Object(
|
|
5397
5521
|
{ id: Type.String({ minLength: 36, maxLength: 36 }) },
|
|
5398
5522
|
{ additionalProperties: false },
|
|
@@ -6870,10 +6994,13 @@ function toolForModel(tool) {
|
|
|
6870
6994
|
const SERVICE_NAMES = { apple_music: "Apple Music", netease: "NetEase Music (网易云音乐)" };
|
|
6871
6995
|
|
|
6872
6996
|
// Making a track plays in Moondog's own player under every music service.
|
|
6873
|
-
|
|
6997
|
+
// Where Stable Audio 3 is not set up or cannot run, Moondog writes its tracks as scores instead.
|
|
6998
|
+
const SCORE_LINE = "- moondog_write_track writes an instrumental track as a score, which Moondog's own synthesizer plays in its player, whatever the music service. You compose it: the chords, the beat and the melody. Use it only when they ask Moondog to make, compose or generate music, not to play songs that exist. moondog_play_made_track plays again one Moondog already made (product.made_tracks).";
|
|
6999
|
+
const GENERATION_LINE = "- moondog_make_track makes an instrumental track on this computer from the listener's taste and plays it in Moondog's own player, whatever the music service. Use it only when they ask Moondog to make, compose or generate music, not to play songs that exist. moondog_play_made_track plays again one Moondog already made (product.made_tracks). When the stream tools are offered, moondog_start_stream keeps making tracks one after another for background listening, and moondog_stop_stream ends it.";
|
|
6874
7000
|
|
|
6875
|
-
function sessionAvailability({ spotifyReady, spotifyPlaybackReady = spotifyReady, previewReady, playbackService = "apple_music", neteaseReady = false, localGenerationReady = false }) {
|
|
6876
|
-
|
|
7001
|
+
function sessionAvailability({ spotifyReady, spotifyPlaybackReady = spotifyReady, previewReady, playbackService = "apple_music", neteaseReady = false, localGenerationReady = false, scoreGenerationReady = false }) {
|
|
7002
|
+
const makingLine = localGenerationReady ? GENERATION_LINE : scoreGenerationReady ? SCORE_LINE : null;
|
|
7003
|
+
if (spotifyPlaybackReady) return makingLine ? `\n\nSession availability:\n${makingLine}` : "";
|
|
6877
7004
|
const lines = [
|
|
6878
7005
|
"Session availability:",
|
|
6879
7006
|
spotifyReady
|
|
@@ -6903,10 +7030,12 @@ function sessionAvailability({ spotifyReady, spotifyPlaybackReady = spotifyReady
|
|
|
6903
7030
|
);
|
|
6904
7031
|
} else if (localGenerationReady) {
|
|
6905
7032
|
lines.push("- No music service can play or queue songs in this session. Say so once, briefly, when the listener asks for songs; moondog_make_track can still make them a track of Moondog's own.");
|
|
7033
|
+
} else if (scoreGenerationReady) {
|
|
7034
|
+
lines.push("- No music service can play or queue songs in this session. Say so once, briefly, when the listener asks for songs; moondog_write_track can still write them a track of Moondog's own.");
|
|
6906
7035
|
} else {
|
|
6907
7036
|
lines.push("- You cannot play or queue music in this session. Say so once, briefly, then help with what you can: the song, its story, and what to try next.");
|
|
6908
7037
|
}
|
|
6909
|
-
if (
|
|
7038
|
+
if (makingLine) lines.push(makingLine);
|
|
6910
7039
|
if (previewReady || neteaseReady) {
|
|
6911
7040
|
lines.push(
|
|
6912
7041
|
"- Playback verification belongs to the selected music service. Its play tool resolves and checks recordings. Use the returned songs and outcome to answer directly; do not run another catalog search or playlist planner just to recheck a successful playback result. A Spotify player or queue read cannot verify playback on another service.",
|
|
@@ -6926,7 +7055,7 @@ const isOnAirRequest = (text) => {
|
|
|
6926
7055
|
onAirRequests ??= new Set(Object.keys(LOCALES).map((locale) => translator(locale)("onAir.request")));
|
|
6927
7056
|
return onAirRequests.has(String(text ?? "").trim());
|
|
6928
7057
|
};
|
|
6929
|
-
const ON_AIR_NOTE = "The listener pressed On Air. Answer this message by starting Moondog's stream with moondog_start_stream: instrumental tracks made on this
|
|
7058
|
+
const ON_AIR_NOTE = "The listener pressed On Air. Answer this message by starting Moondog's stream with moondog_start_stream: instrumental tracks made on this computer from their taste and the moment, one after another, with a broad set of descriptors as that tool asks. Do not search, play or queue catalog music for it. If making music isn't available here, say so in one sentence.";
|
|
6930
7059
|
|
|
6931
7060
|
const LIBRARY_SONG = Type.Object({
|
|
6932
7061
|
title: Type.String({ minLength: 1, maxLength: 200 }),
|
|
@@ -6942,6 +7071,7 @@ function sessionSection(application) {
|
|
|
6942
7071
|
playbackService: application.playbackService ?? "apple_music",
|
|
6943
7072
|
neteaseReady: application.neteaseReady?.() ?? false,
|
|
6944
7073
|
localGenerationReady: application.localGenerationReady?.() ?? false,
|
|
7074
|
+
scoreGenerationReady: application.scoreGenerationReady?.() ?? false,
|
|
6945
7075
|
}).trim() || null;
|
|
6946
7076
|
}
|
|
6947
7077
|
|
|
@@ -6955,6 +7085,7 @@ function playbackSurfaceKey(application) {
|
|
|
6955
7085
|
application.neteaseReady?.() ?? false,
|
|
6956
7086
|
application.listeningReadable?.() ?? false,
|
|
6957
7087
|
application.localGenerationReady?.() ?? false,
|
|
7088
|
+
application.scoreGenerationReady?.() ?? false,
|
|
6958
7089
|
]);
|
|
6959
7090
|
}
|
|
6960
7091
|
|
|
@@ -7106,7 +7237,7 @@ Output rules:
|
|
|
7106
7237
|
- For a playlist with a stated size, return that many tracks. When the candidates cannot fill it with good fits, say so and ask before planning fewer. For a queue or an open pick, see Fewer, better.
|
|
7107
7238
|
- For a library or history plan, explain the order and give a concrete reason for every selected track. The host shows an external plan as the songs plus one source line.
|
|
7108
7239
|
- State uncertainty or ask to broaden the search when results are sparse.
|
|
7109
|
-
- Spotify playback controls, library saves, and private playlist writes may be used through the registered tools. When the listener has turned it on, moondog_make_track makes music on this
|
|
7240
|
+
- Spotify playback controls, library saves, and private playlist writes may be used through the registered tools. When the listener has turned it on, moondog_make_track makes music on this computer, which nothing leaves. Where moondog_write_track is offered instead, Moondog writes a track as a score and plays it on this machine, which nothing leaves either. Publishing, messaging, deletion, paid or online generation, and all other external effects remain disabled.
|
|
7110
7241
|
|
|
7111
7242
|
Curation craft:
|
|
7112
7243
|
- Start from an anchor the listener already knows (a thread in the saved reading, an artist in recent attention, what is playing now) and move outward one step at a time: the same scene, era, producer, label, players or lineage. Name the anchor once.
|
|
@@ -7853,6 +7984,7 @@ export class PiAgentRuntime {
|
|
|
7853
7984
|
state.generationAttempts += 1;
|
|
7854
7985
|
const now = this.clock?.();
|
|
7855
7986
|
return {
|
|
7987
|
+
attempt: state.generationAttempts,
|
|
7856
7988
|
moment: now instanceof Date && Number.isFinite(now.getTime()) ? listenerClock(now) : null,
|
|
7857
7989
|
request: state.promptText,
|
|
7858
7990
|
// A conversation that read Spotify keeps the listener's words out of the receipt, as out of memory.
|
|
@@ -20,9 +20,11 @@ import { clampEffort, readPiRuntimeSelection, writePiRuntimeSelection } from "./
|
|
|
20
20
|
// terminal does with /model and /auth. It returns status shapes only: never a
|
|
21
21
|
// credential, a prompt answer or raw provider text.
|
|
22
22
|
|
|
23
|
-
// The providers every listener is offered, in this order: OpenAI by a ChatGPT subscription or
|
|
24
|
-
// key, then Anthropic, Google and xAI.
|
|
25
|
-
//
|
|
23
|
+
// The providers every listener is offered up front, in this order: OpenAI by a ChatGPT subscription or
|
|
24
|
+
// an API key, then Anthropic, Google and xAI. Pi's other providers join them once a key for one is
|
|
25
|
+
// saved or in the environment. Until then, the ones that take a saved key (DeepSeek, Kimi, GLM,
|
|
26
|
+
// OpenRouter) are marked more, and the window keeps them folded under one row. Any other service is
|
|
27
|
+
// reached as an endpoint by address.
|
|
26
28
|
const FEATURED = ["openai", "anthropic", "google", "xai"];
|
|
27
29
|
// Whether a catalog model takes an input besides text, such as "image".
|
|
28
30
|
const takes = (model, input) => Boolean(input) && Array.isArray(model?.input) && model.input.includes(input);
|
|
@@ -152,17 +154,21 @@ export function createModelSettings({
|
|
|
152
154
|
current,
|
|
153
155
|
|
|
154
156
|
// Settings' providers: Moondog's own model first, then the featured ones in their order, then any other provider that has a key or
|
|
155
|
-
// is in use, by name, then the listener's endpoints in the order they were added.
|
|
157
|
+
// is in use, by name, then the listener's endpoints in the order they were added. Last, marked more: the rest that take a
|
|
158
|
+
// saved key, by name, for the window's one folded row. A key saved for one moves it up among the others.
|
|
156
159
|
async providers({ current: currentProvider } = {}) {
|
|
157
160
|
currentProvider ??= (await current().catch(() => null))?.provider;
|
|
158
161
|
const source = await catalog();
|
|
159
162
|
const all = await rows(source, listed(source));
|
|
160
163
|
const featured = FEATURED.map(id => all.find(provider => provider.id === id)).filter(Boolean);
|
|
161
164
|
const own = all.filter(provider => provider.signIn === "invite");
|
|
162
|
-
const
|
|
163
|
-
|
|
165
|
+
const rest = all.filter(provider => !FEATURED.includes(provider.id) && provider.signIn !== "endpoint" && provider.signIn !== "invite")
|
|
166
|
+
.sort((left, right) => left.name.localeCompare(right.name));
|
|
167
|
+
const shown = provider => provider.signedIn || provider.id === currentProvider;
|
|
168
|
+
const others = rest.filter(shown);
|
|
169
|
+
const more = rest.filter(provider => !shown(provider) && provider.signIn === "api_key").map(provider => ({ ...provider, more: true }));
|
|
164
170
|
const endpoints = (source.endpoints ?? []).map(endpoint => all.find(provider => provider.id === endpoint.id)).filter(Boolean);
|
|
165
|
-
return [...own, ...featured, ...others, ...endpoints];
|
|
171
|
+
return [...own, ...featured, ...others, ...endpoints, ...more];
|
|
166
172
|
},
|
|
167
173
|
|
|
168
174
|
// The menu's models, each with its provider's name and whether it can answer now, and the default
|
|
@@ -564,5 +564,5 @@ function wrapDescription(text, width) {
|
|
|
564
564
|
}
|
|
565
565
|
|
|
566
566
|
export function listeningHelp() {
|
|
567
|
-
return tr("# 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- `/library` - your saved songs and playlists\n- `/generation on|off` -
|
|
567
|
+
return tr("# 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- `/library` - your saved songs and playlists\n- `/generation on|off` - turn Stable Audio 3 on or off. Moondog can write a score when it is off\n- `/onair` - go on air, or come off it\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- `/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- `/status`, `/sources`, `/tools`, `/doctor` - see what's connected and working\n- `/reload` - reload model settings and sign-ins\n- `/model roles` - see what side tasks use: the model that reads images and the web search service\n- `/effort` - choose how hard the model thinks\n- `/endpoint add` or `/endpoint remove <id>` - add a model service by its address, or remove it\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.");
|
|
568
568
|
}
|
|
@@ -24,14 +24,22 @@ const serviceChoices = choices([
|
|
|
24
24
|
["apple_music", N_("30-second previews, played here")],
|
|
25
25
|
["netease", N_("Whole songs through ncm-cli")],
|
|
26
26
|
]);
|
|
27
|
-
|
|
27
|
+
// Off the Mac, Stable Audio 3 is its CPU build: "this computer", and its smaller downloads.
|
|
28
|
+
const onMac = process.platform === "darwin";
|
|
29
|
+
const generationChoices = choices([
|
|
30
|
+
["on", onMac ? N_("Make music on this Mac with Stable Audio 3") : N_("Make music on this computer with Stable Audio 3")],
|
|
31
|
+
// Off turns Stable Audio 3 off; Moondog still writes a track as a score when asked.
|
|
32
|
+
["off", N_("Turn Stable Audio 3 off")],
|
|
33
|
+
]);
|
|
28
34
|
const generationSetupChoices = choices([
|
|
29
35
|
["download", N_("Download a Stable Audio 3 model from Stability AI")],
|
|
30
36
|
["use", N_("Make music with a downloaded model")],
|
|
31
|
-
["remove", N_("Delete a downloaded model from this Mac")],
|
|
37
|
+
["remove", onMac ? N_("Delete a downloaded model from this Mac") : N_("Delete a downloaded model from this computer")],
|
|
32
38
|
["cancel", N_("Stop the download")],
|
|
33
39
|
]);
|
|
34
|
-
const sa3ModelChoices = choices(
|
|
40
|
+
const sa3ModelChoices = choices(onMac
|
|
41
|
+
? [["medium", N_("Medium: best sound, about 5.2 GB")], ["small", N_("Small Music: faster, lighter, about 1.7 GB")]]
|
|
42
|
+
: [["medium", N_("Medium: best sound, about 2.3 GB")], ["small", N_("Small Music: faster, lighter, about 1.2 GB")]]);
|
|
35
43
|
const webChoices = choices([
|
|
36
44
|
["search", N_("Search public music sites")],
|
|
37
45
|
["read", N_("Read a public page")],
|
|
@@ -472,7 +472,7 @@ function formatTools(value, tr) {
|
|
|
472
472
|
const doctorLabels = {
|
|
473
473
|
"web.search": N_("Web search"),
|
|
474
474
|
"web.read": N_("Web page reading"),
|
|
475
|
-
"music.generate.local": N_("Making music on this Mac"),
|
|
475
|
+
"music.generate.local": process.platform === "darwin" ? N_("Making music on this Mac") : N_("Making music on this computer"),
|
|
476
476
|
"node.version": "Node.js",
|
|
477
477
|
"apple_music.source": N_("Apple Music library"),
|
|
478
478
|
"profile.projection": N_("Listening profile"),
|
|
@@ -570,5 +570,5 @@ export function formatLocalResult(command, value, tr = screenTranslator("en")) {
|
|
|
570
570
|
}
|
|
571
571
|
|
|
572
572
|
export function helpText(tr = screenTranslator("en")) {
|
|
573
|
-
return tr("# 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- `/model roles` - see what side tasks use: the model that reads images and the web search service\n- `/model vision auto|<provider> <model>` - choose the model that reads images\n- `/model web auto|deepseek|brave|codex` - choose the web search service\n- `/effort` - choose how hard the model thinks\n- `/auth [provider]` - sign in to a model provider\n- `/endpoint add` or `/endpoint remove <id>` - add a model service by its address, or remove it\n- `/web status|search|read` - look things up on public music sites\n- `/import [path]` - bring in your history, library, or a playlist\n- `/library` - your saved songs and playlists\n- `/library play <name>` - play a playlist\n- `/library save [playlist]` - keep the song playing now\n- `/library import <link>` - copy a playlist from a link\n- `/library export <name>` - send a playlist to Spotify\n- `/generation on|off` -
|
|
573
|
+
return tr("# 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- `/model roles` - see what side tasks use: the model that reads images and the web search service\n- `/model vision auto|<provider> <model>` - choose the model that reads images\n- `/model web auto|deepseek|brave|codex` - choose the web search service\n- `/effort` - choose how hard the model thinks\n- `/auth [provider]` - sign in to a model provider\n- `/endpoint add` or `/endpoint remove <id>` - add a model service by its address, or remove it\n- `/web status|search|read` - look things up on public music sites\n- `/import [path]` - bring in your history, library, or a playlist\n- `/library` - your saved songs and playlists\n- `/library play <name>` - play a playlist\n- `/library save [playlist]` - keep the song playing now\n- `/library import <link>` - copy a playlist from a link\n- `/library export <name>` - send a playlist to Spotify\n- `/generation on|off` - turn Stable Audio 3 on or off. Moondog can write a score when it is off\n- `/generation download|use|remove|cancel` - set up a Stable Audio 3 model\n- `/onair` - go on air, or come off it\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 stream track, or stop them\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- `/lyrics` - the lyrics on the sleeve; `/lyrics sync` finds more\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`. I ask before I remove anything from your library, and I never post, send messages, or spend money.\nAsk me to move playback onto a device by name, such as your iPhone.");
|
|
574
574
|
}
|