moltlaunch 2.7.0 → 2.7.2
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/index.js +10 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1800,9 +1800,10 @@ async function fees(options) {
|
|
|
1800
1800
|
console.log("\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n");
|
|
1801
1801
|
}
|
|
1802
1802
|
try {
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1803
|
+
let agentId = null;
|
|
1804
|
+
try {
|
|
1805
|
+
agentId = await getAgentByOwner(wallet2.address);
|
|
1806
|
+
} catch {
|
|
1806
1807
|
}
|
|
1807
1808
|
const balance = await publicClient.readContract({
|
|
1808
1809
|
address: REVENUE_MANAGER_ADDRESS,
|
|
@@ -1815,14 +1816,14 @@ async function fees(options) {
|
|
|
1815
1816
|
if (options.json) {
|
|
1816
1817
|
console.log(JSON.stringify({
|
|
1817
1818
|
wallet: wallet2.address,
|
|
1818
|
-
agentId: agentId.toString(),
|
|
1819
|
+
...agentId ? { agentId: agentId.toString() } : {},
|
|
1819
1820
|
revenueManager: REVENUE_MANAGER_ADDRESS,
|
|
1820
1821
|
pendingFees: { wei: balance.toString(), eth: balanceEth }
|
|
1821
1822
|
}));
|
|
1822
1823
|
return;
|
|
1823
1824
|
}
|
|
1824
1825
|
console.log(`Wallet: ${wallet2.address}`);
|
|
1825
|
-
console.log(`Agent ID: ${agentId.toString()}`);
|
|
1826
|
+
if (agentId) console.log(`Agent ID: ${agentId.toString()}`);
|
|
1826
1827
|
console.log(`Revenue Manager: ${REVENUE_MANAGER_ADDRESS}`);
|
|
1827
1828
|
console.log("");
|
|
1828
1829
|
console.log(`Pending fees: ${balanceEth} ETH`);
|
|
@@ -3002,12 +3003,12 @@ async function claim(options) {
|
|
|
3002
3003
|
if (escrow.status === 5 /* Released */ || escrow.status === 6 /* Refunded */) {
|
|
3003
3004
|
throw new Error("Payment already released or refunded");
|
|
3004
3005
|
}
|
|
3005
|
-
if (escrow.status !== 2 /* Submitted */) {
|
|
3006
|
-
throw new Error("Work not yet submitted. Run 'mltl submit' first.");
|
|
3007
|
-
}
|
|
3008
3006
|
if (escrow.status === 3 /* Disputed */) {
|
|
3009
3007
|
throw new Error("Task is disputed. Cannot claim until dispute is resolved.");
|
|
3010
3008
|
}
|
|
3009
|
+
if (escrow.status !== 2 /* Submitted */) {
|
|
3010
|
+
throw new Error("Work not yet submitted. Run 'mltl submit' first.");
|
|
3011
|
+
}
|
|
3011
3012
|
const priceEth = formatEther10(escrow.amount);
|
|
3012
3013
|
const timedOut = await isEscrowTimedOut(options.task);
|
|
3013
3014
|
if (!timedOut) {
|
|
@@ -3893,7 +3894,7 @@ async function gigRemove(options) {
|
|
|
3893
3894
|
|
|
3894
3895
|
// src/index.ts
|
|
3895
3896
|
var program = new Command();
|
|
3896
|
-
program.name("mltl").description("moltlaunch \u2014 hire AI agents with onchain reputation").version("2.
|
|
3897
|
+
program.name("mltl").description("moltlaunch \u2014 hire AI agents with onchain reputation").version("2.7.1");
|
|
3897
3898
|
program.command("register").description("Register an agent (launches token + registers identity)").requiredOption("--name <name>", "Agent name").option("--symbol <symbol>", "Token symbol for NEW token (2-10 chars)").option("--token <address>", "Existing Flaunch token address (skips token launch)").requiredOption("--description <desc>", "Agent description").requiredOption("--skills <skills>", "Comma-separated skills (e.g., code,research,review)").option("--endpoint <url>", "x402 endpoint URL (optional - can use task queue instead)").option("--image <path>", "Image file path (PNG, JPG, etc.)").option("--price <eth>", "Price per hire in ETH", "0.001").option("--website <url>", "Website URL").option("--json", "Output as JSON").action(register);
|
|
3898
3899
|
program.command("hire").description("Request work from an agent (they will quote a price)").requiredOption("--agent <id>", "Agent ID (ERC-8004 token ID)").requiredOption("--task <description>", "Task description").option("--json", "Output as JSON").action(hire);
|
|
3899
3900
|
program.command("feedback").description("Submit verified feedback for an agent (linked to completed task)").option("--agent <id>", "Agent ID (auto-resolved if --task provided)").option("--task <taskId>", "Task ID to link feedback to (verifies completion)").requiredOption("--score <0-100>", "Score from 0-100").option("--comment <text>", "Optional feedback comment").option("--json", "Output as JSON").action(feedback);
|