krasavacode 0.3.4 → 0.3.5
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/bin/krasavacode.js +1 -1
- package/package.json +1 -1
- package/src/launch.js +15 -5
package/bin/krasavacode.js
CHANGED
|
@@ -8,7 +8,7 @@ import { runDoctor } from '../src/doctor.js';
|
|
|
8
8
|
import { runSetupGemini } from '../src/setup-gemini.js';
|
|
9
9
|
|
|
10
10
|
// Hardcoded so it works inside Bun --compile (no FS access to package.json)
|
|
11
|
-
const VERSION = '0.3.
|
|
11
|
+
const VERSION = '0.3.5';
|
|
12
12
|
|
|
13
13
|
const cmd = process.argv[2];
|
|
14
14
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "krasavacode",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "KRASAVACODE — однокнопочный бесплатный вайбкодинг для учеников. Claude Code на бесплатных провайдерах через локальный gateway. Сам ставит Node при необходимости.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/launch.js
CHANGED
|
@@ -16,18 +16,21 @@ export async function launchClaude(paths, hub /*, detection */) {
|
|
|
16
16
|
// Organization · API Usage Billing" header on the welcome screen.
|
|
17
17
|
await mkdir(CLAUDE_CONFIG_DIR, { recursive: true });
|
|
18
18
|
|
|
19
|
-
// Drop any pre-existing
|
|
20
|
-
//
|
|
21
|
-
//
|
|
19
|
+
// Drop any pre-existing Anthropic creds from the shell/Keychain so the
|
|
20
|
+
// welcome screen doesn't greet the student with the real Anthropic owner's
|
|
21
|
+
// name and "API Usage Billing".
|
|
22
22
|
const cleanEnv = { ...process.env };
|
|
23
23
|
delete cleanEnv.ANTHROPIC_API_KEY;
|
|
24
|
+
delete cleanEnv.ANTHROPIC_AUTH_TOKEN;
|
|
24
25
|
delete cleanEnv.ANTHROPIC_VERTEX_PROJECT_ID;
|
|
25
26
|
delete cleanEnv.ANTHROPIC_BEDROCK_BASE_URL;
|
|
26
27
|
|
|
27
28
|
const env = {
|
|
28
29
|
...cleanEnv,
|
|
29
30
|
ANTHROPIC_BASE_URL: hub.baseUrl,
|
|
30
|
-
|
|
31
|
+
// --bare mode requires ANTHROPIC_API_KEY (OAuth token is ignored).
|
|
32
|
+
// Our proxy doesn't actually validate this — any non-empty value works.
|
|
33
|
+
ANTHROPIC_API_KEY: PLACEHOLDER_TOKEN,
|
|
31
34
|
// Isolate config/credentials: own dir, separate from ~/.claude/
|
|
32
35
|
ANTHROPIC_CONFIG_DIR: CLAUDE_CONFIG_DIR,
|
|
33
36
|
DISABLE_AUTOUPDATER: '1',
|
|
@@ -38,7 +41,14 @@ export async function launchClaude(paths, hub /*, detection */) {
|
|
|
38
41
|
ANTHROPIC_MODEL: process.env.ANTHROPIC_MODEL || 'claude-sonnet-4-5',
|
|
39
42
|
};
|
|
40
43
|
|
|
41
|
-
|
|
44
|
+
// --bare mode: skips Keychain reads, plugin sync, auto-memory, attribution,
|
|
45
|
+
// CLAUDE.md auto-discovery — i.e. everything that would leak the user's
|
|
46
|
+
// real Anthropic identity into the welcome screen.
|
|
47
|
+
// Set KRASAVACODE_BARE=0 to disable for debugging.
|
|
48
|
+
const useBare = process.env.KRASAVACODE_BARE !== '0';
|
|
49
|
+
const passthroughArgs = process.argv.slice(2)
|
|
50
|
+
.filter(a => !['doctor', 'upgrade', 'setup-gemini', 'gemini'].includes(a));
|
|
51
|
+
if (useBare && !passthroughArgs.includes('--bare')) passthroughArgs.unshift('--bare');
|
|
42
52
|
|
|
43
53
|
const W = 64;
|
|
44
54
|
const line = (txt) => {
|