@schoolai/shipyard-mcp 0.1.2 → 0.1.3-next.445

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.
@@ -4438,11 +4438,11 @@ var require_multistream = __commonJS({
4438
4438
  function write(data) {
4439
4439
  let dest;
4440
4440
  const level = this.lastLevel;
4441
- const { streams } = this;
4441
+ const { streams: streams2 } = this;
4442
4442
  let recordedLevel = 0;
4443
4443
  let stream;
4444
- for (let i = initLoopVar(streams.length, opts.dedupe); checkLoopVar(i, streams.length, opts.dedupe); i = adjustLoopVar(i, opts.dedupe)) {
4445
- dest = streams[i];
4444
+ for (let i = initLoopVar(streams2.length, opts.dedupe); checkLoopVar(i, streams2.length, opts.dedupe); i = adjustLoopVar(i, opts.dedupe)) {
4445
+ dest = streams2[i];
4446
4446
  if (dest.level <= level) {
4447
4447
  if (recordedLevel !== 0 && recordedLevel !== dest.level) {
4448
4448
  break;
@@ -4488,7 +4488,7 @@ var require_multistream = __commonJS({
4488
4488
  if (!isStream) {
4489
4489
  throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");
4490
4490
  }
4491
- const { streams, streamLevels: streamLevels2 } = this;
4491
+ const { streams: streams2, streamLevels: streamLevels2 } = this;
4492
4492
  let level;
4493
4493
  if (typeof dest.levelVal === "number") {
4494
4494
  level = dest.levelVal;
@@ -4505,18 +4505,18 @@ var require_multistream = __commonJS({
4505
4505
  levelVal: void 0,
4506
4506
  id: ++res.lastId
4507
4507
  };
4508
- streams.unshift(dest_);
4509
- streams.sort(compareByLevel);
4510
- this.minLevel = streams[0].level;
4508
+ streams2.unshift(dest_);
4509
+ streams2.sort(compareByLevel);
4510
+ this.minLevel = streams2[0].level;
4511
4511
  return res;
4512
4512
  }
4513
4513
  function remove(id) {
4514
- const { streams } = this;
4515
- const index = streams.findIndex((s) => s.id === id);
4514
+ const { streams: streams2 } = this;
4515
+ const index = streams2.findIndex((s) => s.id === id);
4516
4516
  if (index >= 0) {
4517
- streams.splice(index, 1);
4518
- streams.sort(compareByLevel);
4519
- this.minLevel = streams.length > 0 ? streams[0].level : -1;
4517
+ streams2.splice(index, 1);
4518
+ streams2.sort(compareByLevel);
4519
+ this.minLevel = streams2.length > 0 ? streams2[0].level : -1;
4520
4520
  }
4521
4521
  return res;
4522
4522
  }
@@ -4529,9 +4529,9 @@ var require_multistream = __commonJS({
4529
4529
  }
4530
4530
  }
4531
4531
  function clone2(level) {
4532
- const streams = new Array(this.streams.length);
4533
- for (let i = 0; i < streams.length; i++) {
4534
- streams[i] = {
4532
+ const streams2 = new Array(this.streams.length);
4533
+ for (let i = 0; i < streams2.length; i++) {
4534
+ streams2[i] = {
4535
4535
  level,
4536
4536
  stream: this.streams[i].stream
4537
4537
  };
@@ -4541,7 +4541,7 @@ var require_multistream = __commonJS({
4541
4541
  add,
4542
4542
  remove,
4543
4543
  minLevel: level,
4544
- streams,
4544
+ streams: streams2,
4545
4545
  clone: clone2,
4546
4546
  emit,
4547
4547
  flushSync,
@@ -43789,6 +43789,7 @@ var DEFAULT_AGENT_TYPE = "claude-code";
43789
43789
 
43790
43790
  // src/logger.ts
43791
43791
  var import_pino = __toESM(require_pino(), 1);
43792
+ import { existsSync, mkdirSync } from "fs";
43792
43793
  import { homedir } from "os";
43793
43794
  import { join } from "path";
43794
43795
 
@@ -43820,13 +43821,22 @@ var schema = external_exports.object({
43820
43821
  var serverConfig = loadEnv(schema);
43821
43822
 
43822
43823
  // src/logger.ts
43823
- var LOG_FILE = join(homedir(), ".shipyard", "hook-debug.log");
43824
+ var LOG_DIR = join(homedir(), ".shipyard");
43825
+ var LOG_FILE = join(LOG_DIR, "hook-debug.log");
43826
+ var isTest = process.env.NODE_ENV === "test" || process.env.VITEST;
43827
+ if (!isTest && !existsSync(LOG_DIR)) {
43828
+ try {
43829
+ mkdirSync(LOG_DIR, { recursive: true });
43830
+ } catch {
43831
+ }
43832
+ }
43833
+ var streams = isTest ? [{ stream: import_pino.default.destination(2) }] : [{ stream: import_pino.default.destination(2) }, { stream: import_pino.default.destination(LOG_FILE) }];
43824
43834
  var logger = (0, import_pino.default)(
43825
43835
  {
43826
43836
  level: serverConfig.LOG_LEVEL,
43827
43837
  timestamp: import_pino.default.stdTimeFunctions.isoTime
43828
43838
  },
43829
- import_pino.default.multistream([{ stream: import_pino.default.destination(2) }, { stream: import_pino.default.destination(LOG_FILE) }])
43839
+ import_pino.default.multistream(streams)
43830
43840
  );
43831
43841
 
43832
43842
  // src/adapters/claude-code.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schoolai/shipyard-mcp",
3
- "version": "0.1.2",
3
+ "version": "0.1.3-next.445",
4
4
  "description": "Shipyard MCP server and CLI tools for distributed planning with CRDTs",
5
5
  "type": "module",
6
6
  "bin": {