@schoolai/shipyard-mcp 0.2.2-next.482 → 0.2.2

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.
@@ -4742,7 +4742,7 @@ var BUNDLED_DOCS = `Execute TypeScript code that calls Shipyard APIs. Use this f
4742
4742
 
4743
4743
  ## Available APIs
4744
4744
 
4745
- ### createPlan(opts): Promise<{ planId, sessionToken, url, deliverables, monitoringScript }>
4745
+ ### createPlan(opts): Promise<{ planId, sessionToken, url, deliverables }>
4746
4746
  Create a new plan and open it in browser.
4747
4747
 
4748
4748
  Parameters:
@@ -4756,7 +4756,6 @@ Returns:
4756
4756
  - sessionToken: Required for subsequent API calls
4757
4757
  - url: Browser URL for the plan
4758
4758
  - deliverables: Array of { id, text } for linking artifacts
4759
- - monitoringScript: Bash script to poll for approval (for non-hook agents)
4760
4759
 
4761
4760
  Example:
4762
4761
  \`\`\`typescript
@@ -4764,10 +4763,7 @@ const plan = await createPlan({
4764
4763
  title: "Add auth",
4765
4764
  content: "- [ ] Screenshot of login {#deliverable}"
4766
4765
  });
4767
- // Returns: { planId: "abc", sessionToken: "xyz", url: "...", deliverables: [...], monitoringScript: "#!/bin/bash..." }
4768
-
4769
- // For non-hook agents: Run the monitoring script in background to wait for approval
4770
- // bash <(echo "$monitoringScript") &
4766
+ // Returns: { planId: "abc", sessionToken: "xyz", url: "...", deliverables: [{ id: "del_xxx", text: "Screenshot of login" }] }
4771
4767
  \`\`\`
4772
4768
 
4773
4769
  ---
@@ -4805,7 +4801,7 @@ data.deliverables.forEach(d => console.log(d.id, d.completed));
4805
4801
 
4806
4802
  ---
4807
4803
 
4808
- ### updatePlan(planId, sessionToken, updates): Promise<{ success, monitoringScript }>
4804
+ ### updatePlan(planId, sessionToken, updates): Promise<void>
4809
4805
  Update plan metadata.
4810
4806
 
4811
4807
  Parameters:
@@ -4814,10 +4810,6 @@ Parameters:
4814
4810
  - updates.title (string, optional): New title
4815
4811
  - updates.status (string, optional): 'draft' | 'pending_review' | 'changes_requested' | 'in_progress'
4816
4812
 
4817
- Returns:
4818
- - success: Boolean indicating update succeeded
4819
- - monitoringScript: Bash script to poll for approval (for non-hook agents)
4820
-
4821
4813
  Note: Most status transitions are automatic. Rarely needed.
4822
4814
 
4823
4815
  ---
@@ -4908,6 +4900,46 @@ Parameters:
4908
4900
 
4909
4901
  ---
4910
4902
 
4903
+ ### setupReviewNotification(planId, pollIntervalSeconds?): Promise<{ script }>
4904
+ Get a bash script to poll for plan approval status changes.
4905
+
4906
+ Parameters:
4907
+ - planId (string): Plan ID to monitor
4908
+ - pollIntervalSeconds (number, optional): Polling interval (default: 30)
4909
+
4910
+ Returns:
4911
+ - script: Bash script that polls registry server and exits when status becomes 'in_progress' (approved) or 'changes_requested' (needs work)
4912
+
4913
+ **IMPORTANT:** This is ONLY for agents WITHOUT hook support (Cursor, Devin, Windsurf, etc).
4914
+ Claude Code users have automatic blocking via the shipyard hook - you don't need this.
4915
+
4916
+ **Complete workflow for non-hook agents (example user code):**
4917
+ \`\`\`typescript
4918
+ // 1. Create plan and get the monitoring script in ONE code block
4919
+ const plan = await createPlan({
4920
+ title: "My Feature Implementation",
4921
+ content: "- [ ] Screenshot of working feature {#deliverable}"
4922
+ });
4923
+
4924
+ // 2. Get the polling script (returns bash script as string)
4925
+ const { script } = await setupReviewNotification(plan.planId, 15);
4926
+
4927
+ // 3. Return both so the agent can run the script
4928
+ return {
4929
+ planId: plan.planId,
4930
+ sessionToken: plan.sessionToken,
4931
+ monitoringScript: script,
4932
+ instructions: "Run the monitoring script in background: bash <script> &"
4933
+ };
4934
+ \`\`\`
4935
+
4936
+ The agent then runs the returned bash script in the background. The script will:
4937
+ - Poll the registry server every N seconds
4938
+ - Print status changes to stdout
4939
+ - Exit with code 0 when the plan is approved/rejected
4940
+
4941
+ ---
4942
+
4911
4943
  ### requestUserInput(opts): Promise<{ success, response?, status, reason? }>
4912
4944
  Request input from the user via browser modal.
4913
4945
 
@@ -5043,9 +5075,7 @@ const plan = await createPlan({
5043
5075
  content: "- [ ] Screenshot {#deliverable}\\n- [ ] Video {#deliverable}"
5044
5076
  });
5045
5077
 
5046
- // plan includes: planId, sessionToken, url, deliverables, monitoringScript
5047
- // For non-hook agents: Run monitoringScript in background to wait for approval
5048
- // The script polls and exits when human approves/rejects
5078
+ // plan.deliverables = [{ id: "del_xxx", text: "Screenshot" }, { id: "del_yyy", text: "Video" }]
5049
5079
 
5050
5080
  // Do work, take screenshots...
5051
5081
 
@@ -5085,13 +5115,11 @@ async function createPlan(opts) {
5085
5115
  const allDeliverables = getDeliverables(ydoc);
5086
5116
  deliverables = allDeliverables.map((d) => ({ id: d.id, text: d.text }));
5087
5117
  }
5088
- const { script: monitoringScript } = await setupReviewNotification(planId, 30);
5089
5118
  return {
5090
5119
  planId,
5091
5120
  sessionToken: text.match(/Session Token: (\S+)/)?.[1] || "",
5092
5121
  url: text.match(/URL: (\S+)/)?.[1] || "",
5093
- deliverables,
5094
- monitoringScript
5122
+ deliverables
5095
5123
  };
5096
5124
  }
5097
5125
  async function readPlan(planId, sessionToken, opts) {
@@ -5121,11 +5149,6 @@ async function readPlan(planId, sessionToken, opts) {
5121
5149
  }
5122
5150
  async function updatePlan(planId, sessionToken, updates) {
5123
5151
  await updatePlanTool.handler({ planId, sessionToken, ...updates });
5124
- const { script: monitoringScript } = await setupReviewNotification(planId, 30);
5125
- return {
5126
- success: true,
5127
- monitoringScript
5128
- };
5129
5152
  }
5130
5153
  async function addArtifact2(opts) {
5131
5154
  const result = await addArtifactTool.handler(opts);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schoolai/shipyard-mcp",
3
- "version": "0.2.2-next.482",
3
+ "version": "0.2.2",
4
4
  "description": "Shipyard MCP server and CLI tools for distributed planning with CRDTs",
5
5
  "type": "module",
6
6
  "bin": {