natureco-cli 5.51.1 → 5.51.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.
- package/CHANGELOG.md +5 -0
- package/package.json +97 -97
- package/src/commands/account.js +11 -5
- package/src/utils/natureco-account.js +20 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to NatureCo CLI will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [5.51.2] - 2026-07-11 — "account: giriş linki (magic link) desteği"
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- **`natureco account login` OTP akışı, e-posta 6 haneli kod yerine GİRİŞ LİNKİ (magic link) gönderdiğinde de çalışır.** Supabase e-posta şablonu `{{ .Token }}` yerine link gönderiyorsa, gelen linki yapıştırmak yeterli — CLI linkteki `token_hash`+`type`'ı çıkarıp `/verify` ile oturum açar (`verifyLink`). Kod da link de kabul edilir.
|
|
9
|
+
|
|
5
10
|
## [5.51.1] - 2026-07-10 — "SECURITY: edit_file onay atlaması + kendi-kaynağını-düzenleme kısıtı"
|
|
6
11
|
|
|
7
12
|
### Security
|
package/package.json
CHANGED
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "natureco-cli",
|
|
3
|
-
"version": "5.51.
|
|
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
|
-
"bin": {
|
|
6
|
-
"natureco": "bin/natureco.js"
|
|
7
|
-
},
|
|
8
|
-
"files": [
|
|
9
|
-
"bin/",
|
|
10
|
-
"src/",
|
|
11
|
-
"scripts/",
|
|
12
|
-
"skills/",
|
|
13
|
-
"README.md",
|
|
14
|
-
"SELF.md",
|
|
15
|
-
"CHANGELOG.md",
|
|
16
|
-
"AUDIT.md",
|
|
17
|
-
"SECURITY_AUDIT_SUMMARY.md",
|
|
18
|
-
"DEPLOY_v2.0.0.md"
|
|
19
|
-
],
|
|
20
|
-
"scripts": {
|
|
21
|
-
"test": "vitest run",
|
|
22
|
-
"test:unit": "vitest run",
|
|
23
|
-
"test:watch": "vitest",
|
|
24
|
-
"test:coverage": "vitest run --coverage",
|
|
25
|
-
"lint": "eslint src/ bin/ test/",
|
|
26
|
-
"lint:fix": "eslint src/ bin/ test/ --fix",
|
|
27
|
-
"lint:errors-only": "eslint src/ bin/ test/ --quiet",
|
|
28
|
-
"smoke": "node --check bin/natureco.js && node bin/natureco.js help",
|
|
29
|
-
"postinstall": "node scripts/postinstall.js",
|
|
30
|
-
"prepublishOnly": "node --check bin/natureco.js && eslint src/ bin/ test/ --quiet && vitest run"
|
|
31
|
-
},
|
|
32
|
-
"keywords": [
|
|
33
|
-
"natureco",
|
|
34
|
-
"ai",
|
|
35
|
-
"ai-agent",
|
|
36
|
-
"bot",
|
|
37
|
-
"cli",
|
|
38
|
-
"terminal",
|
|
39
|
-
"openclaw-alternative",
|
|
40
|
-
"claude-code-alternative",
|
|
41
|
-
"multi-agent",
|
|
42
|
-
"self-evolving-skills",
|
|
43
|
-
"audit-log",
|
|
44
|
-
"cost-optimization",
|
|
45
|
-
"seo",
|
|
46
|
-
"türkçe",
|
|
47
|
-
"turkish",
|
|
48
|
-
"whatsapp-bot",
|
|
49
|
-
"telegram-bot",
|
|
50
|
-
"discord-bot",
|
|
51
|
-
"natureco-me"
|
|
52
|
-
],
|
|
53
|
-
"author": {
|
|
54
|
-
"name": "Gencay Olgun",
|
|
55
|
-
"email": "hello@natureco.me",
|
|
56
|
-
"url": "https://natureco.me"
|
|
57
|
-
},
|
|
58
|
-
"homepage": "https://natureco.me/cli",
|
|
59
|
-
"repository": {
|
|
60
|
-
"type": "git",
|
|
61
|
-
"url": "git+https://github.com/natureco-official/natureco-cli.git"
|
|
62
|
-
},
|
|
63
|
-
"bugs": {
|
|
64
|
-
"url": "https://github.com/natureco-official/natureco-cli/issues"
|
|
65
|
-
},
|
|
66
|
-
"license": "MIT",
|
|
67
|
-
"engines": {
|
|
68
|
-
"node": ">=18.0.0"
|
|
69
|
-
},
|
|
70
|
-
"dependencies": {
|
|
71
|
-
"@anthropic-ai/sdk": "^0.105.0",
|
|
72
|
-
"@inquirer/prompts": "^8.5.2",
|
|
73
|
-
"@slack/web-api": "^7.17.0",
|
|
74
|
-
"@whiskeysockets/baileys": "^7.0.0-rc10",
|
|
75
|
-
"chalk": "^4.1.2",
|
|
76
|
-
"commander": "^11.1.0",
|
|
77
|
-
"discord.js": "^14.26.4",
|
|
78
|
-
"irc": "^0.5.2",
|
|
79
|
-
"mattermost": "^3.4.0",
|
|
80
|
-
"node-cron": "^4.2.1",
|
|
81
|
-
"node-telegram-bot-api": "^0.67.0",
|
|
82
|
-
"openai": "^6.45.0",
|
|
83
|
-
"pino": "^8.21.0",
|
|
84
|
-
"qrcode": "^1.5.4",
|
|
85
|
-
"qrcode-terminal": "^0.12.0",
|
|
86
|
-
"semver": "^7.8.1",
|
|
87
|
-
"twilio": "^6.0.2",
|
|
88
|
-
"ws": "^8.20.0"
|
|
89
|
-
},
|
|
90
|
-
"devDependencies": {
|
|
91
|
-
"@eslint/js": "^10.0.1",
|
|
92
|
-
"@vitest/coverage-v8": "^4.1.9",
|
|
93
|
-
"eslint": "^10.6.0",
|
|
94
|
-
"globals": "^15.15.0",
|
|
95
|
-
"vitest": "^4.1.9"
|
|
96
|
-
}
|
|
97
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "natureco-cli",
|
|
3
|
+
"version": "5.51.2",
|
|
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
|
+
"bin": {
|
|
6
|
+
"natureco": "bin/natureco.js"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"bin/",
|
|
10
|
+
"src/",
|
|
11
|
+
"scripts/",
|
|
12
|
+
"skills/",
|
|
13
|
+
"README.md",
|
|
14
|
+
"SELF.md",
|
|
15
|
+
"CHANGELOG.md",
|
|
16
|
+
"AUDIT.md",
|
|
17
|
+
"SECURITY_AUDIT_SUMMARY.md",
|
|
18
|
+
"DEPLOY_v2.0.0.md"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"test": "vitest run",
|
|
22
|
+
"test:unit": "vitest run",
|
|
23
|
+
"test:watch": "vitest",
|
|
24
|
+
"test:coverage": "vitest run --coverage",
|
|
25
|
+
"lint": "eslint src/ bin/ test/",
|
|
26
|
+
"lint:fix": "eslint src/ bin/ test/ --fix",
|
|
27
|
+
"lint:errors-only": "eslint src/ bin/ test/ --quiet",
|
|
28
|
+
"smoke": "node --check bin/natureco.js && node bin/natureco.js help",
|
|
29
|
+
"postinstall": "node scripts/postinstall.js",
|
|
30
|
+
"prepublishOnly": "node --check bin/natureco.js && eslint src/ bin/ test/ --quiet && vitest run"
|
|
31
|
+
},
|
|
32
|
+
"keywords": [
|
|
33
|
+
"natureco",
|
|
34
|
+
"ai",
|
|
35
|
+
"ai-agent",
|
|
36
|
+
"bot",
|
|
37
|
+
"cli",
|
|
38
|
+
"terminal",
|
|
39
|
+
"openclaw-alternative",
|
|
40
|
+
"claude-code-alternative",
|
|
41
|
+
"multi-agent",
|
|
42
|
+
"self-evolving-skills",
|
|
43
|
+
"audit-log",
|
|
44
|
+
"cost-optimization",
|
|
45
|
+
"seo",
|
|
46
|
+
"türkçe",
|
|
47
|
+
"turkish",
|
|
48
|
+
"whatsapp-bot",
|
|
49
|
+
"telegram-bot",
|
|
50
|
+
"discord-bot",
|
|
51
|
+
"natureco-me"
|
|
52
|
+
],
|
|
53
|
+
"author": {
|
|
54
|
+
"name": "Gencay Olgun",
|
|
55
|
+
"email": "hello@natureco.me",
|
|
56
|
+
"url": "https://natureco.me"
|
|
57
|
+
},
|
|
58
|
+
"homepage": "https://natureco.me/cli",
|
|
59
|
+
"repository": {
|
|
60
|
+
"type": "git",
|
|
61
|
+
"url": "git+https://github.com/natureco-official/natureco-cli.git"
|
|
62
|
+
},
|
|
63
|
+
"bugs": {
|
|
64
|
+
"url": "https://github.com/natureco-official/natureco-cli/issues"
|
|
65
|
+
},
|
|
66
|
+
"license": "MIT",
|
|
67
|
+
"engines": {
|
|
68
|
+
"node": ">=18.0.0"
|
|
69
|
+
},
|
|
70
|
+
"dependencies": {
|
|
71
|
+
"@anthropic-ai/sdk": "^0.105.0",
|
|
72
|
+
"@inquirer/prompts": "^8.5.2",
|
|
73
|
+
"@slack/web-api": "^7.17.0",
|
|
74
|
+
"@whiskeysockets/baileys": "^7.0.0-rc10",
|
|
75
|
+
"chalk": "^4.1.2",
|
|
76
|
+
"commander": "^11.1.0",
|
|
77
|
+
"discord.js": "^14.26.4",
|
|
78
|
+
"irc": "^0.5.2",
|
|
79
|
+
"mattermost": "^3.4.0",
|
|
80
|
+
"node-cron": "^4.2.1",
|
|
81
|
+
"node-telegram-bot-api": "^0.67.0",
|
|
82
|
+
"openai": "^6.45.0",
|
|
83
|
+
"pino": "^8.21.0",
|
|
84
|
+
"qrcode": "^1.5.4",
|
|
85
|
+
"qrcode-terminal": "^0.12.0",
|
|
86
|
+
"semver": "^7.8.1",
|
|
87
|
+
"twilio": "^6.0.2",
|
|
88
|
+
"ws": "^8.20.0"
|
|
89
|
+
},
|
|
90
|
+
"devDependencies": {
|
|
91
|
+
"@eslint/js": "^10.0.1",
|
|
92
|
+
"@vitest/coverage-v8": "^4.1.9",
|
|
93
|
+
"eslint": "^10.6.0",
|
|
94
|
+
"globals": "^15.15.0",
|
|
95
|
+
"vitest": "^4.1.9"
|
|
96
|
+
}
|
|
97
|
+
}
|
package/src/commands/account.js
CHANGED
|
@@ -47,15 +47,21 @@ async function doLogin() {
|
|
|
47
47
|
console.log(chalk.gray('\n Doğrulanıyor...'));
|
|
48
48
|
await acc.loginWithPassword(email.trim(), password);
|
|
49
49
|
} else {
|
|
50
|
-
console.log(chalk.gray('\n
|
|
50
|
+
console.log(chalk.gray('\n Gönderiliyor...'));
|
|
51
51
|
await acc.sendOtp(email.trim());
|
|
52
|
-
console.log(chalk.gray(' ') + chalk.cyan(email.trim()) + chalk.gray(' adresine
|
|
52
|
+
console.log(chalk.gray(' ') + chalk.cyan(email.trim()) + chalk.gray(' adresine e-posta gönderildi.'));
|
|
53
|
+
console.log(chalk.gray(' 6 haneli kod geldiyse kodu, giriş linki geldiyse linki yapıştır.'));
|
|
53
54
|
const { token } = await inquirer.prompt([{
|
|
54
|
-
type: 'input', name: 'token', message: '
|
|
55
|
-
validate: (v) => ((v || '').trim().length >= 6 ? true : 'Kodu gir'),
|
|
55
|
+
type: 'input', name: 'token', message: ' Kod veya giriş linki:',
|
|
56
|
+
validate: (v) => ((v || '').trim().length >= 6 ? true : 'Kodu ya da linki gir'),
|
|
56
57
|
}]);
|
|
57
58
|
console.log(chalk.gray('\n Doğrulanıyor...'));
|
|
58
|
-
|
|
59
|
+
const val = token.trim();
|
|
60
|
+
if (/^https?:\/\//i.test(val) || val.includes('token')) {
|
|
61
|
+
await acc.verifyLink(val);
|
|
62
|
+
} else {
|
|
63
|
+
await acc.verifyOtp(email.trim(), val);
|
|
64
|
+
}
|
|
59
65
|
}
|
|
60
66
|
} catch (err) {
|
|
61
67
|
console.log(chalk.red(`\n ❌ ${err.message || 'Giriş başarısız'}\n`));
|
|
@@ -75,6 +75,25 @@ async function verifyOtp(email, token) {
|
|
|
75
75
|
return saveSession(_shape(await _post('/verify', { type: 'email', email, token })));
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
+
/**
|
|
79
|
+
* E-postadan gelen GİRİŞ LİNKİ'ni doğrula (Supabase şablonu 6 haneli kod yerine
|
|
80
|
+
* magic link gönderdiğinde). Linkteki token_hash + type ile /verify çağrılır.
|
|
81
|
+
*/
|
|
82
|
+
async function verifyLink(link) {
|
|
83
|
+
let token_hash, type;
|
|
84
|
+
try {
|
|
85
|
+
const u = new URL(link.trim());
|
|
86
|
+
const q = u.searchParams;
|
|
87
|
+
const frag = new URLSearchParams((u.hash || '').replace(/^#/, ''));
|
|
88
|
+
token_hash = q.get('token_hash') || q.get('token') || frag.get('token_hash') || frag.get('token');
|
|
89
|
+
type = q.get('type') || frag.get('type') || 'magiclink';
|
|
90
|
+
} catch (e) {
|
|
91
|
+
throw new Error('Geçersiz link', { cause: e });
|
|
92
|
+
}
|
|
93
|
+
if (!token_hash) throw new Error("Linkte doğrulama token'ı bulunamadı");
|
|
94
|
+
return saveSession(_shape(await _post('/verify', { type, token_hash })));
|
|
95
|
+
}
|
|
96
|
+
|
|
78
97
|
/** Access token yenile */
|
|
79
98
|
async function refresh() {
|
|
80
99
|
const s = loadSession();
|
|
@@ -114,7 +133,7 @@ function currentEmail() {
|
|
|
114
133
|
function logout() { clearSession(); }
|
|
115
134
|
|
|
116
135
|
module.exports = {
|
|
117
|
-
loginWithPassword, sendOtp, verifyOtp, refresh,
|
|
136
|
+
loginWithPassword, sendOtp, verifyOtp, verifyLink, refresh,
|
|
118
137
|
getAccessToken, whoami, isLoggedIn, currentEmail, logout,
|
|
119
138
|
SUPABASE_URL,
|
|
120
139
|
};
|