@stackbone/cli 0.2.1 → 0.2.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 CHANGED
@@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.2.2] - 2026-07-06
11
+
12
+ ### Fixed
13
+
14
+ - **The Studio "Logs" panel showed nothing in `stackbone dev`.** That panel
15
+ (live SSE tail) expected the agent to run as a separate child process, whose
16
+ stdout/stderr `startAgentProcess` captures and republishes — that's how
17
+ cloud and self-host work today. But locally, deep agents and workflow steps
18
+ run IN-PROCESS inside the CLI/emulator (no child to pipe), so a bare
19
+ `console.log` in agent or workflow code only ever reached the terminal
20
+ running `stackbone dev`, never the bus the panel reads from. The
21
+ orchestrator now bridges the process's own `console.log`/`info`/`debug`/
22
+ `warn`/`error` calls onto the same `agent.log` event the panel already
23
+ consumes (`bridgeProcessStdioToBus` in `@stackbone/agent-runner`), wired
24
+ right after the emulator boots. It patches `console.*` rather than the raw
25
+ `process.stdout`/`stderr` streams on purpose — `@clack/prompts` spinners
26
+ write their redraw frames straight to those streams, bypassing `console`,
27
+ so this leaves the boot/reload UI untouched.
28
+
10
29
  ## [0.2.1] - 2026-07-06
11
30
 
12
31
  ### Added
package/main.js CHANGED
@@ -21,6 +21,7 @@ import addFormats from "ajv-formats";
21
21
  import PgQueryFactory from "pg-query-emscripten";
22
22
  import { createWriteStream, existsSync, mkdirSync, readFileSync, readdirSync, rmSync, statSync, watch, writeFileSync } from "node:fs";
23
23
  import { exec, execFile, spawn } from "node:child_process";
24
+ import { format, promisify } from "node:util";
24
25
  import { parse } from "yaml";
25
26
  import { build } from "esbuild";
26
27
  import { Queue, Worker } from "bullmq";
@@ -29,7 +30,6 @@ import postgres from "postgres";
29
30
  import OpenAI from "openai";
30
31
  import { DeleteObjectCommand, GetObjectCommand, ListObjectsV2Command, PutObjectCommand, S3Client } from "@aws-sdk/client-s3";
31
32
  import { getSignedUrl } from "@aws-sdk/s3-request-presigner";
32
- import { promisify } from "node:util";
33
33
  import { and, asc, count, countDistinct, desc, eq, gt, max, sql } from "drizzle-orm";
34
34
  import { check, customType, index, integer, jsonb, pgSchema, pgTable, text, timestamp, uniqueIndex, uuid, vector } from "drizzle-orm/pg-core";
35
35
  import Ajv$1 from "ajv";
@@ -2989,7 +2989,7 @@ var DEV_HMAC_SECRET = "dev-stackbone-local-emulator-hmac-secret";
2989
2989
  //#endregion
2990
2990
  //#region ../../libs/runtime/agent-emulator/src/lib/server/contract.ts
2991
2991
  init_src$14();
2992
- var STACKBONE_CLI_BUILD_VERSION = "0.2.1";
2992
+ var STACKBONE_CLI_BUILD_VERSION = "0.2.2";
2993
2993
  /**
2994
2994
  * Capabilities the local emulator advertises on `GET /api/contract`, derived
2995
2995
  * from the route registry above so the advertised set and the mounted routes
@@ -3975,6 +3975,44 @@ var createFixturesStore = (opts) => {
3975
3975
  };
3976
3976
  };
3977
3977
  //#endregion
3978
+ //#region ../../libs/runtime/agent-runner/src/lib/live-stdio-bridge.ts
3979
+ var CONSOLE_METHODS, STREAM_FOR_METHOD, bridgeProcessStdioToBus;
3980
+ var init_live_stdio_bridge = __esmMin((() => {
3981
+ CONSOLE_METHODS = [
3982
+ "log",
3983
+ "info",
3984
+ "debug",
3985
+ "warn",
3986
+ "error"
3987
+ ];
3988
+ STREAM_FOR_METHOD = {
3989
+ log: "stdout",
3990
+ info: "stdout",
3991
+ debug: "stdout",
3992
+ warn: "stderr",
3993
+ error: "stderr"
3994
+ };
3995
+ bridgeProcessStdioToBus = (sink) => {
3996
+ const originals = {};
3997
+ for (const method of CONSOLE_METHODS) {
3998
+ const original = console[method];
3999
+ originals[method] = original;
4000
+ console[method] = (...args) => {
4001
+ original.call(console, ...args);
4002
+ sink.publish({
4003
+ type: "agent.log",
4004
+ ts: Date.now(),
4005
+ stream: STREAM_FOR_METHOD[method],
4006
+ line: format(...args)
4007
+ });
4008
+ };
4009
+ }
4010
+ return { stop() {
4011
+ for (const method of CONSOLE_METHODS) console[method] = originals[method];
4012
+ } };
4013
+ };
4014
+ }));
4015
+ //#endregion
3978
4016
  //#region ../../libs/runtime/agent-runner/src/lib/connections.ts
3979
4017
  var STACKBONE_ENV_KEYS, buildAgentEnv;
3980
4018
  var init_connections = __esmMin((() => {
@@ -4405,6 +4443,7 @@ var init_log_tail = __esmMin((() => {
4405
4443
  //#endregion
4406
4444
  //#region ../../libs/runtime/agent-runner/src/index.ts
4407
4445
  var init_src$10 = __esmMin((() => {
4446
+ init_live_stdio_bridge();
4408
4447
  init_src$14();
4409
4448
  init_connections();
4410
4449
  init_agent_runtime_deps();
@@ -32237,6 +32276,7 @@ var startDevSession = async (input) => {
32237
32276
  let workflowWatcher = null;
32238
32277
  let deepAgentsWatcher = null;
32239
32278
  let configSchemaWatcher = null;
32279
+ let liveStdioBridge = null;
32240
32280
  let stopping = false;
32241
32281
  let shutdownResolve = () => void 0;
32242
32282
  const shutdown = new Promise((resolve) => {
@@ -32245,6 +32285,7 @@ var startDevSession = async (input) => {
32245
32285
  const stop = async () => {
32246
32286
  if (stopping) return shutdown;
32247
32287
  stopping = true;
32288
+ if (liveStdioBridge) liveStdioBridge.stop();
32248
32289
  if (configSchemaWatcher) await configSchemaWatcher.close().catch(() => void 0);
32249
32290
  if (deepAgentsWatcher) await deepAgentsWatcher.close().catch(() => void 0);
32250
32291
  if (workflowWatcher) await workflowWatcher.close().catch(() => void 0);
@@ -32495,6 +32536,7 @@ var startDevSession = async (input) => {
32495
32536
  status: "success",
32496
32537
  detail: armed > 0 ? `${emulator.url} · ${armed} trigger${armed === 1 ? "" : "s"} armed` : emulator.url
32497
32538
  });
32539
+ liveStdioBridge = bridgeProcessStdioToBus(bus);
32498
32540
  const das = emulator.deepAgents;
32499
32541
  if (das.length > 0) {
32500
32542
  const models = [...new Set(das.map((a) => a.model))];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackbone/cli",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "license": "UNLICENSED",
5
5
  "type": "module",
6
6
  "bin": {
Binary file
Binary file