@schoolai/shipyard-mcp 0.2.2-next.487 → 0.2.2-next.489
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/apps/hook/dist/index.js +3 -4
- package/apps/server/dist/{chunk-B4TQH7Q3.js → chunk-7ISZ4RKB.js} +1 -1
- package/apps/server/dist/{chunk-UFE5KX7E.js → chunk-CYHEHTLS.js} +3 -4
- package/apps/server/dist/{dist-E4CPV3SO.js → dist-HCVQNHBC.js} +1 -1
- package/apps/server/dist/index.js +33 -8
- package/apps/server/dist/{input-request-manager-IMVZDMUQ.js → input-request-manager-YOBSG7RN.js} +2 -2
- package/package.json +1 -1
package/apps/hook/dist/index.js
CHANGED
|
@@ -42603,10 +42603,9 @@ var PlanMetadataSchema = external_exports.discriminatedUnion("status", [
|
|
|
42603
42603
|
var BaseArtifactSchema = external_exports.object({
|
|
42604
42604
|
id: external_exports.string(),
|
|
42605
42605
|
type: external_exports.enum([
|
|
42606
|
-
"
|
|
42607
|
-
"
|
|
42608
|
-
"
|
|
42609
|
-
"diff"
|
|
42606
|
+
"html",
|
|
42607
|
+
"image",
|
|
42608
|
+
"video"
|
|
42610
42609
|
]),
|
|
42611
42610
|
filename: external_exports.string(),
|
|
42612
42611
|
description: external_exports.string().optional(),
|
|
@@ -760,10 +760,9 @@ var PlanMetadataSchema = z.discriminatedUnion("status", [
|
|
|
760
760
|
var BaseArtifactSchema = z.object({
|
|
761
761
|
id: z.string(),
|
|
762
762
|
type: z.enum([
|
|
763
|
-
"
|
|
764
|
-
"
|
|
765
|
-
"
|
|
766
|
-
"diff"
|
|
763
|
+
"html",
|
|
764
|
+
"image",
|
|
765
|
+
"video"
|
|
767
766
|
]),
|
|
768
767
|
filename: z.string(),
|
|
769
768
|
description: z.string().optional(),
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from "./chunk-EBNL5ZX7.js";
|
|
21
21
|
import {
|
|
22
22
|
InputRequestManager
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-7ISZ4RKB.js";
|
|
24
24
|
import {
|
|
25
25
|
ArtifactSchema,
|
|
26
26
|
DeliverableSchema,
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
setPlanMetadata,
|
|
73
73
|
touchPlanIndexEntry,
|
|
74
74
|
transitionPlanStatus
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-CYHEHTLS.js";
|
|
76
76
|
import {
|
|
77
77
|
loadEnv,
|
|
78
78
|
logger
|
|
@@ -2548,7 +2548,7 @@ var TOOL_NAMES = {
|
|
|
2548
2548
|
var AddArtifactInputBase = z3.object({
|
|
2549
2549
|
planId: z3.string().describe("The plan ID to add artifact to"),
|
|
2550
2550
|
sessionToken: z3.string().describe("Session token from create_plan"),
|
|
2551
|
-
type: z3.enum(["
|
|
2551
|
+
type: z3.enum(["html", "image", "video"]).describe("Artifact type"),
|
|
2552
2552
|
filename: z3.string().describe("Filename for the artifact"),
|
|
2553
2553
|
description: z3.string().optional().describe("What this artifact proves (deliverable name)"),
|
|
2554
2554
|
deliverableId: z3.string().optional().describe("ID of the deliverable this artifact fulfills")
|
|
@@ -2567,6 +2567,30 @@ var AddArtifactInput = z3.discriminatedUnion("source", [
|
|
|
2567
2567
|
content: z3.string().describe("Base64 encoded file content")
|
|
2568
2568
|
})
|
|
2569
2569
|
]);
|
|
2570
|
+
function validateArtifactType(type, filename) {
|
|
2571
|
+
const ext = filename.split(".").pop()?.toLowerCase();
|
|
2572
|
+
const validExtensions = {
|
|
2573
|
+
html: ["html", "htm"],
|
|
2574
|
+
image: ["png", "jpg", "jpeg", "gif", "webp", "svg"],
|
|
2575
|
+
video: ["mp4", "webm", "mov", "avi"]
|
|
2576
|
+
};
|
|
2577
|
+
const valid = validExtensions[type];
|
|
2578
|
+
if (!valid || !ext || !valid.includes(ext)) {
|
|
2579
|
+
const suggestions = {
|
|
2580
|
+
html: "HTML is the primary format for test results, terminal output, code reviews, and structured data. Use self-contained HTML with inline CSS and base64 images.",
|
|
2581
|
+
image: 'Images are for actual UI screenshots only. For terminal output or test results, use type: "html" instead.',
|
|
2582
|
+
video: 'Videos are for browser automation flows and complex interactions. For static content, use type: "image" or "html".'
|
|
2583
|
+
};
|
|
2584
|
+
throw new Error(
|
|
2585
|
+
`Invalid file extension for artifact type '${type}'.
|
|
2586
|
+
|
|
2587
|
+
Expected: ${valid?.join(", ") || "unknown"}
|
|
2588
|
+
Got: ${ext || "no extension"}
|
|
2589
|
+
|
|
2590
|
+
Tip: ${suggestions[type]}`
|
|
2591
|
+
);
|
|
2592
|
+
}
|
|
2593
|
+
}
|
|
2570
2594
|
var addArtifactTool = {
|
|
2571
2595
|
definition: {
|
|
2572
2596
|
name: TOOL_NAMES.ADD_ARTIFACT,
|
|
@@ -2610,7 +2634,7 @@ ARTIFACT TYPES:
|
|
|
2610
2634
|
sessionToken: { type: "string", description: "Session token from create_plan" },
|
|
2611
2635
|
type: {
|
|
2612
2636
|
type: "string",
|
|
2613
|
-
enum: ["
|
|
2637
|
+
enum: ["html", "image", "video"],
|
|
2614
2638
|
description: "Artifact type for rendering"
|
|
2615
2639
|
},
|
|
2616
2640
|
filename: {
|
|
@@ -2650,6 +2674,7 @@ ARTIFACT TYPES:
|
|
|
2650
2674
|
handler: async (args) => {
|
|
2651
2675
|
const input = AddArtifactInput.parse(args);
|
|
2652
2676
|
const { planId, sessionToken, type, filename } = input;
|
|
2677
|
+
validateArtifactType(type, filename);
|
|
2653
2678
|
const actorName = await getGitHubUsername();
|
|
2654
2679
|
logger.info({ planId, type, filename }, "Adding artifact");
|
|
2655
2680
|
let content;
|
|
@@ -4963,7 +4988,7 @@ Upload proof-of-work artifact.
|
|
|
4963
4988
|
Parameters:
|
|
4964
4989
|
- planId (string): The plan ID
|
|
4965
4990
|
- sessionToken (string): Session token
|
|
4966
|
-
- type (string): '
|
|
4991
|
+
- type (string): 'html' | 'image' | 'video'
|
|
4967
4992
|
- filename (string): e.g., "screenshot.png"
|
|
4968
4993
|
- source (string): Content source type - 'file' | 'url' | 'base64'
|
|
4969
4994
|
- filePath (string): Local file path (required when source='file') - RECOMMENDED
|
|
@@ -5383,7 +5408,7 @@ async function setupReviewNotification(planId, pollIntervalSeconds) {
|
|
|
5383
5408
|
return { script, fullResponse: text };
|
|
5384
5409
|
}
|
|
5385
5410
|
async function requestUserInput(opts) {
|
|
5386
|
-
const { InputRequestManager: InputRequestManager2 } = await import("./input-request-manager-
|
|
5411
|
+
const { InputRequestManager: InputRequestManager2 } = await import("./input-request-manager-YOBSG7RN.js");
|
|
5387
5412
|
const ydoc = await getOrCreateDoc3(PLAN_INDEX_DOC_NAME);
|
|
5388
5413
|
const manager = new InputRequestManager2();
|
|
5389
5414
|
const params = opts.type === "choice" ? {
|
|
@@ -5427,7 +5452,7 @@ async function requestUserInput(opts) {
|
|
|
5427
5452
|
};
|
|
5428
5453
|
}
|
|
5429
5454
|
async function postActivityUpdate(opts) {
|
|
5430
|
-
const { logPlanEvent: logPlanEvent2 } = await import("./dist-
|
|
5455
|
+
const { logPlanEvent: logPlanEvent2 } = await import("./dist-HCVQNHBC.js");
|
|
5431
5456
|
const { getGitHubUsername: getGitHubUsername2 } = await import("./server-identity-LSZ4CZRK.js");
|
|
5432
5457
|
const { nanoid: nanoid8 } = await import("nanoid");
|
|
5433
5458
|
const doc = await getOrCreateDoc3(opts.planId);
|
|
@@ -5450,7 +5475,7 @@ async function postActivityUpdate(opts) {
|
|
|
5450
5475
|
return { success: true, eventId, requestId };
|
|
5451
5476
|
}
|
|
5452
5477
|
async function resolveActivityRequest(opts) {
|
|
5453
|
-
const { logPlanEvent: logPlanEvent2, getPlanEvents } = await import("./dist-
|
|
5478
|
+
const { logPlanEvent: logPlanEvent2, getPlanEvents } = await import("./dist-HCVQNHBC.js");
|
|
5454
5479
|
const { getGitHubUsername: getGitHubUsername2 } = await import("./server-identity-LSZ4CZRK.js");
|
|
5455
5480
|
const doc = await getOrCreateDoc3(opts.planId);
|
|
5456
5481
|
const actorName = await getGitHubUsername2();
|