@lucid-agents/taskmarket 1.36.0 → 1.37.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/agent-compatibility.json +1 -1
- package/dist/{api-BAW7ZGDD.js → api-X7M5ZRFO.js} +2 -2
- package/dist/{channels-FAOZ67V2.js → channels-JRY5YSNU.js} +4 -4
- package/dist/{chunk-6AIEGDDI.js → chunk-5YGFSGJA.js} +1 -1
- package/dist/{chunk-NF3XHNJH.js → chunk-ATZLUOQX.js} +3 -3
- package/dist/{chunk-Q3IC6GTF.js → chunk-AUDDFWKQ.js} +247 -111
- package/dist/{chunk-FXBA6X3I.js → chunk-HNTWHQBL.js} +5 -5
- package/dist/{chunk-F5ZHREXK.js → chunk-IDSGZXDR.js} +3 -3
- package/dist/{chunk-WGQV5OG3.js → chunk-M2UVDGSH.js} +3 -3
- package/dist/{chunk-7TDHFFF2.js → chunk-NO227FAP.js} +1 -1
- package/dist/{chunk-Q2NCP72I.js → chunk-OK3AHSZH.js} +8 -8
- package/dist/{chunk-BQ63ZEML.js → chunk-SKD2T3UR.js} +1 -1
- package/dist/{chunk-TKHBDRU6.js → chunk-TDQHU2JT.js} +2 -2
- package/dist/{chunk-WJHT663R.js → chunk-XL76RC3P.js} +1 -1
- package/dist/{chunk-AZ2N4KKB.js → chunk-YQLA6EXP.js} +1 -1
- package/dist/{doctor-WFGKN5ZB.js → doctor-QGHPARVU.js} +8 -8
- package/dist/index.js +217 -41
- package/dist/{launch-QWDD4WLN.js → launch-6VCLZ7XR.js} +11 -11
- package/dist/pi-extensions/xgate.cjs +90 -1
- package/dist/{read-auth-JKSDOSKI.js → read-auth-AVN4SJSZ.js} +3 -3
- package/dist/{reconcile-B33L7D3M.js → reconcile-HEON5ETE.js} +4 -4
- package/dist/{status-CBGRCJQO.js → status-6PCJLCTM.js} +8 -8
- package/dist/{sync-pull-EA6TBOHC.js → sync-pull-62R4YTEO.js} +4 -4
- package/dist/{task-access-grants-JF7LGUWX.js → task-access-grants-MIWSFZZ3.js} +2 -2
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { createRequire as __tmCreateRequire } from 'node:module'; import { fileURLToPath as __tmFileURLToPath } from 'node:url'; import { dirname as __tmDirname } from 'node:path'; const require = __tmCreateRequire(import.meta.url); const __tmFilename = __tmFileURLToPath(import.meta.url); const __tmDirnameValue = __tmDirname(__tmFilename);
|
|
2
2
|
import {
|
|
3
3
|
x402FeePost
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-IDSGZXDR.js";
|
|
5
5
|
import {
|
|
6
6
|
signReadAuth
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-TDQHU2JT.js";
|
|
8
8
|
import {
|
|
9
9
|
taskAccessGrantHeaders
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-5YGFSGJA.js";
|
|
11
11
|
import {
|
|
12
12
|
apiGet,
|
|
13
13
|
apiPost,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
runWorkerAction,
|
|
16
16
|
signMessage,
|
|
17
17
|
taskRequiresTap
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-XL76RC3P.js";
|
|
19
19
|
import {
|
|
20
20
|
TaskAwardSchema,
|
|
21
21
|
buildClaimMessage,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
buildSubmitUploadMessage,
|
|
24
24
|
isRecordingPendingResponse,
|
|
25
25
|
submitUploadExpiresAt
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-AUDDFWKQ.js";
|
|
27
27
|
|
|
28
28
|
// src/sdk/artifact-upload.ts
|
|
29
29
|
import { extname } from "path";
|
|
@@ -115,9 +115,9 @@ function putArtifactBytes(uploadUrl, data, mimeType, onProgress, idleTimeoutMs =
|
|
|
115
115
|
// src/lib/worker-attestation.ts
|
|
116
116
|
var requirementCache = /* @__PURE__ */ new Map();
|
|
117
117
|
async function defaultGet(path) {
|
|
118
|
-
const { apiGet: apiGet2 } = await import("./api-
|
|
119
|
-
const { signReadAuth: signReadAuth2 } = await import("./read-auth-
|
|
120
|
-
const { taskAccessGrantHeaders: taskAccessGrantHeaders2 } = await import("./task-access-grants-
|
|
118
|
+
const { apiGet: apiGet2 } = await import("./api-X7M5ZRFO.js");
|
|
119
|
+
const { signReadAuth: signReadAuth2 } = await import("./read-auth-AVN4SJSZ.js");
|
|
120
|
+
const { taskAccessGrantHeaders: taskAccessGrantHeaders2 } = await import("./task-access-grants-MIWSFZZ3.js");
|
|
121
121
|
const taskId = /^\/api\/tasks\/([^/?]+)/.exec(path)?.[1] ?? "";
|
|
122
122
|
return apiGet2(path, {
|
|
123
123
|
headers: {
|
|
@@ -2,12 +2,12 @@ import { createRequire as __tmCreateRequire } from 'node:module'; import { fileU
|
|
|
2
2
|
import {
|
|
3
3
|
createWalletAccountFromKeystore,
|
|
4
4
|
loadKeystore
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-XL76RC3P.js";
|
|
6
6
|
import {
|
|
7
7
|
READ_AUTH_ADDRESS_HEADER,
|
|
8
8
|
READ_AUTH_SIGNATURE_HEADER,
|
|
9
9
|
buildReadAuthMessage
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-AUDDFWKQ.js";
|
|
11
11
|
|
|
12
12
|
// src/lib/read-auth.ts
|
|
13
13
|
async function signReadAuth(signal) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRequire as __tmCreateRequire } from 'node:module'; import { fileURLToPath as __tmFileURLToPath } from 'node:url'; import { dirname as __tmDirname } from 'node:path'; const require = __tmCreateRequire(import.meta.url); const __tmFilename = __tmFileURLToPath(import.meta.url); const __tmDirnameValue = __tmDirname(__tmFilename);
|
|
2
2
|
import {
|
|
3
3
|
listSandboxes
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-HNTWHQBL.js";
|
|
5
|
+
import "./chunk-ATZLUOQX.js";
|
|
6
|
+
import "./chunk-NO227FAP.js";
|
|
7
|
+
import "./chunk-IDSGZXDR.js";
|
|
8
8
|
import {
|
|
9
9
|
AGENT_COMPATIBILITY,
|
|
10
10
|
assertAgentCompatibility,
|
|
@@ -16,19 +16,19 @@ import {
|
|
|
16
16
|
loadAgentPolicy,
|
|
17
17
|
openAgentChannels,
|
|
18
18
|
railChainIdHex
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-M2UVDGSH.js";
|
|
20
20
|
import {
|
|
21
21
|
getX402PolicyPath,
|
|
22
22
|
loadX402Policy,
|
|
23
23
|
rpcUrlForNetwork
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-YQLA6EXP.js";
|
|
25
25
|
import {
|
|
26
26
|
apiUrl,
|
|
27
27
|
keystoreExists,
|
|
28
28
|
loadKeystore,
|
|
29
29
|
withChainId
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import "./chunk-
|
|
30
|
+
} from "./chunk-XL76RC3P.js";
|
|
31
|
+
import "./chunk-AUDDFWKQ.js";
|
|
32
32
|
import "./chunk-YM4S6IE4.js";
|
|
33
33
|
import {
|
|
34
34
|
AGENT_VIEW_VERSION
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
listWorkerSubmissions,
|
|
15
15
|
submitTaskFiles,
|
|
16
16
|
taskRequirementsOf
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-OK3AHSZH.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
|
-
|
|
38
|
+
resolvePendingComputePurchases,
|
|
39
|
+
x402FeePost
|
|
40
|
+
} from "./chunk-IDSGZXDR.js";
|
|
40
41
|
import {
|
|
41
42
|
signReadAuth
|
|
42
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-TDQHU2JT.js";
|
|
43
44
|
import {
|
|
44
45
|
saveTaskAccessGrant,
|
|
45
46
|
taskAccessGrantHeaders
|
|
46
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-5YGFSGJA.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-
|
|
65
|
+
} from "./chunk-YQLA6EXP.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-
|
|
128
|
+
} from "./chunk-XL76RC3P.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-
|
|
355
|
+
} from "./chunk-AUDDFWKQ.js";
|
|
349
356
|
import "./chunk-S7SJMJ2I.js";
|
|
350
357
|
|
|
351
358
|
// src/index.ts
|
|
352
|
-
import { Command as
|
|
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-
|
|
12990
|
+
const { runAgent } = await import("./launch-6VCLZ7XR.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-
|
|
13424
|
+
const { collectAgentStatus } = await import("./status-6PCJLCTM.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-
|
|
13430
|
+
const { runDoctor } = await import("./doctor-QGHPARVU.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-
|
|
13441
|
+
const { reconcileChannelPurchases, reconcileInvocation } = await import("./reconcile-HEON5ETE.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-
|
|
13473
|
+
const { openAgentChannels, requestTopUp, selectRail, withdrawalHatch } = await import("./channels-JRY5YSNU.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-
|
|
13487
|
-
const { reconcileLeasedPurchase } = await import("./reconcile-
|
|
13493
|
+
const { closeChannel, openAgentChannels, selectChannel } = await import("./channels-JRY5YSNU.js");
|
|
13494
|
+
const { reconcileLeasedPurchase } = await import("./reconcile-HEON5ETE.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-
|
|
13548
|
+
const { runPull } = await import("./sync-pull-62R4YTEO.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(
|
|
19262
|
-
|
|
19263
|
-
|
|
19264
|
-
|
|
19265
|
-
|
|
19266
|
-
|
|
19267
|
-
|
|
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
|
-
|
|
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(
|
|
19272
|
-
if (
|
|
19273
|
-
|
|
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(
|
|
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
|
|
@@ -27534,8 +27581,132 @@ var statusCommand4 = new Command147("status").description("Check whether an emai
|
|
|
27534
27581
|
var dropsCommand = new Command147("drops").description("Browse Task Drops and manage email subscriptions to them").addCommand(listCommand9).addCommand(showCommand6).addCommand(subscribeCommand).addCommand(statusCommand4);
|
|
27535
27582
|
|
|
27536
27583
|
// src/commands/hooks.ts
|
|
27537
|
-
import { Command as
|
|
27584
|
+
import { Command as Command149 } from "commander";
|
|
27538
27585
|
import { BaseError, ContractFunctionRevertedError, ContractFunctionZeroDataError } from "viem";
|
|
27586
|
+
|
|
27587
|
+
// src/lib/listing-submissions.ts
|
|
27588
|
+
import { readFile as readFile6 } from "fs/promises";
|
|
27589
|
+
import { Command as Command148 } from "commander";
|
|
27590
|
+
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.";
|
|
27591
|
+
function prepareListingFile(kind, text) {
|
|
27592
|
+
if (Buffer.byteLength(text, "utf8") > LISTING_SUBMISSION_MAX_BYTES) {
|
|
27593
|
+
return {
|
|
27594
|
+
valid: false,
|
|
27595
|
+
reason: `A submission is at most ${LISTING_SUBMISSION_MAX_BYTES} bytes`
|
|
27596
|
+
};
|
|
27597
|
+
}
|
|
27598
|
+
let parsed;
|
|
27599
|
+
try {
|
|
27600
|
+
parsed = JSON.parse(text);
|
|
27601
|
+
} catch {
|
|
27602
|
+
return { valid: false, reason: "The file is not valid JSON" };
|
|
27603
|
+
}
|
|
27604
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
27605
|
+
return { valid: false, reason: "The file must hold one JSON object" };
|
|
27606
|
+
}
|
|
27607
|
+
const hidden = findHiddenCharacters(kind === "catalog" ? parsed : text);
|
|
27608
|
+
if (hidden) {
|
|
27609
|
+
return {
|
|
27610
|
+
valid: false,
|
|
27611
|
+
reason: `The file contains a control or invisible character at ${hidden}`
|
|
27612
|
+
};
|
|
27613
|
+
}
|
|
27614
|
+
if (kind === "hook") {
|
|
27615
|
+
const subject = hookListingSubject(parsed);
|
|
27616
|
+
if (!subject) {
|
|
27617
|
+
return {
|
|
27618
|
+
valid: false,
|
|
27619
|
+
reason: "A hook manifest submitted for listing must contain exactly one deployment"
|
|
27620
|
+
};
|
|
27621
|
+
}
|
|
27622
|
+
return { valid: true, value: { subject, body: { manifest: text }, signed: text } };
|
|
27623
|
+
}
|
|
27624
|
+
const entryKind = parsed.kind;
|
|
27625
|
+
if (entryKind !== "x402-endpoint") {
|
|
27626
|
+
return {
|
|
27627
|
+
valid: false,
|
|
27628
|
+
reason: `Only kind "x402-endpoint" entries can be submitted; the file has kind ${JSON.stringify(entryKind ?? null)}`
|
|
27629
|
+
};
|
|
27630
|
+
}
|
|
27631
|
+
const entry = CatalogSubmissionEntrySchema.safeParse(parsed);
|
|
27632
|
+
if (!entry.success) {
|
|
27633
|
+
const issue = entry.error.issues[0];
|
|
27634
|
+
return {
|
|
27635
|
+
valid: false,
|
|
27636
|
+
reason: `Invalid catalog entry: ${issue.path.join(".") || "entry"}: ${issue.message}`
|
|
27637
|
+
};
|
|
27638
|
+
}
|
|
27639
|
+
return {
|
|
27640
|
+
valid: true,
|
|
27641
|
+
value: { subject: entry.data.id, body: { entry: entry.data }, signed: entry.data }
|
|
27642
|
+
};
|
|
27643
|
+
}
|
|
27644
|
+
function submitCommandFor(kind) {
|
|
27645
|
+
const what = kind === "catalog" ? "catalog entry (kind x402-endpoint)" : "hook manifest";
|
|
27646
|
+
return new Command148("submit").description(
|
|
27647
|
+
`Submit a ${what} for staff review. Pays the standard action fee, kept either way; needs an ERC-8004 identity on the selected network`
|
|
27648
|
+
).requiredOption("--file <path>", `Path to the ${what} JSON file`).action(async (opts) => {
|
|
27649
|
+
let text;
|
|
27650
|
+
try {
|
|
27651
|
+
text = await readFile6(opts.file, "utf8");
|
|
27652
|
+
} catch {
|
|
27653
|
+
printError(`Cannot read ${opts.file}`);
|
|
27654
|
+
return;
|
|
27655
|
+
}
|
|
27656
|
+
const prepared = prepareListingFile(kind, text);
|
|
27657
|
+
if (!prepared.valid) {
|
|
27658
|
+
printError(prepared.reason);
|
|
27659
|
+
return;
|
|
27660
|
+
}
|
|
27661
|
+
const { subject, body, signed } = prepared.value;
|
|
27662
|
+
try {
|
|
27663
|
+
const proof = await signWalletWrite(
|
|
27664
|
+
"listing-submission",
|
|
27665
|
+
listingSubmissionWriteChange(kind, subject, signed)
|
|
27666
|
+
);
|
|
27667
|
+
const { data, idempotencyKey } = await x402FeePost(
|
|
27668
|
+
kind === "catalog" ? "/api/catalog/submissions" : "/api/hooks/submissions",
|
|
27669
|
+
{ chainId: selectedNetwork().chainId, ...body, ...proof }
|
|
27670
|
+
);
|
|
27671
|
+
printResult({ ...data, notice: NOTICE }, { idempotencyKey });
|
|
27672
|
+
} catch (error) {
|
|
27673
|
+
return renderFailure(error);
|
|
27674
|
+
}
|
|
27675
|
+
});
|
|
27676
|
+
}
|
|
27677
|
+
function submissionsCommandFor(kind) {
|
|
27678
|
+
return new Command148("submissions").description(
|
|
27679
|
+
`List the ${kind === "catalog" ? "catalog entries" : "hook listings"} you submitted and their status`
|
|
27680
|
+
).option("--status <status>", `Only this status: ${LISTING_SUBMISSION_STATUSES.join(", ")}`).option("--limit <n>", "Maximum submissions to return (1-100)", "50").action(async (opts) => {
|
|
27681
|
+
if (opts.status && !LISTING_SUBMISSION_STATUSES.includes(opts.status)) {
|
|
27682
|
+
printError(`--status must be one of ${LISTING_SUBMISSION_STATUSES.join(", ")}`);
|
|
27683
|
+
return;
|
|
27684
|
+
}
|
|
27685
|
+
const limit = Number(opts.limit);
|
|
27686
|
+
if (!Number.isInteger(limit) || limit < 1 || limit > 100) {
|
|
27687
|
+
printError("--limit must be an integer from 1 to 100");
|
|
27688
|
+
return;
|
|
27689
|
+
}
|
|
27690
|
+
const auth = await signReadAuth();
|
|
27691
|
+
if (!auth || Object.keys(auth.headers).length === 0) {
|
|
27692
|
+
printError("Listing submissions needs a wallet. Run `taskmarket init` first.");
|
|
27693
|
+
return;
|
|
27694
|
+
}
|
|
27695
|
+
const params = new URLSearchParams({ kind, limit: String(limit) });
|
|
27696
|
+
if (opts.status) params.set("status", opts.status);
|
|
27697
|
+
try {
|
|
27698
|
+
printResult(
|
|
27699
|
+
await apiGet(`/api/listing-submissions/mine?${params.toString()}`, {
|
|
27700
|
+
headers: auth.headers
|
|
27701
|
+
})
|
|
27702
|
+
);
|
|
27703
|
+
} catch (error) {
|
|
27704
|
+
return renderFailure(error);
|
|
27705
|
+
}
|
|
27706
|
+
});
|
|
27707
|
+
}
|
|
27708
|
+
|
|
27709
|
+
// src/commands/hooks.ts
|
|
27539
27710
|
function withV2Declarations(entry) {
|
|
27540
27711
|
const mask = capabilitiesOf(entry);
|
|
27541
27712
|
const served = entry.hookVersion;
|
|
@@ -27570,7 +27741,7 @@ async function probeHookVersion(entry, chainId) {
|
|
|
27570
27741
|
return reverted ? { ...entry, hookVersion: 1 } : entry;
|
|
27571
27742
|
}
|
|
27572
27743
|
}
|
|
27573
|
-
var listCommand10 = new
|
|
27744
|
+
var listCommand10 = new Command149("list").description(
|
|
27574
27745
|
"List hooks listed (verified) in the hook registry on the selected --network, then observed hooks that are not listed"
|
|
27575
27746
|
).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
27747
|
"--cursor <cursor>",
|
|
@@ -27609,7 +27780,7 @@ var listCommand10 = new Command148("list").description(
|
|
|
27609
27780
|
}
|
|
27610
27781
|
}
|
|
27611
27782
|
);
|
|
27612
|
-
var showCommand7 = new
|
|
27783
|
+
var showCommand7 = new Command149("show").description(
|
|
27613
27784
|
"Show one hook on the selected --network: its registry listing, or its onchain observation marked unlisted"
|
|
27614
27785
|
).argument("<address>", "Hook contract address").action(async (address3) => {
|
|
27615
27786
|
try {
|
|
@@ -27629,7 +27800,7 @@ var showCommand7 = new Command148("show").description(
|
|
|
27629
27800
|
renderFailure(err);
|
|
27630
27801
|
}
|
|
27631
27802
|
});
|
|
27632
|
-
var encodeConfigCommand = new
|
|
27803
|
+
var encodeConfigCommand = new Command149("encode-config").description(
|
|
27633
27804
|
"Encode a V2 hook's typed configuration from its registry config schema, for --hook-config"
|
|
27634
27805
|
).argument("<address>", "Hook contract address").requiredOption(
|
|
27635
27806
|
"--values <json>",
|
|
@@ -27658,7 +27829,7 @@ var encodeConfigCommand = new Command148("encode-config").description(
|
|
|
27658
27829
|
renderFailure(err);
|
|
27659
27830
|
}
|
|
27660
27831
|
});
|
|
27661
|
-
var attachmentConfigCommand = new
|
|
27832
|
+
var attachmentConfigCommand = new Command149("attachment-config").description(
|
|
27662
27833
|
"Show the protocol-default hook order and maximum hooks per task on the selected --network"
|
|
27663
27834
|
).action(async () => {
|
|
27664
27835
|
try {
|
|
@@ -27667,12 +27838,16 @@ var attachmentConfigCommand = new Command148("attachment-config").description(
|
|
|
27667
27838
|
renderFailure(err);
|
|
27668
27839
|
}
|
|
27669
27840
|
});
|
|
27670
|
-
var hooksCommand = new
|
|
27841
|
+
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"));
|
|
27842
|
+
|
|
27843
|
+
// src/commands/catalog/index.ts
|
|
27844
|
+
import { Command as Command150 } from "commander";
|
|
27845
|
+
var catalogCommand = new Command150("catalog").description("Submit paid endpoints to the Taskmarket catalog and track your submissions").addCommand(submitCommandFor("catalog")).addCommand(submissionsCommandFor("catalog"));
|
|
27671
27846
|
|
|
27672
27847
|
// src/commands/tap.ts
|
|
27673
27848
|
import { promises as fs12 } from "fs";
|
|
27674
|
-
import { Command as
|
|
27675
|
-
var tapCommand = new
|
|
27849
|
+
import { Command as Command151 } from "commander";
|
|
27850
|
+
var tapCommand = new Command151("tap").description(
|
|
27676
27851
|
"Manage the TAP signing key used on tasks that require TAP verification"
|
|
27677
27852
|
);
|
|
27678
27853
|
tapCommand.command("import").description(
|
|
@@ -27831,7 +28006,7 @@ tapCommand.command("remove").description("Remove the TAP key from the keystore")
|
|
|
27831
28006
|
});
|
|
27832
28007
|
|
|
27833
28008
|
// src/commands/hire.ts
|
|
27834
|
-
import { Command as
|
|
28009
|
+
import { Command as Command152 } from "commander";
|
|
27835
28010
|
var OWN_FLAGS = /* @__PURE__ */ new Set(["--mode", "--hire-worker", "--service-id"]);
|
|
27836
28011
|
async function lookupListedService(worker, serviceId) {
|
|
27837
28012
|
let listing;
|
|
@@ -27863,7 +28038,7 @@ function hireEvaluatorError(opts, requiresEvaluator) {
|
|
|
27863
28038
|
}
|
|
27864
28039
|
return null;
|
|
27865
28040
|
}
|
|
27866
|
-
var hireCommand = new
|
|
28041
|
+
var hireCommand = new Command152("hire").description(
|
|
27867
28042
|
"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
28043
|
).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
28044
|
"--requires-evaluator",
|
|
@@ -27926,7 +28101,7 @@ hireCommand.action(async (worker, opts) => {
|
|
|
27926
28101
|
// src/index.ts
|
|
27927
28102
|
var require2 = createRequire(import.meta.url);
|
|
27928
28103
|
var { version } = require2("../package.json");
|
|
27929
|
-
var program = new
|
|
28104
|
+
var program = new Command153();
|
|
27930
28105
|
setLastErrorCliVersion(version);
|
|
27931
28106
|
program.name("taskmarket").description("Taskmarket CLI for AI agents").version(version);
|
|
27932
28107
|
program.option(
|
|
@@ -27987,6 +28162,7 @@ program.addCommand(projectCommand);
|
|
|
27987
28162
|
program.addCommand(workflowCommand);
|
|
27988
28163
|
program.addCommand(dropsCommand);
|
|
27989
28164
|
program.addCommand(hooksCommand);
|
|
28165
|
+
program.addCommand(catalogCommand);
|
|
27990
28166
|
program.addCommand(hireCommand);
|
|
27991
28167
|
program.addCommand(hiresCommand);
|
|
27992
28168
|
program.addCommand(bugCommand);
|