moshcode 0.26.0 → 0.27.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/.claude-plugin/marketplace.json +12 -0
- package/README.md +43 -2
- package/bin/moshcode.mjs +8 -0
- package/package.json +1 -1
- package/plugins/crypto/.claude-plugin/plugin.json +13 -0
- package/plugins/crypto/README.md +66 -0
- package/plugins/crypto/commands/bars.md +35 -0
- package/plugins/crypto/commands/book.md +31 -0
- package/plugins/crypto/commands/coin.md +31 -0
- package/plugins/crypto/commands/crypto.md +50 -0
- package/plugins/crypto/commands/pairs.md +31 -0
- package/plugins/crypto/commands/quote.md +31 -0
- package/plugins/crypto/commands/spark.md +36 -0
- package/src/advisor.mjs +12 -2
- package/src/cli-schema.mjs +69 -0
- package/src/crypto.mjs +877 -0
- package/src/plugins.mjs +5 -0
- package/src/tui.mjs +7 -0
package/src/plugins.mjs
CHANGED
|
@@ -33,6 +33,11 @@ export const PLUGINS = [
|
|
|
33
33
|
description: "equity research slash commands backed by advis0r.com",
|
|
34
34
|
commands: ["/ticker", "/signals", "/research", "/lookup", "/reports", "/discover"],
|
|
35
35
|
},
|
|
36
|
+
{
|
|
37
|
+
name: "crypto",
|
|
38
|
+
description: "crypto market data slash commands backed by advis0r.com",
|
|
39
|
+
commands: ["/crypto", "/quote", "/book", "/bars", "/spark", "/pairs", "/coin"],
|
|
40
|
+
},
|
|
36
41
|
];
|
|
37
42
|
|
|
38
43
|
export const DEFAULT_PLUGIN = PLUGINS[0].name;
|
package/src/tui.mjs
CHANGED
|
@@ -21,6 +21,7 @@ import { runScript } from "./runtime.mjs";
|
|
|
21
21
|
import { moshVocabulary } from "./commands.mjs";
|
|
22
22
|
import { mcpCommand, pluginCommand, skillCommand } from "./integrations.mjs";
|
|
23
23
|
import { tickerCommand } from "./advisor.mjs";
|
|
24
|
+
import { cryptoCommand } from "./crypto.mjs";
|
|
24
25
|
import { canOpenBrowser, openBrowser } from "./open-url.mjs";
|
|
25
26
|
import { banner, hr, acid, ash, bone, dim, ok, err, warn, info, moshcodeVersion } from "./ui.mjs";
|
|
26
27
|
import { CORE_CLI_COMMAND_NAMES } from "./cli-schema.mjs";
|
|
@@ -678,6 +679,12 @@ export async function tui() {
|
|
|
678
679
|
await tickerCommand(rest, { openUrl: (url) => canOpenBrowser() && openBrowser(url) });
|
|
679
680
|
continue;
|
|
680
681
|
}
|
|
682
|
+
// `/crypto` renders in the pit for the same reason `/ticker` does: there is
|
|
683
|
+
// no crypto binary to hand the terminal to, only a public read-only API.
|
|
684
|
+
if (cmd === "crypto" || cmd === "coins") {
|
|
685
|
+
await cryptoCommand(rest, { openUrl: (url) => canOpenBrowser() && openBrowser(url) });
|
|
686
|
+
continue;
|
|
687
|
+
}
|
|
681
688
|
if (cmd === "plugin" || cmd === "plugins") {
|
|
682
689
|
await pluginCommand(rest);
|
|
683
690
|
continue;
|