@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bahulam/code",
3
- "version": "2.6.9",
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.9",
53
- "@bahulam/runtime-linux-x64": "2.6.9",
54
- "@bahulam/runtime-win32-x64": "2.6.9"
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 @bahulamai/code\` to fetch the runtime, ` +
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-code login` (saved in
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-code doctor`. */
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 = product || process.env.BAHULAM_PRODUCT || process.env.TARANG_PRODUCT || 'bahulam';
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 hits its provider directly (bypasses gateway metering).
152
- // Retained for enterprise flows (Power BI workspaces, scheduled
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 = '1.0.1';
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(`@bahulamai/code ${VERSION}`); process.exit(0); }
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 v1.0.4 · initializing orbit
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
- // BAHULAM CODE is the product wordmark; the 0xB0 motif is preserved as a
21
- // dev-culture callback beneath it.
22
-
23
- // Renders a gradient purple → magenta → cyan across the given string, one
24
- // codepoint at a time. Falls back to a plain (no-color) string when the
25
- // terminal doesn't support color at all.
26
- function gradientText(text) {
27
- if (!term().color) return text;
28
- const chars = [...text];
29
- const painters = [paint.brand.primary, paint.brand.accent, paint.brand.data];
30
- return chars.map((ch, i) => painters[Math.floor((i / Math.max(1, chars.length)) * painters.length)](ch)).join('');
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 framed BAHULAM CODE wordmark. Box is 24 cols wide, 3 rows
35
- * tall, and fits any terminal ≥40 cols.
41
+ * Render the branded startup banner.
36
42
  */
37
- function wordmarkFrame() {
43
+ export function renderBanner(version = '') {
38
44
  const dim = paint.text.dim;
39
- const top = dim('╔════════════════════════╗');
40
- const bottom = dim('╚════════════════════════╝');
41
- const inner = dim('');
42
- // ║ BAHULAM CODE ║ — 3-space pad each side around a 18-char wordmark
43
- const glyph = paint.bold(gradientText('BAHULAM CODE'));
44
- const bodyPad = ' '.repeat(5);
45
- const tailPad = ' '.repeat(6);
46
- return [
47
- ` ${top}`,
48
- ` ${inner}${bodyPad}${glyph}${tailPad}${inner}`,
49
- ` ${bottom}`,
50
- ].join('\n');
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 orbital banner.
63
+ * Print the branded startup banner.
55
64
  */
56
65
  export function printBanner(version = '') {
57
- const dim = paint.text.dim;
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 ─────────────────────────────────────────────────────