@lucid-agents/taskmarket 1.36.0 → 1.38.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.
Files changed (25) hide show
  1. package/dist/agent-compatibility.json +1 -1
  2. package/dist/{api-BAW7ZGDD.js → api-TC2WI2WY.js} +2 -2
  3. package/dist/{channels-FAOZ67V2.js → channels-UFRYFVIT.js} +4 -4
  4. package/dist/{chunk-7TDHFFF2.js → chunk-3VNJBJSK.js} +1 -1
  5. package/dist/{chunk-AZ2N4KKB.js → chunk-6JQ7KVVK.js} +1 -1
  6. package/dist/{chunk-BQ63ZEML.js → chunk-7RISA22K.js} +1 -1
  7. package/dist/{chunk-F5ZHREXK.js → chunk-HF6T5WRD.js} +3 -3
  8. package/dist/{chunk-FXBA6X3I.js → chunk-LOUQO73Y.js} +5 -5
  9. package/dist/{chunk-6AIEGDDI.js → chunk-PYXJTK3J.js} +1 -1
  10. package/dist/{chunk-TKHBDRU6.js → chunk-QGTMCIZ3.js} +2 -2
  11. package/dist/{chunk-WJHT663R.js → chunk-U6KNPJQ3.js} +1 -1
  12. package/dist/{chunk-Q2NCP72I.js → chunk-UWGOLGKA.js} +8 -8
  13. package/dist/{chunk-WGQV5OG3.js → chunk-WOQ6DNU2.js} +3 -3
  14. package/dist/{chunk-NF3XHNJH.js → chunk-XSYOVYGF.js} +3 -3
  15. package/dist/{chunk-Q3IC6GTF.js → chunk-YGYWUPFH.js} +266 -112
  16. package/dist/{doctor-WFGKN5ZB.js → doctor-3X5OIY5A.js} +8 -8
  17. package/dist/index.js +244 -53
  18. package/dist/{launch-QWDD4WLN.js → launch-YMPZUCU6.js} +11 -11
  19. package/dist/pi-extensions/xgate.cjs +109 -2
  20. package/dist/{read-auth-JKSDOSKI.js → read-auth-7HZZGCWW.js} +3 -3
  21. package/dist/{reconcile-B33L7D3M.js → reconcile-KV6XDQVM.js} +4 -4
  22. package/dist/{status-CBGRCJQO.js → status-JBJOPZQO.js} +8 -8
  23. package/dist/{sync-pull-EA6TBOHC.js → sync-pull-EJMIUSC6.js} +4 -4
  24. package/dist/{task-access-grants-JF7LGUWX.js → task-access-grants-BIPLWENT.js} +2 -2
  25. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  listWorkerSubmissions,
15
15
  submitTaskFiles,
16
16
  taskRequirementsOf
17
- } from "./chunk-Q2NCP72I.js";
17
+ } from "./chunk-UWGOLGKA.js";
18
18
  import {
19
19
  ComputeCreditError,
20
20
  applyComputeCreditSetup,
@@ -35,15 +35,16 @@ import {
35
35
  reconcileX402PaymentById,
36
36
  refusedPaidWrite,
37
37
  releasePendingComputePurchase,
38
- resolvePendingComputePurchases
39
- } from "./chunk-F5ZHREXK.js";
38
+ resolvePendingComputePurchases,
39
+ x402FeePost
40
+ } from "./chunk-HF6T5WRD.js";
40
41
  import {
41
42
  signReadAuth
42
- } from "./chunk-TKHBDRU6.js";
43
+ } from "./chunk-QGTMCIZ3.js";
43
44
  import {
44
45
  saveTaskAccessGrant,
45
46
  taskAccessGrantHeaders
46
- } from "./chunk-6AIEGDDI.js";
47
+ } from "./chunk-PYXJTK3J.js";
47
48
  import {
48
49
  MPP_TEMPO_DEFAULT_VALIDITY_SECONDS,
49
50
  X402PayError,
@@ -61,7 +62,7 @@ import {
61
62
  setX402PolicyRuleEnabled,
62
63
  signSponsoredTempoTransfer,
63
64
  signTaskmarketFeePayment
64
- } from "./chunk-AZ2N4KKB.js";
65
+ } from "./chunk-6JQ7KVVK.js";
65
66
  import {
66
67
  ALL_NETWORKS,
67
68
  ApiError,
@@ -124,7 +125,7 @@ import {
124
125
  withErrorContext,
125
126
  withIdempotentWrite,
126
127
  withTapSignature
127
- } from "./chunk-WJHT663R.js";
128
+ } from "./chunk-U6KNPJQ3.js";
128
129
  import {
129
130
  AGENT_AVATAR_MAX_BYTES,
130
131
  AGENT_HIRES_ROLES,
@@ -154,6 +155,7 @@ import {
154
155
  CAPABILITY_LIMIT_MESSAGE,
155
156
  CapabilitiesListInputSchema,
156
157
  CapabilitiesListResponseSchema,
158
+ CatalogSubmissionEntrySchema,
157
159
  CrossChainFundingConfigOutputSchema,
158
160
  DEFAULT_EVALUATION_WINDOW_HOURS,
159
161
  DEFAULT_TERMS_BOUNDS,
@@ -177,6 +179,8 @@ import {
177
179
  HookIndexInputSchema,
178
180
  INITIAL_BRIEF_TURN_MESSAGE,
179
181
  IntentStatusResponseSchema,
182
+ LISTING_SUBMISSION_MAX_BYTES,
183
+ LISTING_SUBMISSION_STATUSES,
180
184
  LegalAcceptanceResponseSchema,
181
185
  LegalBundleSchema,
182
186
  LegalChallengeResponseSchema,
@@ -290,6 +294,7 @@ import {
290
294
  coreChains,
291
295
  dreamsToUsd,
292
296
  evaluationWindowError,
297
+ findHiddenCharacters,
293
298
  findTemplate,
294
299
  formatDreams,
295
300
  formatPaymentAmount,
@@ -301,6 +306,7 @@ import {
301
306
  hireSelectAtCapacityMessage,
302
307
  hireUnavailableAcknowledgeable,
303
308
  hireUnavailableMessage,
309
+ hookListingSubject,
304
310
  humanListingChangeError,
305
311
  isCapabilitySlug,
306
312
  isInFlightApiError,
@@ -310,6 +316,7 @@ import {
310
316
  isSolanaChainId,
311
317
  isTaskmarketChainId,
312
318
  isTerminalWalletBridgeStatus,
319
+ listingSubmissionWriteChange,
313
320
  marketEventPreferenceChange,
314
321
  needsYouKindForIntent,
315
322
  normalizeReferenceCode,
@@ -345,11 +352,11 @@ import {
345
352
  vaultCallGasLimit7702,
346
353
  verifierProviderId,
347
354
  verifiersUnsupportedOnChain
348
- } from "./chunk-Q3IC6GTF.js";
355
+ } from "./chunk-YGYWUPFH.js";
349
356
  import "./chunk-S7SJMJ2I.js";
350
357
 
351
358
  // src/index.ts
352
- import { Command as Command151 } from "commander";
359
+ import { Command as Command153 } from "commander";
353
360
  import { createRequire } from "module";
354
361
 
355
362
  // src/commands/init.ts
@@ -12980,7 +12987,7 @@ async function runAgentCommand(options) {
12980
12987
  try {
12981
12988
  const { assertAgentCompatibility } = await import("./compatibility-636WJOEX.js");
12982
12989
  const pi = assertAgentCompatibility();
12983
- const { runAgent } = await import("./launch-QWDD4WLN.js");
12990
+ const { runAgent } = await import("./launch-YMPZUCU6.js");
12984
12991
  result = await runAgent({
12985
12992
  model: options.model,
12986
12993
  pi,
@@ -13414,13 +13421,13 @@ function agentManagementCommands() {
13414
13421
  const status = new Command57("status").description(
13415
13422
  "Show the agent channels (locked, charged, refundable), purchases with an unknown outcome, the sandbox and compute credit. Reads only."
13416
13423
  ).action(async () => {
13417
- const { collectAgentStatus } = await import("./status-CBGRCJQO.js");
13424
+ const { collectAgentStatus } = await import("./status-JBJOPZQO.js");
13418
13425
  await run(() => collectAgentStatus());
13419
13426
  });
13420
13427
  const doctor = new Command57("doctor").description(
13421
13428
  "Check that the agent can start: Node and the bundled runtime, wallet and policy, channels, API, sandbox broker, host keys, xgate and RPC. Reads only."
13422
13429
  ).action(async () => {
13423
- const { runDoctor } = await import("./doctor-WFGKN5ZB.js");
13430
+ const { runDoctor } = await import("./doctor-3X5OIY5A.js");
13424
13431
  const report = await run(() => runDoctor());
13425
13432
  if (report && !report.ok) process.exitCode = 1;
13426
13433
  });
@@ -13431,7 +13438,7 @@ function agentManagementCommands() {
13431
13438
  "Reconcile the open purchases of this channel, as status lists it; also reaches retired channels"
13432
13439
  ).action(
13433
13440
  async (invocationId, options) => {
13434
- const { reconcileChannelPurchases, reconcileInvocation } = await import("./reconcile-B33L7D3M.js");
13441
+ const { reconcileChannelPurchases, reconcileInvocation } = await import("./reconcile-KV6XDQVM.js");
13435
13442
  const choice = { rail: options.rail, channel: options.channel };
13436
13443
  if (invocationId !== void 0) {
13437
13444
  await run(() => reconcileInvocation(invocationId, { choice }));
@@ -13463,7 +13470,7 @@ function agentManagementCommands() {
13463
13470
  `Not a USDC amount: ${options.amount} (digits, at most 6 decimals)`
13464
13471
  );
13465
13472
  }
13466
- const { openAgentChannels, requestTopUp, selectRail, withdrawalHatch } = await import("./channels-FAOZ67V2.js");
13473
+ const { openAgentChannels, requestTopUp, selectRail, withdrawalHatch } = await import("./channels-UFRYFVIT.js");
13467
13474
  const { rails } = await openAgentChannels();
13468
13475
  const result = await requestTopUp(selectRail(rails, options.rail), amount);
13469
13476
  return {
@@ -13483,8 +13490,8 @@ function agentManagementCommands() {
13483
13490
  await run(async () => {
13484
13491
  await requireExperimental();
13485
13492
  const { AGENT_VIEW_VERSION } = await import("./budget-view-J6L7X6EY.js");
13486
- const { closeChannel, openAgentChannels, selectChannel } = await import("./channels-FAOZ67V2.js");
13487
- const { reconcileLeasedPurchase } = await import("./reconcile-B33L7D3M.js");
13493
+ const { closeChannel, openAgentChannels, selectChannel } = await import("./channels-UFRYFVIT.js");
13494
+ const { reconcileLeasedPurchase } = await import("./reconcile-KV6XDQVM.js");
13488
13495
  const opened = await openAgentChannels();
13489
13496
  const { rail, retired } = selectChannel(opened, options);
13490
13497
  const result = await closeChannel(
@@ -13538,7 +13545,7 @@ function agentManagementCommands() {
13538
13545
  async (options) => {
13539
13546
  await run(async () => {
13540
13547
  await requireExperimental();
13541
- const { runPull } = await import("./sync-pull-EA6TBOHC.js");
13548
+ const { runPull } = await import("./sync-pull-EJMIUSC6.js");
13542
13549
  const { terminalPrompter } = await import("./prompter-LSICEYSQ.js");
13543
13550
  return runPull(options, {
13544
13551
  interactive: Boolean(process.stdin.isTTY && process.stdout.isTTY),
@@ -19258,22 +19265,55 @@ var removeCommand = new Command101("remove").description("Remove a bookmark; an
19258
19265
  return renderFailure(error);
19259
19266
  }
19260
19267
  });
19261
- var listCommand4 = new Command101("list").description("List your bookmarks, newest first; agent entries carry their chainId").option("--type <type>", `Only one kind: ${ENTITY_TYPES.join(", ")}`).option("--collection <id>", "Only bookmarks in this collection").option("--limit <n>", "Maximum bookmarks to return (1-100)", "50").option("--cursor <cursor>", "Cursor from previous page (nextCursor in JSON output)").action(async (opts) => {
19262
- const entityType = opts.type === void 0 ? void 0 : parseEntityType(opts.type, "--type");
19263
- if (entityType === null) return;
19264
- const limit = Number(opts.limit);
19265
- if (!Number.isInteger(limit) || limit < 1 || limit > 100) {
19266
- printError("--limit must be an integer from 1 to 100");
19267
- return;
19268
+ var listCommand4 = new Command101("list").description("List your bookmarks, newest first; agent entries carry their chainId").option("--type <type>", `Only one kind: ${ENTITY_TYPES.join(", ")}`).option("--collection <id>", "Only bookmarks in this collection").option("--pinned", "Only pinned bookmarks").option("--limit <n>", "Maximum bookmarks to return (1-100)", "50").option("--cursor <cursor>", "Cursor from previous page (nextCursor in JSON output)").action(
19269
+ async (opts) => {
19270
+ const entityType = opts.type === void 0 ? void 0 : parseEntityType(opts.type, "--type");
19271
+ if (entityType === null) return;
19272
+ const limit = Number(opts.limit);
19273
+ if (!Number.isInteger(limit) || limit < 1 || limit > 100) {
19274
+ printError("--limit must be an integer from 1 to 100");
19275
+ return;
19276
+ }
19277
+ const auth = await bookmarkAuth("Listing bookmarks");
19278
+ if (!auth) return;
19279
+ const params = new URLSearchParams({ limit: String(limit) });
19280
+ if (entityType) params.set("entityType", entityType);
19281
+ if (opts.collection) params.set("collectionId", opts.collection);
19282
+ if (opts.pinned) params.set("pinned", "true");
19283
+ if (opts.cursor) params.set("cursor", opts.cursor);
19284
+ try {
19285
+ printResult(await apiGet(`/api/bookmarks?${params.toString()}`, { headers: auth.headers }));
19286
+ } catch (error) {
19287
+ return renderFailure(error);
19288
+ }
19268
19289
  }
19269
- const auth = await bookmarkAuth("Listing bookmarks");
19290
+ );
19291
+ function pinToggle(name, description, action) {
19292
+ return new Command101(name).description(description).argument("<id>", "Bookmark id (from `taskmarket bookmark list`)").action(async (id) => {
19293
+ const auth = await bookmarkAuth(action);
19294
+ if (!auth) return;
19295
+ try {
19296
+ const { data, idempotencyKey } = await apiPost(
19297
+ `/api/bookmarks/${name}`,
19298
+ { id },
19299
+ { headers: auth.headers }
19300
+ );
19301
+ printResult(data, { idempotencyKey });
19302
+ } catch (error) {
19303
+ return renderFailure(error);
19304
+ }
19305
+ });
19306
+ }
19307
+ var countCommand = new Command101("count").description("Count your saved bookmarks").option("--pinned", "Count only pinned bookmarks").action(async (opts) => {
19308
+ const auth = await bookmarkAuth("Counting bookmarks");
19270
19309
  if (!auth) return;
19271
- const params = new URLSearchParams({ limit: String(limit) });
19272
- if (entityType) params.set("entityType", entityType);
19273
- if (opts.collection) params.set("collectionId", opts.collection);
19274
- if (opts.cursor) params.set("cursor", opts.cursor);
19310
+ const params = new URLSearchParams();
19311
+ if (opts.pinned) params.set("pinned", "true");
19312
+ const query4 = params.toString();
19275
19313
  try {
19276
- printResult(await apiGet(`/api/bookmarks?${params.toString()}`, { headers: auth.headers }));
19314
+ printResult(
19315
+ await apiGet(`/api/bookmarks/count${query4 ? `?${query4}` : ""}`, { headers: auth.headers })
19316
+ );
19277
19317
  } catch (error) {
19278
19318
  return renderFailure(error);
19279
19319
  }
@@ -19284,6 +19324,13 @@ var bookmarkCommand = new Command101("bookmark").description(
19284
19324
  bookmarkCommand.addCommand(addCommand);
19285
19325
  bookmarkCommand.addCommand(removeCommand);
19286
19326
  bookmarkCommand.addCommand(listCommand4);
19327
+ bookmarkCommand.addCommand(countCommand);
19328
+ bookmarkCommand.addCommand(
19329
+ pinToggle("pin", "Pin a bookmark by its id; pinning again keeps the first pin time", "Pinning")
19330
+ );
19331
+ bookmarkCommand.addCommand(
19332
+ pinToggle("unpin", "Unpin a bookmark by its id; it stays saved", "Unpinning")
19333
+ );
19287
19334
  bookmarkCommand.addCommand(collectionCommand);
19288
19335
 
19289
19336
  // src/commands/skills/index.ts
@@ -27461,19 +27508,34 @@ var workflowCommand = new Command146("workflow").description(
27461
27508
 
27462
27509
  // src/commands/drops.ts
27463
27510
  import { Command as Command147 } from "commander";
27464
- var listCommand9 = new Command147("list").description("List public Task Drops, ones accepting work first").option("--limit <n>", "Maximum drops to return (1-48)", "24").option("--cursor <cursor>", "nextCursor from a previous page").action(async (opts) => {
27465
- try {
27466
- const input = parseInput(TaskDropDirectoryInputSchema, {
27467
- limit: optionalInt(opts.limit),
27468
- cursor: opts.cursor
27469
- });
27470
- const params = new URLSearchParams({ limit: String(input.limit) });
27471
- if (input.cursor) params.set("cursor", input.cursor);
27472
- printResult(await apiGet(`/api/task-drops/directory?${params.toString()}`));
27473
- } catch (err) {
27474
- renderFailure(err);
27511
+ var listCommand9 = new Command147("list").description("List public Task Drops, ones accepting work first").option("--limit <n>", "Maximum drops to return (1-48)", "24").option("--cursor <cursor>", "nextCursor from a previous page").option("--status <status>", "ended: only drops no longer accepting work, newest first").option("--worker <address>", "Only drops this wallet entered (a submission, pitch or bid)").option("--entered", "Only drops your wallet entered (--worker with your own address)").action(
27512
+ async (opts) => {
27513
+ try {
27514
+ if (opts.worker && opts.entered) throw new Error("Pass --worker or --entered, not both");
27515
+ let worker = opts.worker;
27516
+ if (opts.entered) {
27517
+ try {
27518
+ worker = (await loadKeystore()).walletAddress;
27519
+ } catch {
27520
+ throw new Error("No keystore found. Run `taskmarket init` first, or pass --worker.");
27521
+ }
27522
+ }
27523
+ const input = parseInput(TaskDropDirectoryInputSchema, {
27524
+ limit: optionalInt(opts.limit),
27525
+ cursor: opts.cursor,
27526
+ status: opts.status,
27527
+ worker
27528
+ });
27529
+ const params = new URLSearchParams({ limit: String(input.limit) });
27530
+ if (input.cursor) params.set("cursor", input.cursor);
27531
+ if (input.status) params.set("status", input.status);
27532
+ if (input.worker) params.set("worker", input.worker.toLowerCase());
27533
+ printResult(await apiGet(`/api/task-drops/directory?${params.toString()}`));
27534
+ } catch (err) {
27535
+ renderFailure(err);
27536
+ }
27475
27537
  }
27476
- });
27538
+ );
27477
27539
  var showCommand6 = new Command147("show").description("Show a Task Drop and its discoverable tasks").argument("<taskDropId>", "Task Drop ID").action(async (taskDropId) => {
27478
27540
  try {
27479
27541
  const input = parseInput(TaskDropGetInputSchema, { taskDropId });
@@ -27534,8 +27596,132 @@ var statusCommand4 = new Command147("status").description("Check whether an emai
27534
27596
  var dropsCommand = new Command147("drops").description("Browse Task Drops and manage email subscriptions to them").addCommand(listCommand9).addCommand(showCommand6).addCommand(subscribeCommand).addCommand(statusCommand4);
27535
27597
 
27536
27598
  // src/commands/hooks.ts
27537
- import { Command as Command148 } from "commander";
27599
+ import { Command as Command149 } from "commander";
27538
27600
  import { BaseError, ContractFunctionRevertedError, ContractFunctionZeroDataError } from "viem";
27601
+
27602
+ // src/lib/listing-submissions.ts
27603
+ import { readFile as readFile6 } from "fs/promises";
27604
+ import { Command as Command148 } from "commander";
27605
+ var NOTICE = "Submitted for staff review. The action fee is kept whether the submission is approved or rejected. Approval opens a review pull request; `listed` turns true once the entry is served.";
27606
+ function prepareListingFile(kind, text) {
27607
+ if (Buffer.byteLength(text, "utf8") > LISTING_SUBMISSION_MAX_BYTES) {
27608
+ return {
27609
+ valid: false,
27610
+ reason: `A submission is at most ${LISTING_SUBMISSION_MAX_BYTES} bytes`
27611
+ };
27612
+ }
27613
+ let parsed;
27614
+ try {
27615
+ parsed = JSON.parse(text);
27616
+ } catch {
27617
+ return { valid: false, reason: "The file is not valid JSON" };
27618
+ }
27619
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
27620
+ return { valid: false, reason: "The file must hold one JSON object" };
27621
+ }
27622
+ const hidden = findHiddenCharacters(kind === "catalog" ? parsed : text);
27623
+ if (hidden) {
27624
+ return {
27625
+ valid: false,
27626
+ reason: `The file contains a control or invisible character at ${hidden}`
27627
+ };
27628
+ }
27629
+ if (kind === "hook") {
27630
+ const subject = hookListingSubject(parsed);
27631
+ if (!subject) {
27632
+ return {
27633
+ valid: false,
27634
+ reason: "A hook manifest submitted for listing must contain exactly one deployment"
27635
+ };
27636
+ }
27637
+ return { valid: true, value: { subject, body: { manifest: text }, signed: text } };
27638
+ }
27639
+ const entryKind = parsed.kind;
27640
+ if (entryKind !== "x402-endpoint") {
27641
+ return {
27642
+ valid: false,
27643
+ reason: `Only kind "x402-endpoint" entries can be submitted; the file has kind ${JSON.stringify(entryKind ?? null)}`
27644
+ };
27645
+ }
27646
+ const entry = CatalogSubmissionEntrySchema.safeParse(parsed);
27647
+ if (!entry.success) {
27648
+ const issue = entry.error.issues[0];
27649
+ return {
27650
+ valid: false,
27651
+ reason: `Invalid catalog entry: ${issue.path.join(".") || "entry"}: ${issue.message}`
27652
+ };
27653
+ }
27654
+ return {
27655
+ valid: true,
27656
+ value: { subject: entry.data.id, body: { entry: entry.data }, signed: entry.data }
27657
+ };
27658
+ }
27659
+ function submitCommandFor(kind) {
27660
+ const what = kind === "catalog" ? "catalog entry (kind x402-endpoint)" : "hook manifest";
27661
+ return new Command148("submit").description(
27662
+ `Submit a ${what} for staff review. Pays the standard action fee, kept either way; needs an ERC-8004 identity on the selected network`
27663
+ ).requiredOption("--file <path>", `Path to the ${what} JSON file`).action(async (opts) => {
27664
+ let text;
27665
+ try {
27666
+ text = await readFile6(opts.file, "utf8");
27667
+ } catch {
27668
+ printError(`Cannot read ${opts.file}`);
27669
+ return;
27670
+ }
27671
+ const prepared = prepareListingFile(kind, text);
27672
+ if (!prepared.valid) {
27673
+ printError(prepared.reason);
27674
+ return;
27675
+ }
27676
+ const { subject, body, signed } = prepared.value;
27677
+ try {
27678
+ const proof = await signWalletWrite(
27679
+ "listing-submission",
27680
+ listingSubmissionWriteChange(kind, subject, signed)
27681
+ );
27682
+ const { data, idempotencyKey } = await x402FeePost(
27683
+ kind === "catalog" ? "/api/catalog/submissions" : "/api/hooks/submissions",
27684
+ { chainId: selectedNetwork().chainId, ...body, ...proof }
27685
+ );
27686
+ printResult({ ...data, notice: NOTICE }, { idempotencyKey });
27687
+ } catch (error) {
27688
+ return renderFailure(error);
27689
+ }
27690
+ });
27691
+ }
27692
+ function submissionsCommandFor(kind) {
27693
+ return new Command148("submissions").description(
27694
+ `List the ${kind === "catalog" ? "catalog entries" : "hook listings"} you submitted and their status`
27695
+ ).option("--status <status>", `Only this status: ${LISTING_SUBMISSION_STATUSES.join(", ")}`).option("--limit <n>", "Maximum submissions to return (1-100)", "50").action(async (opts) => {
27696
+ if (opts.status && !LISTING_SUBMISSION_STATUSES.includes(opts.status)) {
27697
+ printError(`--status must be one of ${LISTING_SUBMISSION_STATUSES.join(", ")}`);
27698
+ return;
27699
+ }
27700
+ const limit = Number(opts.limit);
27701
+ if (!Number.isInteger(limit) || limit < 1 || limit > 100) {
27702
+ printError("--limit must be an integer from 1 to 100");
27703
+ return;
27704
+ }
27705
+ const auth = await signReadAuth();
27706
+ if (!auth || Object.keys(auth.headers).length === 0) {
27707
+ printError("Listing submissions needs a wallet. Run `taskmarket init` first.");
27708
+ return;
27709
+ }
27710
+ const params = new URLSearchParams({ kind, limit: String(limit) });
27711
+ if (opts.status) params.set("status", opts.status);
27712
+ try {
27713
+ printResult(
27714
+ await apiGet(`/api/listing-submissions/mine?${params.toString()}`, {
27715
+ headers: auth.headers
27716
+ })
27717
+ );
27718
+ } catch (error) {
27719
+ return renderFailure(error);
27720
+ }
27721
+ });
27722
+ }
27723
+
27724
+ // src/commands/hooks.ts
27539
27725
  function withV2Declarations(entry) {
27540
27726
  const mask = capabilitiesOf(entry);
27541
27727
  const served = entry.hookVersion;
@@ -27570,7 +27756,7 @@ async function probeHookVersion(entry, chainId) {
27570
27756
  return reverted ? { ...entry, hookVersion: 1 } : entry;
27571
27757
  }
27572
27758
  }
27573
- var listCommand10 = new Command148("list").description(
27759
+ var listCommand10 = new Command149("list").description(
27574
27760
  "List hooks listed (verified) in the hook registry on the selected --network, then observed hooks that are not listed"
27575
27761
  ).option("--limit <n>", "Maximum unlisted observed hooks to return (1-100)", "50").option("--observed", "Return the raw onchain observation index instead of the registry view").option(
27576
27762
  "--cursor <cursor>",
@@ -27609,7 +27795,7 @@ var listCommand10 = new Command148("list").description(
27609
27795
  }
27610
27796
  }
27611
27797
  );
27612
- var showCommand7 = new Command148("show").description(
27798
+ var showCommand7 = new Command149("show").description(
27613
27799
  "Show one hook on the selected --network: its registry listing, or its onchain observation marked unlisted"
27614
27800
  ).argument("<address>", "Hook contract address").action(async (address3) => {
27615
27801
  try {
@@ -27629,7 +27815,7 @@ var showCommand7 = new Command148("show").description(
27629
27815
  renderFailure(err);
27630
27816
  }
27631
27817
  });
27632
- var encodeConfigCommand = new Command148("encode-config").description(
27818
+ var encodeConfigCommand = new Command149("encode-config").description(
27633
27819
  "Encode a V2 hook's typed configuration from its registry config schema, for --hook-config"
27634
27820
  ).argument("<address>", "Hook contract address").requiredOption(
27635
27821
  "--values <json>",
@@ -27658,7 +27844,7 @@ var encodeConfigCommand = new Command148("encode-config").description(
27658
27844
  renderFailure(err);
27659
27845
  }
27660
27846
  });
27661
- var attachmentConfigCommand = new Command148("attachment-config").description(
27847
+ var attachmentConfigCommand = new Command149("attachment-config").description(
27662
27848
  "Show the protocol-default hook order and maximum hooks per task on the selected --network"
27663
27849
  ).action(async () => {
27664
27850
  try {
@@ -27667,12 +27853,16 @@ var attachmentConfigCommand = new Command148("attachment-config").description(
27667
27853
  renderFailure(err);
27668
27854
  }
27669
27855
  });
27670
- var hooksCommand = new Command148("hooks").description("Browse the hook registry on the selected --network").addCommand(listCommand10).addCommand(showCommand7).addCommand(encodeConfigCommand).addCommand(attachmentConfigCommand);
27856
+ var hooksCommand = new Command149("hooks").description("Browse the hook registry on the selected --network").addCommand(listCommand10).addCommand(showCommand7).addCommand(encodeConfigCommand).addCommand(attachmentConfigCommand).addCommand(submitCommandFor("hook")).addCommand(submissionsCommandFor("hook"));
27857
+
27858
+ // src/commands/catalog/index.ts
27859
+ import { Command as Command150 } from "commander";
27860
+ var catalogCommand = new Command150("catalog").description("Submit paid endpoints to the Taskmarket catalog and track your submissions").addCommand(submitCommandFor("catalog")).addCommand(submissionsCommandFor("catalog"));
27671
27861
 
27672
27862
  // src/commands/tap.ts
27673
27863
  import { promises as fs12 } from "fs";
27674
- import { Command as Command149 } from "commander";
27675
- var tapCommand = new Command149("tap").description(
27864
+ import { Command as Command151 } from "commander";
27865
+ var tapCommand = new Command151("tap").description(
27676
27866
  "Manage the TAP signing key used on tasks that require TAP verification"
27677
27867
  );
27678
27868
  tapCommand.command("import").description(
@@ -27831,7 +28021,7 @@ tapCommand.command("remove").description("Remove the TAP key from the keystore")
27831
28021
  });
27832
28022
 
27833
28023
  // src/commands/hire.ts
27834
- import { Command as Command150 } from "commander";
28024
+ import { Command as Command152 } from "commander";
27835
28025
  var OWN_FLAGS = /* @__PURE__ */ new Set(["--mode", "--hire-worker", "--service-id"]);
27836
28026
  async function lookupListedService(worker, serviceId) {
27837
28027
  let listing;
@@ -27863,7 +28053,7 @@ function hireEvaluatorError(opts, requiresEvaluator) {
27863
28053
  }
27864
28054
  return null;
27865
28055
  }
27866
- var hireCommand = new Command150("hire").description(
28056
+ var hireCommand = new Command152("hire").description(
27867
28057
  "Hire a worker, a human or an agent: create a claim task only that worker may accept or decline before the accept window ends (costs the reward, in the payment token). Private visibility and every settlement terms flag of task create apply."
27868
28058
  ).argument("<worker>", "The worker's wallet address (a human or an agent)").option("--service <id>", "The listed service this hire is for (from the worker's listing)").option(
27869
28059
  "--requires-evaluator",
@@ -27926,7 +28116,7 @@ hireCommand.action(async (worker, opts) => {
27926
28116
  // src/index.ts
27927
28117
  var require2 = createRequire(import.meta.url);
27928
28118
  var { version } = require2("../package.json");
27929
- var program = new Command151();
28119
+ var program = new Command153();
27930
28120
  setLastErrorCliVersion(version);
27931
28121
  program.name("taskmarket").description("Taskmarket CLI for AI agents").version(version);
27932
28122
  program.option(
@@ -27987,6 +28177,7 @@ program.addCommand(projectCommand);
27987
28177
  program.addCommand(workflowCommand);
27988
28178
  program.addCommand(dropsCommand);
27989
28179
  program.addCommand(hooksCommand);
28180
+ program.addCommand(catalogCommand);
27990
28181
  program.addCommand(hireCommand);
27991
28182
  program.addCommand(hiresCommand);
27992
28183
  program.addCommand(bugCommand);
@@ -38,7 +38,7 @@ import {
38
38
  sha256Hex,
39
39
  specHash,
40
40
  taskStage
41
- } from "./chunk-NF3XHNJH.js";
41
+ } from "./chunk-XSYOVYGF.js";
42
42
  import {
43
43
  SessionSync,
44
44
  emptyBase,
@@ -47,7 +47,7 @@ import {
47
47
  recordSessionEnd,
48
48
  recordSessionStart,
49
49
  uploadPlan
50
- } from "./chunk-BQ63ZEML.js";
50
+ } from "./chunk-7RISA22K.js";
51
51
  import {
52
52
  BrokerConnector,
53
53
  OutputLimitError,
@@ -59,7 +59,7 @@ import {
59
59
  serveSandboxChannel,
60
60
  withFileLock,
61
61
  writeAtomic
62
- } from "./chunk-7TDHFFF2.js";
62
+ } from "./chunk-3VNJBJSK.js";
63
63
  import {
64
64
  TaskOperationError,
65
65
  claimTask,
@@ -78,7 +78,7 @@ import {
78
78
  requestArtifactUpload,
79
79
  submitUploadedArtifacts,
80
80
  taskAwardsOf
81
- } from "./chunk-Q2NCP72I.js";
81
+ } from "./chunk-UWGOLGKA.js";
82
82
  import {
83
83
  applyComputeCreditSetup,
84
84
  atomicToUsd,
@@ -88,13 +88,13 @@ import {
88
88
  planComputeCreditSetup,
89
89
  readComputeCreditBalance,
90
90
  usdToAtomic
91
- } from "./chunk-F5ZHREXK.js";
91
+ } from "./chunk-HF6T5WRD.js";
92
92
  import {
93
93
  signReadAuth
94
- } from "./chunk-TKHBDRU6.js";
94
+ } from "./chunk-QGTMCIZ3.js";
95
95
  import {
96
96
  taskAccessGrantHeaders
97
- } from "./chunk-6AIEGDDI.js";
97
+ } from "./chunk-PYXJTK3J.js";
98
98
  import {
99
99
  MAX_RETIRED_RAILS,
100
100
  NETWORK_NAMES,
@@ -118,7 +118,7 @@ import {
118
118
  routeOfCatalogRow,
119
119
  saveAgentPolicy,
120
120
  settledRetiredRails
121
- } from "./chunk-WGQV5OG3.js";
121
+ } from "./chunk-WOQ6DNU2.js";
122
122
  import {
123
123
  BASE_CHANNEL_RAIL_ID,
124
124
  createBaseChannelPayer,
@@ -132,13 +132,13 @@ import {
132
132
  rpcUrlForNetwork,
133
133
  saveX402Policy,
134
134
  x402SpendWindowAvailability
135
- } from "./chunk-AZ2N4KKB.js";
135
+ } from "./chunk-6JQ7KVVK.js";
136
136
  import {
137
137
  apiUrl,
138
138
  keystoreExists,
139
139
  loadKeystore,
140
140
  selectedNetwork
141
- } from "./chunk-WJHT663R.js";
141
+ } from "./chunk-U6KNPJQ3.js";
142
142
  import {
143
143
  IntentStatusResponseSchema,
144
144
  NetworkChainInfoSchema,
@@ -147,7 +147,7 @@ import {
147
147
  isRecordingPendingResponse,
148
148
  piCodingAgentTools,
149
149
  taskmarketChain
150
- } from "./chunk-Q3IC6GTF.js";
150
+ } from "./chunk-YGYWUPFH.js";
151
151
  import {
152
152
  AgentLaunchError
153
153
  } from "./chunk-YM4S6IE4.js";