@bahulam/code 2.6.9 → 2.6.12
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 +4 -4
- package/src/core/bundled-runtime.mjs +12 -3
- package/src/core/stream-client.mjs +3 -5
- package/src/index.mjs +2 -2
- package/src/onboarding/preflight.mjs +1 -1
- package/src/ui/banner.mjs +38 -41
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bahulam/code",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.12",
|
|
4
4
|
"description": "Bahulam Code \u2014 abundance, in your terminal. CLI-first, reliability-first, sub-agents, 65.6% SWE-bench Verified.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"web-tree-sitter": "^0.26.9"
|
|
50
50
|
},
|
|
51
51
|
"optionalDependencies": {
|
|
52
|
-
"@bahulam/runtime-darwin-arm64": "2.6.
|
|
53
|
-
"@bahulam/runtime-linux-x64": "2.6.
|
|
54
|
-
"@bahulam/runtime-win32-x64": "2.6.
|
|
52
|
+
"@bahulam/runtime-darwin-arm64": "2.6.12",
|
|
53
|
+
"@bahulam/runtime-linux-x64": "2.6.12",
|
|
54
|
+
"@bahulam/runtime-win32-x64": "2.6.12"
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -205,7 +205,7 @@ export async function ensureRuntimeReady() {
|
|
|
205
205
|
if (!fs.existsSync(bin)) {
|
|
206
206
|
throw new Error(
|
|
207
207
|
`Bahulam runtime not found at ${bin}. ` +
|
|
208
|
-
`Re-run \`npm install -g @
|
|
208
|
+
`Re-run \`npm install -g @bahulam/code\` to fetch the runtime, ` +
|
|
209
209
|
`or set BAHULAM_RUNTIME_ROOT to a valid install path.`,
|
|
210
210
|
);
|
|
211
211
|
}
|
|
@@ -231,10 +231,19 @@ export async function ensureRuntimeReady() {
|
|
|
231
231
|
env: {
|
|
232
232
|
...process.env,
|
|
233
233
|
BAHULAM_CLI_LOCAL: '1',
|
|
234
|
+
BAHULAM_PRODUCT: 'bahulam',
|
|
235
|
+
LLM_GATEWAY: 'BahulamGateway',
|
|
236
|
+
BAHULAM_GATEWAY_URL: process.env.BAHULAM_GATEWAY_URL || 'https://gateway.bahulam.ai/v1',
|
|
237
|
+
// Framework validates LICENSE_KEY against the license portal on import.
|
|
238
|
+
// The portal is now embedded inside the Bahulam Gateway itself
|
|
239
|
+
// (see codekepler-bahulam-gateway/app/main.py mount at /portal), so
|
|
240
|
+
// the phone-home shares gateway uptime. Framework code (_license.py)
|
|
241
|
+
// reads LICENSE_PORTAL_URL and hits {url}/api/heartbeat.
|
|
242
|
+
LICENSE_PORTAL_URL: process.env.LICENSE_PORTAL_URL || 'https://gateway.bahulam.ai/portal',
|
|
234
243
|
// Framework requires LICENSE_KEY at import time. Sourced from
|
|
235
244
|
// ~/.bahulam/license.jwt so end users don't need to export a var.
|
|
236
245
|
...(licenseKey ? { LICENSE_KEY: licenseKey } : {}),
|
|
237
|
-
// Bahulam CLI token from `bahulam
|
|
246
|
+
// Bahulam CLI token from `bahulam login` (saved in
|
|
238
247
|
// ~/.bahulam/config.json). BahulamGateway reads it from any of
|
|
239
248
|
// BAHULAM_API_KEY / BAHULAM_CLI_TOKEN / BAHULAM_GATEWAY_API_KEY —
|
|
240
249
|
// we set both so it works whether the framework prefers one over
|
|
@@ -355,7 +364,7 @@ export function isRuntimeInstalled() {
|
|
|
355
364
|
return fs.existsSync(_runtimeBin());
|
|
356
365
|
}
|
|
357
366
|
|
|
358
|
-
/** Diagnostic snapshot for `bahulam
|
|
367
|
+
/** Diagnostic snapshot for `bahulam doctor`. */
|
|
359
368
|
export function runtimeInfo() {
|
|
360
369
|
return {
|
|
361
370
|
installed: isRuntimeInstalled(),
|
|
@@ -117,7 +117,6 @@ export class TarangStreamClient {
|
|
|
117
117
|
toolExecutor,
|
|
118
118
|
verbose = false,
|
|
119
119
|
approvalManager = null,
|
|
120
|
-
product = null,
|
|
121
120
|
reconnectMaxElapsedMs = null,
|
|
122
121
|
mode = null,
|
|
123
122
|
}) {
|
|
@@ -126,7 +125,7 @@ export class TarangStreamClient {
|
|
|
126
125
|
this.toolExecutor = toolExecutor;
|
|
127
126
|
this.verbose = verbose;
|
|
128
127
|
this.approval = approvalManager || new ApprovalManager();
|
|
129
|
-
this.product =
|
|
128
|
+
this.product = 'bahulam';
|
|
130
129
|
this.currentTaskId = null;
|
|
131
130
|
this.lastEventId = null;
|
|
132
131
|
this.retryDelayMs = null;
|
|
@@ -148,9 +147,8 @@ export class TarangStreamClient {
|
|
|
148
147
|
// the Bahulam Gateway directly. Metering runs. THIS IS THE
|
|
149
148
|
// PUBLIC CLI DEFAULT.
|
|
150
149
|
// 'remote' → cloud backend runs the agent loop server-side.
|
|
151
|
-
// Backend
|
|
152
|
-
//
|
|
153
|
-
// jobs) that need a persistent host. Not for individual devs.
|
|
150
|
+
// Backend calls Bahulam Gateway with service-token attribution;
|
|
151
|
+
// metering still runs at the gateway boundary.
|
|
154
152
|
//
|
|
155
153
|
// Explicit opt precedence: constructor arg > env vars > sniff runtime
|
|
156
154
|
// package availability > default 'bundled'.
|
package/src/index.mjs
CHANGED
|
@@ -35,7 +35,7 @@ import { printBanner, printProjectInfo, printHints, printAuthStatus, printStyled
|
|
|
35
35
|
import { ContextRetriever } from './context/retriever.mjs';
|
|
36
36
|
import { loadSettings } from './config/settings.mjs';
|
|
37
37
|
|
|
38
|
-
const VERSION = '
|
|
38
|
+
const VERSION = '2.6.12';
|
|
39
39
|
|
|
40
40
|
// ── Arg Parsing (consolidated from index.mjs + cli-args.mjs) ──
|
|
41
41
|
|
|
@@ -231,7 +231,7 @@ import { startTerminalRepl } from './terminal/repl.mjs';
|
|
|
231
231
|
|
|
232
232
|
async function main() {
|
|
233
233
|
const args = parseArgs(process.argv.slice(2));
|
|
234
|
-
if (args.version) { console.log(`@
|
|
234
|
+
if (args.version) { console.log(`@bahulam/code ${VERSION}`); process.exit(0); }
|
|
235
235
|
if (args.help) { printUsage(); process.exit(0); }
|
|
236
236
|
|
|
237
237
|
const auth = new TarangAuth();
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Prints a non-blocking summary of the runtime environment before the REPL
|
|
5
5
|
* starts so the user can see what is and is not aligned:
|
|
6
6
|
*
|
|
7
|
-
* 🔭 Bahulam Code
|
|
7
|
+
* 🔭 Bahulam Code v2.6.12 · initializing orbit
|
|
8
8
|
*
|
|
9
9
|
* [✓] Auth token
|
|
10
10
|
* [✓] OpenRouter key
|
package/src/ui/banner.mjs
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
import { execSync } from 'node:child_process';
|
|
9
9
|
import * as path from 'node:path';
|
|
10
10
|
|
|
11
|
-
import { icons } from './icons.mjs';
|
|
12
11
|
import { paint, strip } from './palette.mjs';
|
|
13
12
|
import { term } from './term.mjs';
|
|
14
13
|
|
|
@@ -17,56 +16,54 @@ const write = (s) => { try { out.write(s); } catch {} };
|
|
|
17
16
|
|
|
18
17
|
// ── Brand banner ─────────────────────────────────────────────────────────
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
19
|
+
function abundanceGlyph() {
|
|
20
|
+
const loop = term().unicode ? '∞' : 'o';
|
|
21
|
+
return [
|
|
22
|
+
` ${loop}${loop} ${loop}${loop} `,
|
|
23
|
+
`${loop} ${loop} ${loop} ${loop}`,
|
|
24
|
+
`${loop} ${loop} ${loop}`,
|
|
25
|
+
`${loop} ${loop} ${loop} ${loop}`,
|
|
26
|
+
` ${loop}${loop} ${loop}${loop} `,
|
|
27
|
+
];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function wordmarkLines() {
|
|
31
|
+
return [
|
|
32
|
+
'████ ███ █ █ █ █ █ ███ █ █',
|
|
33
|
+
'█ █ █ █ █ █ █ █ █ █ █ ██ ██',
|
|
34
|
+
'████ █████ █████ █ █ █ █████ █ █ █',
|
|
35
|
+
'█ █ █ █ █ █ █ █ █ █ █ █ █',
|
|
36
|
+
'████ █ █ █ █ ███ █████ █ █ █ █',
|
|
37
|
+
];
|
|
31
38
|
}
|
|
32
39
|
|
|
33
40
|
/**
|
|
34
|
-
* Render the
|
|
35
|
-
* tall, and fits any terminal ≥40 cols.
|
|
41
|
+
* Render the branded startup banner.
|
|
36
42
|
*/
|
|
37
|
-
function
|
|
43
|
+
export function renderBanner(version = '') {
|
|
38
44
|
const dim = paint.text.dim;
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
`
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
const mark = abundanceGlyph();
|
|
46
|
+
const wordmark = wordmarkLines();
|
|
47
|
+
const code = paint.brand.data('code');
|
|
48
|
+
const vTag = version ? `${dim(' · v' + version)}` : '';
|
|
49
|
+
const markWidth = 11;
|
|
50
|
+
const wordmarkIndent = ' '.repeat(2 + markWidth + 2);
|
|
51
|
+
const lines = [''];
|
|
52
|
+
|
|
53
|
+
for (let i = 0; i < wordmark.length; i++) {
|
|
54
|
+
lines.push(` ${paint.brand.accent(mark[i].padEnd(markWidth))} ${paint.bold(paint.brand.primary(wordmark[i]))}`);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
lines.push(`${wordmarkIndent}${code} ${dim('· abundance in your terminal')}${vTag}`);
|
|
58
|
+
lines.push('');
|
|
59
|
+
return lines.join('\n');
|
|
51
60
|
}
|
|
52
61
|
|
|
53
62
|
/**
|
|
54
|
-
* Print the branded
|
|
63
|
+
* Print the branded startup banner.
|
|
55
64
|
*/
|
|
56
65
|
export function printBanner(version = '') {
|
|
57
|
-
|
|
58
|
-
const orbit = paint.brand.accent(icons.orbit);
|
|
59
|
-
const dev = paint.brand.data('0xB0');
|
|
60
|
-
const vTag = version ? `${dim(' — ')}${dim('v' + version)}` : '';
|
|
61
|
-
|
|
62
|
-
write('\n');
|
|
63
|
-
write(` ${orbit} ${dim('· bahulam — abundance')}\n`);
|
|
64
|
-
write('\n');
|
|
65
|
-
write(`${wordmarkFrame()}\n`);
|
|
66
|
-
write('\n');
|
|
67
|
-
write(` ${dim('abundance, in your terminal')}\n`);
|
|
68
|
-
write(` ${dev}${vTag}\n`);
|
|
69
|
-
write('\n');
|
|
66
|
+
write(renderBanner(version));
|
|
70
67
|
}
|
|
71
68
|
|
|
72
69
|
// ── Project info bar ─────────────────────────────────────────────────────
|