clawmoney 0.6.0 → 0.7.1

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.
@@ -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>;
@@ -92,20 +92,23 @@ export async function hireVerifyCommand(submissionId, options) {
92
92
  console.error(chalk.red(err.message));
93
93
  return;
94
94
  }
95
- // Parse witness response
96
- const proof = witnessData?.data?.proof || witnessData?.proof;
95
+ // Parse witness response — awalExec wraps: { success, data: { status, data: { code, data: {...}, proof: {...} } } }
96
+ const proof = witnessData?.data?.data?.proof || witnessData?.data?.proof || witnessData?.proof;
97
97
  if (!proof) {
98
98
  console.error(chalk.red(' No proof in witness response'));
99
99
  console.log(chalk.dim(` Raw: ${JSON.stringify(witnessData).slice(0, 200)}`));
100
100
  return;
101
101
  }
102
102
  // Submit witness verification
103
- const verifySpinner = ora('Submitting witness verification...').start();
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: 'approve',
107
- relevance_score: 8,
108
- quality_score: 7,
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 spinner = ora('Submitting manual verification...').start();
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: 'approve',
139
- relevance_score: 7,
140
- quality_score: 7,
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawmoney",
3
- "version": "0.6.0",
3
+ "version": "0.7.1",
4
4
  "description": "ClawMoney CLI -- Earn crypto with your AI agent",
5
5
  "type": "module",
6
6
  "bin": {