@lucid-agents/taskmarket 1.45.0 → 1.46.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-PZVGK3VQ.js → api-56KWZFR4.js} +2 -2
- package/dist/{channels-LDMZ3OEM.js → channels-YKCZU2Q7.js} +4 -4
- package/dist/{chunk-THIC75V5.js → chunk-3MITXF2F.js} +3 -3
- package/dist/{chunk-XLJRCGOJ.js → chunk-64NUUQBC.js} +1 -1
- package/dist/{chunk-JPVBWX3Q.js → chunk-66HELSIU.js} +3 -3
- package/dist/{chunk-FHDTYW6C.js → chunk-7KZOHF7R.js} +1 -1
- package/dist/{chunk-QUY6764O.js → chunk-AS3N5L25.js} +2 -2
- package/dist/{chunk-KY4JM6NG.js → chunk-DPJIDICA.js} +31 -13
- package/dist/{chunk-TPCXOWSC.js → chunk-E3J2J3PZ.js} +8 -8
- package/dist/{chunk-6YFLKQ4Q.js → chunk-HFG7TSVD.js} +12 -0
- package/dist/{chunk-PRYNO5S7.js → chunk-MMODVSSS.js} +1 -1
- package/dist/{chunk-5NILW5UT.js → chunk-MUFEOBRQ.js} +1 -1
- package/dist/{chunk-QYXBVFVX.js → chunk-O5C2CWWL.js} +5 -5
- package/dist/{chunk-GIVPCMJ3.js → chunk-Y3B7POF2.js} +631 -40
- package/dist/{doctor-HV5QQDGU.js → doctor-TA3AZMPJ.js} +8 -8
- package/dist/index.js +73 -30
- package/dist/{launch-56RHQCWT.js → launch-2RINYQTU.js} +11 -11
- package/dist/{read-auth-ZJBQQVGO.js → read-auth-FFCZKAFN.js} +3 -3
- package/dist/{reconcile-PQXSATCK.js → reconcile-O6LVP2Z3.js} +4 -4
- package/dist/{status-EBMZGDFS.js → status-FRMTSDIG.js} +8 -8
- package/dist/{sync-pull-423LBSPO.js → sync-pull-OUXRL6A2.js} +4 -4
- package/dist/{task-access-grants-KWTKM3NP.js → task-access-grants-WV3HVN5V.js} +2 -2
- package/package.json +4 -4
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
parseFailureBody,
|
|
15
15
|
readFailureBody,
|
|
16
16
|
withErrorContext
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-MUFEOBRQ.js";
|
|
18
|
+
import "./chunk-HFG7TSVD.js";
|
|
19
19
|
import "./chunk-S7SJMJ2I.js";
|
|
20
20
|
export {
|
|
21
21
|
ApiError,
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
selectRail,
|
|
11
11
|
uncertainPurchases,
|
|
12
12
|
withdrawalHatch
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-3MITXF2F.js";
|
|
14
|
+
import "./chunk-Y3B7POF2.js";
|
|
15
|
+
import "./chunk-MUFEOBRQ.js";
|
|
16
|
+
import "./chunk-HFG7TSVD.js";
|
|
17
17
|
import "./chunk-YM4S6IE4.js";
|
|
18
18
|
import "./chunk-XJOB4NMV.js";
|
|
19
19
|
import "./chunk-S7SJMJ2I.js";
|
|
@@ -10,16 +10,16 @@ import {
|
|
|
10
10
|
listX402Payments,
|
|
11
11
|
loadX402Policy,
|
|
12
12
|
rpcUrlForNetwork
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-Y3B7POF2.js";
|
|
14
14
|
import {
|
|
15
15
|
createWalletAccountFromKeystore,
|
|
16
16
|
keystoreExists,
|
|
17
17
|
loadKeystore
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-MUFEOBRQ.js";
|
|
19
19
|
import {
|
|
20
20
|
getTaskmarketHome,
|
|
21
21
|
taskmarketChain
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-HFG7TSVD.js";
|
|
23
23
|
import {
|
|
24
24
|
AgentLaunchError
|
|
25
25
|
} from "./chunk-YM4S6IE4.js";
|
|
@@ -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-HFG7TSVD.js";
|
|
5
5
|
import {
|
|
6
6
|
AgentLaunchError
|
|
7
7
|
} from "./chunk-YM4S6IE4.js";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
unsafeHostPath,
|
|
9
9
|
withFileLock,
|
|
10
10
|
writeAtomic
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-64NUUQBC.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-DPJIDICA.js";
|
|
20
20
|
import {
|
|
21
21
|
getTaskmarketHome
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-HFG7TSVD.js";
|
|
23
23
|
import {
|
|
24
24
|
AgentLaunchError
|
|
25
25
|
} from "./chunk-YM4S6IE4.js";
|
|
@@ -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-HFG7TSVD.js";
|
|
6
6
|
|
|
7
7
|
// src/lib/task-access-grants.ts
|
|
8
8
|
import { promises as fs } from "fs";
|
|
@@ -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-MUFEOBRQ.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-HFG7TSVD.js";
|
|
11
11
|
|
|
12
12
|
// src/lib/read-auth.ts
|
|
13
13
|
async function signReadAuth(signal) {
|
|
@@ -1,9 +1,11 @@
|
|
|
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
|
+
MPP_TEMPO_CHARGE_SCHEME,
|
|
3
4
|
X402PayError,
|
|
4
5
|
assertX402HeaderName,
|
|
5
6
|
assertX402HeaderValue,
|
|
6
7
|
createEvmPerRequestRail,
|
|
8
|
+
createMppTempoChargeRail,
|
|
7
9
|
createMppTempoCredential,
|
|
8
10
|
createTaskmarketFeeRail,
|
|
9
11
|
createX402Allocations,
|
|
@@ -15,7 +17,7 @@ import {
|
|
|
15
17
|
readMppTempoChallenge,
|
|
16
18
|
reconcileX402Payment,
|
|
17
19
|
withX402FileLock
|
|
18
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-Y3B7POF2.js";
|
|
19
21
|
import {
|
|
20
22
|
ApiError,
|
|
21
23
|
apiGet,
|
|
@@ -36,14 +38,14 @@ import {
|
|
|
36
38
|
withChainId,
|
|
37
39
|
withIdempotentWrite,
|
|
38
40
|
withTapSignature
|
|
39
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-MUFEOBRQ.js";
|
|
40
42
|
import {
|
|
41
43
|
ComputeCreditBuyOutputSchema,
|
|
42
44
|
ComputeCreditPricingSchema,
|
|
43
45
|
ComputeCreditStatusOutputSchema,
|
|
44
46
|
apiErrorEnvelopeOf,
|
|
45
47
|
getTaskmarketHome
|
|
46
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-HFG7TSVD.js";
|
|
47
49
|
|
|
48
50
|
// src/lib/x402-fee.ts
|
|
49
51
|
import { randomUUID as randomUUID3 } from "crypto";
|
|
@@ -337,9 +339,19 @@ async function externalResponseData(response, options = {}) {
|
|
|
337
339
|
}
|
|
338
340
|
|
|
339
341
|
// src/lib/x402-pay-client.ts
|
|
342
|
+
function x402PaymentProtocol(payment) {
|
|
343
|
+
return payment.scheme === MPP_TEMPO_CHARGE_SCHEME ? "mpp" : "x402";
|
|
344
|
+
}
|
|
345
|
+
function withPaymentProtocol(payment) {
|
|
346
|
+
return { ...payment, protocol: x402PaymentProtocol(payment) };
|
|
347
|
+
}
|
|
340
348
|
var X402_CLI_BODY_LIMIT_BYTES = 64 * 1024 * 1024;
|
|
341
|
-
function cliX402Rails() {
|
|
342
|
-
return [
|
|
349
|
+
function cliX402Rails(options = {}) {
|
|
350
|
+
return [
|
|
351
|
+
createEvmPerRequestRail(),
|
|
352
|
+
createTaskmarketFeeRail(),
|
|
353
|
+
...options.firstParty ? [] : [createMppTempoChargeRail()]
|
|
354
|
+
];
|
|
343
355
|
}
|
|
344
356
|
function createCliX402Payer(options = {}) {
|
|
345
357
|
const policyPath = getX402PolicyPath();
|
|
@@ -347,7 +359,7 @@ function createCliX402Payer(options = {}) {
|
|
|
347
359
|
journalPath: getX402JournalPath(),
|
|
348
360
|
loadPolicy: (loadOptions) => loadX402Policy(policyPath, loadOptions),
|
|
349
361
|
getAccount: async () => options.account ?? await createWalletAccountFromKeystore(await loadKeystore()),
|
|
350
|
-
rails: cliX402Rails(),
|
|
362
|
+
rails: cliX402Rails({ firstParty: options.firstParty }),
|
|
351
363
|
fetch: options.fetchImpl,
|
|
352
364
|
limits: {
|
|
353
365
|
maxRequestBodyBytes: X402_CLI_BODY_LIMIT_BYTES,
|
|
@@ -374,6 +386,7 @@ async function executeX402PayRequest(options) {
|
|
|
374
386
|
headers: options.headers,
|
|
375
387
|
body,
|
|
376
388
|
policyRuleId: options.policyRuleId,
|
|
389
|
+
...options.protocol ? { protocol: options.protocol } : {},
|
|
377
390
|
nonInteractive: Boolean(options.nonInteractive)
|
|
378
391
|
},
|
|
379
392
|
{
|
|
@@ -381,7 +394,8 @@ async function executeX402PayRequest(options) {
|
|
|
381
394
|
confirmDirectApproval: options.confirmDirectApproval
|
|
382
395
|
}
|
|
383
396
|
);
|
|
384
|
-
const
|
|
397
|
+
const record = result.payment ? await getX402Payment(result.payment.paymentId, getX402JournalPath()) : void 0;
|
|
398
|
+
const payment = record ? withPaymentProtocol(record) : void 0;
|
|
385
399
|
let responseData;
|
|
386
400
|
try {
|
|
387
401
|
responseData = await externalResponseData(result.response, {
|
|
@@ -416,12 +430,14 @@ async function executeX402PayRequest(options) {
|
|
|
416
430
|
}
|
|
417
431
|
async function reconcileX402PaymentById(paymentId) {
|
|
418
432
|
const policyPath = getX402PolicyPath();
|
|
419
|
-
return
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
433
|
+
return withPaymentProtocol(
|
|
434
|
+
await reconcileX402Payment({
|
|
435
|
+
journalPath: getX402JournalPath(),
|
|
436
|
+
paymentId,
|
|
437
|
+
loadPolicy: () => loadX402Policy(policyPath),
|
|
438
|
+
rails: cliX402Rails()
|
|
439
|
+
})
|
|
440
|
+
);
|
|
425
441
|
}
|
|
426
442
|
|
|
427
443
|
// src/lib/x402-fee.ts
|
|
@@ -1113,6 +1129,8 @@ export {
|
|
|
1113
1129
|
failedAfterPayment,
|
|
1114
1130
|
mppPost,
|
|
1115
1131
|
loadExternalHeaders,
|
|
1132
|
+
x402PaymentProtocol,
|
|
1133
|
+
withPaymentProtocol,
|
|
1116
1134
|
executeX402PayRequest,
|
|
1117
1135
|
reconcileX402PaymentById,
|
|
1118
1136
|
x402FeePost,
|
|
@@ -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-DPJIDICA.js";
|
|
5
5
|
import {
|
|
6
6
|
signReadAuth
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-AS3N5L25.js";
|
|
8
8
|
import {
|
|
9
9
|
taskAccessGrantHeaders
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-7KZOHF7R.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-MUFEOBRQ.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-HFG7TSVD.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-56KWZFR4.js");
|
|
119
|
+
const { signReadAuth: signReadAuth2 } = await import("./read-auth-FFCZKAFN.js");
|
|
120
|
+
const { taskAccessGrantHeaders: taskAccessGrantHeaders2 } = await import("./task-access-grants-WV3HVN5V.js");
|
|
121
121
|
const taskId = /^\/api\/tasks\/([^/?]+)/.exec(path)?.[1] ?? "";
|
|
122
122
|
return apiGet2(path, {
|
|
123
123
|
headers: {
|
|
@@ -5220,6 +5220,15 @@ function base64UrlToBytes(value) {
|
|
|
5220
5220
|
const binary = atob(padded + "=".repeat((4 - padded.length % 4) % 4));
|
|
5221
5221
|
return Uint8Array.from(binary, (char) => char.charCodeAt(0));
|
|
5222
5222
|
}
|
|
5223
|
+
function canonicalJson(value) {
|
|
5224
|
+
if (Array.isArray(value))
|
|
5225
|
+
return `[${value.map(canonicalJson).join(",")}]`;
|
|
5226
|
+
if (value !== null && typeof value === "object") {
|
|
5227
|
+
const entries = Object.entries(value).filter(([, entry]) => entry !== void 0).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0);
|
|
5228
|
+
return `{${entries.map(([key, entry]) => `${JSON.stringify(key)}:${canonicalJson(entry)}`).join(",")}}`;
|
|
5229
|
+
}
|
|
5230
|
+
return JSON.stringify(value);
|
|
5231
|
+
}
|
|
5223
5232
|
function encodeMppJson(value) {
|
|
5224
5233
|
return bytesToBase64Url(new TextEncoder().encode(JSON.stringify(value)));
|
|
5225
5234
|
}
|
|
@@ -19793,6 +19802,9 @@ export {
|
|
|
19793
19802
|
AgentHiresInputSchema,
|
|
19794
19803
|
AgentServiceRecordsResponseSchema,
|
|
19795
19804
|
MppTempoChargeRequestSchema,
|
|
19805
|
+
MppReceiptSchema,
|
|
19806
|
+
canonicalJson,
|
|
19807
|
+
encodeMppJson,
|
|
19796
19808
|
decodeMppJson,
|
|
19797
19809
|
parseMppChallenge,
|
|
19798
19810
|
formatMppCredential,
|
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
loadDeliverableRecord,
|
|
7
7
|
readComputeView,
|
|
8
8
|
taskStage
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-66HELSIU.js";
|
|
10
10
|
import {
|
|
11
11
|
activeClaim,
|
|
12
12
|
captureProblem,
|
|
13
13
|
killedSession,
|
|
14
14
|
loadSyncState,
|
|
15
15
|
orphanOf
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-64NUUQBC.js";
|
|
17
17
|
import {
|
|
18
18
|
allocationViews,
|
|
19
19
|
channelView,
|
|
@@ -21,14 +21,14 @@ import {
|
|
|
21
21
|
openAgentChannels,
|
|
22
22
|
uncertainPurchases,
|
|
23
23
|
withdrawalHatch
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-3MITXF2F.js";
|
|
25
25
|
import {
|
|
26
26
|
apiUrl,
|
|
27
27
|
selectedNetwork
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-MUFEOBRQ.js";
|
|
29
29
|
import {
|
|
30
30
|
SandboxListOutputSchema
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-HFG7TSVD.js";
|
|
32
32
|
import {
|
|
33
33
|
AgentLaunchError
|
|
34
34
|
} from "./chunk-YM4S6IE4.js";
|