nextclaw 0.1.0 → 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/dist/cli/index.js CHANGED
@@ -1,5 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
+ APP_NAME,
4
+ APP_REPLY_SUBJECT,
5
+ APP_TAGLINE,
6
+ APP_TITLE,
3
7
  AgentLoop,
4
8
  ConfigSchema,
5
9
  LiteLLMProvider,
@@ -14,7 +18,7 @@ import {
14
18
  getWorkspacePath,
15
19
  loadConfig,
16
20
  saveConfig
17
- } from "../chunk-RTVGGPPW.js";
21
+ } from "../chunk-X77K7Y4T.js";
18
22
 
19
23
  // src/cli/index.ts
20
24
  import { Command } from "commander";
@@ -205,14 +209,20 @@ var TelegramChannel = class extends BaseChannel {
205
209
  this.bot.onText(/^\/start$/, async (msg) => {
206
210
  await this.bot?.sendMessage(
207
211
  msg.chat.id,
208
- `\u{1F44B} Hi ${msg.from?.first_name ?? ""}! I'm nextclaw.
212
+ `\u{1F44B} Hi ${msg.from?.first_name ?? ""}! I'm ${APP_NAME}.
209
213
 
210
214
  Send me a message and I'll respond!
211
215
  Type /help to see available commands.`
212
216
  );
213
217
  });
214
218
  this.bot.onText(/^\/help$/, async (msg) => {
215
- const helpText = "\u{1F916} <b>nextclaw commands</b>\n\n/start \u2014 Start the bot\n/reset \u2014 Reset conversation history\n/help \u2014 Show this help message\n\nJust send me a text message to chat!";
219
+ const helpText = `\u{1F916} <b>${APP_NAME} commands</b>
220
+
221
+ /start \u2014 Start the bot
222
+ /reset \u2014 Reset conversation history
223
+ /help \u2014 Show this help message
224
+
225
+ Just send me a text message to chat!`;
216
226
  await this.bot?.sendMessage(msg.chat.id, helpText, { parse_mode: "HTML" });
217
227
  });
218
228
  this.bot.onText(/^\/reset$/, async (msg) => {
@@ -1844,7 +1854,7 @@ var DingTalkChannel = class extends BaseChannel {
1844
1854
  msgKey: "sampleMarkdown",
1845
1855
  msgParam: JSON.stringify({
1846
1856
  text: msg.content,
1847
- title: "Nextclaw Reply"
1857
+ title: `${APP_TITLE} Reply`
1848
1858
  })
1849
1859
  };
1850
1860
  const response = await fetch4(url, {
@@ -1985,7 +1995,7 @@ var EmailChannel = class extends BaseChannel {
1985
1995
  if (!toAddr) {
1986
1996
  return;
1987
1997
  }
1988
- const baseSubject = this.lastSubjectByChat.get(toAddr) ?? "nextclaw reply";
1998
+ const baseSubject = this.lastSubjectByChat.get(toAddr) ?? APP_REPLY_SUBJECT;
1989
1999
  const subject = msg.metadata?.subject?.trim() || this.replySubject(baseSubject);
1990
2000
  const transporter = nodemailer.createTransport({
1991
2001
  host: this.config.smtpHost,
@@ -2761,8 +2771,8 @@ var LOGO = "\u{1F916}";
2761
2771
  var EXIT_COMMANDS = /* @__PURE__ */ new Set(["exit", "quit", "/exit", "/quit", ":q"]);
2762
2772
  var VERSION = getPackageVersion();
2763
2773
  var program = new Command();
2764
- program.name("nextclaw").description(`${LOGO} nextclaw - Personal AI Assistant`).version(VERSION, "-v, --version", "show version");
2765
- program.command("onboard").description("Initialize nextclaw configuration and workspace").action(() => {
2774
+ program.name(APP_NAME).description(`${LOGO} ${APP_NAME} - ${APP_TAGLINE}`).version(VERSION, "-v, --version", "show version");
2775
+ program.command("onboard").description(`Initialize ${APP_NAME} configuration and workspace`).action(() => {
2766
2776
  const configPath = getConfigPath();
2767
2777
  if (existsSync5(configPath)) {
2768
2778
  console.log(`Config already exists at ${configPath}`);
@@ -2774,12 +2784,12 @@ program.command("onboard").description("Initialize nextclaw configuration and wo
2774
2784
  console.log(`\u2713 Created workspace at ${workspace}`);
2775
2785
  createWorkspaceTemplates(workspace);
2776
2786
  console.log(`
2777
- ${LOGO} nextclaw is ready!`);
2787
+ ${LOGO} ${APP_NAME} is ready!`);
2778
2788
  console.log("\nNext steps:");
2779
2789
  console.log(` 1. Add your API key to ${configPath}`);
2780
- console.log(' 2. Chat: nextclaw agent -m "Hello!"');
2790
+ console.log(` 2. Chat: ${APP_NAME} agent -m "Hello!"`);
2781
2791
  });
2782
- program.command("gateway").description("Start the nextclaw gateway").option("-p, --port <port>", "Gateway port", "18790").option("-v, --verbose", "Verbose output", false).action(async (_opts) => {
2792
+ program.command("gateway").description(`Start the ${APP_NAME} gateway`).option("-p, --port <port>", "Gateway port", "18790").option("-v, --verbose", "Verbose output", false).action(async (_opts) => {
2783
2793
  const config = loadConfig();
2784
2794
  const bus = new MessageBus();
2785
2795
  const provider = makeProvider(config);
@@ -2979,11 +2989,11 @@ cron.command("run <jobId>").option("-f, --force", "Run even if disabled").action
2979
2989
  const ok = await service.runJob(jobId, Boolean(opts.force));
2980
2990
  console.log(ok ? "\u2713 Job executed" : `Failed to run job ${jobId}`);
2981
2991
  });
2982
- program.command("status").description("Show nextclaw status").action(() => {
2992
+ program.command("status").description(`Show ${APP_NAME} status`).action(() => {
2983
2993
  const configPath = getConfigPath();
2984
2994
  const config = loadConfig();
2985
2995
  const workspace = getWorkspacePath(config.agents.defaults.workspace);
2986
- console.log(`${LOGO} nextclaw Status
2996
+ console.log(`${LOGO} ${APP_NAME} Status
2987
2997
  `);
2988
2998
  console.log(`Config: ${configPath} ${existsSync5(configPath) ? "\u2713" : "\u2717"}`);
2989
2999
  console.log(`Workspace: ${workspace} ${existsSync5(workspace) ? "\u2713" : "\u2717"}`);
@@ -3006,7 +3016,7 @@ function makeProvider(config) {
3006
3016
  const model = config.agents.defaults.model;
3007
3017
  if (!provider?.apiKey && !model.startsWith("bedrock/")) {
3008
3018
  console.error("Error: No API key configured.");
3009
- console.error("Set one in ~/.nextclaw/config.json under providers section");
3019
+ console.error(`Set one in ${getConfigPath()} under providers section`);
3010
3020
  process.exit(1);
3011
3021
  }
3012
3022
  return new LiteLLMProvider({
@@ -3020,7 +3030,22 @@ function makeProvider(config) {
3020
3030
  function createWorkspaceTemplates(workspace) {
3021
3031
  const templates = {
3022
3032
  "AGENTS.md": "# Agent Instructions\n\nYou are a helpful AI assistant. Be concise, accurate, and friendly.\n\n## Guidelines\n\n- Always explain what you're doing before taking actions\n- Ask for clarification when the request is ambiguous\n- Use tools to help accomplish tasks\n- Remember important information in your memory files\n",
3023
- "SOUL.md": "# Soul\n\nI am nextclaw, a lightweight AI assistant.\n\n## Personality\n\n- Helpful and friendly\n- Concise and to the point\n- Curious and eager to learn\n\n## Values\n\n- Accuracy over speed\n- User privacy and safety\n- Transparency in actions\n",
3033
+ "SOUL.md": `# Soul
3034
+
3035
+ I am ${APP_NAME}, a lightweight AI assistant.
3036
+
3037
+ ## Personality
3038
+
3039
+ - Helpful and friendly
3040
+ - Concise and to the point
3041
+ - Curious and eager to learn
3042
+
3043
+ ## Values
3044
+
3045
+ - Accuracy over speed
3046
+ - User privacy and safety
3047
+ - Transparency in actions
3048
+ `,
3024
3049
  "USER.md": "# User\n\nInformation about the user goes here.\n\n## Preferences\n\n- Communication style: (casual/formal)\n- Timezone: (your timezone)\n- Language: (your preferred language)\n"
3025
3050
  };
3026
3051
  for (const [filename, content] of Object.entries(templates)) {
@@ -3071,7 +3096,7 @@ function getBridgeDir() {
3071
3096
  source = srcBridge;
3072
3097
  }
3073
3098
  if (!source) {
3074
- console.error("Bridge source not found. Try reinstalling nextclaw.");
3099
+ console.error(`Bridge source not found. Try reinstalling ${APP_NAME}.`);
3075
3100
  process.exit(1);
3076
3101
  }
3077
3102
  console.log(`${LOGO} Setting up bridge...`);
package/dist/index.js CHANGED
@@ -40,7 +40,7 @@ import {
40
40
  matchProvider,
41
41
  providerLabel,
42
42
  saveConfig
43
- } from "./chunk-RTVGGPPW.js";
43
+ } from "./chunk-X77K7Y4T.js";
44
44
  export {
45
45
  AgentDefaultsSchema,
46
46
  AgentLoop,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nextclaw",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Lightweight personal AI assistant with CLI, multi-provider routing, and channel integrations.",
5
5
  "private": false,
6
6
  "type": "module",