@dfm-fi/agent 0.2.1963 → 0.2.1964
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/app-wallet-owner.js +3 -1
- package/dist/mcp-server.js +5 -4
- package/dist/onboarding.js +1 -1
- package/package.json +1 -1
- package/skills.md +4 -4
package/dist/app-wallet-owner.js
CHANGED
|
@@ -181,7 +181,9 @@ export async function runCreateAppWallet(api, keyPath = ownerKeyPath()) {
|
|
|
181
181
|
appWallet: step.appWallet,
|
|
182
182
|
ownerKey,
|
|
183
183
|
note: `The owner key at ${key.path} is the ONLY key that owns this app wallet — back it up offline. ` +
|
|
184
|
-
'DFM cannot recover it. Fund
|
|
184
|
+
'DFM cannot recover it. Fund it by sending USDC + a little SOL to the app wallet address from ANY wallet ' +
|
|
185
|
+
'(this agent\'s identity wallet, another wallet it controls, or a person\'s — who sends does not matter), ' +
|
|
186
|
+
'then deposit/launch as usual.',
|
|
185
187
|
};
|
|
186
188
|
}
|
|
187
189
|
export const POLICY_UPDATE_NOTICE = "DFM's signing rules changed — run create_app_wallet to approve them";
|
package/dist/mcp-server.js
CHANGED
|
@@ -437,8 +437,8 @@ server.registerTool('app_wallet', {
|
|
|
437
437
|
nextStep = 'Active. Balance unavailable from this API version.';
|
|
438
438
|
}
|
|
439
439
|
else if (usdc <= 0 && sol <= 0) {
|
|
440
|
-
nextStep = 'Active but empty.
|
|
441
|
-
`from
|
|
440
|
+
nextStep = 'Active but empty. Send USDC + a little SOL to its address from any wallet, ' +
|
|
441
|
+
`or use \`app_wallet_fund {usdc, sol}\` from this agent's identity wallet, or ${SETUP_URL}.`;
|
|
442
442
|
}
|
|
443
443
|
else if (sol <= 0) {
|
|
444
444
|
nextStep =
|
|
@@ -1479,13 +1479,14 @@ server.registerTool('app_wallet_rearm', {
|
|
|
1479
1479
|
}
|
|
1480
1480
|
});
|
|
1481
1481
|
server.registerTool('app_wallet_fund', {
|
|
1482
|
-
title: 'Fund the app wallet from
|
|
1482
|
+
title: 'Fund the app wallet from this agent\'s identity wallet',
|
|
1483
1483
|
description: 'REAL-MONEY (gated). Move USDC and/or SOL from YOUR OWN wallet into your app ' +
|
|
1484
1484
|
'wallet, so it can pay for launches, deposits and fees. This is the ONE ' +
|
|
1485
1485
|
'signature the app-wallet model cannot avoid: it is your money leaving your ' +
|
|
1486
1486
|
'wallet, so it is signed locally and needs a keypair — in KEYLESS mode ' +
|
|
1487
1487
|
'(API key only) do it from https://app.dfm.finance/account instead. Amounts are ' +
|
|
1488
|
-
'human units: usdc 12.5, sol 0.05. Send SOL too — the app wallet pays its own fees.'
|
|
1488
|
+
'human units: usdc 12.5, sol 0.05. Send SOL too — the app wallet pays its own fees. ' +
|
|
1489
|
+
'Not the only way: a plain USDC/SOL transfer to the app wallet address from ANY wallet funds it too.',
|
|
1489
1490
|
inputSchema: {
|
|
1490
1491
|
usdc: z.number().nonnegative().optional(),
|
|
1491
1492
|
sol: z.number().nonnegative().optional(),
|
package/dist/onboarding.js
CHANGED
|
@@ -245,7 +245,7 @@ export function fundingNextStep(f) {
|
|
|
245
245
|
'amount you will deposit (the API sets no minimum deposit), and SOL ≥ 0.0381 for the launch (0.023 without ' +
|
|
246
246
|
'share-mint metadata) + 0.02 per deposit — about 0.06 SOL total.';
|
|
247
247
|
if (f.keyless) {
|
|
248
|
-
return `${have} ${need} This MCP runs on an API key (no local keypair), so it cannot sign a top-up:
|
|
248
|
+
return `${have} ${need} This MCP runs on an API key (no local keypair), so it cannot sign a top-up: send USDC + SOL to the app wallet address from any wallet (an agent\'s or a person\'s, it does not matter), or fund it at https://app.dfm.finance/account.`;
|
|
249
249
|
}
|
|
250
250
|
const to = f.identityPubkey ? `the identity wallet ${f.identityPubkey}` : 'the identity wallet (create_identity_wallet prints it)';
|
|
251
251
|
const gate = f.writeEnabled
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dfm-fi/agent",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1964",
|
|
4
4
|
"description": "DFM v2 MCP server — drive the full fund launch → deposit → redeem (+ manage) lifecycle from an AI agent against the live API.",
|
|
5
5
|
"homepage": "https://app.dfm.finance/docs/agent",
|
|
6
6
|
"mcpName": "io.github.DFM-Finance/dfm-agent",
|
package/skills.md
CHANGED
|
@@ -34,7 +34,7 @@ The agent signs in with its own Solana **identity keypair** (SIWS). No API key i
|
|
|
34
34
|
| 2 | (if no identity) | `create_identity_wallet {}` | The identity public key. Created once at `~/.config/dfm/agent-wallet.json` (0600) or reused; never a second. |
|
|
35
35
|
| 3 | "Set your profile, name it Atlas" | `set_profile {displayName:"Atlas"}` | Profile + `avatar.isDefault`. With no image at `~/.config/dfm/avatar.png` a deterministic default avatar is generated, so no file is required. |
|
|
36
36
|
| 4 | (automatic in onboard) | `create_app_wallet {}` | The app wallet address. It is owned by a local P-256 key (`~/.config/dfm/app-wallet-owner.pem`) — back it up; DFM cannot recover it. |
|
|
37
|
-
| 5 | "Fund your app wallet" |
|
|
37
|
+
| 5 | "Fund your app wallet" | send USDC + SOL to the **app wallet** address from ANY wallet — the agent's own identity wallet (`app_wallet_fund {usdc, sol}`), another wallet the agent controls, or a person's; who sends does not matter | A transaction signature. `onboard`/`whoami` print the exact amounts as `next` / `fundingStep`. |
|
|
38
38
|
| 6 | (optional) | `create_api_key {name}` | A read-only `dfm_` key stored in a 0600 file; the key itself never enters the chat. |
|
|
39
39
|
|
|
40
40
|
What the launch preflight enforces on the app wallet: **USDC** = 0.1 (factory seed, read live) + whatever
|
|
@@ -46,8 +46,8 @@ the identity wallet for the `app_wallet_fund` fee.
|
|
|
46
46
|
|
|
47
47
|
The human mints a `dfm_` key at https://app.dfm.finance → **Agent → Keys** (tick "allow writes" for write
|
|
48
48
|
tools) and installs: `npx -y @dfm-fi/agent install --write --api-key dfm_...`.
|
|
49
|
-
The
|
|
50
|
-
refused in key-only mode because it signs from a local wallet.
|
|
49
|
+
The app wallet is funded by a plain USDC + SOL transfer to its address from any wallet (or in the app,
|
|
50
|
+
https://app.dfm.finance/account); `app_wallet_fund` is refused in key-only mode because it signs from a local wallet.
|
|
51
51
|
|
|
52
52
|
## Rules that are easy to get wrong
|
|
53
53
|
|
|
@@ -103,7 +103,7 @@ refuse and transfer nothing. Rebalancing is manual: there are no auto-rebalance
|
|
|
103
103
|
| `Refused: <tool> … confirmPhrase=` | `DFM_MCP_CONFIRM_REQUIRED=1` | ask the human, relay the exact phrase |
|
|
104
104
|
| `PROFILE_REQUIRED` (412) | no display name or avatar yet | `set_profile {displayName}` |
|
|
105
105
|
| `No active app-wallet signer` / `hasAppWallet: false` | no app wallet | path A: `onboard`; path B: the human signs in at app.dfm.finance |
|
|
106
|
-
| `Insufficient SOL: need ~…` / `Insufficient SOL for account rent` | app wallet short of SOL |
|
|
106
|
+
| `Insufficient SOL: need ~…` / `Insufficient SOL for account rent` | app wallet short of SOL | send SOL to the app wallet address from any wallet (`app_wallet_fund`, another wallet, or the app); waiting adds nothing |
|
|
107
107
|
| `allocationBps must sum to exactly 10000` / `The allocation must contain 2–10 unique assets` | bad basket | fix weights / asset count |
|
|
108
108
|
| `must be a raw 6dp integer` | a float or bare dollars | send raw units, e.g. `"12000000"` |
|
|
109
109
|
| `has no app-wallet signing path in this agent` | that tool has no executor in this mode | do it in the app |
|