@elizaos/plugin-vincent 2.0.3-beta.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/LICENSE +21 -0
- package/README.md +84 -0
- package/package.json +78 -0
- package/registry-entry.json +36 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Shaw Walters and elizaOS Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# @elizaos/plugin-vincent
|
|
2
|
+
|
|
3
|
+
Adds Vincent trading integration to an [elizaOS](https://github.com/elizaOS/eliza) agent. Vincent ([heyvincent.ai](https://heyvincent.ai)) provides OAuth-gated trading access on Hyperliquid and Polymarket.
|
|
4
|
+
|
|
5
|
+
## What this plugin provides
|
|
6
|
+
|
|
7
|
+
- **OAuth connection flow** — server-side PKCE OAuth against Vincent. The agent handles the code verifier; the user's browser visits the Vincent authorization page and is redirected back. No secrets are exposed to the browser.
|
|
8
|
+
- **Trading strategy management** — configure a named strategy (`dca`, `rebalance`, `threshold`, or `manual`) with params, execution interval, and dry-run mode, stored in the agent config.
|
|
9
|
+
- **Dashboard UI** — a full-screen React view showing connection status, wallet addresses and balances, strategy settings, and P&L analytics. Available in desktop, XR, and terminal (TUI) variants.
|
|
10
|
+
|
|
11
|
+
## Capabilities added
|
|
12
|
+
|
|
13
|
+
| Capability | Description |
|
|
14
|
+
|------------|-------------|
|
|
15
|
+
| Vincent OAuth | Connect/disconnect a Vincent account via PKCE OAuth |
|
|
16
|
+
| Connection status | Poll whether Vincent is connected and which venues are available |
|
|
17
|
+
| Strategy config | Read and update the active trading strategy |
|
|
18
|
+
| Trading profile | Retrieve P&L analytics (via Vincent API) |
|
|
19
|
+
| Wallet overview | Display the agent's EVM and Solana wallet addresses and balances |
|
|
20
|
+
|
|
21
|
+
## API routes registered
|
|
22
|
+
|
|
23
|
+
All routes use `rawPath: true` — they appear at these exact paths regardless of plugin prefix:
|
|
24
|
+
|
|
25
|
+
| Method | Path | Description |
|
|
26
|
+
|--------|------|-------------|
|
|
27
|
+
| `POST` | `/api/vincent/start-login` | Begin OAuth: returns `authUrl` to open in browser |
|
|
28
|
+
| `GET` | `/callback/vincent` | OAuth redirect landing page; exchanges code for tokens |
|
|
29
|
+
| `GET` | `/api/vincent/status` | Connection status and available trading venues |
|
|
30
|
+
| `POST` | `/api/vincent/disconnect` | Clear stored Vincent credentials |
|
|
31
|
+
| `GET` | `/api/vincent/trading-profile` | P&L profile data |
|
|
32
|
+
| `GET` | `/api/vincent/strategy` | Current strategy configuration |
|
|
33
|
+
| `POST` | `/api/vincent/strategy` | Update strategy configuration |
|
|
34
|
+
|
|
35
|
+
## Enabling the plugin
|
|
36
|
+
|
|
37
|
+
Add `vincentPlugin` to your agent's plugin list:
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
import { vincentPlugin } from "@elizaos/plugin-vincent";
|
|
41
|
+
|
|
42
|
+
const agent = {
|
|
43
|
+
plugins: [vincentPlugin],
|
|
44
|
+
// ...
|
|
45
|
+
};
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
The overlay app self-registers when the package is imported, making the Vincent dashboard available in the UI apps grid.
|
|
49
|
+
|
|
50
|
+
## Configuration
|
|
51
|
+
|
|
52
|
+
The plugin stores its state in the elizaOS agent config file (no additional env vars required). After a successful OAuth flow the following fields are written to config:
|
|
53
|
+
|
|
54
|
+
| Field | Description |
|
|
55
|
+
|-------|-------------|
|
|
56
|
+
| `vincent.accessToken` | Vincent OAuth access token |
|
|
57
|
+
| `vincent.refreshToken` | OAuth refresh token (if provided) |
|
|
58
|
+
| `vincent.clientId` | Dynamically registered OAuth client ID |
|
|
59
|
+
| `vincent.connectedAt` | Unix timestamp of connection |
|
|
60
|
+
| `trading.strategy` | Strategy name: `dca`, `rebalance`, `threshold`, or `manual` |
|
|
61
|
+
| `trading.params` | Strategy-specific parameter object |
|
|
62
|
+
| `trading.intervalSeconds` | Execution interval in seconds |
|
|
63
|
+
| `trading.dryRun` | Whether to run in dry-run mode |
|
|
64
|
+
|
|
65
|
+
The Vincent API base URL (`https://heyvincent.ai`) is not configurable via env var.
|
|
66
|
+
|
|
67
|
+
## OAuth flow
|
|
68
|
+
|
|
69
|
+
1. The UI calls `POST /api/vincent/start-login`.
|
|
70
|
+
2. The agent registers a dynamic OAuth client with Vincent, generates a PKCE challenge, and returns an `authUrl`.
|
|
71
|
+
3. The UI opens `authUrl` in the system browser.
|
|
72
|
+
4. The user authenticates; Vincent redirects to `GET /callback/vincent` on the local agent server.
|
|
73
|
+
5. The agent exchanges the authorization code for tokens using the stored PKCE verifier and persists them.
|
|
74
|
+
6. The UI polls `GET /api/vincent/status` until `connected: true`.
|
|
75
|
+
|
|
76
|
+
Pending login sessions expire after 10 minutes. A server restart during a flow requires restarting the login.
|
|
77
|
+
|
|
78
|
+
## Development
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
bun run --cwd plugins/plugin-vincent build # full build
|
|
82
|
+
bun run --cwd plugins/plugin-vincent test # unit tests
|
|
83
|
+
bun run --cwd plugins/plugin-vincent clean # clean dist
|
|
84
|
+
```
|
package/package.json
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@elizaos/plugin-vincent",
|
|
3
|
+
"version": "2.0.3-beta.5",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"eliza-source": {
|
|
10
|
+
"types": "./src/index.ts",
|
|
11
|
+
"import": "./src/index.ts",
|
|
12
|
+
"default": "./src/index.ts"
|
|
13
|
+
},
|
|
14
|
+
"import": "./dist/index.js",
|
|
15
|
+
"default": "./dist/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./plugin": {
|
|
18
|
+
"types": "./dist/plugin.d.ts",
|
|
19
|
+
"import": "./dist/plugin.js",
|
|
20
|
+
"default": "./dist/plugin.js"
|
|
21
|
+
},
|
|
22
|
+
"./*.css": "./dist/*.css",
|
|
23
|
+
"./*": {
|
|
24
|
+
"types": "./dist/*.d.ts",
|
|
25
|
+
"eliza-source": {
|
|
26
|
+
"types": "./src/*.ts",
|
|
27
|
+
"import": "./src/*.ts",
|
|
28
|
+
"default": "./src/*.ts"
|
|
29
|
+
},
|
|
30
|
+
"import": "./dist/*.js",
|
|
31
|
+
"default": "./dist/*.js"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@elizaos/agent": "2.0.3-beta.5",
|
|
36
|
+
"@elizaos/app-core": "2.0.3-beta.5",
|
|
37
|
+
"@elizaos/core": "2.0.3-beta.5",
|
|
38
|
+
"@elizaos/shared": "2.0.3-beta.5",
|
|
39
|
+
"@elizaos/ui": "2.0.3-beta.5",
|
|
40
|
+
"lucide-react": "^1.0.0",
|
|
41
|
+
"react": "^19.0.0"
|
|
42
|
+
},
|
|
43
|
+
"elizaos": {
|
|
44
|
+
"app": {
|
|
45
|
+
"heroImage": "assets/hero.png"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public"
|
|
50
|
+
},
|
|
51
|
+
"types": "./dist/index.d.ts",
|
|
52
|
+
"scripts": {
|
|
53
|
+
"build": "bun run build:js && bun run build:views && bun run build:types",
|
|
54
|
+
"clean": "node ../../packages/scripts/rm-path-recursive.mjs dist",
|
|
55
|
+
"test": "vitest run --config vitest.config.ts",
|
|
56
|
+
"build:js": "tsup --config ../tsup.plugin-packages.shared.ts",
|
|
57
|
+
"build:views": "bunx --bun vite build --config vite.config.views.ts",
|
|
58
|
+
"build:types": "tsc --noCheck -p tsconfig.build.json",
|
|
59
|
+
"typecheck": "tsgo --noEmit -p tsconfig.build.json",
|
|
60
|
+
"test:e2e:manual": "vitest run --config ../../vitest.config.ts test/*.real.e2e.test.ts"
|
|
61
|
+
},
|
|
62
|
+
"files": [
|
|
63
|
+
"registry-entry.json",
|
|
64
|
+
"dist"
|
|
65
|
+
],
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@testing-library/react": "^16.3.2",
|
|
68
|
+
"@types/react": "^19.0.0",
|
|
69
|
+
"@types/react-dom": "^19.0.0",
|
|
70
|
+
"jsdom": "^29.0.0",
|
|
71
|
+
"react": "^19.0.0",
|
|
72
|
+
"react-dom": "^19.0.0",
|
|
73
|
+
"tsup": "^8.5.1",
|
|
74
|
+
"vite": "^8.0.0",
|
|
75
|
+
"vitest": "^4.1.5"
|
|
76
|
+
},
|
|
77
|
+
"gitHead": "ff6157011c9459670021cc28a6797592a78b8817"
|
|
78
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "vincent",
|
|
3
|
+
"name": "Vincent",
|
|
4
|
+
"description": "Connect Vincent to trade on Hyperliquid and Polymarket through Vincent's agent.",
|
|
5
|
+
"npmName": "@elizaos/plugin-vincent",
|
|
6
|
+
"source": "bundled",
|
|
7
|
+
"tags": ["trading", "hyperliquid", "polymarket", "prediction-markets"],
|
|
8
|
+
"config": {},
|
|
9
|
+
"render": {
|
|
10
|
+
"visible": true,
|
|
11
|
+
"pinTo": [],
|
|
12
|
+
"style": "hero-card",
|
|
13
|
+
"icon": "Wallet",
|
|
14
|
+
"group": "Curated",
|
|
15
|
+
"groupOrder": 6,
|
|
16
|
+
"actions": ["launch", "configure"]
|
|
17
|
+
},
|
|
18
|
+
"resources": {},
|
|
19
|
+
"dependsOn": ["wallet"],
|
|
20
|
+
"kind": "app",
|
|
21
|
+
"subtype": "trading",
|
|
22
|
+
"launch": {
|
|
23
|
+
"type": "server-launch",
|
|
24
|
+
"capabilities": ["vincent", "delegated-trading", "wallet"],
|
|
25
|
+
"curatedSlug": "vincent",
|
|
26
|
+
"routePlugin": {
|
|
27
|
+
"specifier": "@elizaos/plugin-vincent/plugin",
|
|
28
|
+
"exportName": "vincentPlugin"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"curatedApp": {
|
|
32
|
+
"slug": "vincent",
|
|
33
|
+
"order": 5,
|
|
34
|
+
"aliases": []
|
|
35
|
+
}
|
|
36
|
+
}
|