@thedeck/mcp 0.1.4 → 0.1.5
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 +16 -6
- package/package.json +38 -38
package/dist/index.js
CHANGED
|
@@ -1081,7 +1081,7 @@ var POSTING_STEPS = [
|
|
|
1081
1081
|
"4. Ask for the end date: the last day builders can enter, 5 to 60 days from today. Confirm the person’s time zone with them; never assume it. Entries close at 23:59 on that date in their time zone. Then save the draft with deck.post_draft, with the confirmed scenarios.",
|
|
1082
1082
|
"5. Ask for real example data. If they attach a file in this chat, make the blanked copy yourself: replace names, numbers and anything sensitive, show them the exact blanked copy, and send it with deck.add_example_copy only after they say yes. An example’s input can be several files, like a PDF and a CSV: send each with the same pair, never zipped together. On their own computer, blank names, numbers and anything sensitive in a copy on their computer before anything is sent. The confirmed scenarios are the basis for the examples and tests. Suggest which one or two examples builders should see; the person decides, and the rest stay hidden for judging. Then propose tests with deck.propose_tests. Propose a test plan, not copies of the examples: at least one test for every confirmed scenario, plus edge cases you write yourself (empty input, malformed input with outcome fails_cleanly, large input, boundary values), each with its category. Pick how each test is compared and raise its time limit only for large inputs. For a large input or a hidden test file, send it once with deck.add_example_copy (hidden from builders unless they choose to show it) and name it in the test by its pair and role instead of writing it out. Show them the plan in plain words: what each test checks, which ones builders see, and the pass mark. Send it with person_approved true only after they say yes.",
|
|
1083
1083
|
"6. Ask what reward they will pay for the accepted submission, then who can see the task: anyone on The Deck, or only builders they invite. Save both on the draft with deck.post_draft.",
|
|
1084
|
-
"7. When deck.post_draft says nothing is missing, give the person its pay link. They open it and pay the held deposit, 30% of the reward, on Stripe themselves, which posts the task; the rest is charged only when they accept a submission. Tell them the exact amounts deck.post_draft gives. While something is still missing, the same link opens the review page, which shows what."
|
|
1084
|
+
"7. When deck.post_draft says nothing is missing, give the person only its pay link, no other link. They open it and pay the held deposit, 30% of the reward, on Stripe themselves, which posts the task; the rest is charged only when they accept a submission. Tell them the exact amounts deck.post_draft gives. While something is still missing, the same link opens the review page, which shows what."
|
|
1085
1085
|
].join("\n");
|
|
1086
1086
|
var NEVER = "You can never save a card, post a task live, accept an entry, pitch in or pay anyone: the person pays the deposit themselves on Stripe, through the pay link, and accepts entries on The Deck.";
|
|
1087
1087
|
var REPORTS = "During the beta, when the person is noticeably struggling or inconvenienced at any step, posting or building, write a short report of what went wrong, show them the exact text and send it with deck.report_issue only if they say yes. Do the same whenever they say \"report this\". Offer a report with kind workflow_change, the same way, when the person changes how they go through the steps: answers in a different order, skips or merges steps, does a step on the website instead of in the chat, writes the post themselves, or turns down a suggested approach and does it their own way; it shows how people prefer to work with an agent. Ask whether to send it in one short question, at most once per problem or change. Never put example data, file contents, secrets or other people’s details in a report.";
|
|
@@ -1237,7 +1237,7 @@ var NEXT = {
|
|
|
1237
1237
|
looking_for: ASK_ABOUT_IT,
|
|
1238
1238
|
rules: ASK_ABOUT_IT,
|
|
1239
1239
|
handover: ASK_ABOUT_IT,
|
|
1240
|
-
examples: "
|
|
1240
|
+
examples: "First make sure the person said yes to these scenarios as you described them back, and answered the details; if not, describe them back now and save again with their changes. Then ask the person for one real example file, blank it and send it with deck.add_example_copy.",
|
|
1241
1241
|
tests: "Propose a test plan with deck.propose_tests: show it to the person in plain words and ask whether it is right.",
|
|
1242
1242
|
reward: "Ask the person what reward they will pay for the accepted submission.",
|
|
1243
1243
|
deadline: "Ask the person for an end date 5 to 60 days from their today.",
|
|
@@ -1247,16 +1247,26 @@ function payNote(out) {
|
|
|
1247
1247
|
const rest = out.reward_cents - out.deposit_cents;
|
|
1248
1248
|
return `The pay link charges ${formatMoney(out.deposit_cents)} now, the held deposit, 30% of the ${formatMoney(out.reward_cents)} reward; the other ${formatMoney(rest)} is charged only when they accept a submission, and the deposit comes back in full if no entry passes. Say these exact amounts.`;
|
|
1249
1249
|
}
|
|
1250
|
+
function deadlineNote(args) {
|
|
1251
|
+
if (!args) return [];
|
|
1252
|
+
return [`Entries close at 23:59 on ${args.ends_on} in ${args.time_zone}. If the person did not name this time zone themselves, say the date and zone back and ask them to confirm before going on; save again if they change it.`];
|
|
1253
|
+
}
|
|
1250
1254
|
var postDraft = {
|
|
1251
1255
|
name: "deck.post_draft",
|
|
1252
1256
|
title: "Draft a task",
|
|
1253
|
-
description: `For posters. Saves a task brief on The Deck as a draft, or updates the draft named by quest_id. The deadline, the reward and who can see it are the person’s: send only the end date, time zone, reward and visibility they gave you, never ones you chose, and leave the reward and visibility out until they have said them. When nothing is missing, give the person pay_url: they pay the held deposit, 30% of the reward, on Stripe themselves, which posts the task; the rest is charged when they accept a submission. An agent never posts a task live and never spends money. ${ONE_QUESTION}`,
|
|
1257
|
+
description: `For posters. Saves a task brief on The Deck as a draft, or updates the draft named by quest_id. Save it only after the person said yes to the scenarios you described back to them and gave the end date and time zone. The deadline, the reward and who can see it are the person’s: send only the end date, time zone, reward and visibility they gave you, never ones you chose, and leave the reward and visibility out until they have said them. The time zone must be one the person stated or confirmed; never assume it from where they seem to be: ask which zone they are in, or name the one you think and wait for their yes. When nothing is missing, give the person pay_url and no other link: they pay the held deposit, 30% of the reward, on Stripe themselves, which posts the task; the rest is charged when they accept a submission. An agent never posts a task live and never spends money. ${ONE_QUESTION}`,
|
|
1254
1258
|
run: (backend, args) => backend.postDraft(args),
|
|
1255
|
-
summary: (out) => {
|
|
1256
|
-
if (out.missing.length === 0) return
|
|
1259
|
+
summary: (out, args) => {
|
|
1260
|
+
if (out.missing.length === 0) return [
|
|
1261
|
+
`Draft saved as quest ${out.quest_id}. Nothing is missing.`,
|
|
1262
|
+
...deadlineNote(args),
|
|
1263
|
+
payNote(out),
|
|
1264
|
+
`Give the person only this link, not the review link, to pay the held deposit on Stripe themselves, which posts the task: ${out.pay_url}`
|
|
1265
|
+
].join(" ");
|
|
1257
1266
|
const [next] = out.missing;
|
|
1258
1267
|
return [
|
|
1259
1268
|
`Draft saved as quest ${out.quest_id}. The poster checks it at ${out.review_url}; paying and posting stay theirs.`,
|
|
1269
|
+
...deadlineNote(args),
|
|
1260
1270
|
...next ? [`Next: ${next.label}. ${NEXT[next.part]}`] : [],
|
|
1261
1271
|
ONE_QUESTION
|
|
1262
1272
|
].join(" ");
|
|
@@ -1323,7 +1333,7 @@ async function callTool(tool, backend, args) {
|
|
|
1323
1333
|
return {
|
|
1324
1334
|
content: [{
|
|
1325
1335
|
type: "text",
|
|
1326
|
-
text: tool.summary(out)
|
|
1336
|
+
text: tool.summary(out, args)
|
|
1327
1337
|
}],
|
|
1328
1338
|
structuredContent: out
|
|
1329
1339
|
};
|
package/package.json
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@thedeck/mcp",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"bin": {
|
|
6
|
-
"mcp": "dist/index.js",
|
|
7
|
-
"thedeck-mcp": "dist/index.js",
|
|
8
|
-
"thedeck": "dist/cli.js"
|
|
9
|
-
},
|
|
10
|
-
"exports": {
|
|
11
|
-
".": "./src/server.ts",
|
|
12
|
-
"./backend": "./src/backend.ts"
|
|
13
|
-
},
|
|
14
|
-
"files": [
|
|
15
|
-
"dist"
|
|
16
|
-
],
|
|
17
|
-
"scripts": {
|
|
18
|
-
"build": "vite build --ssr src/index.ts --outDir dist && vite build --ssr src/cli.ts --outDir dist --emptyOutDir false",
|
|
19
|
-
"typecheck": "tsc --noEmit",
|
|
20
|
-
"lint": "eslint .",
|
|
21
|
-
"test": "vitest run"
|
|
22
|
-
},
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"@modelcontextprotocol/sdk": "1.32.1",
|
|
25
|
-
"zod": "4.6.7"
|
|
26
|
-
},
|
|
27
|
-
"devDependencies": {
|
|
28
|
-
"@modelcontextprotocol/ext-apps": "1.7.5",
|
|
29
|
-
"@thedeck/runner": "workspace:*",
|
|
30
|
-
"@thedeck/shared": "workspace:*",
|
|
31
|
-
"@types/node": "26.6.5",
|
|
32
|
-
"@vitest/coverage-v8": "5.0.5",
|
|
33
|
-
"happy-dom": "21.0.4",
|
|
34
|
-
"typescript": "6.0.3",
|
|
35
|
-
"vite": "8.3.5",
|
|
36
|
-
"vitest": "5.0.5"
|
|
37
|
-
}
|
|
38
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@thedeck/mcp",
|
|
3
|
+
"version": "0.1.5",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"bin": {
|
|
6
|
+
"mcp": "dist/index.js",
|
|
7
|
+
"thedeck-mcp": "dist/index.js",
|
|
8
|
+
"thedeck": "dist/cli.js"
|
|
9
|
+
},
|
|
10
|
+
"exports": {
|
|
11
|
+
".": "./src/server.ts",
|
|
12
|
+
"./backend": "./src/backend.ts"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "vite build --ssr src/index.ts --outDir dist && vite build --ssr src/cli.ts --outDir dist --emptyOutDir false",
|
|
19
|
+
"typecheck": "tsc --noEmit",
|
|
20
|
+
"lint": "eslint .",
|
|
21
|
+
"test": "vitest run"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@modelcontextprotocol/sdk": "1.32.1",
|
|
25
|
+
"zod": "4.6.7"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@modelcontextprotocol/ext-apps": "1.7.5",
|
|
29
|
+
"@thedeck/runner": "workspace:*",
|
|
30
|
+
"@thedeck/shared": "workspace:*",
|
|
31
|
+
"@types/node": "26.6.5",
|
|
32
|
+
"@vitest/coverage-v8": "5.0.5",
|
|
33
|
+
"happy-dom": "21.0.4",
|
|
34
|
+
"typescript": "6.0.3",
|
|
35
|
+
"vite": "8.3.5",
|
|
36
|
+
"vitest": "5.0.5"
|
|
37
|
+
}
|
|
38
|
+
}
|