@frequencytalk/agent 0.1.0 → 0.1.1

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 CHANGED
@@ -37,7 +37,8 @@ const { frequency } = await agent.frequencies.tuneByNumber(118025);
37
37
  const session = await agent.session(frequency!.id);
38
38
  await agent.speaker(session).speakWav("hello.wav");
39
39
 
40
- // Hear the reply for ten seconds.
40
+ // Hear the reply for ten seconds. Receiving is off until you listen to a channel.
41
+ for (const c of await agent.frequencies.channels(frequency!.id)) session.listen(c.id);
41
42
  const listener = agent.listener(session);
42
43
  await listener.start();
43
44
  await new Promise((r) => setTimeout(r, 10_000));
package/dist/cli.js CHANGED
@@ -5417,6 +5417,10 @@ async function startMcpServer(options = {}) {
5417
5417
  async function main() {
5418
5418
  const argv = process.argv.slice(2);
5419
5419
  const cmd = argv[0];
5420
+ if (argv.includes("--help") || argv.includes("-h") || cmd === "help") {
5421
+ console.log(USAGE);
5422
+ return;
5423
+ }
5420
5424
  const at = argv.indexOf("--base-url");
5421
5425
  const baseUrl = at === -1 ? void 0 : argv[at + 1];
5422
5426
  if (cmd === "mcp") {
@@ -5433,9 +5437,10 @@ async function main() {
5433
5437
  }
5434
5438
  return;
5435
5439
  }
5436
- console.error("usage: frequencytalk-agent <mcp|whoami> [--base-url URL]\nThe key is read from FREQUENCY_AGENT_KEY or ~/.config/frequencytalk/agent.json, never from the command line.");
5440
+ console.error(USAGE);
5437
5441
  process.exit(2);
5438
5442
  }
5443
+ var USAGE = "usage: frequencytalk-agent <mcp|whoami> [--base-url URL] [--help]\n mcp run the MCP server on stdio (the key from FREQUENCY_AGENT_KEY or ~/.config/frequencytalk/agent.json, never argv)\n whoami sign in with the key and print the account and its credit";
5439
5444
  main().catch((err) => {
5440
5445
  console.error(err instanceof Error ? err.message : String(err));
5441
5446
  process.exit(1);