@lucid-agents/taskmarket 1.27.0 → 1.29.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-EKGAP2TK.js → api-4UFXNF3X.js} +2 -2
- package/dist/{channels-5V4244GL.js → channels-UJ32F6KT.js} +4 -4
- package/dist/{chunk-7KBQDZWR.js → chunk-44AGKANB.js} +1 -1
- package/dist/{chunk-RA3GGK5G.js → chunk-6QD7LE3R.js} +3 -3
- package/dist/{chunk-CS36JL4J.js → chunk-6QUNPM4S.js} +1 -1
- package/dist/{chunk-D26Z36NX.js → chunk-A4M344DT.js} +1 -1
- package/dist/{chunk-MAIB4J42.js → chunk-BXZHXNZZ.js} +3 -3
- package/dist/{chunk-QF2AWW7O.js → chunk-CLFA6AAX.js} +5 -5
- package/dist/{chunk-ZW6MI2F6.js → chunk-FQIK5KSR.js} +6277 -5837
- package/dist/{chunk-EDW4XCAY.js → chunk-LLDTXUHC.js} +3 -3
- package/dist/{chunk-DTSONVE3.js → chunk-LRCJQWAT.js} +2 -2
- package/dist/{chunk-6T24AGBE.js → chunk-R7FABEN6.js} +1 -1
- package/dist/{chunk-PCDHSI5Y.js → chunk-VABTHZFQ.js} +9 -8
- package/dist/{chunk-HVI5YS47.js → chunk-XUBYHJMJ.js} +1 -1
- package/dist/{doctor-3VKAO7ZW.js → doctor-HRIWE4JV.js} +8 -8
- package/dist/index.js +104 -31
- package/dist/{launch-YVKAONR5.js → launch-ZER5DDN3.js} +11 -11
- package/dist/pi-extensions/xgate.cjs +2692 -2257
- package/dist/{read-auth-XZOWQ45P.js → read-auth-D5OASV5M.js} +3 -3
- package/dist/{reconcile-YBEASFA3.js → reconcile-VEEAEVG7.js} +4 -4
- package/dist/{status-NCA4MCIV.js → status-BDVDZCU2.js} +8 -8
- package/dist/{sync-pull-WOKOY65R.js → sync-pull-QXN3V4MI.js} +4 -4
- package/dist/{task-access-grants-7JUAFFYG.js → task-access-grants-RS4O6LUB.js} +2 -2
- package/package.json +2 -2
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
unsafeHostPath,
|
|
9
9
|
withFileLock,
|
|
10
10
|
writeAtomic
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-R7FABEN6.js";
|
|
12
12
|
import {
|
|
13
13
|
buyComputeCredit,
|
|
14
14
|
fetchComputePricing,
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
loadComputeCreditConfig,
|
|
17
17
|
onComputeBalanceObserved,
|
|
18
18
|
readComputeCreditStatus
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-6QD7LE3R.js";
|
|
20
20
|
import {
|
|
21
21
|
getTaskmarketHome
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-FQIK5KSR.js";
|
|
23
23
|
import {
|
|
24
24
|
AgentLaunchError
|
|
25
25
|
} from "./chunk-YM4S6IE4.js";
|
|
@@ -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-44AGKANB.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-FQIK5KSR.js";
|
|
11
11
|
|
|
12
12
|
// src/lib/read-auth.ts
|
|
13
13
|
async function signReadAuth() {
|
|
@@ -1,7 +1,7 @@
|
|
|
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
|
getTaskmarketHome
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FQIK5KSR.js";
|
|
5
5
|
import {
|
|
6
6
|
AgentLaunchError
|
|
7
7
|
} from "./chunk-YM4S6IE4.js";
|
|
@@ -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-6QD7LE3R.js";
|
|
5
5
|
import {
|
|
6
6
|
signReadAuth
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LRCJQWAT.js";
|
|
8
8
|
import {
|
|
9
9
|
taskAccessGrantHeaders
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-XUBYHJMJ.js";
|
|
11
11
|
import {
|
|
12
12
|
apiGet,
|
|
13
13
|
apiPost,
|
|
@@ -15,13 +15,13 @@ import {
|
|
|
15
15
|
runWorkerAction,
|
|
16
16
|
signMessage,
|
|
17
17
|
taskRequiresTap
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-44AGKANB.js";
|
|
19
19
|
import {
|
|
20
20
|
TaskAwardSchema,
|
|
21
21
|
buildClaimMessage,
|
|
22
22
|
buildSubmitMessage,
|
|
23
23
|
isRecordingPendingResponse
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-FQIK5KSR.js";
|
|
25
25
|
|
|
26
26
|
// src/sdk/artifact-upload.ts
|
|
27
27
|
import { extname } from "path";
|
|
@@ -108,9 +108,9 @@ function putArtifactBytes(uploadUrl, data, mimeType, onProgress) {
|
|
|
108
108
|
// src/lib/worker-attestation.ts
|
|
109
109
|
var requirementCache = /* @__PURE__ */ new Map();
|
|
110
110
|
async function defaultGet(path) {
|
|
111
|
-
const { apiGet: apiGet2 } = await import("./api-
|
|
112
|
-
const { signReadAuth: signReadAuth2 } = await import("./read-auth-
|
|
113
|
-
const { taskAccessGrantHeaders: taskAccessGrantHeaders2 } = await import("./task-access-grants-
|
|
111
|
+
const { apiGet: apiGet2 } = await import("./api-4UFXNF3X.js");
|
|
112
|
+
const { signReadAuth: signReadAuth2 } = await import("./read-auth-D5OASV5M.js");
|
|
113
|
+
const { taskAccessGrantHeaders: taskAccessGrantHeaders2 } = await import("./task-access-grants-RS4O6LUB.js");
|
|
114
114
|
const taskId = /^\/api\/tasks\/([^/?]+)/.exec(path)?.[1] ?? "";
|
|
115
115
|
return apiGet2(path, {
|
|
116
116
|
headers: {
|
|
@@ -252,6 +252,7 @@ async function listTasks(ctx, filter = {}) {
|
|
|
252
252
|
if (filter.mode) params.set("mode", filter.mode);
|
|
253
253
|
if (filter.auctionType) params.set("auctionType", filter.auctionType);
|
|
254
254
|
if (filter.tags) params.set("tags", filter.tags);
|
|
255
|
+
if (filter.capabilities) params.set("capabilities", filter.capabilities);
|
|
255
256
|
if (filter.minReward) params.set("minReward", filter.minReward);
|
|
256
257
|
if (filter.maxReward) params.set("maxReward", filter.maxReward);
|
|
257
258
|
if (filter.minTotalReward) params.set("minTotalReward", filter.minTotalReward);
|
|
@@ -2,7 +2,7 @@ import { createRequire as __tmCreateRequire } from 'node:module'; import { fileU
|
|
|
2
2
|
import {
|
|
3
3
|
TASK_ACCESS_GRANT_HEADER,
|
|
4
4
|
getTaskmarketHome
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FQIK5KSR.js";
|
|
6
6
|
|
|
7
7
|
// src/lib/task-access-grants.ts
|
|
8
8
|
import { promises as fs } from "fs";
|
|
@@ -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-CLFA6AAX.js";
|
|
5
|
+
import "./chunk-LLDTXUHC.js";
|
|
6
|
+
import "./chunk-R7FABEN6.js";
|
|
7
|
+
import "./chunk-6QD7LE3R.js";
|
|
8
8
|
import {
|
|
9
9
|
AGENT_COMPATIBILITY,
|
|
10
10
|
assertAgentCompatibility,
|
|
@@ -14,19 +14,19 @@ import {
|
|
|
14
14
|
channelView,
|
|
15
15
|
loadAgentPolicy,
|
|
16
16
|
openAgentChannels
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-BXZHXNZZ.js";
|
|
18
18
|
import {
|
|
19
19
|
getX402PolicyPath,
|
|
20
20
|
loadX402Policy,
|
|
21
21
|
rpcUrlForNetwork
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-6QUNPM4S.js";
|
|
23
23
|
import {
|
|
24
24
|
apiUrl,
|
|
25
25
|
keystoreExists,
|
|
26
26
|
loadKeystore,
|
|
27
27
|
withChainId
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import "./chunk-
|
|
28
|
+
} from "./chunk-44AGKANB.js";
|
|
29
|
+
import "./chunk-FQIK5KSR.js";
|
|
30
30
|
import "./chunk-YM4S6IE4.js";
|
|
31
31
|
import {
|
|
32
32
|
AGENT_VIEW_VERSION
|
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
listWorkerSubmissions,
|
|
14
14
|
submitTaskFiles,
|
|
15
15
|
taskRequirementsOf
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-VABTHZFQ.js";
|
|
17
17
|
import {
|
|
18
18
|
ComputeCreditError,
|
|
19
19
|
applyComputeCreditSetup,
|
|
@@ -35,14 +35,14 @@ import {
|
|
|
35
35
|
refusedPaidWrite,
|
|
36
36
|
releasePendingComputePurchase,
|
|
37
37
|
resolvePendingComputePurchases
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-6QD7LE3R.js";
|
|
39
39
|
import {
|
|
40
40
|
signReadAuth
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-LRCJQWAT.js";
|
|
42
42
|
import {
|
|
43
43
|
saveTaskAccessGrant,
|
|
44
44
|
taskAccessGrantHeaders
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-XUBYHJMJ.js";
|
|
46
46
|
import {
|
|
47
47
|
MPP_TEMPO_DEFAULT_VALIDITY_SECONDS,
|
|
48
48
|
X402PayError,
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
setX402PolicyRuleEnabled,
|
|
61
61
|
signSponsoredTempoTransfer,
|
|
62
62
|
signTaskmarketFeePayment
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-6QUNPM4S.js";
|
|
64
64
|
import {
|
|
65
65
|
ApiError,
|
|
66
66
|
KeystoreExistsError,
|
|
@@ -116,10 +116,11 @@ import {
|
|
|
116
116
|
withErrorContext,
|
|
117
117
|
withIdempotentWrite,
|
|
118
118
|
withTapSignature
|
|
119
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-44AGKANB.js";
|
|
120
120
|
import {
|
|
121
121
|
AGENT_AVATAR_MAX_BYTES,
|
|
122
122
|
AGENT_HIRES_ROLES,
|
|
123
|
+
AGENT_LISTING_LIMITS,
|
|
123
124
|
AGENT_LISTING_REPORT_REASONS,
|
|
124
125
|
ActivityFeedInputSchema,
|
|
125
126
|
ActivityHeatmapInputSchema,
|
|
@@ -138,6 +139,7 @@ import {
|
|
|
138
139
|
BUG_REPORT_STATUSES,
|
|
139
140
|
BUG_REPORT_VISIBILITIES,
|
|
140
141
|
BugReportMessageBodySchema,
|
|
142
|
+
CAPABILITY_LIMIT_MESSAGE,
|
|
141
143
|
CapabilitiesListInputSchema,
|
|
142
144
|
CapabilitiesListResponseSchema,
|
|
143
145
|
CrossChainFundingConfigOutputSchema,
|
|
@@ -206,6 +208,9 @@ import {
|
|
|
206
208
|
SubmissionReviewStartPayloadSchema,
|
|
207
209
|
SubmissionReviewTaskInputSchema,
|
|
208
210
|
SubmitBugReportInputSchema,
|
|
211
|
+
TaskActionQueueInputSchema,
|
|
212
|
+
TaskCapabilitiesSchema,
|
|
213
|
+
TaskChildListSchema,
|
|
209
214
|
TaskDropDirectoryInputSchema,
|
|
210
215
|
TaskDropGetInputSchema,
|
|
211
216
|
TaskDropOfficialStatusInputSchema,
|
|
@@ -296,7 +301,7 @@ import {
|
|
|
296
301
|
vaultCallGasLimit7702,
|
|
297
302
|
verifierProviderId,
|
|
298
303
|
verifiersUnsupportedOnChain
|
|
299
|
-
} from "./chunk-
|
|
304
|
+
} from "./chunk-FQIK5KSR.js";
|
|
300
305
|
import "./chunk-S7SJMJ2I.js";
|
|
301
306
|
|
|
302
307
|
// src/index.ts
|
|
@@ -7832,6 +7837,9 @@ var createCmd = new Command8("create").description("Create a new task (costs the
|
|
|
7832
7837
|
"--require-verified <verifiers>",
|
|
7833
7838
|
"Only workers one of these verifiers passes may work on the task (comma-separated; any one is enough): tap:identity:verified (verified agents) or tap:identity:known (known or verified agents). With --require-identity too, both must be met."
|
|
7834
7839
|
).option("--tags <tags>", "Comma-separated tags").option(
|
|
7840
|
+
"--capabilities <slugs>",
|
|
7841
|
+
"Comma-separated capability slugs the task needs, from `taskmarket capabilities` (active entries only; capped like a listing)"
|
|
7842
|
+
).option(
|
|
7835
7843
|
"--metric-description <text>",
|
|
7836
7844
|
'Benchmark metric workers are ranked on, e.g. "Test suite pass rate" (benchmark mode only, max 500 characters)'
|
|
7837
7845
|
).option(
|
|
@@ -8047,6 +8055,12 @@ async function runCreateTask(opts, extra = {}) {
|
|
|
8047
8055
|
if (longTag !== void 0) {
|
|
8048
8056
|
return void printError(`Each tag must be at most ${TAG_MAX_BYTES} bytes: "${longTag}"`);
|
|
8049
8057
|
}
|
|
8058
|
+
const capabilities = opts.capabilities ? opts.capabilities.split(",").map((slug) => slug.trim()).filter(Boolean) : [];
|
|
8059
|
+
if (capabilities.length > 0) {
|
|
8060
|
+
const parsed = TaskCapabilitiesSchema.safeParse(capabilities);
|
|
8061
|
+
if (!parsed.success)
|
|
8062
|
+
return void printError(parsed.error.issues.map((i) => i.message).join(". "));
|
|
8063
|
+
}
|
|
8050
8064
|
const body = {
|
|
8051
8065
|
...extra.projectId !== void 0 ? { projectId: extra.projectId } : {},
|
|
8052
8066
|
...extra.continuation ? extra.continuation : {},
|
|
@@ -8059,6 +8073,9 @@ async function runCreateTask(opts, extra = {}) {
|
|
|
8059
8073
|
submissionVisibility: opts.submissionVisibility,
|
|
8060
8074
|
tags
|
|
8061
8075
|
};
|
|
8076
|
+
if (capabilities.length > 0) {
|
|
8077
|
+
body.capabilities = capabilities;
|
|
8078
|
+
}
|
|
8062
8079
|
if (allowedViewers && allowedViewers.length > 0) {
|
|
8063
8080
|
body.allowedViewers = allowedViewers;
|
|
8064
8081
|
}
|
|
@@ -8358,7 +8375,10 @@ var listCmd = new Command9("list").alias("search").description("List available t
|
|
|
8358
8375
|
).option("--mode <mode>", "Filter by mode (bounty, claim, pitch, benchmark, auction)").option(
|
|
8359
8376
|
"--auction-type <type>",
|
|
8360
8377
|
"Filter auction tasks by subtype (dutch, english, reverse_dutch, reverse_english)"
|
|
8361
|
-
).option("--tags <tags>", "Comma-separated tags to filter by").option(
|
|
8378
|
+
).option("--tags <tags>", "Comma-separated tags to filter by").option(
|
|
8379
|
+
"--capabilities <slugs>",
|
|
8380
|
+
"Only tasks naming any of these capabilities (comma-separated slugs from `taskmarket capabilities`)"
|
|
8381
|
+
).option("--skill <skill>", "Filter by skill tag (comma-separated, alias for --tags)").option("--reward-min <n>", "Minimum reward in the payment token").option("--reward-max <n>", "Maximum reward in the payment token").option(
|
|
8362
8382
|
"--total-reward-min <n>",
|
|
8363
8383
|
"Minimum total reward in USD: the USDC reward plus a sponsored reward valued at its approved vault's curator-set price (unpriced sponsored rewards add nothing)"
|
|
8364
8384
|
).option(
|
|
@@ -8386,6 +8406,7 @@ var listCmd = new Command9("list").alias("search").description("List available t
|
|
|
8386
8406
|
mode: opts.mode,
|
|
8387
8407
|
auctionType: opts.auctionType,
|
|
8388
8408
|
tags: tagsValue,
|
|
8409
|
+
capabilities: opts.capabilities,
|
|
8389
8410
|
minReward: opts.rewardMin ? String(Math.round(Number(opts.rewardMin) * 1e6)) : void 0,
|
|
8390
8411
|
maxReward: opts.rewardMax ? String(Math.round(Number(opts.rewardMax) * 1e6)) : void 0,
|
|
8391
8412
|
minTotalReward: opts.totalRewardMin ? String(Math.round(Number(opts.totalRewardMin) * 1e6)) : void 0,
|
|
@@ -9023,11 +9044,14 @@ var pitchCmd = new Command18("pitch").description("Submit a pitch for a task (co
|
|
|
9023
9044
|
|
|
9024
9045
|
// src/commands/task/pitches.ts
|
|
9025
9046
|
import { Command as Command19 } from "commander";
|
|
9026
|
-
var pitchesCmd = new Command19("pitches").description("List pitches for a task").argument("<taskId>", "Task ID (0x-prefixed hex)").action(async (taskId) => {
|
|
9047
|
+
var pitchesCmd = new Command19("pitches").description("List pitches for a task").argument("<taskId>", "Task ID (0x-prefixed hex)").option("--limit <n>", "Page size (1-500; default 500)").option("--cursor <id>", "Last returned id; read the following page").action(async (taskId, opts) => {
|
|
9027
9048
|
try {
|
|
9049
|
+
const page = TaskChildListSchema.parse({ taskId, ...opts });
|
|
9050
|
+
const params = new URLSearchParams({ limit: String(page.limit) });
|
|
9051
|
+
if (page.cursor) params.set("cursor", page.cursor);
|
|
9028
9052
|
const auth = await signReadAuth();
|
|
9029
9053
|
const headers = { ...auth?.headers ?? {}, ...await taskAccessGrantHeaders(taskId) };
|
|
9030
|
-
printResult(await apiGet(`/api/tasks/${taskId}/pitches`, { headers }));
|
|
9054
|
+
printResult(await apiGet(`/api/tasks/${taskId}/pitches?${params}`, { headers }));
|
|
9031
9055
|
} catch (err) {
|
|
9032
9056
|
renderFailure(err);
|
|
9033
9057
|
}
|
|
@@ -9085,11 +9109,14 @@ var proofCmd = new Command21("proof").description("Submit a benchmark proof (cos
|
|
|
9085
9109
|
|
|
9086
9110
|
// src/commands/task/proofs.ts
|
|
9087
9111
|
import { Command as Command22 } from "commander";
|
|
9088
|
-
var proofsCmd = new Command22("proofs").description("List proofs for a benchmark task").argument("<taskId>", "Task ID (0x-prefixed hex)").action(async (taskId) => {
|
|
9112
|
+
var proofsCmd = new Command22("proofs").description("List proofs for a benchmark task").argument("<taskId>", "Task ID (0x-prefixed hex)").option("--limit <n>", "Page size (1-500; default 500)").option("--cursor <id>", "Last returned id; read the following page").action(async (taskId, opts) => {
|
|
9089
9113
|
try {
|
|
9114
|
+
const page = TaskChildListSchema.parse({ taskId, ...opts });
|
|
9115
|
+
const params = new URLSearchParams({ limit: String(page.limit) });
|
|
9116
|
+
if (page.cursor) params.set("cursor", page.cursor);
|
|
9090
9117
|
const auth = await signReadAuth();
|
|
9091
9118
|
const headers = { ...auth?.headers ?? {}, ...await taskAccessGrantHeaders(taskId) };
|
|
9092
|
-
printResult(await apiGet(`/api/tasks/${taskId}/proofs`, { headers }));
|
|
9119
|
+
printResult(await apiGet(`/api/tasks/${taskId}/proofs?${params}`, { headers }));
|
|
9093
9120
|
} catch (err) {
|
|
9094
9121
|
renderFailure(err);
|
|
9095
9122
|
}
|
|
@@ -10349,7 +10376,7 @@ async function runAgentCommand(options) {
|
|
|
10349
10376
|
try {
|
|
10350
10377
|
const { assertAgentCompatibility } = await import("./compatibility-636WJOEX.js");
|
|
10351
10378
|
const pi = assertAgentCompatibility();
|
|
10352
|
-
const { runAgent } = await import("./launch-
|
|
10379
|
+
const { runAgent } = await import("./launch-ZER5DDN3.js");
|
|
10353
10380
|
result = await runAgent({
|
|
10354
10381
|
model: options.model,
|
|
10355
10382
|
pi,
|
|
@@ -10531,7 +10558,12 @@ profileCommand.command("set").description(
|
|
|
10531
10558
|
collect3
|
|
10532
10559
|
).option("--clear-specialties", "Remove every specialty").option("--clear-capabilities", "Remove every capability").option("--avatar <file>", "Upload an avatar: a PNG, JPEG or WebP file of at most 1 MB").option("--clear-avatar", "Remove your uploaded avatar and use the generated one").action(async (opts) => {
|
|
10533
10560
|
try {
|
|
10534
|
-
if (opts.capability)
|
|
10561
|
+
if (opts.capability) {
|
|
10562
|
+
assertSelectableCapabilities(opts.capability);
|
|
10563
|
+
if (new Set(opts.capability).size > AGENT_LISTING_LIMITS.capabilitiesPerListingMax) {
|
|
10564
|
+
throw new Error(CAPABILITY_LIMIT_MESSAGE);
|
|
10565
|
+
}
|
|
10566
|
+
}
|
|
10535
10567
|
if (opts.avatar !== void 0 && opts.clearAvatar) {
|
|
10536
10568
|
throw new Error("Pass --avatar or --clear-avatar, not both");
|
|
10537
10569
|
}
|
|
@@ -10558,12 +10590,16 @@ profileCommand.command("set").description(
|
|
|
10558
10590
|
);
|
|
10559
10591
|
}
|
|
10560
10592
|
}
|
|
10593
|
+
const capabilities = opts.clearCapabilities ? [] : opts.capability ?? current.capabilities;
|
|
10594
|
+
if (capabilities.length > AGENT_LISTING_LIMITS.capabilitiesPerListingMax) {
|
|
10595
|
+
throw new Error(CAPABILITY_LIMIT_MESSAGE);
|
|
10596
|
+
}
|
|
10561
10597
|
const profile = {
|
|
10562
10598
|
displayName: opts.name ?? current.displayName ?? "",
|
|
10563
10599
|
description: opts.description ?? current.description ?? "",
|
|
10564
10600
|
roles: opts.role ?? (current.roles.length > 0 ? current.roles : ["worker"]),
|
|
10565
10601
|
specialties: opts.clearSpecialties ? [] : opts.specialty ?? current.specialties.map((specialty) => specialty.label),
|
|
10566
|
-
capabilities
|
|
10602
|
+
capabilities
|
|
10567
10603
|
};
|
|
10568
10604
|
const change = { action: "profile.set", profile };
|
|
10569
10605
|
const humanRefusal = current.kind === "human" ? humanListingChangeError(change) : null;
|
|
@@ -10774,13 +10810,13 @@ function agentManagementCommands() {
|
|
|
10774
10810
|
const status = new Command53("status").description(
|
|
10775
10811
|
"Show the agent channels (locked, charged, refundable), purchases with an unknown outcome, the sandbox and compute credit. Reads only."
|
|
10776
10812
|
).action(async () => {
|
|
10777
|
-
const { collectAgentStatus } = await import("./status-
|
|
10813
|
+
const { collectAgentStatus } = await import("./status-BDVDZCU2.js");
|
|
10778
10814
|
await run(() => collectAgentStatus());
|
|
10779
10815
|
});
|
|
10780
10816
|
const doctor = new Command53("doctor").description(
|
|
10781
10817
|
"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."
|
|
10782
10818
|
).action(async () => {
|
|
10783
|
-
const { runDoctor } = await import("./doctor-
|
|
10819
|
+
const { runDoctor } = await import("./doctor-HRIWE4JV.js");
|
|
10784
10820
|
const report = await run(() => runDoctor());
|
|
10785
10821
|
if (report && !report.ok) process.exitCode = 1;
|
|
10786
10822
|
});
|
|
@@ -10791,7 +10827,7 @@ function agentManagementCommands() {
|
|
|
10791
10827
|
"Reconcile the open purchases of this channel, as status lists it; also reaches retired channels"
|
|
10792
10828
|
).action(
|
|
10793
10829
|
async (invocationId, options) => {
|
|
10794
|
-
const { reconcileChannelPurchases, reconcileInvocation } = await import("./reconcile-
|
|
10830
|
+
const { reconcileChannelPurchases, reconcileInvocation } = await import("./reconcile-VEEAEVG7.js");
|
|
10795
10831
|
const choice = { rail: options.rail, channel: options.channel };
|
|
10796
10832
|
if (invocationId !== void 0) {
|
|
10797
10833
|
await run(() => reconcileInvocation(invocationId, { choice }));
|
|
@@ -10823,7 +10859,7 @@ function agentManagementCommands() {
|
|
|
10823
10859
|
`Not a USDC amount: ${options.amount} (digits, at most 6 decimals)`
|
|
10824
10860
|
);
|
|
10825
10861
|
}
|
|
10826
|
-
const { openAgentChannels, requestTopUp, selectRail, withdrawalHatch } = await import("./channels-
|
|
10862
|
+
const { openAgentChannels, requestTopUp, selectRail, withdrawalHatch } = await import("./channels-UJ32F6KT.js");
|
|
10827
10863
|
const { rails } = await openAgentChannels();
|
|
10828
10864
|
const result = await requestTopUp(selectRail(rails, options.rail), amount);
|
|
10829
10865
|
return {
|
|
@@ -10843,8 +10879,8 @@ function agentManagementCommands() {
|
|
|
10843
10879
|
await run(async () => {
|
|
10844
10880
|
await requireExperimental();
|
|
10845
10881
|
const { AGENT_VIEW_VERSION } = await import("./budget-view-J6L7X6EY.js");
|
|
10846
|
-
const { closeChannel, openAgentChannels, selectChannel } = await import("./channels-
|
|
10847
|
-
const { reconcileLeasedPurchase } = await import("./reconcile-
|
|
10882
|
+
const { closeChannel, openAgentChannels, selectChannel } = await import("./channels-UJ32F6KT.js");
|
|
10883
|
+
const { reconcileLeasedPurchase } = await import("./reconcile-VEEAEVG7.js");
|
|
10848
10884
|
const opened = await openAgentChannels();
|
|
10849
10885
|
const { rail, retired } = selectChannel(opened, options);
|
|
10850
10886
|
const result = await closeChannel(
|
|
@@ -10898,7 +10934,7 @@ function agentManagementCommands() {
|
|
|
10898
10934
|
async (options) => {
|
|
10899
10935
|
await run(async () => {
|
|
10900
10936
|
await requireExperimental();
|
|
10901
|
-
const { runPull } = await import("./sync-pull-
|
|
10937
|
+
const { runPull } = await import("./sync-pull-QXN3V4MI.js");
|
|
10902
10938
|
const { terminalPrompter } = await import("./prompter-LSICEYSQ.js");
|
|
10903
10939
|
return runPull(options, {
|
|
10904
10940
|
interactive: Boolean(process.stdin.isTTY && process.stdout.isTTY),
|
|
@@ -10967,7 +11003,7 @@ var agentsCommand = new Command55("agents").description("Browse the worker direc
|
|
|
10967
11003
|
"--sort <order>",
|
|
10968
11004
|
"Sort order: reputation (top rated), tasks or hires (most hired: completed reserved, quote and request hires)",
|
|
10969
11005
|
"reputation"
|
|
10970
|
-
).option("--
|
|
11006
|
+
).option("--specialty <specialty>", "Filter listed workers by specialty, as a label or slug").option("--skill <tag>", "Deprecated alias of --specialty").option(
|
|
10971
11007
|
"--capability <slug>",
|
|
10972
11008
|
"Filter listed agents by capability slug (see `taskmarket capabilities`)"
|
|
10973
11009
|
).option("--role <role>", "Filter listed workers by role: worker or evaluator").option("--search <query>", "Search by agentId or wallet address").option("--limit <n>", "Maximum results to return", "20").option("--min-rating <n>", `Only workers rated at least this: ${MIN_RATINGS.join(", ")}`).option(
|
|
@@ -11008,8 +11044,8 @@ var agentsCommand = new Command55("agents").description("Browse the worker direc
|
|
|
11008
11044
|
const params = new URLSearchParams();
|
|
11009
11045
|
if (verifiedBy.value) params.set("verifiedBy", verifiedBy.value);
|
|
11010
11046
|
if (opts.sort) params.set("sort", opts.sort);
|
|
11011
|
-
|
|
11012
|
-
if (
|
|
11047
|
+
const specialty = opts.specialty ?? opts.skill;
|
|
11048
|
+
if (specialty) params.set("specialty", specialty);
|
|
11013
11049
|
if (opts.capability) params.set("capability", opts.capability);
|
|
11014
11050
|
if (role) params.set("role", role);
|
|
11015
11051
|
if (opts.search) params.set("search", opts.search);
|
|
@@ -11019,15 +11055,19 @@ var agentsCommand = new Command55("agents").description("Browse the worker direc
|
|
|
11019
11055
|
if (kind) params.set("actorType", kind);
|
|
11020
11056
|
const availability = opts.availability ?? DEFAULT_AVAILABILITY;
|
|
11021
11057
|
if (availability !== "any") params.set("availability", availability);
|
|
11022
|
-
const
|
|
11023
|
-
params.set("chainId", String(chainId));
|
|
11058
|
+
const chainId = selectedNetworkOrUndefined()?.chainId;
|
|
11059
|
+
if (chainId !== void 0) params.set("chainId", String(chainId));
|
|
11024
11060
|
const result = await apiGet(`/api/agents/leaderboard?${params.toString()}`);
|
|
11025
11061
|
printResult(
|
|
11026
11062
|
Array.isArray(result) ? result.map((entry) => ({
|
|
11027
11063
|
...entry,
|
|
11028
11064
|
availability: entry.availability ?? null,
|
|
11029
|
-
|
|
11030
|
-
|
|
11065
|
+
...chainId === void 0 ? {
|
|
11066
|
+
chains: Array.isArray(entry.chains) ? entry.chains.map((item) => ({
|
|
11067
|
+
...item,
|
|
11068
|
+
earningsToken: paymentTokenSymbol(Number(item.chainId))
|
|
11069
|
+
})) : []
|
|
11070
|
+
} : { earningsChainId: chainId, earningsToken: paymentTokenSymbol(chainId) }
|
|
11031
11071
|
})) : result
|
|
11032
11072
|
);
|
|
11033
11073
|
}
|
|
@@ -11204,7 +11244,24 @@ agentsCommand.command("report").description("Report a worker's listing, or one o
|
|
|
11204
11244
|
import { Command as Command56 } from "commander";
|
|
11205
11245
|
var inboxCommand = new Command56("inbox").description(
|
|
11206
11246
|
"Show what you need to do now, then tasks you created, tasks you are working on, and private tasks you were invited to"
|
|
11207
|
-
).
|
|
11247
|
+
).option(
|
|
11248
|
+
"--limit <n>",
|
|
11249
|
+
"Action candidate page size (1-100; default 50); task/bid lists are unchanged"
|
|
11250
|
+
).option(
|
|
11251
|
+
"--cursor <token>",
|
|
11252
|
+
"Continue the action queue with its nextCursor; task/bid lists are unchanged"
|
|
11253
|
+
).option("--actions-only", "Read only the bounded action queue, without task/bid lists").action(async (opts) => {
|
|
11254
|
+
let page;
|
|
11255
|
+
try {
|
|
11256
|
+
page = TaskActionQueueInputSchema.parse({
|
|
11257
|
+
address: "validation",
|
|
11258
|
+
limit: opts.limit,
|
|
11259
|
+
cursor: opts.cursor
|
|
11260
|
+
});
|
|
11261
|
+
} catch (err) {
|
|
11262
|
+
renderFailure(err);
|
|
11263
|
+
return;
|
|
11264
|
+
}
|
|
11208
11265
|
const auth = await signReadAuth();
|
|
11209
11266
|
if (!auth) {
|
|
11210
11267
|
printError("No keystore found. Run `taskmarket init` first.");
|
|
@@ -11213,6 +11270,22 @@ var inboxCommand = new Command56("inbox").description(
|
|
|
11213
11270
|
const address2 = auth.walletAddress;
|
|
11214
11271
|
const hasReadAuth = Object.keys(auth.headers).length > 0;
|
|
11215
11272
|
const inboxParams = new URLSearchParams({ address: address2 });
|
|
11273
|
+
const actionParams = new URLSearchParams({ address: address2, limit: String(page.limit) });
|
|
11274
|
+
if (page.cursor) actionParams.set("cursor", page.cursor);
|
|
11275
|
+
if (opts.actionsOnly) {
|
|
11276
|
+
try {
|
|
11277
|
+
printResult(
|
|
11278
|
+
withChainNames({
|
|
11279
|
+
actions: await apiGet(`/api/agents/action-queue?${actionParams}`, {
|
|
11280
|
+
headers: auth.headers
|
|
11281
|
+
})
|
|
11282
|
+
})
|
|
11283
|
+
);
|
|
11284
|
+
} catch (err) {
|
|
11285
|
+
renderFailure(err);
|
|
11286
|
+
}
|
|
11287
|
+
return;
|
|
11288
|
+
}
|
|
11216
11289
|
const [taskResult, pendingBids, actions] = await Promise.all([
|
|
11217
11290
|
apiGet(`/api/agents/inbox?${inboxParams.toString()}`, {
|
|
11218
11291
|
headers: auth.headers
|
|
@@ -11224,7 +11297,7 @@ var inboxCommand = new Command56("inbox").description(
|
|
|
11224
11297
|
// the web Inbox shows. Nothing here filters it or re-derives it from raw pendingActions
|
|
11225
11298
|
// (ADR-0080). A queue failure is reported beside the task lists instead of
|
|
11226
11299
|
// failing the whole read.
|
|
11227
|
-
apiGet(`/api/agents/action-queue?${
|
|
11300
|
+
apiGet(`/api/agents/action-queue?${actionParams.toString()}`, {
|
|
11228
11301
|
headers: auth.headers
|
|
11229
11302
|
}).then(
|
|
11230
11303
|
(queue) => ({ queue, error: null }),
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
sha256Hex,
|
|
39
39
|
specHash,
|
|
40
40
|
taskStage
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-LLDTXUHC.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-
|
|
50
|
+
} from "./chunk-A4M344DT.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-
|
|
62
|
+
} from "./chunk-R7FABEN6.js";
|
|
63
63
|
import {
|
|
64
64
|
TaskOperationError,
|
|
65
65
|
authorizeUploads,
|
|
@@ -78,7 +78,7 @@ import {
|
|
|
78
78
|
requestArtifactUpload,
|
|
79
79
|
submitUploadedArtifacts,
|
|
80
80
|
taskAwardsOf
|
|
81
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-VABTHZFQ.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-
|
|
91
|
+
} from "./chunk-6QD7LE3R.js";
|
|
92
92
|
import {
|
|
93
93
|
signReadAuth
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-LRCJQWAT.js";
|
|
95
95
|
import {
|
|
96
96
|
taskAccessGrantHeaders
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-XUBYHJMJ.js";
|
|
98
98
|
import {
|
|
99
99
|
MAX_RETIRED_RAILS,
|
|
100
100
|
WORKSPACE_CONSENT_VERSION,
|
|
@@ -114,7 +114,7 @@ import {
|
|
|
114
114
|
routeOfCatalogRow,
|
|
115
115
|
saveAgentPolicy,
|
|
116
116
|
settledRetiredRails
|
|
117
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-BXZHXNZZ.js";
|
|
118
118
|
import {
|
|
119
119
|
BASE_CHANNEL_RAIL_ID,
|
|
120
120
|
createBaseChannelPayer,
|
|
@@ -128,13 +128,13 @@ import {
|
|
|
128
128
|
rpcUrlForNetwork,
|
|
129
129
|
saveX402Policy,
|
|
130
130
|
x402SpendWindowAvailability
|
|
131
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-6QUNPM4S.js";
|
|
132
132
|
import {
|
|
133
133
|
apiUrl,
|
|
134
134
|
keystoreExists,
|
|
135
135
|
loadKeystore,
|
|
136
136
|
selectedNetwork
|
|
137
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-44AGKANB.js";
|
|
138
138
|
import {
|
|
139
139
|
IntentStatusResponseSchema,
|
|
140
140
|
NetworkChainInfoSchema,
|
|
@@ -143,7 +143,7 @@ import {
|
|
|
143
143
|
isRecordingPendingResponse,
|
|
144
144
|
piCodingAgentTools,
|
|
145
145
|
taskmarketChain
|
|
146
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-FQIK5KSR.js";
|
|
147
147
|
import {
|
|
148
148
|
AgentLaunchError
|
|
149
149
|
} from "./chunk-YM4S6IE4.js";
|