tru-mcp 0.17.0 → 0.17.1
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.
|
@@ -79,6 +79,10 @@ export const discoverApiTool = {
|
|
|
79
79
|
`The agent.md is hosted by tru — no local agent.md file needed. The llms.txt and Link header`,
|
|
80
80
|
`stay local in the app's codebase to enable discovery from the app's own domain.`,
|
|
81
81
|
];
|
|
82
|
+
if (result.pages_crawled === 0 && args.url && /^https?:\/\/(localhost|127\.0\.0\.1)(:|\/|$)/.test(args.url)) {
|
|
83
|
+
lines.push(``, `Your app is running locally — tru's crawler can't reach localhost from the server. ` +
|
|
84
|
+
`The agent.md content will be composed from your codebase instead, which is more accurate.`);
|
|
85
|
+
}
|
|
82
86
|
if (result.endpoints_found === 0) {
|
|
83
87
|
lines.push(``, `No API endpoints were auto-detected. To improve discovery:`, `- Add an /openapi.json or /swagger.json file to your app`, `- Add an /agent.md file with your API documentation`, `- Make sure your /docs or /api/docs pages are publicly accessible`);
|
|
84
88
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover_api.js","sourceRoot":"","sources":["../../src/tools/discover_api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACnH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EACT,uGAAuG;QACvG,iFAAiF;QACjF,sFAAsF;QACtF,kIAAkI;QAClI,uEAAuE;IACzE,WAAW,EAAE;QACX,YAAY,EAAE,CAAC;aACZ,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,sHAAsH,CAAC;QACnI,GAAG,EAAE,CAAC;aACH,M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-15,11 +15,16 @@ export const readSkillTool = {
|
|
|
15
15
|
const url = `${BASE_URL}/apps/${encodeURIComponent(args.service_name)}/SKILL.md`;
|
|
16
16
|
const res = await fetch(url);
|
|
17
17
|
if (res.status === 404) {
|
|
18
|
+
const body = await res.text();
|
|
19
|
+
const noSkillYet = body.includes('No skill generated') || body.includes('discovery first');
|
|
20
|
+
const message = noSkillYet
|
|
21
|
+
? `App "${args.service_name}" exists but has no skill generated yet. Use dev_generate_skill(service_name: "${args.service_name}") to create one.`
|
|
22
|
+
: `No app found with service_name "${args.service_name}". Use browse_apps to list available apps.`;
|
|
18
23
|
return {
|
|
19
24
|
content: [
|
|
20
25
|
{
|
|
21
26
|
type: "text",
|
|
22
|
-
text:
|
|
27
|
+
text: message,
|
|
23
28
|
},
|
|
24
29
|
],
|
|
25
30
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read_skill.js","sourceRoot":"","sources":["../../src/tools/read_skill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,gBAAgB,CAAC;AAE7D,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,IAAI,EAAE,cAAc;IACpB,WAAW,EACT,oDAAoD;QACpD,0EAA0E;QAC1E,oEAAoE;IACtE,WAAW,EAAE;QACX,YAAY,EAAE,CAAC;aACZ,MAAM,EAAE;aACR,QAAQ,CAAC,+CAA+C,CAAC;KAC7D;IACD,OAAO,EAAE,KAAK,EAAE,IAA8B,EAAE,EAAE;QAChD,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,GAAG,QAAQ,SAAS,kBAAkB,CAAC,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC;YACjF,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;YAE7B,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;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F,CAAC;YACJ,CAAC;YAED,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;gBACZ,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;gBAC9B,MAAM,IAAI,KAAK,CAAC,aAAa,GAAG,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC,CAAC;YACtD,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;YAElC,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;aACrD,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACjE,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,2BAA2B,OAAO,EAAE;qBAC3C;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC"}
|
|
@@ -6,7 +6,7 @@ import { BASE_URL, SIGNATURE_VERIFICATION_SETUP, PROVISION_ENDPOINT_CODE, TRU_AG
|
|
|
6
6
|
function section1_Register() {
|
|
7
7
|
return `## Phase 1: Register — "You exist on tru"
|
|
8
8
|
|
|
9
|
-
**Why this matters:**
|
|
9
|
+
**Why this matters:** Registration puts your app on the map. After this step, AI agents can find you, and you have an API key to start building. Your app name and logo are what customers see when they pay through tru.
|
|
10
10
|
|
|
11
11
|
**First, verify you're in the right directory.** Check for a \`package.json\`, source code, or other project files. If the current directory doesn't look like an app codebase, stop and tell the developer: "I need to be in your project directory to set up tru. Open Claude Code in your app's repo and ask me again." Do NOT proceed with setup in an empty or wrong directory.
|
|
12
12
|
|
|
@@ -19,13 +19,13 @@ function section1_Register() {
|
|
|
19
19
|
|
|
20
20
|
**Use AskUserQuestion** to confirm the proposed values. Include ALL discovered values directly in the question text so the developer can see them. Do NOT use markdown formatting (no ** or other markup) — use plain text only, since AskUserQuestion does not render markdown.
|
|
21
21
|
|
|
22
|
-
Collect TWO URLs:
|
|
23
|
-
- **
|
|
24
|
-
- **Production URL**: Where the app will be deployed (e.g. \`https://picforge.ai\`). Guess from: \`git config user.email\` domain (e.g. \`david@picforge.ai\` → \`https://picforge.ai\`), package.json homepage, deployment configs, CNAME files, or README links.
|
|
22
|
+
Collect TWO URLs — tru needs both because they serve different purposes:
|
|
23
|
+
- **Local URL**: Where the app is running right now (e.g. \`http://localhost:4000\`). tru hits this URL during setup to test your provision endpoint and validate the integration. Auto-detect from package.json start script port, server config, .env files, \`app.listen()\` calls, etc. Do NOT guess or default — if you can't find the port, ask the developer: "What port does your app run on locally?"
|
|
24
|
+
- **Production URL**: Where the app will be deployed (e.g. \`https://picforge.ai\`). tru uses this for agent discovery links — it's the URL that appears in your agent.md so AI agents know where to find your app in the real world. You can update it anytime in the tru dashboard. Guess from: \`git config user.email\` domain (e.g. \`david@picforge.ai\` → \`https://picforge.ai\`), package.json homepage, deployment configs, CNAME files, or README links.
|
|
25
25
|
|
|
26
26
|
**If you cannot guess the production URL**, ask separately BEFORE the confirmation screen:
|
|
27
27
|
|
|
28
|
-
question: "
|
|
28
|
+
question: "Where will your app be deployed?\\n\\ntru needs this for agent discovery — it's the public URL that appears in your agent.md so AI agents can find your app. You can update it anytime in the tru dashboard."
|
|
29
29
|
header: "Production URL"
|
|
30
30
|
options:
|
|
31
31
|
- label: "Type something"
|
|
@@ -107,12 +107,14 @@ If the app doesn't have a way to load \`.env\` files, add one (e.g. \`require('d
|
|
|
107
107
|
|
|
108
108
|
### Next
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
Your app exists on tru — agents can find you. Next: connect your Stripe account so you can get paid.
|
|
111
|
+
|
|
112
|
+
Call \`dev_setup_guide(section: 2)\` to continue.`;
|
|
111
113
|
}
|
|
112
114
|
function section2_Payments() {
|
|
113
115
|
return `## Phase 2: Payments — "You can get paid"
|
|
114
116
|
|
|
115
|
-
**Why this matters:**
|
|
117
|
+
**Why this matters:** This is how you get paid. tru routes payments directly to your Stripe account — your dashboard, your payouts, your Radar rules. Nothing about your existing Stripe setup changes.
|
|
116
118
|
|
|
117
119
|
**Choose Stripe mode**
|
|
118
120
|
|
|
@@ -171,12 +173,14 @@ Then continue to the next section.
|
|
|
171
173
|
|
|
172
174
|
### Next
|
|
173
175
|
|
|
174
|
-
|
|
176
|
+
Payments are wired up — charges flow directly to your Stripe account. Next: build the provision endpoint so users get instant access after purchase.
|
|
177
|
+
|
|
178
|
+
Call \`dev_setup_guide(section: 3)\` to continue.`;
|
|
175
179
|
}
|
|
176
180
|
function section3_Provisioning() {
|
|
177
181
|
return `## Phase 3: Provisioning — "Users get accounts automatically"
|
|
178
182
|
|
|
179
|
-
**Why this matters:**
|
|
183
|
+
**Why this matters:** This is how users go from "I just paid" to "I'm logged in" — instantly, with zero friction. When someone signs up through an AI agent, tru calls your provision endpoint with their verified identity and purchases. Your app creates the account and they're in.
|
|
180
184
|
|
|
181
185
|
Build the provision endpoint, then register it with tru so tru knows where to send provisioning requests:
|
|
182
186
|
|
|
@@ -244,12 +248,14 @@ If any of these fail, fix the issue before continuing. The agent discovery files
|
|
|
244
248
|
|
|
245
249
|
### Next
|
|
246
250
|
|
|
247
|
-
|
|
251
|
+
Users can now sign up and get access automatically through tru. Next: make your app discoverable to AI agents everywhere.
|
|
252
|
+
|
|
253
|
+
Call \`dev_setup_guide(section: 4)\` to set up agent discovery and go live.`;
|
|
248
254
|
}
|
|
249
255
|
function section4_GoLive() {
|
|
250
256
|
return `## Phase 4: Go Live — "Agents can discover, buy, and provision your services"
|
|
251
257
|
|
|
252
|
-
**Why this matters:** This is
|
|
258
|
+
**Why this matters:** This is the unlock. After this phase, any AI agent — Claude, GPT, or anything built on them — can discover your app, sign users up, and process payments on your behalf. Your app becomes accessible from every AI conversation, not just your own website.
|
|
253
259
|
|
|
254
260
|
**tru is the source of truth for agent.md.** Instead of writing a local file, you'll generate the content and push it to tru via API. tru hosts it at \`${BASE_URL}/apps/{service_name}/agent.md\` — always up to date, editable in the dashboard.
|
|
255
261
|
|
|
@@ -376,18 +382,15 @@ Run \`dev_validate(service_name)\` to verify the full integration — provisioni
|
|
|
376
382
|
|
|
377
383
|
Fix any issues. Re-run until all checks pass.
|
|
378
384
|
|
|
379
|
-
**
|
|
385
|
+
**Your app is live on tru.**
|
|
380
386
|
|
|
381
|
-
|
|
382
|
-
- Registered the app with tru (identity, API key)
|
|
383
|
-
- Connected Stripe for payments
|
|
384
|
-
- Configured products for agents to sell
|
|
385
|
-
- Built a provisioning endpoint for automatic user creation
|
|
386
|
-
- Validated provisioning works end-to-end
|
|
387
|
-
- Made the app discoverable to AI agents (agent.md, llms.txt, content negotiation)
|
|
388
|
-
- Validated the full integration
|
|
387
|
+
AI agents can now discover your app, sign users up, and process payments — all flowing directly to your Stripe account. Your next customer could come from any AI agent, anywhere.
|
|
389
388
|
|
|
390
|
-
|
|
389
|
+
Here's what you just built:
|
|
390
|
+
- Your app is registered and discoverable on the tru network
|
|
391
|
+
- Payments flow directly to your Stripe account
|
|
392
|
+
- Users get provisioned automatically after purchase
|
|
393
|
+
- AI agents can find you through agent.md, llms.txt, and your login page
|
|
391
394
|
|
|
392
395
|
Share these links with the developer:
|
|
393
396
|
- **Your tru dashboard:** [${BASE_URL}/admin](${BASE_URL}/admin) — manage your app, view charges, monitor activity
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup_guide.js","sourceRoot":"","sources":["../../src/tools/setup_guide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,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