clawmoney 0.6.0 → 0.7.0
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/commands/hire.d.ts +3 -0
- package/dist/commands/hire.js +14 -8
- package/dist/index.js +3 -0
- package/package.json +1 -1
package/dist/commands/hire.d.ts
CHANGED
|
@@ -5,6 +5,9 @@ interface SubmitOptions {
|
|
|
5
5
|
}
|
|
6
6
|
interface VerifyOptions {
|
|
7
7
|
witness?: boolean;
|
|
8
|
+
relevance: string;
|
|
9
|
+
quality: string;
|
|
10
|
+
vote?: string;
|
|
8
11
|
}
|
|
9
12
|
export declare function hireSubmitCommand(taskId: string, options: SubmitOptions): Promise<void>;
|
|
10
13
|
export declare function hireVerifyCommand(submissionId: string, options: VerifyOptions): Promise<void>;
|
package/dist/commands/hire.js
CHANGED
|
@@ -100,12 +100,15 @@ export async function hireVerifyCommand(submissionId, options) {
|
|
|
100
100
|
return;
|
|
101
101
|
}
|
|
102
102
|
// Submit witness verification
|
|
103
|
-
const
|
|
103
|
+
const vote = options.vote || 'approve';
|
|
104
|
+
const relevanceScore = parseInt(options.relevance, 10);
|
|
105
|
+
const qualityScore = parseInt(options.quality, 10);
|
|
106
|
+
const verifySpinner = ora(`Submitting witness verification (${vote}, R:${relevanceScore} Q:${qualityScore})...`).start();
|
|
104
107
|
try {
|
|
105
108
|
const resp = await apiPost(`/api/v1/hire/submissions/${submissionId}/verify`, {
|
|
106
|
-
vote
|
|
107
|
-
relevance_score:
|
|
108
|
-
quality_score:
|
|
109
|
+
vote,
|
|
110
|
+
relevance_score: relevanceScore,
|
|
111
|
+
quality_score: qualityScore,
|
|
109
112
|
tweet_proof: {
|
|
110
113
|
payload: proof.payload,
|
|
111
114
|
signature: proof.signature,
|
|
@@ -132,12 +135,15 @@ export async function hireVerifyCommand(submissionId, options) {
|
|
|
132
135
|
}
|
|
133
136
|
else {
|
|
134
137
|
// Manual verification
|
|
135
|
-
const
|
|
138
|
+
const vote = options.vote || 'approve';
|
|
139
|
+
const relevanceScore = parseInt(options.relevance, 10);
|
|
140
|
+
const qualityScore = parseInt(options.quality, 10);
|
|
141
|
+
const spinner = ora(`Submitting manual verification (${vote}, R:${relevanceScore} Q:${qualityScore})...`).start();
|
|
136
142
|
try {
|
|
137
143
|
const resp = await apiPost(`/api/v1/hire/submissions/${submissionId}/verify`, {
|
|
138
|
-
vote
|
|
139
|
-
relevance_score:
|
|
140
|
-
quality_score:
|
|
144
|
+
vote,
|
|
145
|
+
relevance_score: relevanceScore,
|
|
146
|
+
quality_score: qualityScore,
|
|
141
147
|
views: 0,
|
|
142
148
|
likes: 0,
|
|
143
149
|
comments: 0,
|
package/dist/index.js
CHANGED
|
@@ -60,6 +60,9 @@ hire
|
|
|
60
60
|
.command('verify <submission-id>')
|
|
61
61
|
.description('Verify a hire submission')
|
|
62
62
|
.option('-w, --witness', 'Use x402 witness verification ($0.01)')
|
|
63
|
+
.requiredOption('-r, --relevance <score>', 'Relevance score (1-10)')
|
|
64
|
+
.requiredOption('-q, --quality <score>', 'Quality score (1-10)')
|
|
65
|
+
.option('-v, --vote <vote>', 'Vote: approve or reject', 'approve')
|
|
63
66
|
.action(async (taskId, options) => {
|
|
64
67
|
try {
|
|
65
68
|
await hireVerifyCommand(taskId, options);
|