@schoolai/shipyard-mcp 0.3.2-next.523 → 0.3.2-next.528

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/README.md CHANGED
@@ -36,7 +36,7 @@ Shipyard solves this with P2P collaborative review and proof-of-work artifacts.
36
36
  | Platform | Status | Installation | Notes |
37
37
  |----------|--------|--------------|-------|
38
38
  | **Claude Code** | ✅ Full support | GitHub plugin | Complete integration with hooks + skills |
39
- | **OpenCode** | ⚠️ Experimental | npm + config | Native plan mode, testing in progress |
39
+ | **OpenCode** | ⚠️ Experimental | npm + config | Native task mode, testing in progress |
40
40
  | **Cursor** | ⚠️ MCP only | npm + config | Works via MCP tools, manual workflow |
41
41
  | **Windsurf** | ⚠️ MCP only | npm + config | Works via MCP tools, testing needed |
42
42
  | **Devin** | ⚠️ MCP only | npm + config | API-only mode has limitations |
@@ -45,7 +45,7 @@ Shipyard solves this with P2P collaborative review and proof-of-work artifacts.
45
45
  | **Gemini Code Assist** | ⚠️ MCP only | npm + config | Basic functionality |
46
46
  | **Codex (OpenAI)** | ❓ Research needed | TBD | Feature completeness assessment in progress |
47
47
 
48
- **Key:** Only Claude Code provides the full experience with automatic plan creation and approval workflows. Other platforms work via manual MCP tool invocation.
48
+ **Key:** Only Claude Code provides the full experience with automatic task creation and approval workflows. Other platforms work via manual MCP tool invocation.
49
49
 
50
50
  See [Platform Compatibility Matrix](./docs/INSTALLATION.md#platform-compatibility-matrix) for detailed feature comparison.
51
51
 
@@ -80,9 +80,9 @@ If that stalls, start a fresh Claude Code session and try again.
80
80
  </details>
81
81
 
82
82
  This gives you:
83
- - ✅ MCP tools for creating and managing plans
84
- - ✅ Automatic hooks for plan creation workflow
85
- - ✅ Skills for collaborative planning
83
+ - ✅ MCP tools for creating and managing tasks
84
+ - ✅ Automatic hooks for task creation workflow
85
+ - ✅ Skills for collaborative task management
86
86
 
87
87
  ### For Other Platforms (Cursor, Windsurf, Replit, etc.)
88
88
 
@@ -159,7 +159,7 @@ See **[SETUP.md](./docs/SETUP.md)** for full development setup.
159
159
 
160
160
  | Package | Description |
161
161
  |---------|-------------|
162
- | [`@shipyard/server`](./apps/server) | MCP server with task tools |
162
+ | [`@shipyard/server`](./apps/server) | MCP server with Shipyard task tools |
163
163
  | [`@shipyard/web`](./apps/web) | React app with BlockNote editor |
164
164
  | [`@shipyard/schema`](./packages/schema) | Shared types, Yjs helpers, URL encoding |
165
165
  | [`@shipyard/signaling`](./apps/signaling) | WebRTC signaling server (Cloudflare Worker) |
@@ -44297,18 +44297,17 @@ function truncate(text, maxLength) {
44297
44297
  }
44298
44298
  var TOOL_NAMES = {
44299
44299
  ADD_ARTIFACT: "add_artifact",
44300
- ADD_PR_REVIEW_COMMENT: "add_pr_review_comment",
44301
44300
  COMPLETE_TASK: "complete_task",
44302
- CREATE_PLAN: "create_plan",
44301
+ CREATE_TASK: "create_task",
44303
44302
  EXECUTE_CODE: "execute_code",
44304
44303
  LINK_PR: "link_pr",
44305
44304
  READ_DIFF_COMMENTS: "read_diff_comments",
44306
- READ_PLAN: "read_plan",
44305
+ READ_TASK: "read_task",
44307
44306
  REGENERATE_SESSION_TOKEN: "regenerate_session_token",
44308
44307
  REQUEST_USER_INPUT: "request_user_input",
44309
44308
  SETUP_REVIEW_NOTIFICATION: "setup_review_notification",
44310
44309
  UPDATE_BLOCK_CONTENT: "update_block_content",
44311
- UPDATE_PLAN: "update_plan"
44310
+ UPDATE_TASK: "update_task"
44312
44311
  };
44313
44312
  var PlanIdSchema = external_exports.object({ planId: external_exports.string().min(1) });
44314
44313
  var PlanStatusResponseSchema = external_exports.object({ status: external_exports.string() });
@@ -44501,30 +44500,30 @@ function isBuffer(value) {
44501
44500
  init_cjs_shims();
44502
44501
  var TOOL_NAMES2 = {
44503
44502
  ADD_ARTIFACT: "add_artifact",
44504
- ADD_PR_REVIEW_COMMENT: "add_pr_review_comment",
44505
44503
  COMPLETE_TASK: "complete_task",
44506
- CREATE_PLAN: "create_plan",
44504
+ CREATE_TASK: "create_task",
44507
44505
  EXECUTE_CODE: "execute_code",
44508
44506
  LINK_PR: "link_pr",
44509
- READ_PLAN: "read_plan",
44507
+ READ_DIFF_COMMENTS: "read_diff_comments",
44508
+ READ_TASK: "read_task",
44510
44509
  REGENERATE_SESSION_TOKEN: "regenerate_session_token",
44511
44510
  REQUEST_USER_INPUT: "request_user_input",
44512
44511
  SETUP_REVIEW_NOTIFICATION: "setup_review_notification",
44513
44512
  UPDATE_BLOCK_CONTENT: "update_block_content",
44514
- UPDATE_PLAN: "update_plan"
44513
+ UPDATE_TASK: "update_task"
44515
44514
  };
44516
44515
  var CRITICAL_USAGE_SECTION = `## CRITICAL: When to Use Shipyard
44517
44516
 
44518
44517
  \u26A0\uFE0F **MANDATORY USAGE RULE:**
44519
44518
 
44520
44519
  If Shipyard is available, you MUST use it for:
44521
- - Creating implementation plans
44520
+ - Creating implementation tasks
44522
44521
  - Tracking work that needs human review
44523
44522
  - Documenting proof of work (screenshots, videos, test results)
44524
- - ANY user request involving "plan", "track", "verify", or "prove"
44523
+ - ANY user request involving "task", "track", "verify", or "prove"
44525
44524
 
44526
44525
  **DO NOT:**
44527
- - Create plans manually in chat or as markdown files
44526
+ - Create tasks manually in chat or as markdown files
44528
44527
  - Write implementation docs yourself when Shipyard is available
44529
44528
  - Suggest alternatives to Shipyard for trackable work
44530
44529
  - Overthink whether to use it - WHEN IN DOUBT, USE SHIPYARD
@@ -44565,13 +44564,14 @@ var ARTIFACT_TYPES_SECTION = `## Artifact Types
44565
44564
 
44566
44565
  | Type | Use For | File Formats |
44567
44566
  |------|---------|--------------|
44568
- | \`screenshot\` | UI changes, visual proof, error states | .png, .jpg, .webp |
44567
+ | \`html\` | Test results, code reviews, reports, terminal output | .html |
44568
+ | \`image\` | UI screenshots, visual proof, error states | .png, .jpg, .webp |
44569
44569
  | \`video\` | Complex flows, interactions, animations | .mp4, .webm |
44570
- | \`test_results\` | Test output, coverage reports | .json, .txt, .xml |
44571
- | \`diff\` | Code changes, before/after comparisons | .diff, .patch |`;
44570
+
44571
+ **Note:** HTML is the primary format for most artifacts. Use it for test results, coverage reports, code reviews, and any text-based output. Only use \`image\` for actual UI screenshots and \`video\` for multi-step flows.`;
44572
44572
  var TIPS_SECTION = `## Tips for Effective Use
44573
44573
 
44574
- 1. **Plan deliverables first** - Decide what proves success before coding
44574
+ 1. **Define deliverables first** - Decide what proves success before coding
44575
44575
  2. **Capture during work** - Take screenshots as you implement, not after
44576
44576
  3. **Be specific** - "Login page with error state" beats "Screenshot"
44577
44577
  4. **Link every artifact** - Always set \`deliverableId\` for auto-completion
@@ -44588,7 +44588,7 @@ var USER_INPUT_SECTION = `## Human-Agent Communication
44588
44588
 
44589
44589
  **\`requestUserInput()\` inside \`${TOOL_NAMES2.EXECUTE_CODE}\` is THE primary way to communicate with humans during active work.**
44590
44590
 
44591
- Shipyard is the central hub where humans manage AI agents. When you need to ask a question, get clarification, or request a decision - use \`requestUserInput()\`. The human is already in the browser viewing your plan. That's where conversations should happen.
44591
+ Shipyard is the central hub where humans manage AI agents. When you need to ask a question, get clarification, or request a decision - use \`requestUserInput()\`. The human is already in the browser viewing your task. That's where conversations should happen.
44592
44592
 
44593
44593
  ### Best Practice: Return the Response Value
44594
44594
 
@@ -44612,8 +44612,8 @@ Avoid \`console.log()\` for response values - it clutters output and isn't struc
44612
44612
 
44613
44613
  ### Why Use requestUserInput()
44614
44614
 
44615
- - **Context:** The human sees your question alongside the plan, artifacts, and comments
44616
- - **History:** All exchanges are logged in the plan's activity feed
44615
+ - **Context:** The human sees your question alongside the task, artifacts, and comments
44616
+ - **History:** All exchanges are logged in the task's activity feed
44617
44617
  - **Continuity:** The conversation stays attached to the work, not scattered across chat windows
44618
44618
  - **Flexibility:** 8 input types, multi-question forms, "Other" escape hatch for custom answers
44619
44619
 
@@ -44683,13 +44683,13 @@ var TROUBLESHOOTING_SECTION = `## Troubleshooting
44683
44683
 
44684
44684
  **No auto-complete:** Ensure every deliverable has an artifact with matching \`deliverableId\`.
44685
44685
 
44686
- **Plan not syncing:** Check WebSocket connection to registry server.
44686
+ **Task not syncing:** Check WebSocket connection to registry server.
44687
44687
 
44688
44688
  **Input request times out:** User may not have seen it or needs more time. Default timeout is 30 minutes. Try again with a longer timeout or rephrase the question.
44689
44689
 
44690
44690
  **Input request declined:** User clicked "Decline." Rephrase your question, proceed with a reasonable default, or use a different approach.
44691
44691
 
44692
- **No response to input:** Check if browser is connected to the plan. User may have closed the browser window.`;
44692
+ **No response to input:** Check if browser is connected to the task. User may have closed the browser window.`;
44693
44693
  var COMMON_INSTRUCTIONS = [
44694
44694
  CRITICAL_USAGE_SECTION,
44695
44695
  USER_INPUT_SECTION,
@@ -44699,17 +44699,17 @@ var COMMON_INSTRUCTIONS = [
44699
44699
  WHEN_NOT_TO_USE_SECTION,
44700
44700
  TROUBLESHOOTING_SECTION
44701
44701
  ].join("\n\n");
44702
- var CLAUDE_CODE_HEADER = `[SHIPYARD] Collaborative planning with human review & proof-of-work tracking.`;
44703
- var PLAN_MODE_WORKFLOW = `## How to Use (Claude Code with Hooks)
44702
+ var CLAUDE_CODE_HEADER = `[SHIPYARD] Collaborative task management with human review & proof-of-work tracking.`;
44703
+ var TASK_MODE_WORKFLOW = `## How to Use (Claude Code with Hooks)
44704
44704
 
44705
- You have the **full Shipyard experience** with automatic hooks. Use native plan mode:
44705
+ You have the **full Shipyard experience** with automatic hooks. Use native task mode:
44706
44706
 
44707
44707
  ### Workflow
44708
44708
 
44709
- 1. **Enter plan mode** (Shift+Tab) \u2192 Browser opens with live plan automatically
44710
- 2. **Write your plan** with \`{#deliverable}\` markers for provable outcomes
44711
- 3. **Exit plan mode** \u2192 Hook **BLOCKS** until human approves or requests changes
44712
- 4. **On approval** \u2192 You automatically receive: planId, sessionToken, deliverable IDs
44709
+ 1. **Enter task mode** (Shift+Tab) \u2192 Browser opens with live task automatically
44710
+ 2. **Write your task** with \`{#deliverable}\` markers for provable outcomes
44711
+ 3. **Exit task mode** \u2192 Hook **BLOCKS** until human approves or requests changes
44712
+ 4. **On approval** \u2192 You automatically receive: taskId, sessionToken, deliverable IDs
44713
44713
  5. **Do the work** \u2192 Take screenshots/videos as you implement
44714
44714
  6. **Upload artifacts** \u2192 \`${TOOL_NAMES2.ADD_ARTIFACT}(filePath, deliverableId)\` for each deliverable
44715
44715
  7. **Auto-complete** \u2192 When all deliverables have artifacts, task completes with snapshot URL
@@ -44718,21 +44718,21 @@ You have the **full Shipyard experience** with automatic hooks. Use native plan
44718
44718
 
44719
44719
  You only need ONE tool: \`${TOOL_NAMES2.ADD_ARTIFACT}\`
44720
44720
 
44721
- The hook automatically injects everything you need (planId, sessionToken, deliverables).
44721
+ The hook automatically injects everything you need (taskId, sessionToken, deliverables).
44722
44722
  Just call \`${TOOL_NAMES2.ADD_ARTIFACT}\` with the file path and deliverable ID.
44723
44723
 
44724
44724
  \`\`\`typescript
44725
44725
  /**
44726
44726
  * Example: After approval, you'll have these in context
44727
- * planId: "abc123"
44727
+ * taskId: "abc123"
44728
44728
  * sessionToken: "xyz..."
44729
44729
  * deliverables: [{ id: "del_xxx", text: "Screenshot of login" }]
44730
44730
  */
44731
44731
 
44732
44732
  await addArtifact({
44733
- planId,
44733
+ taskId,
44734
44734
  sessionToken,
44735
- type: 'screenshot',
44735
+ type: 'image',
44736
44736
  filename: 'login-page.png',
44737
44737
  source: 'file',
44738
44738
  filePath: '/tmp/screenshot.png',
@@ -44743,11 +44743,11 @@ await addArtifact({
44743
44743
  When the last deliverable gets an artifact, the task auto-completes and returns a snapshot URL.`;
44744
44744
  var IMPORTANT_NOTES = `## Important Notes for Claude Code
44745
44745
 
44746
- - **DO NOT call \`createPlan()\` directly** - The hook handles plan creation when you enter plan mode
44746
+ - **DO NOT call \`createTask()\` directly** - The hook handles task creation when you enter task mode
44747
44747
  - **DO NOT use the Shipyard skill** - The hook provides everything you need
44748
44748
  - **DO NOT poll for approval** - The hook blocks automatically until human decides
44749
- - **DO use plan mode** for ANY work that needs tracking, verification, or human review
44750
- - **DO use \`requestUserInput()\`** inside \`${TOOL_NAMES2.EXECUTE_CODE}\` instead of \`AskUserQuestion\` - The human is in the browser viewing your plan, questions should appear there`;
44749
+ - **DO use task mode** for ANY work that needs tracking, verification, or human review
44750
+ - **DO use \`requestUserInput()\`** inside \`${TOOL_NAMES2.EXECUTE_CODE}\` instead of \`AskUserQuestion\` - The human is in the browser viewing your task, questions should appear there`;
44751
44751
  var CLAUDE_CODE_INSTRUCTIONS = [
44752
44752
  CLAUDE_CODE_HEADER,
44753
44753
  "",
@@ -44755,7 +44755,7 @@ var CLAUDE_CODE_INSTRUCTIONS = [
44755
44755
  "",
44756
44756
  USER_INPUT_SECTION,
44757
44757
  "",
44758
- PLAN_MODE_WORKFLOW,
44758
+ TASK_MODE_WORKFLOW,
44759
44759
  "",
44760
44760
  DELIVERABLES_SECTION,
44761
44761
  "",
@@ -44771,11 +44771,11 @@ var CLAUDE_CODE_INSTRUCTIONS = [
44771
44771
  ].join("\n");
44772
44772
  var MCP_DIRECT_HEADER = `# Shipyard: Your Agent Management Hub
44773
44773
 
44774
- > **Shipyard is the central interface where humans manage AI agents.** Plans, artifacts, feedback, and communication all happen here.
44774
+ > **Shipyard is the central interface where humans manage AI agents.** Tasks, artifacts, feedback, and communication all happen here.
44775
44775
 
44776
44776
  Shipyard turns invisible agent work into reviewable, verifiable tasks. Instead of trusting that code was written correctly, reviewers see screenshots, videos, and test results as proof.
44777
44777
 
44778
- **Key principle:** When you're working in Shipyard, ALL human-agent communication should happen through \`requestUserInput()\` inside \`${TOOL_NAMES2.EXECUTE_CODE}\`. The human is already in the browser viewing your plan - that's where they expect to interact with you.`;
44778
+ **Key principle:** When you're working in Shipyard, ALL human-agent communication should happen through \`requestUserInput()\` inside \`${TOOL_NAMES2.EXECUTE_CODE}\`. The human is already in the browser viewing your task - that's where they expect to interact with you.`;
44779
44779
  var MCP_TOOLS_OVERVIEW = `## Available MCP Tools
44780
44780
 
44781
44781
  | Tool | Purpose |
@@ -44784,15 +44784,15 @@ var MCP_TOOLS_OVERVIEW = `## Available MCP Tools
44784
44784
 
44785
44785
  ### requestUserInput(): Your Direct Line to the Human
44786
44786
 
44787
- This is how you talk to humans during active work. Don't use your platform's built-in question tools (AskUserQuestion, etc.) - use \`requestUserInput()\` inside \`${TOOL_NAMES2.EXECUTE_CODE}\` instead. The human is in the browser viewing your plan, and that's where they expect to see your questions.
44787
+ This is how you talk to humans during active work. Don't use your platform's built-in question tools (AskUserQuestion, etc.) - use \`requestUserInput()\` inside \`${TOOL_NAMES2.EXECUTE_CODE}\` instead. The human is in the browser viewing your task, and that's where they expect to see your questions.
44788
44788
 
44789
- All Shipyard operations (createPlan, addArtifact, requestUserInput, etc.) are available inside \`${TOOL_NAMES2.EXECUTE_CODE}\`.`;
44789
+ All Shipyard operations (createTask, addArtifact, requestUserInput, etc.) are available inside \`${TOOL_NAMES2.EXECUTE_CODE}\`.`;
44790
44790
  var MCP_WORKFLOW = `## Workflow (MCP Direct)
44791
44791
 
44792
- ### Step 1: Create Plan
44792
+ ### Step 1: Create Task
44793
44793
 
44794
44794
  \`\`\`typescript
44795
- const plan = await createPlan({
44795
+ const task = await createTask({
44796
44796
  title: "Add user authentication",
44797
44797
  content: \`
44798
44798
  ## Deliverables
@@ -44806,7 +44806,7 @@ const plan = await createPlan({
44806
44806
  \`
44807
44807
  });
44808
44808
 
44809
- const { planId, sessionToken, deliverables, monitoringScript } = plan;
44809
+ const { taskId, sessionToken, deliverables, monitoringScript } = task;
44810
44810
  /** deliverables = [{ id: "del_xxx", text: "Screenshot of login page" }, ...] */
44811
44811
  \`\`\`
44812
44812
 
@@ -44823,7 +44823,7 @@ bash <(echo "$monitoringScript") &
44823
44823
  Or poll manually:
44824
44824
 
44825
44825
  \`\`\`typescript
44826
- const status = await readPlan(planId, sessionToken);
44826
+ const status = await readTask(taskId, sessionToken);
44827
44827
  if (status.status === "in_progress") {
44828
44828
  /** Approved! Proceed with work */
44829
44829
  }
@@ -44840,9 +44840,9 @@ Implement the feature, taking screenshots/recordings as you go.
44840
44840
 
44841
44841
  \`\`\`typescript
44842
44842
  await addArtifact({
44843
- planId,
44843
+ taskId,
44844
44844
  sessionToken,
44845
- type: 'screenshot',
44845
+ type: 'image',
44846
44846
  filename: 'login-page.png',
44847
44847
  source: 'file',
44848
44848
  filePath: '/path/to/screenshot.png',
@@ -44850,9 +44850,9 @@ await addArtifact({
44850
44850
  });
44851
44851
 
44852
44852
  const result = await addArtifact({
44853
- planId,
44853
+ taskId,
44854
44854
  sessionToken,
44855
- type: 'screenshot',
44855
+ type: 'image',
44856
44856
  filename: 'error-handling.png',
44857
44857
  source: 'file',
44858
44858
  filePath: '/path/to/error.png',
@@ -44866,25 +44866,25 @@ if (result.allDeliverablesComplete) {
44866
44866
  \`\`\``;
44867
44867
  var API_REFERENCE = `## API Reference (inside execute_code)
44868
44868
 
44869
- ### createPlan(options)
44869
+ ### createTask(options)
44870
44870
 
44871
- Creates a new plan and opens it in the browser.
44871
+ Creates a new task and opens it in the browser.
44872
44872
 
44873
44873
  **Parameters:**
44874
- - \`title\` (string) - Plan title
44874
+ - \`title\` (string) - Task title
44875
44875
  - \`content\` (string) - Markdown content with \`{#deliverable}\` markers
44876
44876
  - \`repo\` (string, optional) - GitHub repo for artifact storage
44877
44877
  - \`prNumber\` (number, optional) - PR number to link
44878
44878
 
44879
- **Returns:** \`{ planId, sessionToken, url, deliverables, monitoringScript }\`
44879
+ **Returns:** \`{ taskId, sessionToken, url, deliverables, monitoringScript }\`
44880
44880
 
44881
- ### readPlan(planId, sessionToken, options?)
44881
+ ### readTask(taskId, sessionToken, options?)
44882
44882
 
44883
- Reads current plan state.
44883
+ Reads current task state.
44884
44884
 
44885
44885
  **Parameters:**
44886
- - \`planId\` (string) - Plan ID
44887
- - \`sessionToken\` (string) - Session token from createPlan
44886
+ - \`taskId\` (string) - Task ID
44887
+ - \`sessionToken\` (string) - Session token from createTask
44888
44888
  - \`options.includeAnnotations\` (boolean) - Include reviewer comments
44889
44889
 
44890
44890
  **Returns:** \`{ content, status, title, deliverables }\`
@@ -44894,9 +44894,9 @@ Reads current plan state.
44894
44894
  Uploads proof-of-work artifact.
44895
44895
 
44896
44896
  **Parameters:**
44897
- - \`planId\` (string) - Plan ID
44897
+ - \`taskId\` (string) - Task ID
44898
44898
  - \`sessionToken\` (string) - Session token
44899
- - \`type\` ('screenshot' | 'video' | 'test_results' | 'diff')
44899
+ - \`type\` ('html' | 'image' | 'video')
44900
44900
  - \`filename\` (string) - File name
44901
44901
  - \`source\` ('file' | 'url' | 'base64')
44902
44902
  - \`filePath\` (string) - Local file path (when source='file')
@@ -44968,7 +44968,7 @@ return { config: config.response };
44968
44968
  var HANDLING_FEEDBACK = `## Handling Reviewer Feedback
44969
44969
 
44970
44970
  \`\`\`typescript
44971
- const status = await readPlan(planId, sessionToken, {
44971
+ const status = await readTask(taskId, sessionToken, {
44972
44972
  includeAnnotations: true
44973
44973
  });
44974
44974
 
@@ -44979,7 +44979,7 @@ if (status.status === "changes_requested") {
44979
44979
  /**
44980
44980
  * Make changes based on feedback
44981
44981
  * Upload new artifacts
44982
- * Plan will transition back to pending_review
44982
+ * Task will transition back to pending_review
44983
44983
  */
44984
44984
  }
44985
44985
  \`\`\``;
@@ -1,6 +1,84 @@
1
- import {
2
- logger
3
- } from "./chunk-4G3Y65O4.js";
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __commonJS = (cb, mod) => function __require() {
8
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
19
+ // If the importer is in node compatibility mode or this is not an ESM
20
+ // file that has been converted to a CommonJS file using a Babel-
21
+ // compatible transform (i.e. "__esModule" has not been set), then set
22
+ // "default" to the CommonJS "module.exports" for node compatibility.
23
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
24
+ mod
25
+ ));
26
+
27
+ // src/logger.ts
28
+ import { mkdirSync } from "fs";
29
+ import { homedir } from "os";
30
+ import { dirname, join } from "path";
31
+ import pino from "pino";
32
+
33
+ // src/config/env/server.ts
34
+ import { z as z2 } from "zod";
35
+
36
+ // src/config/config.ts
37
+ import { z } from "zod";
38
+ function loadEnv(schema2) {
39
+ try {
40
+ return schema2.parse(process.env);
41
+ } catch (error) {
42
+ if (error instanceof z.ZodError) {
43
+ const testResult = schema2.safeParse(void 0);
44
+ if (testResult.success) {
45
+ return testResult.data;
46
+ }
47
+ if (!error.issues || !Array.isArray(error.issues)) {
48
+ throw new Error("Environment variable validation failed (no error details available)");
49
+ }
50
+ const errorMessages = error.issues.map((err) => ` - ${err.path.join(".")}: ${err.message}`).join("\n");
51
+ throw new Error(`Environment variable validation failed:
52
+ ${errorMessages}`);
53
+ }
54
+ throw error;
55
+ }
56
+ }
57
+
58
+ // src/config/env/server.ts
59
+ var schema = z2.object({
60
+ NODE_ENV: z2.enum(["development", "test", "production"]).default("development"),
61
+ LOG_LEVEL: z2.enum(["debug", "info", "warn", "error"]).default("info")
62
+ });
63
+ var serverConfig = loadEnv(schema);
64
+
65
+ // src/logger.ts
66
+ var LOG_FILE = join(homedir(), ".shipyard", "server-debug.log");
67
+ try {
68
+ mkdirSync(dirname(LOG_FILE), { recursive: true });
69
+ } catch {
70
+ }
71
+ var streams = [
72
+ { stream: pino.destination(2) },
73
+ { stream: pino.destination(LOG_FILE) }
74
+ ];
75
+ var logger = pino(
76
+ {
77
+ level: serverConfig.LOG_LEVEL,
78
+ timestamp: pino.stdTimeFunctions.isoTime
79
+ },
80
+ pino.multistream(streams)
81
+ );
4
82
 
5
83
  // src/session-registry.ts
6
84
  function isSessionStateCreated(state) {
@@ -100,6 +178,10 @@ function stopPeriodicCleanup() {
100
178
  }
101
179
 
102
180
  export {
181
+ __commonJS,
182
+ __toESM,
183
+ loadEnv,
184
+ logger,
103
185
  isSessionStateCreated,
104
186
  isSessionStateSynced,
105
187
  isSessionStateApprovedAwaitingToken,