@shipvo/mcp 0.0.4 → 0.0.6
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/server.js +2 -2
- package/package.json +2 -1
package/dist/server.js
CHANGED
|
@@ -61,7 +61,7 @@ Finish a task by checking the final screen says what you expected (for example "
|
|
|
61
61
|
server.tool("open_app", "Open an app in a fresh phone-sized session and return its first screen.", {
|
|
62
62
|
app: z.string().describe("App id from list_apps, optionally with a release: 'tide' (local build), 'tide@latest' or 'tide@r13' (the published release phones run)"),
|
|
63
63
|
session: z.string().optional().describe("Session name (default: generated). One session is one phone."),
|
|
64
|
-
seed_cart: z.array(z.object({ id: z.string(), qty: z.number().int().positive() })).optional().describe("Start with these items already in the cart (test
|
|
64
|
+
seed_cart: z.array(z.object({ product_id: z.string().optional(), id: z.string().optional(), quantity: z.number().int().positive().optional(), qty: z.number().int().positive().optional() }).refine((l) => (l.product_id ?? l.id) && (l.quantity ?? l.qty), "each line needs product_id (or id) and quantity (or qty)")).optional().describe("Start with these items already in the cart (test shortcut). Each line: { product_id, quantity }; { id, qty } also works."),
|
|
65
65
|
dark: z.boolean().optional().describe("Dark mode"),
|
|
66
66
|
}, async ({ app, session, seed_cart, dark }) => {
|
|
67
67
|
const id = app.split("@")[0];
|
|
@@ -70,7 +70,7 @@ Finish a task by checking the final screen says what you expected (for example "
|
|
|
70
70
|
if (ctx.scope === "read")
|
|
71
71
|
throw new Error("this key is read-only: it cannot open sessions");
|
|
72
72
|
const sid = session ?? `${id}-${Date.now().toString(36)}`;
|
|
73
|
-
const r = await sim("/session", { session: sid, app, seed_cart, dark });
|
|
73
|
+
const r = await sim("/session", { session: sid, app, seed_cart: seed_cart?.map((l) => ({ ...l, product_id: l.product_id ?? l.id, quantity: l.quantity ?? l.qty })), dark });
|
|
74
74
|
sessions.set(sid, { app: id, steps: 0, startedAt: Date.now() });
|
|
75
75
|
return text(`session: ${sid}\napp: ${id} release: ${r.release ?? "local"}\n\n${r.screen ?? ""}`);
|
|
76
76
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipvo/mcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"description": "MCP server that lets AI agents open, see and operate Shipvo apps without a phone: a phone-sized simulator of the real app, plus the app's typed commands and owner API.",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"engines": {
|
|
44
44
|
"node": ">=20"
|
|
45
45
|
},
|
|
46
|
+
"mcpName": "io.github.shipvo/shipvo",
|
|
46
47
|
"scripts": {
|
|
47
48
|
"build": "tsc -p tsconfig.json"
|
|
48
49
|
}
|