@jclaw/core 0.6.0 → 0.6.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.
Files changed (2) hide show
  1. package/dist/cli/jclaw.js +13 -1
  2. package/package.json +1 -1
package/dist/cli/jclaw.js CHANGED
@@ -3,6 +3,16 @@ import { JClawAgent } from '../runtime/agent.js';
3
3
  import { createSimpleMemoryClient } from '../context/simple-memory-client.js';
4
4
  import { readFile, writeFile } from 'fs/promises';
5
5
  import { existsSync } from 'fs';
6
+ import { fileURLToPath } from 'url';
7
+ import { dirname, join } from 'path';
8
+
9
+ const __filename = fileURLToPath(import.meta.url);
10
+ const __dirname = dirname(__filename);
11
+
12
+ // Read version from package.json
13
+ const packageJsonPath = join(__dirname, '../../package.json');
14
+ const packageJson = JSON.parse(await readFile(packageJsonPath, 'utf-8'));
15
+ const VERSION = packageJson.version;
6
16
 
7
17
  const args = process.argv.slice(2);
8
18
  const command = args[0];
@@ -90,6 +100,8 @@ async function execute(prompt) {
90
100
  console.log(`🔌 API: ${llmConfig.apiBase}\n`);
91
101
 
92
102
  const agent = new JClawAgent({
103
+ name: 'jclaw-cli',
104
+ version: VERSION,
93
105
  enableAutoSkill: true,
94
106
  skillShConfig: { enableCache: true },
95
107
  llm: llmConfig,
@@ -116,7 +128,7 @@ async function chat() {
116
128
  console.log('🧬 JClaw 交互模式 (输入 "exit" 退出)\n');
117
129
  console.log(`📡 模型:${llmConfig.model}\n`);
118
130
 
119
- const agent = new JClawAgent({ enableAutoSkill: true, llm: llmConfig });
131
+ const agent = new JClawAgent({ name: 'jclaw-chat', version: VERSION, enableAutoSkill: true, llm: llmConfig });
120
132
  await agent.start();
121
133
 
122
134
  const readline = await import('readline');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jclaw/core",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Universal self-evolving Agent with improved AutoSkill retry logic",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",