@bahulam/code 0.1.25 → 0.1.26

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": "0.1.25",
3
+ "version": "0.1.26",
4
4
  "description": "Bahulam Code — abundance, in your terminal. CLI-first, reliability-first, sub-agents, 65.6% SWE-bench Verified.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -54,7 +54,7 @@ import {
54
54
  */
55
55
  export async function runHeadless({ instruction, model, timeout = 300, maxCost, verbose = false, cacheReport = null, local = false, mode = null, vision = [], agent = null, workflow = null }) {
56
56
  const startTime = Date.now();
57
- const runtimeMode = mode || 'local';
57
+ const runtimeMode = mode || (local ? 'local' : 'remote');
58
58
  const cliLocal = runtimeMode === 'local' || runtimeMode === 'direct';
59
59
 
60
60
  const log = (msg) => {
@@ -1,13 +1,12 @@
1
1
  /**
2
2
  * Mode Selector
3
3
  *
4
- * local (default): CLI-side orchestration via Bahulam Gateway.
5
- * The npm process runs the ReAct loop and tool execution; model
6
- * calls route through the gateway. Requires `bahulam login`.
7
- *
8
- * remote: All requests go to Bahulam backend.
4
+ * remote (default): All requests go to Bahulam backend.
9
5
  * Backend handles orchestration, model selection, tool routing.
10
6
  * User's provider and models configured via web Settings page.
7
+ *
8
+ * local: For local LLMs (Ollama, LM Studio, etc.)
9
+ * Direct API call, no backend. Only when user explicitly opts in.
11
10
  */
12
11
 
13
12
  let _probeCache = { available: null, timestamp: 0 };
@@ -340,10 +340,10 @@ async function main() {
340
340
  bahulam --agent <slug> -p "x" Run a named agent (local deterministic graph)
341
341
  bahulam --workflow <name> -p Run a named workflow (local deterministic graph)
342
342
  bahulam --headless -p "x" Non-interactive: auto-approve, JSONL output
343
- bahulam --local -p "x" Local npm orchestration via Bahulam Gateway (default)
344
343
  bahulam --remote -p "x" Remote backend /api/execute orchestration
345
344
  bahulam --bundled -p "x" Local bundled backend-style orchestration
346
- bahulam --direct -p "x" Local npm orchestration via provider API
345
+ bahulam --local -p "x" Local npm orchestration via Bahulam Gateway
346
+ bahulam --direct -p "x" Local npm orchestration via provider API
347
347
  bahulam --headless -p "x" --vision screenshot.png
348
348
  Attach an image via the vision analysis pipeline
349
349
  bahulam --resume Resume last conversation
@@ -542,7 +542,7 @@ async function main() {
542
542
  verbose: args.verbose,
543
543
  cacheReport: args.cacheReport,
544
544
  local: args.local,
545
- mode: args.runtimeMode || 'local',
545
+ mode: args.runtimeMode || (args.local ? 'local' : 'remote'),
546
546
  vision: args.vision,
547
547
  agent: args.agent,
548
548
  workflow: args.workflow,
@@ -4475,7 +4475,7 @@ export async function startTerminalRepl() {
4475
4475
  safeCwd(); // prime the cache in repl-utils.mjs for later recovery
4476
4476
 
4477
4477
  const cliArgs = parseArgs(process.argv.slice(2));
4478
- const runtimeMode = cliArgs.runtimeMode || 'local';
4478
+ const runtimeMode = cliArgs.runtimeMode || 'remote';
4479
4479
  const gatewayUrl = resolveGatewayUrl();
4480
4480
  const localSessionId = `local_${Date.now()}_${Math.random().toString(16).slice(2, 10)}`;
4481
4481
  const auth = new BahulamAuth();