@schoolai/shipyard-mcp 0.3.2-next.523 → 0.3.2-next.527
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 +6 -6
- package/apps/hook/dist/index.cjs +58 -60
- package/apps/server/dist/{chunk-2MIAN4VT.js → chunk-HFZCBGQ3.js} +85 -3
- package/apps/server/dist/{chunk-NNJ3ELQW.js → chunk-QDYV6R7L.js} +2942 -1250
- package/apps/server/dist/index.js +253 -518
- package/apps/server/dist/{input-request-manager-OSA7HKQW.js → input-request-manager-QKHCEJUU.js} +3 -8
- package/apps/server/dist/{session-registry-3ZNR5KYN.js → session-registry-CBDXMXY3.js} +1 -3
- package/package.json +1 -1
- package/apps/server/dist/chunk-4G3Y65O4.js +0 -60
- package/apps/server/dist/chunk-JSBRDJBE.js +0 -30
- package/apps/server/dist/chunk-SPYUFJJK.js +0 -212
- package/apps/server/dist/chunk-WLIAQMMT.js +0 -2779
- package/apps/server/dist/dist-STCVHI7H.js +0 -497
- package/apps/server/dist/server-identity-LMOARXHL.js +0 -14
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
|
|
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
|
|
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
|
|
84
|
-
- ✅ Automatic hooks for
|
|
85
|
-
- ✅ Skills for collaborative
|
|
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) |
|
package/apps/hook/dist/index.cjs
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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,28 @@ 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
|
-
|
|
44504
|
+
CREATE_TASK: "create_task",
|
|
44507
44505
|
EXECUTE_CODE: "execute_code",
|
|
44508
44506
|
LINK_PR: "link_pr",
|
|
44509
|
-
|
|
44507
|
+
READ_TASK: "read_task",
|
|
44510
44508
|
REGENERATE_SESSION_TOKEN: "regenerate_session_token",
|
|
44511
44509
|
REQUEST_USER_INPUT: "request_user_input",
|
|
44512
|
-
SETUP_REVIEW_NOTIFICATION: "setup_review_notification",
|
|
44513
44510
|
UPDATE_BLOCK_CONTENT: "update_block_content",
|
|
44514
|
-
|
|
44511
|
+
UPDATE_TASK: "update_task"
|
|
44515
44512
|
};
|
|
44516
44513
|
var CRITICAL_USAGE_SECTION = `## CRITICAL: When to Use Shipyard
|
|
44517
44514
|
|
|
44518
44515
|
\u26A0\uFE0F **MANDATORY USAGE RULE:**
|
|
44519
44516
|
|
|
44520
44517
|
If Shipyard is available, you MUST use it for:
|
|
44521
|
-
- Creating implementation
|
|
44518
|
+
- Creating implementation tasks
|
|
44522
44519
|
- Tracking work that needs human review
|
|
44523
44520
|
- Documenting proof of work (screenshots, videos, test results)
|
|
44524
|
-
- ANY user request involving "
|
|
44521
|
+
- ANY user request involving "task", "track", "verify", or "prove"
|
|
44525
44522
|
|
|
44526
44523
|
**DO NOT:**
|
|
44527
|
-
- Create
|
|
44524
|
+
- Create tasks manually in chat or as markdown files
|
|
44528
44525
|
- Write implementation docs yourself when Shipyard is available
|
|
44529
44526
|
- Suggest alternatives to Shipyard for trackable work
|
|
44530
44527
|
- Overthink whether to use it - WHEN IN DOUBT, USE SHIPYARD
|
|
@@ -44565,13 +44562,14 @@ var ARTIFACT_TYPES_SECTION = `## Artifact Types
|
|
|
44565
44562
|
|
|
44566
44563
|
| Type | Use For | File Formats |
|
|
44567
44564
|
|------|---------|--------------|
|
|
44568
|
-
| \`
|
|
44565
|
+
| \`html\` | Test results, code reviews, reports, terminal output | .html |
|
|
44566
|
+
| \`image\` | UI screenshots, visual proof, error states | .png, .jpg, .webp |
|
|
44569
44567
|
| \`video\` | Complex flows, interactions, animations | .mp4, .webm |
|
|
44570
|
-
|
|
44571
|
-
|
|
44568
|
+
|
|
44569
|
+
**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
44570
|
var TIPS_SECTION = `## Tips for Effective Use
|
|
44573
44571
|
|
|
44574
|
-
1. **
|
|
44572
|
+
1. **Define deliverables first** - Decide what proves success before coding
|
|
44575
44573
|
2. **Capture during work** - Take screenshots as you implement, not after
|
|
44576
44574
|
3. **Be specific** - "Login page with error state" beats "Screenshot"
|
|
44577
44575
|
4. **Link every artifact** - Always set \`deliverableId\` for auto-completion
|
|
@@ -44588,7 +44586,7 @@ var USER_INPUT_SECTION = `## Human-Agent Communication
|
|
|
44588
44586
|
|
|
44589
44587
|
**\`requestUserInput()\` inside \`${TOOL_NAMES2.EXECUTE_CODE}\` is THE primary way to communicate with humans during active work.**
|
|
44590
44588
|
|
|
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
|
|
44589
|
+
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
44590
|
|
|
44593
44591
|
### Best Practice: Return the Response Value
|
|
44594
44592
|
|
|
@@ -44612,8 +44610,8 @@ Avoid \`console.log()\` for response values - it clutters output and isn't struc
|
|
|
44612
44610
|
|
|
44613
44611
|
### Why Use requestUserInput()
|
|
44614
44612
|
|
|
44615
|
-
- **Context:** The human sees your question alongside the
|
|
44616
|
-
- **History:** All exchanges are logged in the
|
|
44613
|
+
- **Context:** The human sees your question alongside the task, artifacts, and comments
|
|
44614
|
+
- **History:** All exchanges are logged in the task's activity feed
|
|
44617
44615
|
- **Continuity:** The conversation stays attached to the work, not scattered across chat windows
|
|
44618
44616
|
- **Flexibility:** 8 input types, multi-question forms, "Other" escape hatch for custom answers
|
|
44619
44617
|
|
|
@@ -44683,13 +44681,13 @@ var TROUBLESHOOTING_SECTION = `## Troubleshooting
|
|
|
44683
44681
|
|
|
44684
44682
|
**No auto-complete:** Ensure every deliverable has an artifact with matching \`deliverableId\`.
|
|
44685
44683
|
|
|
44686
|
-
**
|
|
44684
|
+
**Task not syncing:** Check WebSocket connection to registry server.
|
|
44687
44685
|
|
|
44688
44686
|
**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
44687
|
|
|
44690
44688
|
**Input request declined:** User clicked "Decline." Rephrase your question, proceed with a reasonable default, or use a different approach.
|
|
44691
44689
|
|
|
44692
|
-
**No response to input:** Check if browser is connected to the
|
|
44690
|
+
**No response to input:** Check if browser is connected to the task. User may have closed the browser window.`;
|
|
44693
44691
|
var COMMON_INSTRUCTIONS = [
|
|
44694
44692
|
CRITICAL_USAGE_SECTION,
|
|
44695
44693
|
USER_INPUT_SECTION,
|
|
@@ -44699,17 +44697,17 @@ var COMMON_INSTRUCTIONS = [
|
|
|
44699
44697
|
WHEN_NOT_TO_USE_SECTION,
|
|
44700
44698
|
TROUBLESHOOTING_SECTION
|
|
44701
44699
|
].join("\n\n");
|
|
44702
|
-
var CLAUDE_CODE_HEADER = `[SHIPYARD] Collaborative
|
|
44703
|
-
var
|
|
44700
|
+
var CLAUDE_CODE_HEADER = `[SHIPYARD] Collaborative task management with human review & proof-of-work tracking.`;
|
|
44701
|
+
var TASK_MODE_WORKFLOW = `## How to Use (Claude Code with Hooks)
|
|
44704
44702
|
|
|
44705
|
-
You have the **full Shipyard experience** with automatic hooks. Use native
|
|
44703
|
+
You have the **full Shipyard experience** with automatic hooks. Use native task mode:
|
|
44706
44704
|
|
|
44707
44705
|
### Workflow
|
|
44708
44706
|
|
|
44709
|
-
1. **Enter
|
|
44710
|
-
2. **Write your
|
|
44711
|
-
3. **Exit
|
|
44712
|
-
4. **On approval** \u2192 You automatically receive:
|
|
44707
|
+
1. **Enter task mode** (Shift+Tab) \u2192 Browser opens with live task automatically
|
|
44708
|
+
2. **Write your task** with \`{#deliverable}\` markers for provable outcomes
|
|
44709
|
+
3. **Exit task mode** \u2192 Hook **BLOCKS** until human approves or requests changes
|
|
44710
|
+
4. **On approval** \u2192 You automatically receive: taskId, sessionToken, deliverable IDs
|
|
44713
44711
|
5. **Do the work** \u2192 Take screenshots/videos as you implement
|
|
44714
44712
|
6. **Upload artifacts** \u2192 \`${TOOL_NAMES2.ADD_ARTIFACT}(filePath, deliverableId)\` for each deliverable
|
|
44715
44713
|
7. **Auto-complete** \u2192 When all deliverables have artifacts, task completes with snapshot URL
|
|
@@ -44718,21 +44716,21 @@ You have the **full Shipyard experience** with automatic hooks. Use native plan
|
|
|
44718
44716
|
|
|
44719
44717
|
You only need ONE tool: \`${TOOL_NAMES2.ADD_ARTIFACT}\`
|
|
44720
44718
|
|
|
44721
|
-
The hook automatically injects everything you need (
|
|
44719
|
+
The hook automatically injects everything you need (taskId, sessionToken, deliverables).
|
|
44722
44720
|
Just call \`${TOOL_NAMES2.ADD_ARTIFACT}\` with the file path and deliverable ID.
|
|
44723
44721
|
|
|
44724
44722
|
\`\`\`typescript
|
|
44725
44723
|
/**
|
|
44726
44724
|
* Example: After approval, you'll have these in context
|
|
44727
|
-
*
|
|
44725
|
+
* taskId: "abc123"
|
|
44728
44726
|
* sessionToken: "xyz..."
|
|
44729
44727
|
* deliverables: [{ id: "del_xxx", text: "Screenshot of login" }]
|
|
44730
44728
|
*/
|
|
44731
44729
|
|
|
44732
44730
|
await addArtifact({
|
|
44733
|
-
|
|
44731
|
+
taskId,
|
|
44734
44732
|
sessionToken,
|
|
44735
|
-
type: '
|
|
44733
|
+
type: 'image',
|
|
44736
44734
|
filename: 'login-page.png',
|
|
44737
44735
|
source: 'file',
|
|
44738
44736
|
filePath: '/tmp/screenshot.png',
|
|
@@ -44743,11 +44741,11 @@ await addArtifact({
|
|
|
44743
44741
|
When the last deliverable gets an artifact, the task auto-completes and returns a snapshot URL.`;
|
|
44744
44742
|
var IMPORTANT_NOTES = `## Important Notes for Claude Code
|
|
44745
44743
|
|
|
44746
|
-
- **DO NOT call \`
|
|
44744
|
+
- **DO NOT call \`createTask()\` directly** - The hook handles task creation when you enter task mode
|
|
44747
44745
|
- **DO NOT use the Shipyard skill** - The hook provides everything you need
|
|
44748
44746
|
- **DO NOT poll for approval** - The hook blocks automatically until human decides
|
|
44749
|
-
- **DO use
|
|
44750
|
-
- **DO use \`requestUserInput()\`** inside \`${TOOL_NAMES2.EXECUTE_CODE}\` instead of \`AskUserQuestion\` - The human is in the browser viewing your
|
|
44747
|
+
- **DO use task mode** for ANY work that needs tracking, verification, or human review
|
|
44748
|
+
- **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
44749
|
var CLAUDE_CODE_INSTRUCTIONS = [
|
|
44752
44750
|
CLAUDE_CODE_HEADER,
|
|
44753
44751
|
"",
|
|
@@ -44755,7 +44753,7 @@ var CLAUDE_CODE_INSTRUCTIONS = [
|
|
|
44755
44753
|
"",
|
|
44756
44754
|
USER_INPUT_SECTION,
|
|
44757
44755
|
"",
|
|
44758
|
-
|
|
44756
|
+
TASK_MODE_WORKFLOW,
|
|
44759
44757
|
"",
|
|
44760
44758
|
DELIVERABLES_SECTION,
|
|
44761
44759
|
"",
|
|
@@ -44771,11 +44769,11 @@ var CLAUDE_CODE_INSTRUCTIONS = [
|
|
|
44771
44769
|
].join("\n");
|
|
44772
44770
|
var MCP_DIRECT_HEADER = `# Shipyard: Your Agent Management Hub
|
|
44773
44771
|
|
|
44774
|
-
> **Shipyard is the central interface where humans manage AI agents.**
|
|
44772
|
+
> **Shipyard is the central interface where humans manage AI agents.** Tasks, artifacts, feedback, and communication all happen here.
|
|
44775
44773
|
|
|
44776
44774
|
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
44775
|
|
|
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
|
|
44776
|
+
**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
44777
|
var MCP_TOOLS_OVERVIEW = `## Available MCP Tools
|
|
44780
44778
|
|
|
44781
44779
|
| Tool | Purpose |
|
|
@@ -44784,15 +44782,15 @@ var MCP_TOOLS_OVERVIEW = `## Available MCP Tools
|
|
|
44784
44782
|
|
|
44785
44783
|
### requestUserInput(): Your Direct Line to the Human
|
|
44786
44784
|
|
|
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
|
|
44785
|
+
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
44786
|
|
|
44789
|
-
All Shipyard operations (
|
|
44787
|
+
All Shipyard operations (createTask, addArtifact, requestUserInput, etc.) are available inside \`${TOOL_NAMES2.EXECUTE_CODE}\`.`;
|
|
44790
44788
|
var MCP_WORKFLOW = `## Workflow (MCP Direct)
|
|
44791
44789
|
|
|
44792
|
-
### Step 1: Create
|
|
44790
|
+
### Step 1: Create Task
|
|
44793
44791
|
|
|
44794
44792
|
\`\`\`typescript
|
|
44795
|
-
const
|
|
44793
|
+
const task = await createTask({
|
|
44796
44794
|
title: "Add user authentication",
|
|
44797
44795
|
content: \`
|
|
44798
44796
|
## Deliverables
|
|
@@ -44806,7 +44804,7 @@ const plan = await createPlan({
|
|
|
44806
44804
|
\`
|
|
44807
44805
|
});
|
|
44808
44806
|
|
|
44809
|
-
const {
|
|
44807
|
+
const { taskId, sessionToken, deliverables, monitoringScript } = task;
|
|
44810
44808
|
/** deliverables = [{ id: "del_xxx", text: "Screenshot of login page" }, ...] */
|
|
44811
44809
|
\`\`\`
|
|
44812
44810
|
|
|
@@ -44823,7 +44821,7 @@ bash <(echo "$monitoringScript") &
|
|
|
44823
44821
|
Or poll manually:
|
|
44824
44822
|
|
|
44825
44823
|
\`\`\`typescript
|
|
44826
|
-
const status = await
|
|
44824
|
+
const status = await readTask(taskId, sessionToken);
|
|
44827
44825
|
if (status.status === "in_progress") {
|
|
44828
44826
|
/** Approved! Proceed with work */
|
|
44829
44827
|
}
|
|
@@ -44840,9 +44838,9 @@ Implement the feature, taking screenshots/recordings as you go.
|
|
|
44840
44838
|
|
|
44841
44839
|
\`\`\`typescript
|
|
44842
44840
|
await addArtifact({
|
|
44843
|
-
|
|
44841
|
+
taskId,
|
|
44844
44842
|
sessionToken,
|
|
44845
|
-
type: '
|
|
44843
|
+
type: 'image',
|
|
44846
44844
|
filename: 'login-page.png',
|
|
44847
44845
|
source: 'file',
|
|
44848
44846
|
filePath: '/path/to/screenshot.png',
|
|
@@ -44850,9 +44848,9 @@ await addArtifact({
|
|
|
44850
44848
|
});
|
|
44851
44849
|
|
|
44852
44850
|
const result = await addArtifact({
|
|
44853
|
-
|
|
44851
|
+
taskId,
|
|
44854
44852
|
sessionToken,
|
|
44855
|
-
type: '
|
|
44853
|
+
type: 'image',
|
|
44856
44854
|
filename: 'error-handling.png',
|
|
44857
44855
|
source: 'file',
|
|
44858
44856
|
filePath: '/path/to/error.png',
|
|
@@ -44866,25 +44864,25 @@ if (result.allDeliverablesComplete) {
|
|
|
44866
44864
|
\`\`\``;
|
|
44867
44865
|
var API_REFERENCE = `## API Reference (inside execute_code)
|
|
44868
44866
|
|
|
44869
|
-
###
|
|
44867
|
+
### createTask(options)
|
|
44870
44868
|
|
|
44871
|
-
Creates a new
|
|
44869
|
+
Creates a new task and opens it in the browser.
|
|
44872
44870
|
|
|
44873
44871
|
**Parameters:**
|
|
44874
|
-
- \`title\` (string) -
|
|
44872
|
+
- \`title\` (string) - Task title
|
|
44875
44873
|
- \`content\` (string) - Markdown content with \`{#deliverable}\` markers
|
|
44876
44874
|
- \`repo\` (string, optional) - GitHub repo for artifact storage
|
|
44877
44875
|
- \`prNumber\` (number, optional) - PR number to link
|
|
44878
44876
|
|
|
44879
|
-
**Returns:** \`{
|
|
44877
|
+
**Returns:** \`{ taskId, sessionToken, url, deliverables, monitoringScript }\`
|
|
44880
44878
|
|
|
44881
|
-
###
|
|
44879
|
+
### readTask(taskId, sessionToken, options?)
|
|
44882
44880
|
|
|
44883
|
-
Reads current
|
|
44881
|
+
Reads current task state.
|
|
44884
44882
|
|
|
44885
44883
|
**Parameters:**
|
|
44886
|
-
- \`
|
|
44887
|
-
- \`sessionToken\` (string) - Session token from
|
|
44884
|
+
- \`taskId\` (string) - Task ID
|
|
44885
|
+
- \`sessionToken\` (string) - Session token from createTask
|
|
44888
44886
|
- \`options.includeAnnotations\` (boolean) - Include reviewer comments
|
|
44889
44887
|
|
|
44890
44888
|
**Returns:** \`{ content, status, title, deliverables }\`
|
|
@@ -44894,9 +44892,9 @@ Reads current plan state.
|
|
|
44894
44892
|
Uploads proof-of-work artifact.
|
|
44895
44893
|
|
|
44896
44894
|
**Parameters:**
|
|
44897
|
-
- \`
|
|
44895
|
+
- \`taskId\` (string) - Task ID
|
|
44898
44896
|
- \`sessionToken\` (string) - Session token
|
|
44899
|
-
- \`type\` ('
|
|
44897
|
+
- \`type\` ('html' | 'image' | 'video')
|
|
44900
44898
|
- \`filename\` (string) - File name
|
|
44901
44899
|
- \`source\` ('file' | 'url' | 'base64')
|
|
44902
44900
|
- \`filePath\` (string) - Local file path (when source='file')
|
|
@@ -44968,7 +44966,7 @@ return { config: config.response };
|
|
|
44968
44966
|
var HANDLING_FEEDBACK = `## Handling Reviewer Feedback
|
|
44969
44967
|
|
|
44970
44968
|
\`\`\`typescript
|
|
44971
|
-
const status = await
|
|
44969
|
+
const status = await readTask(taskId, sessionToken, {
|
|
44972
44970
|
includeAnnotations: true
|
|
44973
44971
|
});
|
|
44974
44972
|
|
|
@@ -44979,7 +44977,7 @@ if (status.status === "changes_requested") {
|
|
|
44979
44977
|
/**
|
|
44980
44978
|
* Make changes based on feedback
|
|
44981
44979
|
* Upload new artifacts
|
|
44982
|
-
*
|
|
44980
|
+
* Task will transition back to pending_review
|
|
44983
44981
|
*/
|
|
44984
44982
|
}
|
|
44985
44983
|
\`\`\``;
|
|
@@ -1,6 +1,84 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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,
|