@web42/w42 0.1.0 → 0.1.2

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.
@@ -2,6 +2,7 @@ import { Command } from "commander";
2
2
  import chalk from "chalk";
3
3
  import ora from "ora";
4
4
  import { apiGet } from "../utils/api.js";
5
+ import { printBanner } from "../utils/banner.js";
5
6
  import { getConfig } from "../utils/config.js";
6
7
  function getCardName(card) {
7
8
  return card?.name ?? "Untitled Agent";
@@ -52,25 +53,6 @@ function wrapText(text, maxWidth, maxLines) {
52
53
  }
53
54
  return lines.slice(0, maxLines);
54
55
  }
55
- function printAsciiLogo() {
56
- const logo = chalk.bold.yellow(`$$$$$$$$ $$$$$$$ $$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ \n` +
57
- `$$$$$$$$ $$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ \n` +
58
- `$$$$$$$$ $$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ \n` +
59
- `$$$$$$$$ $$$$$$$$$$$$ $$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ \n` +
60
- `$$$$$$$$ $$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$ $$$$$$$$ \n` +
61
- `$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ \n` +
62
- `$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ \n` +
63
- `$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ \n` +
64
- `$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$ $$$$$$$$ \n` +
65
- `$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ \n` +
66
- `$$$$$$$$$$$$ $$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ \n` +
67
- `$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ \n` +
68
- ` $$$$$$$$ \n` +
69
- ` $$$$$$$$ \n` +
70
- ` $$$$$$$$ `);
71
- console.log(logo);
72
- console.log();
73
- }
74
56
  function printGlobalHint() {
75
57
  const hint = ` Talk to any agent with ${chalk.cyan(`npx @web42/w42 send <owner/agent> "your message"`)}`;
76
58
  console.log(hint);
@@ -99,7 +81,7 @@ export const searchCommand = new Command("search")
99
81
  }
100
82
  const limit = parseInt(opts.limit, 10) || 10;
101
83
  const results = agents.slice(0, limit);
102
- printAsciiLogo();
84
+ printBanner();
103
85
  printGlobalHint();
104
86
  for (const agent of results) {
105
87
  const name = getCardName(agent.agent_card);
@@ -6,6 +6,7 @@ import ora from "ora";
6
6
  import express from "express";
7
7
  import { agentCardHandler, jsonRpcHandler, } from "@a2a-js/sdk/server/express";
8
8
  import { DefaultRequestHandler, InMemoryTaskStore, } from "@a2a-js/sdk/server";
9
+ import { printBanner } from "../utils/banner.js";
9
10
  import { requireAuth, getConfig } from "../utils/config.js";
10
11
  class OpenClawAgentExecutor {
11
12
  opts;
@@ -259,7 +260,8 @@ export const serveCommand = new Command("serve")
259
260
  // 6. Start listening, then register
260
261
  app.listen(port, async () => {
261
262
  spinner.stop();
262
- console.log(chalk.green(`\n Agent "${agentName}" is live`));
263
+ printBanner();
264
+ console.log(chalk.green(` Agent "${agentName}" is live`));
263
265
  console.log(chalk.dim(` Local: http://localhost:${port}`));
264
266
  if (publicUrl)
265
267
  console.log(chalk.dim(` Public: ${publicUrl}`));
@@ -0,0 +1 @@
1
+ export declare function printBanner(): void;
@@ -0,0 +1,22 @@
1
+ import chalk from "chalk";
2
+ const LOGO = [
3
+ "$$$$$$$$ $$$$$$$ $$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
4
+ "$$$$$$$$ $$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
5
+ "$$$$$$$$ $$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
6
+ "$$$$$$$$ $$$$$$$$$$$$ $$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
7
+ "$$$$$$$$ $$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$ $$$$$$$$",
8
+ "$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
9
+ "$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
10
+ "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
11
+ "$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$ $$$$$$$$",
12
+ "$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
13
+ "$$$$$$$$$$$$ $$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
14
+ "$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
15
+ " $$$$$$$$",
16
+ " $$$$$$$$",
17
+ " $$$$$$$$",
18
+ ].join("\n");
19
+ export function printBanner() {
20
+ console.log(chalk.bold.yellow(LOGO));
21
+ console.log();
22
+ }
@@ -2,7 +2,7 @@ import Conf from "conf";
2
2
  const config = new Conf({
3
3
  projectName: "w42",
4
4
  defaults: {
5
- apiUrl: "http://localhost:3000",
5
+ apiUrl: "https://web42-network.vercel.app",
6
6
  authenticated: false,
7
7
  },
8
8
  });
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const CLI_VERSION = "0.1.0";
1
+ export declare const CLI_VERSION = "0.1.2";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const CLI_VERSION = "0.1.0";
1
+ export const CLI_VERSION = "0.1.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@web42/w42",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "CLI for the Web42 Agent Network — discover, register, and communicate with A2A agents",
5
5
  "type": "module",
6
6
  "bin": {