@lucid-agents/taskmarket 0.6.3 → 0.6.4

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,23 +5,31 @@ import { printResult } from '../lib/output.js';
5
5
  export const statsCommand = new Command('stats')
6
6
  .description('View agent statistics')
7
7
  .option('--address <addr>', 'Wallet address (defaults to own wallet)')
8
+ .option('--agent <agentId>', 'Agent ID (alternative to --address)')
8
9
  .action(async (opts) => {
9
10
  let address = opts.address;
10
11
  if (!address) {
11
12
  const keystore = await loadKeystore();
12
13
  address = keystore.walletAddress;
13
14
  }
15
+ const statsQuery = opts.agent
16
+ ? `/api/agents/stats?agentId=${opts.agent}`
17
+ : `/api/agents/stats?address=${address}`;
14
18
  const [result, balanceResult] = await Promise.all([
15
- apiGet(`/api/agents/stats?address=${address}`),
19
+ apiGet(statsQuery),
16
20
  apiGet(`/api/wallet/balance?address=${address}`),
17
21
  ]);
18
22
  printResult({
19
- address,
23
+ agentId: result.agentId,
24
+ address: result.address,
20
25
  balanceUsdc: balanceResult.balanceUsdc,
21
26
  balanceBaseUnits: balanceResult.balanceBaseUnits,
22
27
  completedTasks: result.completedTasks,
28
+ ratedTasks: result.ratedTasks,
23
29
  averageRating: result.averageRating,
24
30
  totalEarnings: result.totalEarnings,
31
+ skills: result.skills,
32
+ recentRatings: result.recentRatings,
25
33
  });
26
34
  });
27
35
  //# sourceMappingURL=stats.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stats.js","sourceRoot":"","sources":["../../src/commands/stats.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,OAAO,CAAC,O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KAClE,MAAM,CAAC,KAAK,EAAE,IAA0C,EAAE,EAAE;IAC3D,IAAI,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;IAC3B,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,QAAQ,GAAG,MAAM,YAAY,EAAE,CAAC;QACtC,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC;IACnC,CAAC;IAED,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK;QAC3B,CAAC,CAAC,6BAA6B,IAAI,CAAC,KAAK,EAAE;QAC3C,CAAC,CAAC,6BAA6B,OAAO,EAAE,CAAC;IAE3C,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAChD,MAAM,CAAC,UAAU,CASf;QACF,MAAM,CAAC,+BAA+B,OAAO,EAAE,CAG7C;KACH,CAAC,CAAC;IAEH,WAAW,CAAC;QACV,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,WAAW,EAAE,aAAa,CAAC,WAAW;QACtC,gBAAgB,EAAE,aAAa,CAAC,gBAAgB;QAChD,cAAc,EAAE,MAAM,CAAC,cAAc;QACrC,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,aAAa,EAAE,MAAM,CAAC,aAAa;QACnC,aAAa,EAAE,MAAM,CAAC,aAAa;QACnC,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,aAAa,EAAE,MAAM,CAAC,aAAa;KACpC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,18 +1,15 @@
1
1
  import { Command } from 'commander';
2
- import { loadKeystore } from '../../lib/keystore.js';
3
- import { apiPost } from '../../lib/api.js';
2
+ import { x402Post } from '../../lib/x402.js';
4
3
  import { printResult } from '../../lib/output.js';
5
4
  export const bidCmd = new Command('bid')
6
5
  .description('Submit a bid on an auction task')
7
6
  .argument('<taskId>', 'Task ID (0x-prefixed hex)')
8
7
  .requiredOption('--price <usdc>', 'Bid price in USDC (e.g. 3 or 1.5)')
9
8
  .action(async (taskId, opts) => {
10
- const keystore = await loadKeystore();
11
9
  const priceBaseUnits = String(Math.round(parseFloat(opts.price) * 1e6));
12
- const result = (await apiPost(`/api/tasks/${taskId}/bids`, {
10
+ const result = (await x402Post(`/api/tasks/${taskId}/bids`, {
13
11
  taskId,
14
12
  price: priceBaseUnits,
15
- workerAddress: keystore.walletAddress,
16
13
  }));
17
14
  printResult({ bidId: result.bidId });
18
15
  });
@@ -1 +1 @@
1
- {"version":3,"file":"bid.js","sourceRoot":"","sources":["../../../src/commands/task/bid.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,OAAO,CAAC,KAAK,CAAC;KACrC,WAAW,CAAC,iCAAiC,CAAC;KAC9C,QAAQ,CAAC,UAAU,EAAE,2BAA2B,CAAC;KACjD,cAAc,CAAC,gBAAgB,EAAE,mCAAmC,CAAC;KACrE,MAAM,CAAC,KAAK,EAAE,MAAc,EAAE,IAAuB,EAAE,EAAE;IACxD,MAAM,QAAQ,GAAG,MAAM,YAAY,EAAE,CAAC;IACtC,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;IAExE,MAAM,MAAM,GAAG,CAAC,MAAM,OAAO,CAAC,cAAc,MAAM,OAAO,EAAE;QACzD,MAAM;QACN,KAAK,EAAE,cAAc;QACrB,aAAa,EAAE,QAAQ,CAAC,aAAa;KACtC,CAAC,CAAsB,CAAC;IAEzB,WAAW,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;AACvC,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"bid.js","sourceRoot":"","sources":["../../../src/commands/task/bid.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,OAAO,CAAC,KAAK,CAAC;KACrC,WAAW,CAAC,iCAAiC,CAAC;KAC9C,QAAQ,CAAC,UAAU,EAAE,2BAA2B,CAAC;KACjD,cAAc,CAAC,gBAAgB,EAAE,mCAAmC,CAAC;KACrE,MAAM,CAAC,KAAK,EAAE,MAAc,EAAE,IAAuB,EAAE,EAAE;IACxD,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;IAExE,MAAM,MAAM,GAAG,CAAC,MAAM,QAAQ,CAAC,cAAc,MAAM,OAAO,EAAE;QAC1D,MAAM;QACN,KAAK,EAAE,cAAc;KACtB,CAAC,CAAsB,CAAC;IAEzB,WAAW,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;AACvC,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lucid-agents/taskmarket",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "taskmarket": "./dist/index.js"