natureco-cli 5.6.12 → 5.6.13
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/package.json +1 -1
- package/src/tools/soul.js +15 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "natureco-cli",
|
|
3
|
-
"version": "5.6.
|
|
3
|
+
"version": "5.6.13",
|
|
4
4
|
"description": "OpenClaw'dan daha güvenli, daha hızlı, daha ucuz AI agent CLI. Multi-agent, self-evolving skills, audit log, maliyet optimizasyonu ve NatureCo platform-native.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"natureco": "bin/natureco.js"
|
package/src/tools/soul.js
CHANGED
|
@@ -125,19 +125,29 @@ function soulAction(params) {
|
|
|
125
125
|
const action = params.action || "show";
|
|
126
126
|
const all = findAll();
|
|
127
127
|
const loaded = Object.keys(all).length;
|
|
128
|
+
// v5.6.13: Dosya yollarini kisalt (home ile baslat)
|
|
129
|
+
const shortenPath = (p) => {
|
|
130
|
+
if (!p) return '';
|
|
131
|
+
const home = require('os').homedir();
|
|
132
|
+
if (p.startsWith(home)) return '~' + p.slice(home.length);
|
|
133
|
+
return p;
|
|
134
|
+
};
|
|
128
135
|
|
|
129
136
|
if (action === "show") {
|
|
130
137
|
if (loaded === 0) {
|
|
131
138
|
return {
|
|
132
139
|
success: false,
|
|
133
|
-
error: "Hicbir SOUL dosyasi bulunamadi. Aranacak yerler:\n" + SOUL_PATHS.join("\n"),
|
|
140
|
+
error: "Hicbir SOUL dosyasi bulunamadi. Aranacak yerler:\n" + SOUL_PATHS.map(shortenPath).join("\n"),
|
|
134
141
|
};
|
|
135
142
|
}
|
|
136
143
|
return {
|
|
137
144
|
success: true,
|
|
138
145
|
loaded: loaded,
|
|
139
|
-
files: Object.fromEntries(Object.entries(all).map(([k, v]) => [k, {
|
|
140
|
-
|
|
146
|
+
files: Object.fromEntries(Object.entries(all).map(([k, v]) => [k, {
|
|
147
|
+
path: shortenPath(v.path),
|
|
148
|
+
content: v.content ? v.content.slice(0, 500) + (v.content.length > 500 ? '... [truncated]' : '') : ''
|
|
149
|
+
}])),
|
|
150
|
+
summary: summarizeSoul(buildSoulContext(), 2000),
|
|
141
151
|
message: loaded + " SOUL dosyasi yuklendi: " + Object.keys(all).join(", "),
|
|
142
152
|
};
|
|
143
153
|
}
|
|
@@ -148,12 +158,12 @@ function soulAction(params) {
|
|
|
148
158
|
loaded: loaded,
|
|
149
159
|
total: SOUL_FILES.length,
|
|
150
160
|
files: Object.fromEntries(Object.entries(all).map(([k, v]) => ({
|
|
151
|
-
path: v.path,
|
|
161
|
+
path: shortenPath(v.path),
|
|
152
162
|
size: fs.statSync(v.path).size,
|
|
153
163
|
modifiedAt: fs.statSync(v.path).mtime.toISOString(),
|
|
154
164
|
lineCount: v.content.split("\n").length,
|
|
155
165
|
}))),
|
|
156
|
-
searched: SOUL_PATHS,
|
|
166
|
+
searched: SOUL_PATHS.map(shortenPath),
|
|
157
167
|
};
|
|
158
168
|
}
|
|
159
169
|
|