tru-mcp 0.14.3 → 0.14.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.
|
@@ -21,7 +21,15 @@ export const authenticateTool = {
|
|
|
21
21
|
content: [
|
|
22
22
|
{
|
|
23
23
|
type: "text",
|
|
24
|
-
text: `Already authenticated as ${existing.email}
|
|
24
|
+
text: `Already authenticated as ${existing.email}.\n\n` +
|
|
25
|
+
`IMPORTANT: Use AskUserQuestion to confirm this is the right account:\n` +
|
|
26
|
+
` question: "You're already logged in as ${existing.email}. Is this the account you want to use?"\n` +
|
|
27
|
+
` options:\n` +
|
|
28
|
+
` - label: "Yes, continue"\n` +
|
|
29
|
+
` description: "Use ${existing.email} for this setup"\n` +
|
|
30
|
+
` - label: "Switch account"\n` +
|
|
31
|
+
` description: "Log in with a different email"\n` +
|
|
32
|
+
`If they choose "Switch account", call login(switch_account: true).`,
|
|
25
33
|
},
|
|
26
34
|
],
|
|
27
35
|
};
|
|
@@ -34,7 +42,15 @@ export const authenticateTool = {
|
|
|
34
42
|
content: [
|
|
35
43
|
{
|
|
36
44
|
type: "text",
|
|
37
|
-
text: `Authenticated successfully as ${result.email}. Credentials saved locally
|
|
45
|
+
text: `Authenticated successfully as ${result.email}. Credentials saved locally.\n\n` +
|
|
46
|
+
`IMPORTANT: Use AskUserQuestion to confirm this is the right account before proceeding:\n` +
|
|
47
|
+
` question: "You're logged in as ${result.email}. Is this the account you want to use?"\n` +
|
|
48
|
+
` options:\n` +
|
|
49
|
+
` - label: "Yes, continue"\n` +
|
|
50
|
+
` description: "Use ${result.email} for this setup"\n` +
|
|
51
|
+
` - label: "Switch account"\n` +
|
|
52
|
+
` description: "Log in with a different email"\n` +
|
|
53
|
+
`If they choose "Switch account", call login(switch_account: true).`,
|
|
38
54
|
},
|
|
39
55
|
],
|
|
40
56
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authenticate.js","sourceRoot":"","sources":["../../src/tools/authenticate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAElE,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,OAAO;IACb,WAAW,EACT,yCAAyC;QACzC,sGAAsG;QACtG,sDAAsD;QACtD,iFAAiF;QACjF,gKAAgK;IAClK,WAAW,EAAE;QACX,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oDAAoD,CAAC;KACtG;IACD,OAAO,EAAE,KAAK,EAAE,IAAkC,EAAE,EAAE;QACpD,IAAI,CAAC;YACH,6DAA6D;YAC7D,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;gBACzB,MAAM,QAAQ,GAAG,MAAM,iBAAiB,EAAE,CAAC;gBAC3C,IAAI,QAAQ,EAAE,CAAC;oBACb,OAAO;wBACL,OAAO,EAAE;4BACP;gCACE,IAAI,EAAE,MAAe;gCACrB,IAAI,EAAE,4BAA4B,QAAQ,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"authenticate.js","sourceRoot":"","sources":["../../src/tools/authenticate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAElE,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,OAAO;IACb,WAAW,EACT,yCAAyC;QACzC,sGAAsG;QACtG,sDAAsD;QACtD,iFAAiF;QACjF,gKAAgK;IAClK,WAAW,EAAE;QACX,cAAc,EAAE,CAAC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OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,gCAAgC,OAAO,EAAE;qBAChD;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,kFAAkF;IAC/F,WAAW,EAAE,EAAE;IACf,OAAO,EAAE,KAAK,EAAE,KAA4B,EAAE,EAAE;QAC9C,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;QAC/B,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,0BAA0B,EAAE,CAAC;aACvE,CAAC;QACJ,CAAC;QACD,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAC3B,SAAS,EAAE,CAAC;QACZ,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,cAAc,KAAK,sDAAsD,EAAE,CAAC;SACtH,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -21,28 +21,26 @@ const OWL_BANNER = `
|
|
|
21
21
|
const GUIDE = `
|
|
22
22
|
## INSTRUCTIONS — follow these steps exactly.
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
${OWL_BANNER}
|
|
24
|
+
### Step 0: Show banner and ask which path
|
|
26
25
|
|
|
27
|
-
|
|
26
|
+
Display this banner EXACTLY as-is:
|
|
27
|
+
${OWL_BANNER}
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
Then IMMEDIATELY call the **AskUserQuestion** tool with this question. Do NOT print these options as plain text — you MUST use the interactive AskUserQuestion tool:
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
question: "Which path fits your needs?"
|
|
32
|
+
header: "Setup"
|
|
33
|
+
options:
|
|
34
|
+
- label: "Integrate tru into my app"
|
|
35
|
+
description: "I'm building an app and want to add tru for identity, payments, and agent discovery"
|
|
36
|
+
- label: "Use tru wallet"
|
|
37
|
+
description: "I want my AI agent to buy things, use services, and send or receive money"
|
|
32
38
|
|
|
33
|
-
|
|
34
|
-
- **A wallet you control** — set spending rules per app, approve or auto-approve charges
|
|
35
|
-
- **Virtual cards** — single-use cards for purchases on any site
|
|
36
|
-
- **Credential sharing** — share verified name, email, phone, address with apps (you approve each request)
|
|
37
|
-
- **Risk signals** — every tru user carries a trust profile that apps can check
|
|
39
|
+
Wait for the user's answer before continuing. Then follow the matching path below.
|
|
38
40
|
|
|
39
41
|
---
|
|
40
42
|
|
|
41
|
-
## Choose your path
|
|
42
|
-
|
|
43
|
-
**Use AskUserQuestion** to ask the user which path they want:
|
|
44
|
-
- **Use tru wallet** — "I want my AI agent to buy things, use services, and send or receive money from other people"
|
|
45
|
-
- **Integrate tru into my app** — "I'm a developer building an app and want to add tru"
|
|
43
|
+
## Choose your path (reference)
|
|
46
44
|
|
|
47
45
|
### Path A: "I want to use tru wallet to buy things"
|
|
48
46
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_started.js","sourceRoot":"","sources":["../../src/tools/get_started.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAExC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,gBAAgB,CAAC;AAE7D,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACtC,IAAI,OAAO,GAAG,OAAO,CAAC;AACtB,IAAI,CAAC;IACH,MAAM,GAAG,GAAG,IAAI,CAAC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