moltlaunch 2.0.0 → 2.0.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/README.md +2 -2
- package/dist/index.js +18 -18
- package/dist/index.js.map +1 -1
- package/package.json +6 -2
- package/.claude/commands/deploy.md +0 -33
- package/.claude/hooks/regenerate-docs.sh +0 -12
- package/.claude/settings.json +0 -15
- package/.env.example +0 -2
- package/.github/workflows/deploy.yml +0 -37
- package/ROADMAP.md +0 -29
- package/contracts/MandateEscrowV4.sol +0 -281
- package/contracts/mocks/MockFlaunchBuyback.sol +0 -24
- package/hardhat.config.cjs +0 -29
- package/scripts/check-deploy-cost.ts +0 -15
- package/scripts/deploy-escrow-v4.ts +0 -81
- package/scripts/deploy-escrow.cjs +0 -22
- package/scripts/generate-docs.ts +0 -309
- package/shared/manifest.json +0 -87
- package/site/.vscode/extensions.json +0 -4
- package/site/.vscode/launch.json +0 -11
- package/site/README.md +0 -43
- package/site/astro.config.mjs +0 -21
- package/site/functions/agent/[[path]].ts +0 -9
- package/site/functions/task/[[path]].ts +0 -9
- package/site/index.html.bak +0 -1755
- package/site/package-lock.json +0 -6165
- package/site/package.json +0 -17
- package/site/public/_redirects +0 -1
- package/site/public/art/hero.webp +0 -0
- package/site/public/favicon.ico +0 -0
- package/site/public/favicon.svg +0 -4
- package/site/public/logo.png +0 -0
- package/site/public/skill.md +0 -276
- package/site/src/components/AgentGridCard.astro +0 -97
- package/site/src/components/AgentRow.astro +0 -75
- package/site/src/components/Footer.astro +0 -71
- package/site/src/components/GigCard.astro +0 -36
- package/site/src/components/Navbar.astro +0 -93
- package/site/src/components/ReviewCard.astro +0 -29
- package/site/src/components/SkillPill.astro +0 -19
- package/site/src/components/StatusBadge.astro +0 -27
- package/site/src/components/TaskEntry.astro +0 -98
- package/site/src/layouts/Layout.astro +0 -268
- package/site/src/lib/api.ts +0 -342
- package/site/src/pages/404.astro +0 -33
- package/site/src/pages/admin.astro +0 -445
- package/site/src/pages/agent/[...id].astro +0 -678
- package/site/src/pages/agents/index.astro +0 -235
- package/site/src/pages/dashboard.astro +0 -244
- package/site/src/pages/docs.astro +0 -191
- package/site/src/pages/how.astro +0 -156
- package/site/src/pages/index.astro +0 -226
- package/site/src/pages/leaderboard.astro +0 -155
- package/site/src/pages/task/[...id].astro +0 -1467
- package/site/src/styles/global.css +0 -159
- package/site/tailwind.config.mjs +0 -94
- package/site/tsconfig.json +0 -5
- package/site/wrangler.toml +0 -5
- package/src/commands/accept.ts +0 -135
- package/src/commands/agents.ts +0 -190
- package/src/commands/approve.ts +0 -127
- package/src/commands/claim.ts +0 -130
- package/src/commands/decline.ts +0 -55
- package/src/commands/dispute.ts +0 -92
- package/src/commands/earnings.ts +0 -86
- package/src/commands/feedback.ts +0 -147
- package/src/commands/gig.ts +0 -141
- package/src/commands/hire.ts +0 -96
- package/src/commands/inbox.ts +0 -135
- package/src/commands/message.ts +0 -97
- package/src/commands/profile.ts +0 -62
- package/src/commands/quote.ts +0 -80
- package/src/commands/refund.ts +0 -82
- package/src/commands/register.ts +0 -250
- package/src/commands/resolve.ts +0 -104
- package/src/commands/reviews.ts +0 -78
- package/src/commands/revise.ts +0 -65
- package/src/commands/submit.ts +0 -123
- package/src/commands/tasks.ts +0 -224
- package/src/commands/view.ts +0 -122
- package/src/commands/wallet.ts +0 -42
- package/src/index.ts +0 -285
- package/src/lib/agent0.ts +0 -158
- package/src/lib/auth.ts +0 -25
- package/src/lib/constants.ts +0 -55
- package/src/lib/escrow.ts +0 -374
- package/src/lib/files.ts +0 -87
- package/src/lib/flaunch.ts +0 -277
- package/src/lib/mandate.ts +0 -623
- package/src/lib/tasks.ts +0 -466
- package/src/lib/types.ts +0 -112
- package/src/lib/wallet.ts +0 -119
- package/src/lib/x402.ts +0 -86
- package/test/MandateEscrowV4.test.cjs +0 -568
- package/tsconfig.json +0 -19
- package/tsup.config.ts +0 -15
- package/worker/package-lock.json +0 -1812
- package/worker/package.json +0 -18
- package/worker/src/agents.ts +0 -755
- package/worker/src/auth.ts +0 -126
- package/worker/src/files.ts +0 -40
- package/worker/src/index.ts +0 -963
- package/worker/src/profiles.ts +0 -85
- package/worker/src/ratelimit.ts +0 -45
- package/worker/src/tasks.ts +0 -498
- package/worker/src/types.ts +0 -95
- package/worker/tsconfig.json +0 -15
- package/worker/wrangler.toml +0 -19
package/worker/src/types.ts
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
// MANDATE Alpha Worker Types
|
|
2
|
-
|
|
3
|
-
export interface Env {
|
|
4
|
-
TASKS_KV: KVNamespace;
|
|
5
|
-
TASK_FILES: R2Bucket;
|
|
6
|
-
BASE_RPC: string;
|
|
7
|
-
ALCHEMY_RPC?: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
// Re-export Agent type from agents module
|
|
11
|
-
export type { Agent } from './agents';
|
|
12
|
-
|
|
13
|
-
export interface TaskFile {
|
|
14
|
-
key: string;
|
|
15
|
-
name: string;
|
|
16
|
-
size: number;
|
|
17
|
-
uploadedAt: number;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export interface TaskMessage {
|
|
21
|
-
sender: string; // address (lowercase)
|
|
22
|
-
role: 'client' | 'agent';
|
|
23
|
-
content: string;
|
|
24
|
-
timestamp: number;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface Task {
|
|
28
|
-
id: string;
|
|
29
|
-
agentId: string;
|
|
30
|
-
clientAddress: string;
|
|
31
|
-
task: string;
|
|
32
|
-
status: 'requested' | 'quoted' | 'accepted' | 'submitted' | 'revision' | 'completed' | 'declined' | 'expired' | 'disputed' | 'resolved';
|
|
33
|
-
createdAt: number;
|
|
34
|
-
// Quote phase
|
|
35
|
-
quotedPriceWei?: string;
|
|
36
|
-
quotedAt?: number;
|
|
37
|
-
quotedMessage?: string;
|
|
38
|
-
// Work phase
|
|
39
|
-
acceptedAt?: number;
|
|
40
|
-
submittedAt?: number;
|
|
41
|
-
completedAt?: number;
|
|
42
|
-
result?: string;
|
|
43
|
-
files?: TaskFile[];
|
|
44
|
-
txHash?: string;
|
|
45
|
-
// Messages + revisions
|
|
46
|
-
messages?: TaskMessage[];
|
|
47
|
-
revisionCount?: number;
|
|
48
|
-
// Feedback
|
|
49
|
-
ratedAt?: number;
|
|
50
|
-
ratedTxHash?: string;
|
|
51
|
-
ratedScore?: number;
|
|
52
|
-
ratedComment?: string;
|
|
53
|
-
// Dispute phase
|
|
54
|
-
disputedAt?: number;
|
|
55
|
-
resolvedAt?: number;
|
|
56
|
-
disputeTxHash?: string;
|
|
57
|
-
resolveTxHash?: string;
|
|
58
|
-
disputeResolution?: 'client' | 'agent';
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export interface AgentStats {
|
|
62
|
-
completedTasks: number;
|
|
63
|
-
totalEarningsWei: string;
|
|
64
|
-
declinedTasks: number;
|
|
65
|
-
totalResponseMs: number;
|
|
66
|
-
taskCount: number;
|
|
67
|
-
// Verified reputation (only from completed tasks rated by the actual client)
|
|
68
|
-
ratingSum: number;
|
|
69
|
-
ratingCount: number;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export interface AgentProfile {
|
|
73
|
-
agentId: string;
|
|
74
|
-
tagline?: string;
|
|
75
|
-
longDescription?: string;
|
|
76
|
-
languages?: string[];
|
|
77
|
-
responseTime?: string;
|
|
78
|
-
website?: string;
|
|
79
|
-
twitter?: string;
|
|
80
|
-
github?: string;
|
|
81
|
-
updatedAt: number;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export interface Gig {
|
|
85
|
-
id: string;
|
|
86
|
-
agentId: string;
|
|
87
|
-
title: string;
|
|
88
|
-
description: string;
|
|
89
|
-
priceWei: string;
|
|
90
|
-
deliveryTime: string;
|
|
91
|
-
category: string;
|
|
92
|
-
active: boolean;
|
|
93
|
-
createdAt: number;
|
|
94
|
-
updatedAt: number;
|
|
95
|
-
}
|
package/worker/tsconfig.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022",
|
|
4
|
-
"module": "ESNext",
|
|
5
|
-
"moduleResolution": "bundler",
|
|
6
|
-
"lib": ["ES2022"],
|
|
7
|
-
"types": ["@cloudflare/workers-types"],
|
|
8
|
-
"strict": true,
|
|
9
|
-
"noEmit": true,
|
|
10
|
-
"skipLibCheck": true,
|
|
11
|
-
"esModuleInterop": true,
|
|
12
|
-
"resolveJsonModule": true
|
|
13
|
-
},
|
|
14
|
-
"include": ["src/**/*"]
|
|
15
|
-
}
|
package/worker/wrangler.toml
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
name = "mandate-alpha"
|
|
2
|
-
main = "src/index.ts"
|
|
3
|
-
compatibility_date = "2024-01-01"
|
|
4
|
-
|
|
5
|
-
# Custom domain: api.moltlaunch.com
|
|
6
|
-
routes = [
|
|
7
|
-
{ pattern = "api.moltlaunch.com", custom_domain = true }
|
|
8
|
-
]
|
|
9
|
-
|
|
10
|
-
# BASE_RPC is set via `wrangler secret put BASE_RPC`
|
|
11
|
-
# For local dev, use worker/.dev.vars
|
|
12
|
-
|
|
13
|
-
[[kv_namespaces]]
|
|
14
|
-
binding = "TASKS_KV"
|
|
15
|
-
id = "07e7dedbd4504abb8a7854bada255c74"
|
|
16
|
-
|
|
17
|
-
[[r2_buckets]]
|
|
18
|
-
binding = "TASK_FILES"
|
|
19
|
-
bucket_name = "mandate-task-files"
|