@amirhosseinnateghi/vibed-mcp 0.1.7 → 0.1.9
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/dist/index.js +50 -21
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6009,6 +6009,25 @@ var CATEGORIES = [
|
|
|
6009
6009
|
"Art",
|
|
6010
6010
|
"Other"
|
|
6011
6011
|
];
|
|
6012
|
+
var TAGS = [
|
|
6013
|
+
"game",
|
|
6014
|
+
"puzzle",
|
|
6015
|
+
"quiz",
|
|
6016
|
+
"simulation",
|
|
6017
|
+
"music",
|
|
6018
|
+
"art",
|
|
6019
|
+
"animation",
|
|
6020
|
+
"story",
|
|
6021
|
+
"invitation",
|
|
6022
|
+
"love",
|
|
6023
|
+
"education",
|
|
6024
|
+
"science",
|
|
6025
|
+
"news",
|
|
6026
|
+
"tool",
|
|
6027
|
+
"productivity"
|
|
6028
|
+
];
|
|
6029
|
+
var MAX_TAGS = 5;
|
|
6030
|
+
var FEED_TAG_CHIPS = ["All", ...TAGS];
|
|
6012
6031
|
var VISIBILITY = ["public", "unlisted"];
|
|
6013
6032
|
var COVER_MODES = ["image", "gif"];
|
|
6014
6033
|
var EXPERIENCE_SOURCE = ["builder", "import", "remix"];
|
|
@@ -10285,15 +10304,22 @@ var categorySchema = external_exports.enum(CATEGORIES);
|
|
|
10285
10304
|
var visibilitySchema = external_exports.enum(VISIBILITY);
|
|
10286
10305
|
var coverModeSchema = external_exports.enum(COVER_MODES);
|
|
10287
10306
|
var sourceSchema = external_exports.enum(EXPERIENCE_SOURCE);
|
|
10288
|
-
var
|
|
10307
|
+
var KNOWN_TAGS = new Set(TAGS);
|
|
10308
|
+
var tagsSchema = external_exports.array(external_exports.string().max(40)).transform(
|
|
10289
10309
|
(tags) => Array.from(
|
|
10290
|
-
new Set(
|
|
10291
|
-
|
|
10310
|
+
new Set(
|
|
10311
|
+
tags.map((t) => t.replace(/^#/, "").trim().toLowerCase()).filter((t) => KNOWN_TAGS.has(t))
|
|
10312
|
+
)
|
|
10313
|
+
).slice(0, MAX_TAGS)
|
|
10292
10314
|
).default([]);
|
|
10293
10315
|
var publishSchema = external_exports.object({
|
|
10294
10316
|
title: external_exports.string().min(1).max(120),
|
|
10317
|
+
// Caption was removed from the publish UI; kept optional so old clients / the
|
|
10318
|
+
// CLI don't break and existing captions stay searchable.
|
|
10295
10319
|
caption: external_exports.string().max(2e3).default(""),
|
|
10296
|
-
|
|
10320
|
+
// Legacy: category is no longer chosen in the UI. The connector CLI may still
|
|
10321
|
+
// send it; publishExperience folds it into `tags` and leaves the column null.
|
|
10322
|
+
category: categorySchema.optional(),
|
|
10297
10323
|
tags: tagsSchema,
|
|
10298
10324
|
remixable: external_exports.boolean().default(true),
|
|
10299
10325
|
visibility: visibilitySchema.default("public"),
|
|
@@ -10406,7 +10432,8 @@ var aiConnectionSchema = external_exports.object({
|
|
|
10406
10432
|
});
|
|
10407
10433
|
var feedQuerySchema = external_exports.object({
|
|
10408
10434
|
tab: external_exports.enum(["explore", "following"]).default("explore"),
|
|
10409
|
-
category
|
|
10435
|
+
// Filter the explore feed to a single tag (replaces the old `category` param).
|
|
10436
|
+
tag: external_exports.string().optional(),
|
|
10410
10437
|
cursor: external_exports.string().optional(),
|
|
10411
10438
|
limit: external_exports.coerce.number().int().min(1).max(30).default(10)
|
|
10412
10439
|
});
|
|
@@ -11435,10 +11462,14 @@ function inferTitle(html, projectDir) {
|
|
|
11435
11462
|
const dir2 = basename(projectDir).replace(/[-_]+/g, " ").trim();
|
|
11436
11463
|
return (dir2 || "Untitled").slice(0, 120);
|
|
11437
11464
|
}
|
|
11438
|
-
function
|
|
11439
|
-
|
|
11440
|
-
const
|
|
11441
|
-
|
|
11465
|
+
function normalizeTags(tags, category) {
|
|
11466
|
+
const known = new Set(TAGS);
|
|
11467
|
+
const out = [];
|
|
11468
|
+
for (const t of [...tags ?? [], ...category ? [category] : []]) {
|
|
11469
|
+
const s = t.replace(/^#/, "").trim().toLowerCase();
|
|
11470
|
+
if (known.has(s) && !out.includes(s)) out.push(s);
|
|
11471
|
+
}
|
|
11472
|
+
return out.slice(0, MAX_TAGS);
|
|
11442
11473
|
}
|
|
11443
11474
|
async function importDraft(client, html) {
|
|
11444
11475
|
const r = await apiFetch(client, "POST", "/imports", { html });
|
|
@@ -11447,9 +11478,7 @@ async function importDraft(client, html) {
|
|
|
11447
11478
|
async function publishDraft(client, draftArtifactKey, meta, html, projectDir) {
|
|
11448
11479
|
const exp = await apiFetch(client, "POST", "/experiences", {
|
|
11449
11480
|
title: meta.title?.trim() || (html ? inferTitle(html, projectDir ?? ".") : "Untitled"),
|
|
11450
|
-
|
|
11451
|
-
category: normalizeCategory(meta.category),
|
|
11452
|
-
tags: meta.tags ?? [],
|
|
11481
|
+
tags: normalizeTags(meta.tags, meta.category),
|
|
11453
11482
|
remixable: meta.remixable ?? true,
|
|
11454
11483
|
visibility: meta.visibility ?? "public",
|
|
11455
11484
|
draftArtifactKey
|
|
@@ -11471,9 +11500,8 @@ async function deleteExperience(client, idOrUrl) {
|
|
|
11471
11500
|
}
|
|
11472
11501
|
|
|
11473
11502
|
// src/index.ts
|
|
11474
|
-
var SERVER_INFO = { name: "vibed", version: "0.1.
|
|
11503
|
+
var SERVER_INFO = { name: "vibed", version: "0.1.9" };
|
|
11475
11504
|
var PROTOCOL_VERSION = "2024-11-05";
|
|
11476
|
-
var CATEGORIES2 = ["Game", "Invitation", "Story", "News", "Quiz", "Tool", "Art", "Other"];
|
|
11477
11505
|
var pendingLogin = null;
|
|
11478
11506
|
var str = (v, d = "") => typeof v === "string" ? v : d;
|
|
11479
11507
|
var bool = (v, d) => typeof v === "boolean" ? v : d;
|
|
@@ -11554,7 +11582,7 @@ After the user approves, call vibed_login_wait.`;
|
|
|
11554
11582
|
},
|
|
11555
11583
|
{
|
|
11556
11584
|
name: "vibed_draft",
|
|
11557
|
-
description: "
|
|
11585
|
+
description: "THE DEFAULT for 'make it vibed' / 'publish to vibed': bundle the project and upload it as a PRIVATE draft, returning a hosted, sandboxed PREVIEW link (\u2026/p/<id>/) and a draftKey. Publishes NOTHING \u2014 the link is in no feed, profile, or search; only someone with it can open it. Give the user the preview link, then STOP and let them review \u2014 'make it vibed' means preview first, NOT publish. Only call vibed_publish after the user explicitly tells you to publish this draft. Requires sign-in. BEFORE drafting, make the single HTML file remix-friendly \u2014 a file-top comment, tunable constants (speed/difficulty/colors/text) grouped and labeled near the top, clear names, comments on the non-obvious WHY, readable not minified \u2014 because remix is core to vibed and its AI builder edits THIS file to fork it.",
|
|
11558
11586
|
inputSchema: {
|
|
11559
11587
|
type: "object",
|
|
11560
11588
|
properties: {
|
|
@@ -11585,7 +11613,7 @@ Show it to the user. To publish it, call vibed_publish with draftKey: ${d.draftA
|
|
|
11585
11613
|
},
|
|
11586
11614
|
{
|
|
11587
11615
|
name: "vibed_publish",
|
|
11588
|
-
description: "
|
|
11616
|
+
description: "Make a draft PUBLIC. Publishing is public and hard to undo \u2014 do NOT call this unless the user has EXPLICITLY told you to publish (e.g. 'publish it', 'post it', 'go ahead'). 'make it vibed' is NOT a publish instruction, and 'looks good' is not either \u2014 when unsure, ask and wait. Default flow: vibed_draft \u2192 user reviews the preview \u2192 user says publish \u2192 this. Pass draftKey (from vibed_draft) to promote the previewed draft (preferred); passing path bundles + publishes in one shot and SKIPS the preview \u2014 only do that if the user asked to skip it. Requires sign-in. Confirm the title and tags first. Returns the published URL.",
|
|
11589
11617
|
inputSchema: {
|
|
11590
11618
|
type: "object",
|
|
11591
11619
|
properties: {
|
|
@@ -11595,9 +11623,12 @@ Show it to the user. To publish it, call vibed_publish with draftKey: ${d.draftA
|
|
|
11595
11623
|
},
|
|
11596
11624
|
path: { type: "string", description: "Project directory (default: current directory)" },
|
|
11597
11625
|
title: { type: "string", description: "Title (default: page <title>/<h1>/folder name)" },
|
|
11598
|
-
|
|
11599
|
-
|
|
11600
|
-
|
|
11626
|
+
tags: {
|
|
11627
|
+
type: "array",
|
|
11628
|
+
items: { type: "string", enum: TAGS },
|
|
11629
|
+
maxItems: MAX_TAGS,
|
|
11630
|
+
description: `Up to ${MAX_TAGS} tags from: ${TAGS.join(", ")}`
|
|
11631
|
+
},
|
|
11601
11632
|
unlisted: { type: "boolean", description: "Publish unlisted instead of public" },
|
|
11602
11633
|
remixable: { type: "boolean", description: "Allow others to remix (default true)" },
|
|
11603
11634
|
entry: { type: "string" },
|
|
@@ -11611,9 +11642,7 @@ Show it to the user. To publish it, call vibed_publish with draftKey: ${d.draftA
|
|
|
11611
11642
|
const client = { apiBase: cfg.apiBase, token: cfg.token };
|
|
11612
11643
|
const meta = {
|
|
11613
11644
|
title: str(a.title) || void 0,
|
|
11614
|
-
category: str(a.category) || void 0,
|
|
11615
11645
|
tags: Array.isArray(a.tags) ? a.tags : void 0,
|
|
11616
|
-
caption: str(a.caption) || void 0,
|
|
11617
11646
|
remixable: bool(a.remixable, true),
|
|
11618
11647
|
visibility: bool(a.unlisted, false) ? "unlisted" : "public"
|
|
11619
11648
|
};
|
package/package.json
CHANGED