@lucid-agents/taskmarket 1.20.0 → 1.20.2
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/{channels-A57K7BP6.js → channels-I6252ZCN.js} +3 -3
- package/dist/{chunk-SOX4RRVI.js → chunk-2AED73YN.js} +1 -1
- package/dist/{chunk-F7HVOUHY.js → chunk-2JTB3UFM.js} +13 -1
- package/dist/{chunk-W7JSBEGK.js → chunk-5D4HN65V.js} +2 -2
- package/dist/{chunk-RA6EZSII.js → chunk-6LKXMM4U.js} +1 -1
- package/dist/{chunk-SCZPZWRF.js → chunk-AT2VG32A.js} +1 -1
- package/dist/{chunk-LKO25UQ7.js → chunk-D7U7SB2R.js} +4 -4
- package/dist/{chunk-S62UQAAF.js → chunk-F7ENDHGG.js} +3 -3
- package/dist/{chunk-SQFNRMEN.js → chunk-TO6BB6N3.js} +3 -3
- package/dist/{chunk-2YFJNXXA.js → chunk-WUSEHQHR.js} +19 -5
- package/dist/{doctor-DO2R6HK7.js → doctor-KVWA7KOW.js} +10 -9
- package/dist/index.js +31 -24
- package/dist/{launch-CXG3JSD7.js → launch-II23FNVJ.js} +8 -8
- package/dist/{reconcile-LB2ZRNG5.js → reconcile-OZX2E2L3.js} +3 -3
- package/dist/{status-ITMQZ4W6.js → status-CJKS7MHC.js} +7 -7
- package/dist/{sync-pull-U3WGVKDX.js → sync-pull-NWOCLFGB.js} +3 -3
- package/package.json +3 -3
|
@@ -10,9 +10,9 @@ import {
|
|
|
10
10
|
selectRail,
|
|
11
11
|
uncertainPurchases,
|
|
12
12
|
withdrawalHatch
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-5D4HN65V.js";
|
|
14
|
+
import "./chunk-AT2VG32A.js";
|
|
15
|
+
import "./chunk-2JTB3UFM.js";
|
|
16
16
|
import "./chunk-XJOB4NMV.js";
|
|
17
17
|
import "./chunk-YM4S6IE4.js";
|
|
18
18
|
import "./chunk-S7SJMJ2I.js";
|
|
@@ -1880,6 +1880,9 @@ var UsdcDomainSchema = z17.object({
|
|
|
1880
1880
|
var GetWithdrawalAddressOutputSchema = z17.object({
|
|
1881
1881
|
withdrawalAddress: z17.string().nullable(),
|
|
1882
1882
|
chainId: z17.number().int().positive(),
|
|
1883
|
+
// ADR-0323: true when this chain has an address but no recovery code yet (a backfilled
|
|
1884
|
+
// address), so revealBackfilledRecoveryCode would mint one. Revealing still needs a signature.
|
|
1885
|
+
recoveryCodeAvailable: z17.boolean(),
|
|
1883
1886
|
usdcDomain: UsdcDomainSchema
|
|
1884
1887
|
});
|
|
1885
1888
|
var AuthorizationSchema = z17.object({
|
|
@@ -3396,7 +3399,12 @@ var HostedAllowanceViewSchema = z24.object({
|
|
|
3396
3399
|
var COMPUTE_CREDIT_PURCHASE_STATUSES = ["pending", "granted", "void"];
|
|
3397
3400
|
var DeviceCredentialsShape = {
|
|
3398
3401
|
deviceId: z25.string().min(1).max(200),
|
|
3399
|
-
apiToken: z25.string().min(1).max(500)
|
|
3402
|
+
apiToken: z25.string().min(1).max(500),
|
|
3403
|
+
/**
|
|
3404
|
+
* The chain the purchase is paid and recorded on. The backend has no default chain (ADR-0327):
|
|
3405
|
+
* a request that names none, and whose payment names no network, is refused `chain_required`.
|
|
3406
|
+
*/
|
|
3407
|
+
chainId: z25.number().int().positive().optional()
|
|
3400
3408
|
};
|
|
3401
3409
|
var ComputeCreditBuyInputSchema = z25.object({
|
|
3402
3410
|
...DeviceCredentialsShape,
|
|
@@ -10253,6 +10261,9 @@ function setSelectedNetwork(network) {
|
|
|
10253
10261
|
function selectedNetwork() {
|
|
10254
10262
|
return selected ?? resolveNetwork({ env: process.env.TASKMARKET_NETWORK });
|
|
10255
10263
|
}
|
|
10264
|
+
function withChainId(path3, chainId = selectedNetwork().chainId) {
|
|
10265
|
+
return `${path3}${path3.includes("?") ? "&" : "?"}chainId=${chainId}`;
|
|
10266
|
+
}
|
|
10256
10267
|
function apiUrl() {
|
|
10257
10268
|
return process.env.TASKMARKET_API_URL || selectedNetwork().apiUrl;
|
|
10258
10269
|
}
|
|
@@ -10589,6 +10600,7 @@ export {
|
|
|
10589
10600
|
resolveNetwork,
|
|
10590
10601
|
setSelectedNetwork,
|
|
10591
10602
|
selectedNetwork,
|
|
10603
|
+
withChainId,
|
|
10592
10604
|
apiUrl,
|
|
10593
10605
|
paymentProtocolOf,
|
|
10594
10606
|
apiOrigin,
|
|
@@ -11,12 +11,12 @@ import {
|
|
|
11
11
|
listX402Payments,
|
|
12
12
|
loadX402Policy,
|
|
13
13
|
rpcUrlForNetwork
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-AT2VG32A.js";
|
|
15
15
|
import {
|
|
16
16
|
getTaskmarketHome,
|
|
17
17
|
keystoreExists,
|
|
18
18
|
loadKeystore
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-2JTB3UFM.js";
|
|
20
20
|
import {
|
|
21
21
|
failureDetail,
|
|
22
22
|
failureDetailOf,
|
|
@@ -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-2JTB3UFM.js";
|
|
5
5
|
import {
|
|
6
6
|
AgentLaunchError
|
|
7
7
|
} from "./chunk-YM4S6IE4.js";
|
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
loadDeliverableRecord,
|
|
7
7
|
readComputeView,
|
|
8
8
|
taskStage
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-F7ENDHGG.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-6LKXMM4U.js";
|
|
17
17
|
import {
|
|
18
18
|
allocationViews,
|
|
19
19
|
channelView,
|
|
@@ -21,12 +21,12 @@ import {
|
|
|
21
21
|
openAgentChannels,
|
|
22
22
|
uncertainPurchases,
|
|
23
23
|
withdrawalHatch
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-5D4HN65V.js";
|
|
25
25
|
import {
|
|
26
26
|
SandboxListOutputSchema,
|
|
27
27
|
apiUrl,
|
|
28
28
|
selectedNetwork
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-2JTB3UFM.js";
|
|
30
30
|
import {
|
|
31
31
|
AGENT_VIEW_VERSION,
|
|
32
32
|
blockingPurchases,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
unsafeHostPath,
|
|
9
9
|
withFileLock,
|
|
10
10
|
writeAtomic
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-6LKXMM4U.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-WUSEHQHR.js";
|
|
20
20
|
import {
|
|
21
21
|
getTaskmarketHome
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-2JTB3UFM.js";
|
|
23
23
|
import {
|
|
24
24
|
burnRate,
|
|
25
25
|
computeLow
|
|
@@ -1,11 +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
3
|
x402FeePost
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WUSEHQHR.js";
|
|
5
5
|
import {
|
|
6
6
|
createWalletAccountFromKeystore,
|
|
7
7
|
signMessage
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-AT2VG32A.js";
|
|
9
9
|
import {
|
|
10
10
|
READ_AUTH_ADDRESS_HEADER,
|
|
11
11
|
READ_AUTH_SIGNATURE_HEADER,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
getTaskmarketHome,
|
|
20
20
|
isRecordingPendingResponse,
|
|
21
21
|
loadKeystore
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-2JTB3UFM.js";
|
|
23
23
|
|
|
24
24
|
// src/lib/read-auth.ts
|
|
25
25
|
async function signReadAuth() {
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
readMppTempoChallenge,
|
|
17
17
|
reconcileX402Payment,
|
|
18
18
|
withX402FileLock
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-AT2VG32A.js";
|
|
20
20
|
import {
|
|
21
21
|
ApiError,
|
|
22
22
|
ComputeCreditBuyOutputSchema,
|
|
@@ -37,8 +37,9 @@ import {
|
|
|
37
37
|
readFailureBody,
|
|
38
38
|
resolveIdempotencyKey,
|
|
39
39
|
selectedNetwork,
|
|
40
|
+
withChainId,
|
|
40
41
|
withIdempotentWrite
|
|
41
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-2JTB3UFM.js";
|
|
42
43
|
|
|
43
44
|
// src/lib/x402-fee.ts
|
|
44
45
|
import { randomUUID as randomUUID3 } from "crypto";
|
|
@@ -600,7 +601,9 @@ function atomicToUsd(atomic) {
|
|
|
600
601
|
return fraction ? `${value / scale}.${fraction}` : `${value / scale}`;
|
|
601
602
|
}
|
|
602
603
|
async function fetchComputePricing() {
|
|
603
|
-
const parsed = ComputeCreditPricingSchema.safeParse(
|
|
604
|
+
const parsed = ComputeCreditPricingSchema.safeParse(
|
|
605
|
+
await apiGet(withChainId(COMPUTE_PRICING_PATH))
|
|
606
|
+
);
|
|
604
607
|
if (!parsed.success) {
|
|
605
608
|
throw new ComputeCreditError("invalid_response", "The compute pricing response is malformed");
|
|
606
609
|
}
|
|
@@ -825,7 +828,12 @@ async function purchaseLocked(input, seams) {
|
|
|
825
828
|
try {
|
|
826
829
|
const outcome = await x402FeePost(
|
|
827
830
|
COMPUTE_CREDIT_PATH,
|
|
828
|
-
{
|
|
831
|
+
{
|
|
832
|
+
chainId: selectedNetwork().chainId,
|
|
833
|
+
deviceId: keystore.deviceId,
|
|
834
|
+
apiToken: keystore.apiToken,
|
|
835
|
+
amountUsd: input.amountUsd
|
|
836
|
+
},
|
|
829
837
|
{
|
|
830
838
|
idempotencyKey: pending.idempotencyKey,
|
|
831
839
|
invocationId: pending.invocationId,
|
|
@@ -882,7 +890,12 @@ async function resolvePendingLocked(seams) {
|
|
|
882
890
|
try {
|
|
883
891
|
const replay = await apiPost(
|
|
884
892
|
COMPUTE_CREDIT_PATH,
|
|
885
|
-
{
|
|
893
|
+
{
|
|
894
|
+
chainId: selectedNetwork().chainId,
|
|
895
|
+
deviceId: keystore.deviceId,
|
|
896
|
+
apiToken: keystore.apiToken,
|
|
897
|
+
amountUsd: record.amountUsd
|
|
898
|
+
},
|
|
886
899
|
{ idempotencyKey: key }
|
|
887
900
|
);
|
|
888
901
|
const parsed = ComputeCreditBuyOutputSchema.safeParse(replay.data);
|
|
@@ -934,6 +947,7 @@ async function readComputeCreditBalance() {
|
|
|
934
947
|
async function readStatus() {
|
|
935
948
|
const keystore = await loadKeystore();
|
|
936
949
|
const outcome = await apiPost(COMPUTE_CREDIT_STATUS_PATH, {
|
|
950
|
+
chainId: selectedNetwork().chainId,
|
|
937
951
|
deviceId: keystore.deviceId,
|
|
938
952
|
apiToken: keystore.apiToken
|
|
939
953
|
});
|
|
@@ -6,25 +6,26 @@ import {
|
|
|
6
6
|
} from "./chunk-4ZC6SH7H.js";
|
|
7
7
|
import {
|
|
8
8
|
listSandboxes
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-D7U7SB2R.js";
|
|
10
|
+
import "./chunk-F7ENDHGG.js";
|
|
11
|
+
import "./chunk-6LKXMM4U.js";
|
|
12
|
+
import "./chunk-WUSEHQHR.js";
|
|
13
13
|
import {
|
|
14
14
|
channelView,
|
|
15
15
|
loadAgentPolicy,
|
|
16
16
|
openAgentChannels
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-5D4HN65V.js";
|
|
18
18
|
import {
|
|
19
19
|
getX402PolicyPath,
|
|
20
20
|
loadX402Policy,
|
|
21
21
|
rpcUrlForNetwork
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-AT2VG32A.js";
|
|
23
23
|
import {
|
|
24
24
|
apiUrl,
|
|
25
25
|
keystoreExists,
|
|
26
|
-
loadKeystore
|
|
27
|
-
|
|
26
|
+
loadKeystore,
|
|
27
|
+
withChainId
|
|
28
|
+
} from "./chunk-2JTB3UFM.js";
|
|
28
29
|
import {
|
|
29
30
|
AGENT_VIEW_VERSION
|
|
30
31
|
} from "./chunk-XJOB4NMV.js";
|
|
@@ -124,7 +125,7 @@ async function runDoctor(deps = {}) {
|
|
|
124
125
|
add("channels", "skip", "Needs a wallet and a usable spending policy");
|
|
125
126
|
}
|
|
126
127
|
try {
|
|
127
|
-
const response = await get(`${apiBase.replace(/\/+$/, "")}/api/compute/pricing`);
|
|
128
|
+
const response = await get(withChainId(`${apiBase.replace(/\/+$/, "")}/api/compute/pricing`));
|
|
128
129
|
await response.body?.cancel().catch(() => void 0);
|
|
129
130
|
add(
|
|
130
131
|
"api",
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
signReadAuth,
|
|
15
15
|
submitTaskFiles,
|
|
16
16
|
taskAccessGrantHeaders
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-TO6BB6N3.js";
|
|
18
18
|
import {
|
|
19
19
|
ComputeCreditError,
|
|
20
20
|
applyComputeCreditSetup,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
refusedPaidWrite,
|
|
37
37
|
releasePendingComputePurchase,
|
|
38
38
|
resolvePendingComputePurchases
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-WUSEHQHR.js";
|
|
40
40
|
import {
|
|
41
41
|
MPP_TEMPO_DEFAULT_VALIDITY_SECONDS,
|
|
42
42
|
X402PayError,
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
signSponsoredTempoTransfer,
|
|
59
59
|
signTaskmarketFeePayment,
|
|
60
60
|
signTypedData
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-AT2VG32A.js";
|
|
62
62
|
import {
|
|
63
63
|
AgentMessageEnvelopeSchema,
|
|
64
64
|
ApiError,
|
|
@@ -164,9 +164,10 @@ import {
|
|
|
164
164
|
taskmarketChain,
|
|
165
165
|
taskmarketCommandFor,
|
|
166
166
|
usdcToBaseUnits,
|
|
167
|
+
withChainId,
|
|
167
168
|
withErrorContext,
|
|
168
169
|
withIdempotentWrite
|
|
169
|
-
} from "./chunk-
|
|
170
|
+
} from "./chunk-2JTB3UFM.js";
|
|
170
171
|
import {
|
|
171
172
|
channelLines
|
|
172
173
|
} from "./chunk-XJOB4NMV.js";
|
|
@@ -636,7 +637,7 @@ var initCommand = new Command2("init").description("Create and register a new ag
|
|
|
636
637
|
} catch {
|
|
637
638
|
}
|
|
638
639
|
if (!emailAddress2) {
|
|
639
|
-
const username2 = opts.email ?? (agentId2 && networkInfo2 ? sanitizeEmailUsername(agentId2, String(
|
|
640
|
+
const username2 = opts.email ?? (agentId2 && networkInfo2 ? sanitizeEmailUsername(agentId2, String(selectedNetwork().chainId)) : null);
|
|
640
641
|
if (username2) {
|
|
641
642
|
emailAddress2 = await tryRegisterEmail(
|
|
642
643
|
keystore.deviceId,
|
|
@@ -710,7 +711,7 @@ var initCommand = new Command2("init").description("Create and register a new ag
|
|
|
710
711
|
networkInfo = response.result.data;
|
|
711
712
|
} catch {
|
|
712
713
|
}
|
|
713
|
-
const username = opts.email ?? (agentId && networkInfo ? sanitizeEmailUsername(agentId, String(
|
|
714
|
+
const username = opts.email ?? (agentId && networkInfo ? sanitizeEmailUsername(agentId, String(selectedNetwork().chainId)) : null);
|
|
714
715
|
const emailAddress = username ? await tryRegisterEmail(deviceId, apiToken, username, !!opts.email) : null;
|
|
715
716
|
const chain = chainInfoFor(networkInfo, selectedNetwork().chainId);
|
|
716
717
|
printResult({
|
|
@@ -797,7 +798,7 @@ async function x402Post(path3, body, options) {
|
|
|
797
798
|
// src/commands/identity.ts
|
|
798
799
|
var identityCommand = new Command4("identity").description("Manage agent identity");
|
|
799
800
|
identityCommand.command("register").description("Register ERC-8004 agent identity (costs 0.001 in the payment token)").action(async () => {
|
|
800
|
-
const { data: result, idempotencyKey } = await x402Post("/api/identity/register", {});
|
|
801
|
+
const { data: result, idempotencyKey } = await x402Post("/api/identity/register", { chainId: selectedNetwork().chainId });
|
|
801
802
|
printResult({ agentId: result.agentId }, { idempotencyKey });
|
|
802
803
|
});
|
|
803
804
|
identityCommand.command("status").description("Check identity registration status").action(async () => {
|
|
@@ -863,14 +864,16 @@ var statsCommand = new Command6("stats").description("View agent statistics").op
|
|
|
863
864
|
const keystore = await loadKeystore();
|
|
864
865
|
address = keystore.walletAddress;
|
|
865
866
|
}
|
|
866
|
-
const statsQuery =
|
|
867
|
+
const statsQuery = withChainId(
|
|
868
|
+
opts.agent ? `/api/agents/stats?agentId=${opts.agent}` : `/api/agents/stats?address=${address}`
|
|
869
|
+
);
|
|
867
870
|
const [result, balanceResult, dreamsResult, exchangeRateResult] = await Promise.all([
|
|
868
871
|
apiGet(statsQuery),
|
|
869
872
|
apiGet(
|
|
870
873
|
`/api/wallet/balance?address=${address}&chainId=${selectedNetwork().chainId}`
|
|
871
874
|
),
|
|
872
|
-
apiGet(`/api/wallet/dreams-balance?address=${address}`).then((r) => r).catch(() => null),
|
|
873
|
-
apiGet("/api/wallet/exchange-rate").then((r) => r).catch(() => null)
|
|
875
|
+
apiGet(withChainId(`/api/wallet/dreams-balance?address=${address}`)).then((r) => r).catch(() => null),
|
|
876
|
+
apiGet(withChainId("/api/wallet/exchange-rate")).then((r) => r).catch(() => null)
|
|
874
877
|
]);
|
|
875
878
|
let pendingDreamsRewards = null;
|
|
876
879
|
let pendingDreamsUsd = null;
|
|
@@ -1415,7 +1418,7 @@ function parseTermsFlags(opts) {
|
|
|
1415
1418
|
}
|
|
1416
1419
|
async function fetchTermsBoundsInfo() {
|
|
1417
1420
|
try {
|
|
1418
|
-
const response = await apiGet("/api/tasks/terms-bounds");
|
|
1421
|
+
const response = await apiGet(withChainId("/api/tasks/terms-bounds"));
|
|
1419
1422
|
return {
|
|
1420
1423
|
// Spread over the defaults so a server that predates a field still yields a full record.
|
|
1421
1424
|
bounds: { ...DEFAULT_TERMS_BOUNDS, ...response?.bounds ?? {} },
|
|
@@ -1668,6 +1671,7 @@ var createCmd = new Command8("create").description("Create a new task (costs the
|
|
|
1668
1671
|
return void printError(`Each tag must be at most ${TAG_MAX_BYTES} bytes: "${longTag}"`);
|
|
1669
1672
|
}
|
|
1670
1673
|
const body = {
|
|
1674
|
+
chainId: selectedNetwork().chainId,
|
|
1671
1675
|
description: opts.description,
|
|
1672
1676
|
reward: rewardBaseUnits,
|
|
1673
1677
|
duration,
|
|
@@ -1800,7 +1804,7 @@ var createCmd = new Command8("create").description("Create a new task (costs the
|
|
|
1800
1804
|
return;
|
|
1801
1805
|
}
|
|
1802
1806
|
const preview = await apiGet(
|
|
1803
|
-
`/api/sponsored-task-vaults/${opts.sponsoredTask}/preview-funding?managerAddress=${managerAddress}&grossAmount=${grossAmount}`
|
|
1807
|
+
`/api/sponsored-task-vaults/${opts.sponsoredTask}/preview-funding?managerAddress=${managerAddress}&grossAmount=${grossAmount}&chainId=${selectedNetwork().chainId}`
|
|
1804
1808
|
);
|
|
1805
1809
|
if (!preview.ok) {
|
|
1806
1810
|
return void printError(
|
|
@@ -1836,7 +1840,7 @@ var createCmd = new Command8("create").description("Create a new task (costs the
|
|
|
1836
1840
|
}
|
|
1837
1841
|
let taskLimits;
|
|
1838
1842
|
try {
|
|
1839
|
-
const limits = await apiGet("/api/tasks/limits");
|
|
1843
|
+
const limits = await apiGet(withChainId("/api/tasks/limits"));
|
|
1840
1844
|
const { maxTags, maxHooks: maxHooks2 } = limits ?? {};
|
|
1841
1845
|
if (typeof maxTags === "number" && Number.isInteger(maxTags) && maxTags > 0 && typeof maxHooks2 === "number" && Number.isInteger(maxHooks2) && maxHooks2 > 0) {
|
|
1842
1846
|
taskLimits = { maxTags, maxHooks: maxHooks2 };
|
|
@@ -1855,7 +1859,7 @@ var createCmd = new Command8("create").description("Create a new task (costs the
|
|
|
1855
1859
|
if (hooks.length > 0) {
|
|
1856
1860
|
try {
|
|
1857
1861
|
const attachmentConfiguration = await apiGet(
|
|
1858
|
-
"/api/hooks/attachment-configuration"
|
|
1862
|
+
withChainId("/api/hooks/attachment-configuration")
|
|
1859
1863
|
);
|
|
1860
1864
|
if (attachmentConfiguration !== null && typeof attachmentConfiguration === "object" && !Array.isArray(attachmentConfiguration)) {
|
|
1861
1865
|
const { defaultHooks, maxHooks: maxHooks2 } = attachmentConfiguration;
|
|
@@ -3441,7 +3445,7 @@ async function runAgentCommand(options) {
|
|
|
3441
3445
|
try {
|
|
3442
3446
|
const { assertAgentCompatibility } = await import("./compatibility-636WJOEX.js");
|
|
3443
3447
|
const pi = assertAgentCompatibility();
|
|
3444
|
-
const { runAgent } = await import("./launch-
|
|
3448
|
+
const { runAgent } = await import("./launch-II23FNVJ.js");
|
|
3445
3449
|
result = await runAgent({
|
|
3446
3450
|
model: options.model,
|
|
3447
3451
|
pi,
|
|
@@ -3500,13 +3504,13 @@ function agentManagementCommands() {
|
|
|
3500
3504
|
const status = new Command48("status").description(
|
|
3501
3505
|
"Show the agent channels (locked, charged, refundable), purchases with an unknown outcome, the sandbox and compute credit. Reads only."
|
|
3502
3506
|
).option("--json", "Print the versioned JSON envelope").action(async (options) => {
|
|
3503
|
-
const { collectAgentStatus, statusLines } = await import("./status-
|
|
3507
|
+
const { collectAgentStatus, statusLines } = await import("./status-CJKS7MHC.js");
|
|
3504
3508
|
await run(options, () => collectAgentStatus(), statusLines);
|
|
3505
3509
|
});
|
|
3506
3510
|
const doctor = new Command48("doctor").description(
|
|
3507
3511
|
"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."
|
|
3508
3512
|
).option("--json", "Print the versioned JSON envelope").action(async (options) => {
|
|
3509
|
-
const { runDoctor, doctorLines } = await import("./doctor-
|
|
3513
|
+
const { runDoctor, doctorLines } = await import("./doctor-KVWA7KOW.js");
|
|
3510
3514
|
const report = await run(options, () => runDoctor(), doctorLines);
|
|
3511
3515
|
if (report && !report.ok) process.exitCode = 1;
|
|
3512
3516
|
});
|
|
@@ -3517,7 +3521,7 @@ function agentManagementCommands() {
|
|
|
3517
3521
|
"Reconcile the open purchases of this channel, as status lists it; also reaches retired channels"
|
|
3518
3522
|
).option("--json", "Print the versioned JSON envelope").action(
|
|
3519
3523
|
async (invocationId, options) => {
|
|
3520
|
-
const { reconcileChannelPurchases, reconcileInvocation } = await import("./reconcile-
|
|
3524
|
+
const { reconcileChannelPurchases, reconcileInvocation } = await import("./reconcile-OZX2E2L3.js");
|
|
3521
3525
|
const choice = { rail: options.rail, channel: options.channel };
|
|
3522
3526
|
if (invocationId !== void 0) {
|
|
3523
3527
|
await run(
|
|
@@ -3575,7 +3579,7 @@ function agentManagementCommands() {
|
|
|
3575
3579
|
`Not a USDC amount: ${options.amount} (digits, at most 6 decimals)`
|
|
3576
3580
|
);
|
|
3577
3581
|
}
|
|
3578
|
-
const { openAgentChannels, requestTopUp, selectRail, withdrawalHatch } = await import("./channels-
|
|
3582
|
+
const { openAgentChannels, requestTopUp, selectRail, withdrawalHatch } = await import("./channels-I6252ZCN.js");
|
|
3579
3583
|
const { rails } = await openAgentChannels();
|
|
3580
3584
|
const result = await requestTopUp(selectRail(rails, options.rail), amount);
|
|
3581
3585
|
return {
|
|
@@ -3599,8 +3603,8 @@ function agentManagementCommands() {
|
|
|
3599
3603
|
async () => {
|
|
3600
3604
|
await requireExperimental();
|
|
3601
3605
|
const { AGENT_VIEW_VERSION } = await import("./budget-view-J6L7X6EY.js");
|
|
3602
|
-
const { closeChannel, openAgentChannels, selectChannel } = await import("./channels-
|
|
3603
|
-
const { reconcileLeasedPurchase } = await import("./reconcile-
|
|
3606
|
+
const { closeChannel, openAgentChannels, selectChannel } = await import("./channels-I6252ZCN.js");
|
|
3607
|
+
const { reconcileLeasedPurchase } = await import("./reconcile-OZX2E2L3.js");
|
|
3604
3608
|
const opened = await openAgentChannels();
|
|
3605
3609
|
const { rail, retired } = selectChannel(opened, options);
|
|
3606
3610
|
const result = await closeChannel(
|
|
@@ -3671,7 +3675,7 @@ function agentManagementCommands() {
|
|
|
3671
3675
|
options,
|
|
3672
3676
|
async () => {
|
|
3673
3677
|
await requireExperimental();
|
|
3674
|
-
const { runPull } = await import("./sync-pull-
|
|
3678
|
+
const { runPull } = await import("./sync-pull-NWOCLFGB.js");
|
|
3675
3679
|
const { terminalPrompter } = await import("./prompter-LSICEYSQ.js");
|
|
3676
3680
|
return runPull(options, {
|
|
3677
3681
|
interactive: Boolean(process.stdin.isTTY && process.stdout.isTTY) && !options.json,
|
|
@@ -3740,6 +3744,7 @@ var agentsCommand = new Command50("agents").description("Browse the agent direct
|
|
|
3740
3744
|
if (opts.skill) params.set("skill", opts.skill);
|
|
3741
3745
|
if (opts.search) params.set("search", opts.search);
|
|
3742
3746
|
if (opts.limit) params.set("limit", opts.limit);
|
|
3747
|
+
params.set("chainId", String(selectedNetwork().chainId));
|
|
3743
3748
|
const result = await apiGet(`/api/agents/leaderboard?${params.toString()}`);
|
|
3744
3749
|
printResult(result);
|
|
3745
3750
|
});
|
|
@@ -4250,7 +4255,7 @@ var withdrawDreamsCommand = new Command62("withdraw-dreams").description("Withdr
|
|
|
4250
4255
|
return;
|
|
4251
4256
|
}
|
|
4252
4257
|
const balance = await apiGet(
|
|
4253
|
-
`/api/wallet/dreams-balance?address=${workerAddress}`
|
|
4258
|
+
withChainId(`/api/wallet/dreams-balance?address=${workerAddress}`)
|
|
4254
4259
|
);
|
|
4255
4260
|
if (!balance.hookAddress || balance.chainId === void 0) {
|
|
4256
4261
|
printError("DREAMS rewards are not configured on this server");
|
|
@@ -4299,6 +4304,7 @@ var withdrawDreamsCommand = new Command62("withdraw-dreams").description("Withdr
|
|
|
4299
4304
|
const { data: result, idempotencyKey } = await apiPost(
|
|
4300
4305
|
"/api/wallet/withdraw-dreams",
|
|
4301
4306
|
{
|
|
4307
|
+
chainId: balance.chainId,
|
|
4302
4308
|
workerAddress,
|
|
4303
4309
|
destination,
|
|
4304
4310
|
nonce,
|
|
@@ -4635,6 +4641,7 @@ var withdrawCommand = new Command65("withdraw").description(
|
|
|
4635
4641
|
const { data: result, idempotencyKey } = await apiPost(
|
|
4636
4642
|
"/api/wallet/withdraw",
|
|
4637
4643
|
{
|
|
4644
|
+
chainId,
|
|
4638
4645
|
from,
|
|
4639
4646
|
amountBaseUnits,
|
|
4640
4647
|
authorization,
|
|
@@ -5481,7 +5488,7 @@ async function resolveInboxId(to) {
|
|
|
5481
5488
|
if (!isAddress(to) && to.length === 64 && /^[0-9a-f]+$/.test(to)) {
|
|
5482
5489
|
return to;
|
|
5483
5490
|
}
|
|
5484
|
-
const param = isAddress(to) ? `address=${encodeURIComponent(to)}` : `agentId=${encodeURIComponent(to)}`;
|
|
5491
|
+
const param = isAddress(to) ? `address=${encodeURIComponent(to)}` : `agentId=${encodeURIComponent(to)}&chainId=${selectedNetwork().chainId}`;
|
|
5485
5492
|
const result = await apiGet(`/api/xmtp/resolve?${param}`);
|
|
5486
5493
|
if (!result.inboxId) {
|
|
5487
5494
|
const label = isAddress(to) ? `address ${to}` : `agent "${to}"`;
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
recordSessionEnd,
|
|
8
8
|
recordSessionStart,
|
|
9
9
|
uploadPlan
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-2AED73YN.js";
|
|
11
11
|
import {
|
|
12
12
|
TaskOperationError,
|
|
13
13
|
authorizeUploads,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
submitUploadedArtifacts,
|
|
29
29
|
taskAccessGrantHeaders,
|
|
30
30
|
taskAwardsOf
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-TO6BB6N3.js";
|
|
32
32
|
import {
|
|
33
33
|
terminalPrompter
|
|
34
34
|
} from "./chunk-ZIC2YCLV.js";
|
|
@@ -68,7 +68,7 @@ import {
|
|
|
68
68
|
sha256Hex,
|
|
69
69
|
specHash,
|
|
70
70
|
taskStage
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-F7ENDHGG.js";
|
|
72
72
|
import {
|
|
73
73
|
BrokerConnector,
|
|
74
74
|
OutputLimitError,
|
|
@@ -80,7 +80,7 @@ import {
|
|
|
80
80
|
serveSandboxChannel,
|
|
81
81
|
withFileLock,
|
|
82
82
|
writeAtomic
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-6LKXMM4U.js";
|
|
84
84
|
import {
|
|
85
85
|
applyComputeCreditSetup,
|
|
86
86
|
atomicToUsd,
|
|
@@ -90,7 +90,7 @@ import {
|
|
|
90
90
|
planComputeCreditSetup,
|
|
91
91
|
readComputeCreditBalance,
|
|
92
92
|
usdToAtomic
|
|
93
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-WUSEHQHR.js";
|
|
94
94
|
import {
|
|
95
95
|
MAX_RETIRED_RAILS,
|
|
96
96
|
WORKSPACE_CONSENT_VERSION,
|
|
@@ -110,7 +110,7 @@ import {
|
|
|
110
110
|
routeOfCatalogRow,
|
|
111
111
|
saveAgentPolicy,
|
|
112
112
|
settledRetiredRails
|
|
113
|
-
} from "./chunk-
|
|
113
|
+
} from "./chunk-5D4HN65V.js";
|
|
114
114
|
import {
|
|
115
115
|
BASE_CHANNEL_RAIL_ID,
|
|
116
116
|
createBaseChannelPayer,
|
|
@@ -124,7 +124,7 @@ import {
|
|
|
124
124
|
rpcUrlForNetwork,
|
|
125
125
|
saveX402Policy,
|
|
126
126
|
x402SpendWindowAvailability
|
|
127
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-AT2VG32A.js";
|
|
128
128
|
import {
|
|
129
129
|
IntentStatusResponseSchema,
|
|
130
130
|
NetworkChainInfoSchema,
|
|
@@ -136,7 +136,7 @@ import {
|
|
|
136
136
|
loadKeystore,
|
|
137
137
|
selectedNetwork,
|
|
138
138
|
taskmarketChain
|
|
139
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-2JTB3UFM.js";
|
|
140
140
|
import {
|
|
141
141
|
AGENT_VIEW_VERSION,
|
|
142
142
|
describeFailureDetail,
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
channelView,
|
|
4
4
|
openAgentChannels,
|
|
5
5
|
selectChannel
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5D4HN65V.js";
|
|
7
7
|
import {
|
|
8
8
|
BASE_CHANNEL_RAIL_ID,
|
|
9
9
|
X402_INVOCATION_ID_PATTERN,
|
|
10
10
|
getX402JournalPath,
|
|
11
11
|
listX402Payments
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-AT2VG32A.js";
|
|
13
|
+
import "./chunk-2JTB3UFM.js";
|
|
14
14
|
import {
|
|
15
15
|
AGENT_VIEW_VERSION,
|
|
16
16
|
LOST_RESPONSE_TEXT,
|
|
@@ -7,13 +7,13 @@ import {
|
|
|
7
7
|
statusLines,
|
|
8
8
|
syncLines,
|
|
9
9
|
taskLines
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-D7U7SB2R.js";
|
|
11
|
+
import "./chunk-F7ENDHGG.js";
|
|
12
|
+
import "./chunk-6LKXMM4U.js";
|
|
13
|
+
import "./chunk-WUSEHQHR.js";
|
|
14
|
+
import "./chunk-5D4HN65V.js";
|
|
15
|
+
import "./chunk-AT2VG32A.js";
|
|
16
|
+
import "./chunk-2JTB3UFM.js";
|
|
17
17
|
import "./chunk-XJOB4NMV.js";
|
|
18
18
|
import "./chunk-YM4S6IE4.js";
|
|
19
19
|
import "./chunk-S7SJMJ2I.js";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
savedWorkspace,
|
|
12
12
|
summarize,
|
|
13
13
|
unsavedPaths
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-2AED73YN.js";
|
|
15
15
|
import {
|
|
16
16
|
BrokerConnector,
|
|
17
17
|
SandboxUnavailableError,
|
|
@@ -27,11 +27,11 @@ import {
|
|
|
27
27
|
releaseClaim,
|
|
28
28
|
unresolvedCount,
|
|
29
29
|
updateSyncState
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-6LKXMM4U.js";
|
|
31
31
|
import {
|
|
32
32
|
apiUrl,
|
|
33
33
|
loadKeystore
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-2JTB3UFM.js";
|
|
35
35
|
import {
|
|
36
36
|
AgentLaunchError
|
|
37
37
|
} from "./chunk-YM4S6IE4.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lucid-agents/taskmarket",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"taskmarket": "./dist/index.js"
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"@taskmarket/agent-host": "0.0.1",
|
|
32
32
|
"@taskmarket/contracts": "0.0.0",
|
|
33
33
|
"@taskmarket/prettier-config": "0.0.0",
|
|
34
|
-
"@taskmarket/eslint-config": "0.0.0",
|
|
35
34
|
"@taskmarket/remote-tools": "0.0.1",
|
|
36
35
|
"@taskmarket/shared": "2.0.0",
|
|
37
|
-
"@taskmarket/x402-payer": "0.1.0"
|
|
36
|
+
"@taskmarket/x402-payer": "0.1.0",
|
|
37
|
+
"@taskmarket/eslint-config": "0.0.0"
|
|
38
38
|
},
|
|
39
39
|
"files": [
|
|
40
40
|
"dist",
|