@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 +6 -6
- package/apps/hook/dist/index.cjs +59 -59
- 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 +365 -630
- 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,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
|
-
|
|
44504
|
+
CREATE_TASK: "create_task",
|
|
44507
44505
|
EXECUTE_CODE: "execute_code",
|
|
44508
44506
|
LINK_PR: "link_pr",
|
|
44509
|
-
|
|
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
|
-
|
|
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
|
|
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 "
|
|
44523
|
+
- ANY user request involving "task", "track", "verify", or "prove"
|
|
44525
44524
|
|
|
44526
44525
|
**DO NOT:**
|
|
44527
|
-
- Create
|
|
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
|
-
| \`
|
|
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
|
-
|
|
44571
|
-
|
|
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. **
|
|
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
|
|
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
|
|
44616
|
-
- **History:** All exchanges are logged in the
|
|
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
|
-
**
|
|
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
|
|
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
|
|
44703
|
-
var
|
|
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
|
|
44705
|
+
You have the **full Shipyard experience** with automatic hooks. Use native task mode:
|
|
44706
44706
|
|
|
44707
44707
|
### Workflow
|
|
44708
44708
|
|
|
44709
|
-
1. **Enter
|
|
44710
|
-
2. **Write your
|
|
44711
|
-
3. **Exit
|
|
44712
|
-
4. **On approval** \u2192 You automatically receive:
|
|
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 (
|
|
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
|
-
*
|
|
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
|
-
|
|
44733
|
+
taskId,
|
|
44734
44734
|
sessionToken,
|
|
44735
|
-
type: '
|
|
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 \`
|
|
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
|
|
44750
|
-
- **DO use \`requestUserInput()\`** inside \`${TOOL_NAMES2.EXECUTE_CODE}\` instead of \`AskUserQuestion\` - The human is in the browser viewing your
|
|
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
|
-
|
|
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.**
|
|
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
|
|
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
|
|
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 (
|
|
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
|
|
44792
|
+
### Step 1: Create Task
|
|
44793
44793
|
|
|
44794
44794
|
\`\`\`typescript
|
|
44795
|
-
const
|
|
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 {
|
|
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
|
|
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
|
-
|
|
44843
|
+
taskId,
|
|
44844
44844
|
sessionToken,
|
|
44845
|
-
type: '
|
|
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
|
-
|
|
44853
|
+
taskId,
|
|
44854
44854
|
sessionToken,
|
|
44855
|
-
type: '
|
|
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
|
-
###
|
|
44869
|
+
### createTask(options)
|
|
44870
44870
|
|
|
44871
|
-
Creates a new
|
|
44871
|
+
Creates a new task and opens it in the browser.
|
|
44872
44872
|
|
|
44873
44873
|
**Parameters:**
|
|
44874
|
-
- \`title\` (string) -
|
|
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:** \`{
|
|
44879
|
+
**Returns:** \`{ taskId, sessionToken, url, deliverables, monitoringScript }\`
|
|
44880
44880
|
|
|
44881
|
-
###
|
|
44881
|
+
### readTask(taskId, sessionToken, options?)
|
|
44882
44882
|
|
|
44883
|
-
Reads current
|
|
44883
|
+
Reads current task state.
|
|
44884
44884
|
|
|
44885
44885
|
**Parameters:**
|
|
44886
|
-
- \`
|
|
44887
|
-
- \`sessionToken\` (string) - Session token from
|
|
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
|
-
- \`
|
|
44897
|
+
- \`taskId\` (string) - Task ID
|
|
44898
44898
|
- \`sessionToken\` (string) - Session token
|
|
44899
|
-
- \`type\` ('
|
|
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
|
|
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
|
-
*
|
|
44982
|
+
* Task will transition back to pending_review
|
|
44983
44983
|
*/
|
|
44984
44984
|
}
|
|
44985
44985
|
\`\`\``;
|
|
@@ -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,
|