@mestreyoda/fabrica 0.2.12 → 0.2.13

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
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.13 - 2026-03-31
4
+
5
+ - Disabled automatic pretty logging on TTY so the plugin no longer depends on `pino-pretty` during load.
6
+ - Added a safe one-shot fallback to structured logs when pretty transport resolution or initialization fails.
7
+ - Added logger transport regression coverage and promoted it into the hot-path test lane.
8
+
3
9
  ## 0.2.12 - 2026-03-31
4
10
 
5
11
  - Made the published plugin self-contained by replacing remaining runtime helper imports from `openclaw/plugin-sdk`.
package/dist/index.js CHANGED
@@ -94160,7 +94160,7 @@ var require_thread_stream = __commonJS({
94160
94160
  var require_transport2 = __commonJS({
94161
94161
  "node_modules/pino/lib/transport.js"(exports2, module2) {
94162
94162
  "use strict";
94163
- var { createRequire: createRequire4 } = __require("module");
94163
+ var { createRequire: createRequire5 } = __require("module");
94164
94164
  var { existsSync: existsSync2 } = __require("node:fs");
94165
94165
  var getCallers = require_caller();
94166
94166
  var { join: join7, isAbsolute, sep } = __require("node:path");
@@ -94363,7 +94363,7 @@ var require_transport2 = __commonJS({
94363
94363
  for (const filePath of callers) {
94364
94364
  try {
94365
94365
  const context2 = filePath === "node:repl" ? process.cwd() + sep : filePath;
94366
- fixTarget2 = createRequire4(context2).resolve(origin);
94366
+ fixTarget2 = createRequire5(context2).resolve(origin);
94367
94367
  break;
94368
94368
  } catch (err) {
94369
94369
  continue;
@@ -96136,17 +96136,35 @@ var require_pino = __commonJS({
96136
96136
  });
96137
96137
 
96138
96138
  // lib/observability/logger.ts
96139
+ import { createRequire } from "node:module";
96140
+ function warnPrettyFallback(error48) {
96141
+ if (prettyFallbackWarned) return;
96142
+ prettyFallbackWarned = true;
96143
+ const reason = error48 instanceof Error ? error48.message : String(error48);
96144
+ console.warn(`[fabrica] pretty logging unavailable, falling back to structured logs: ${reason}`);
96145
+ }
96139
96146
  function createTransport() {
96140
- const pretty = process.env.LOG_PRETTY === "1" || process.stdout.isTTY && process.env.NODE_ENV !== "production";
96141
- if (!pretty) return void 0;
96142
- return import_pino.default.transport({
96143
- target: "pino-pretty",
96144
- options: {
96145
- colorize: true,
96146
- translateTime: "SYS:standard",
96147
- ignore: "pid,hostname"
96148
- }
96149
- });
96147
+ if (process.env.LOG_PRETTY !== "1") return void 0;
96148
+ let target;
96149
+ try {
96150
+ target = require2.resolve("pino-pretty");
96151
+ } catch (error48) {
96152
+ warnPrettyFallback(error48);
96153
+ return void 0;
96154
+ }
96155
+ try {
96156
+ return import_pino.default.transport({
96157
+ target,
96158
+ options: {
96159
+ colorize: true,
96160
+ translateTime: "SYS:standard",
96161
+ ignore: "pid,hostname"
96162
+ }
96163
+ });
96164
+ } catch (error48) {
96165
+ warnPrettyFallback(error48);
96166
+ return void 0;
96167
+ }
96150
96168
  }
96151
96169
  function createFabricaLogger(destination) {
96152
96170
  return (0, import_pino.default)({
@@ -96205,13 +96223,15 @@ function getRootLogger() {
96205
96223
  function getLogger(bindings) {
96206
96224
  return bindings ? rootLogger.child(bindings) : rootLogger;
96207
96225
  }
96208
- var import_pino, rootLogger;
96226
+ var import_pino, require2, prettyFallbackWarned, rootLogger;
96209
96227
  var init_logger = __esm({
96210
96228
  "lib/observability/logger.ts"() {
96211
96229
  "use strict";
96212
96230
  import_pino = __toESM(require_pino(), 1);
96213
96231
  init_esm();
96214
96232
  init_context3();
96233
+ require2 = createRequire(import.meta.url);
96234
+ prettyFallbackWarned = false;
96215
96235
  rootLogger = createFabricaLogger();
96216
96236
  }
96217
96237
  });
@@ -111327,8 +111347,8 @@ import fsSync from "node:fs";
111327
111347
  import path5 from "node:path";
111328
111348
  import { fileURLToPath as fileURLToPath3 } from "node:url";
111329
111349
  function getCurrentVersion() {
111330
- if ("0.2.12") {
111331
- return "0.2.12";
111350
+ if ("0.2.13") {
111351
+ return "0.2.13";
111332
111352
  }
111333
111353
  try {
111334
111354
  const pkgPath = path5.join(THIS_DIR, "..", "..", "package.json");
@@ -115962,7 +115982,7 @@ var classify_exports = {};
115962
115982
  __export(classify_exports, {
115963
115983
  classifyStep: () => classifyStep
115964
115984
  });
115965
- import { createRequire } from "node:module";
115985
+ import { createRequire as createRequire2 } from "node:module";
115966
115986
  function loadRules() {
115967
115987
  if (cachedRules) return cachedRules;
115968
115988
  cachedRules = _require("../configs/classification-rules.json");
@@ -115977,7 +115997,7 @@ var init_classify = __esm({
115977
115997
  init_runtime_paths();
115978
115998
  init_llm_retry();
115979
115999
  init_zod();
115980
- _require = createRequire(import.meta.url);
116000
+ _require = createRequire2(import.meta.url);
115981
116001
  LlmResponseSchema = external_exports.object({
115982
116002
  payloads: external_exports.array(external_exports.object({ text: external_exports.string() })).min(1)
115983
116003
  }).passthrough();
@@ -116063,7 +116083,7 @@ var interview_exports = {};
116063
116083
  __export(interview_exports, {
116064
116084
  interviewStep: () => interviewStep
116065
116085
  });
116066
- import { createRequire as createRequire2 } from "node:module";
116086
+ import { createRequire as createRequire3 } from "node:module";
116067
116087
  function loadTemplates() {
116068
116088
  if (cachedTemplates) return cachedTemplates;
116069
116089
  cachedTemplates = _require2("../configs/interview-templates.json");
@@ -116073,7 +116093,7 @@ var _require2, cachedTemplates, interviewStep;
116073
116093
  var init_interview = __esm({
116074
116094
  "lib/intake/steps/interview.ts"() {
116075
116095
  "use strict";
116076
- _require2 = createRequire2(import.meta.url);
116096
+ _require2 = createRequire3(import.meta.url);
116077
116097
  cachedTemplates = null;
116078
116098
  interviewStep = {
116079
116099
  name: "interview",
@@ -140221,8 +140241,8 @@ function validateSpecQuality(input) {
140221
140241
  }
140222
140242
 
140223
140243
  // lib/intake/steps/triage.ts
140224
- import { createRequire as createRequire3 } from "node:module";
140225
- var _require3 = createRequire3(import.meta.url);
140244
+ import { createRequire as createRequire4 } from "node:module";
140245
+ var _require3 = createRequire4(import.meta.url);
140226
140246
  var cachedMatrix = null;
140227
140247
  function loadMatrix() {
140228
140248
  if (cachedMatrix) return cachedMatrix;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mestreyoda/fabrica",
3
- "version": "0.2.12",
3
+ "version": "0.2.13",
4
4
  "description": "Autonomous software engineering pipeline for OpenClaw. Turns ideas into deployed code via intake, dispatch, review, test, and merge.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -43,7 +43,7 @@
43
43
  "test": "npm run test:hot-path",
44
44
  "test:unit": "vitest run",
45
45
  "test:e2e": "VITEST_E2E=1 vitest run lib/services/bootstrap.e2e.test.ts lib/services/pipeline.e2e.test.ts tests/e2e/qa-bootstrap.e2e.test.ts tests/e2e/orchestration-smoke.e2e.test.ts",
46
- "test:hot-path": "VITEST_E2E=1 vitest run --maxWorkers=1 tests/unit/message-builder.test.ts tests/unit/worker-context-hook.test.ts tests/unit/reviewer-session.test.ts tests/unit/reviewer-completion.test.ts tests/unit/reviewer-completion-side-effects.test.ts tests/unit/reactive-dispatch-hook.test.ts tests/unit/subagent-lifecycle-hook.test.ts tests/unit/subagent-lifecycle-slot-cleanup.test.ts tests/unit/dispatch-identity.test.ts tests/unit/work-finish-slot.test.ts tests/unit/heartbeat-health-session.test.ts tests/unit/reviewer-poll-pass.test.ts tests/unit/heartbeat-canonical-pr.test.ts tests/e2e/orchestration-smoke.e2e.test.ts",
46
+ "test:hot-path": "VITEST_E2E=1 vitest run --maxWorkers=1 tests/unit/message-builder.test.ts tests/unit/worker-context-hook.test.ts tests/unit/reviewer-session.test.ts tests/unit/reviewer-completion.test.ts tests/unit/reviewer-completion-side-effects.test.ts tests/unit/reactive-dispatch-hook.test.ts tests/unit/subagent-lifecycle-hook.test.ts tests/unit/subagent-lifecycle-slot-cleanup.test.ts tests/unit/dispatch-identity.test.ts tests/unit/work-finish-slot.test.ts tests/unit/heartbeat-health-session.test.ts tests/unit/reviewer-poll-pass.test.ts tests/unit/heartbeat-canonical-pr.test.ts tests/unit/logger-transport.test.ts tests/e2e/orchestration-smoke.e2e.test.ts",
47
47
  "test:all": "npm run test:unit && npm run test:e2e",
48
48
  "test:watch": "vitest",
49
49
  "prepublishOnly": "npm run build && npm run verify:runtime-boundary && npm run test:all && npm run verify:installability"