jaspervault_cli 1.0.13 → 1.0.14

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.
@@ -35,6 +35,23 @@ Interact with JasperVault's perpetual contract platform. You can create market/l
35
35
  - **First-time setup**: use \`jv vault init-wc\` to initialize via WalletConnect (scan QR on phone, sign delegation — no private key needed)
36
36
  - API URL defaults to the JasperVault trading endpoint; no environment variables needed for normal use
37
37
 
38
+ ## Activation Behavior
39
+
40
+ When this skill is activated (first message from the user, OR any trading intent such as open position, check portfolio, deposit, etc.):
41
+
42
+ 1. First check if vault is already initialized:
43
+ \`\`\`bash
44
+ jv orders list --pretty
45
+ \`\`\`
46
+
47
+ 2. If the command fails with "delegation key not found", "vault not initialized", "no profile", or similar error (exit code 1):
48
+ - Tell the user: "Your vault is not initialized yet. Let me start the setup via WalletConnect — no private key needed."
49
+ - Immediately run \`jv vault init-wc --network jaspervault --timeout 120\` and follow the QR code display instructions in the Setup Flow section below.
50
+
51
+ 3. If the command succeeds → vault is ready. Proceed with the user's request.
52
+
53
+ IMPORTANT: Always use WalletConnect initialization (\`jv vault init-wc\`). Never suggest \`jv vault init\` (private-key mode) unless the user explicitly requests it.
54
+
38
55
  ## Setup Flow (First Time — WalletConnect)
39
56
 
40
57
  \`\`\`bash
@@ -45,7 +62,21 @@ jv vault init-wc --network jaspervault --timeout 120
45
62
  CRITICAL EXECUTION NOTE: This command runs for up to 2 minutes. Do NOT interrupt or kill the process after the first JSON line. Wait for the process to exit naturally (second JSON output = success or failure).
46
63
 
47
64
  The command outputs two JSON lines:
48
- 1. \`{"status":"awaiting_connection", "uri":"wc:...", "qrCodeUrl":"https://api.qrserver.com/...", ...}\` — Display the QR code as a markdown image: \`![Scan QR code to connect wallet](<qrCodeUrl>)\`. Do NOT print \`qrCodeText\` — the text-art QR code breaks alignment in markdown rendering and cannot be scanned. Also provide the \`uri\` as a fallback for manual paste in the wallet app.
65
+
66
+ 1. \`{"status":"awaiting_connection", "uri":"wc:...", "qrCodeUrl":"https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=wc%3A...", ...}\`
67
+
68
+ Extract the \`qrCodeUrl\` field from the JSON. It will be a URL starting with \`https://api.qrserver.com/v1/create-qr-code/\`. You MUST send it as a markdown image so it renders as a scannable QR code:
69
+
70
+ \`\`\`
71
+ ![WalletConnect QR Code](https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=wc%3A...)
72
+ \`\`\`
73
+
74
+ Replace the URL above with the actual \`qrCodeUrl\` from the JSON output. Also provide the \`uri\` as a fallback:
75
+
76
+ > Or open your wallet app → WalletConnect → paste this URI: \`wc:...\`
77
+
78
+ CRITICAL: MUST use markdown image syntax \`![description](qrCodeUrl)\`. NEVER post the URL as plain text. NEVER print \`qrCodeText\`. NEVER generate your own QR code. The image will not appear if you only post the raw URL without the \`![...]()\` wrapper.
79
+
49
80
  2. \`{"success":true, "message":"Vault initialized successfully", ...}\` — Init complete. The delegation wallet is saved to \`~/.jaspervault/keys.json\` and vault addresses to \`~/.jaspervault/profile.json\`. Subsequent commands use these automatically — no wallet interaction needed.
50
81
 
51
82
  Do NOT ask the user to set \`PRIVATE_KEY\`. Do NOT suggest \`jv vault init\` unless the user explicitly requests private-key mode.
@@ -1 +1 @@
1
- {"version":3,"file":"skill-body.js","sourceRoot":"","sources":["../../../src/templates/skill-body.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC1D,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CACzC,YAAY,CAAC,IAAI,CAAC,SAA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,kBAAkB,CAAC;QAC3F,KAAK,QAAQ;YACX,OAAO,wBAAwB,GAAG,kBAAkB,CAAC;QACvD;YACE,MAAM,IAAI,KAAK,CAAC,qBAAqB,QAAQ,EAAE,CAAC,CAAC;IACrD,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jaspervault_cli",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "description": "JasperVault CLI for interacting with the JasperVault Manager API",
5
5
  "type": "module",
6
6
  "bin": {