@lucid-agents/taskmarket 1.43.0 → 1.44.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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "taskmarket": "1.43.0",
2
+ "taskmarket": "1.44.0",
3
3
  "manifestVersion": 1,
4
4
  "pi": {
5
5
  "package": "@earendil-works/pi-coding-agent",
@@ -14,8 +14,8 @@ import {
14
14
  parseFailureBody,
15
15
  readFailureBody,
16
16
  withErrorContext
17
- } from "./chunk-XZZKUMHQ.js";
18
- import "./chunk-MGDBSENK.js";
17
+ } from "./chunk-AZMCG2LI.js";
18
+ import "./chunk-IVCJPX7J.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-Z7MFEW73.js";
14
- import "./chunk-F532X4HL.js";
15
- import "./chunk-XZZKUMHQ.js";
16
- import "./chunk-MGDBSENK.js";
13
+ } from "./chunk-3HR7XRLE.js";
14
+ import "./chunk-FUHULPDT.js";
15
+ import "./chunk-AZMCG2LI.js";
16
+ import "./chunk-IVCJPX7J.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-F532X4HL.js";
13
+ } from "./chunk-FUHULPDT.js";
14
14
  import {
15
15
  createWalletAccountFromKeystore,
16
16
  keystoreExists,
17
17
  loadKeystore
18
- } from "./chunk-XZZKUMHQ.js";
18
+ } from "./chunk-AZMCG2LI.js";
19
19
  import {
20
20
  getTaskmarketHome,
21
21
  taskmarketChain
22
- } from "./chunk-MGDBSENK.js";
22
+ } from "./chunk-IVCJPX7J.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-MGDBSENK.js";
4
+ } from "./chunk-IVCJPX7J.js";
5
5
  import {
6
6
  AgentLaunchError
7
7
  } from "./chunk-YM4S6IE4.js";
@@ -9,7 +9,7 @@ import {
9
9
  paymentProtocolFor,
10
10
  taskmarketChain,
11
11
  verifierProviderId
12
- } from "./chunk-MGDBSENK.js";
12
+ } from "./chunk-IVCJPX7J.js";
13
13
 
14
14
  // src/lib/idempotency.ts
15
15
  import { randomUUID } from "crypto";
@@ -380,7 +380,12 @@ async function getWalletAddress() {
380
380
  }
381
381
 
382
382
  // src/lib/tap.ts
383
- var TAP_ALGORITHMS = ["ed25519", "rsa-pss-sha256", "rsa-pss-sha512"];
383
+ var TAP_ALGORITHMS = [
384
+ "ed25519",
385
+ "ecdsa-p256-sha256",
386
+ "rsa-pss-sha256",
387
+ "rsa-pss-sha512"
388
+ ];
384
389
  var TAP_MAX_LIFETIME_SECONDS = 8 * 60;
385
390
  var TAP_DEFAULT_LIFETIME_SECONDS = 5 * 60;
386
391
  var ED25519_PKCS8_PREFIX = Buffer.from("302e020100300506032b657004220420", "hex");
@@ -389,6 +394,9 @@ function isTapAlgorithm(value) {
389
394
  }
390
395
  function algorithmsFor(key) {
391
396
  if (key.asymmetricKeyType === "ed25519") return ["ed25519"];
397
+ if (key.asymmetricKeyType === "ec" && key.asymmetricKeyDetails?.namedCurve === "prime256v1") {
398
+ return ["ecdsa-p256-sha256"];
399
+ }
392
400
  if (key.asymmetricKeyType === "rsa" || key.asymmetricKeyType === "rsa-pss") {
393
401
  return ["rsa-pss-sha256", "rsa-pss-sha512"];
394
402
  }
@@ -416,9 +424,8 @@ function parseTapPrivateKey(text, alg) {
416
424
  }
417
425
  const supported = algorithmsFor(privateKey);
418
426
  if (supported.length === 0) {
419
- throw new Error(
420
- `TAP keys must be ed25519 or RSA, not ${privateKey.asymmetricKeyType ?? "unknown"}`
421
- );
427
+ const found = privateKey.asymmetricKeyType === "ec" ? `an EC key on ${privateKey.asymmetricKeyDetails?.namedCurve ?? "an unknown curve"}` : privateKey.asymmetricKeyType ?? "unknown";
428
+ throw new Error(`TAP keys must be ed25519, ECDSA P-256 or RSA, not ${found}`);
422
429
  }
423
430
  if (alg !== void 0) {
424
431
  if (!isTapAlgorithm(alg)) {
@@ -467,8 +474,12 @@ function tapSignatureAgentFor(stored, apiBase = apiUrl) {
467
474
  }
468
475
  return stored.signatureAgent;
469
476
  }
470
- function generateTapKey() {
471
- return { privateKey: generateKeyPairSync("ed25519").privateKey, alg: "ed25519" };
477
+ var TAP_CREATE_ALGORITHMS = ["ecdsa-p256-sha256", "ed25519"];
478
+ function generateTapKey(alg = "ecdsa-p256-sha256") {
479
+ if (alg === "ed25519") {
480
+ return { privateKey: generateKeyPairSync("ed25519").privateKey, alg };
481
+ }
482
+ return { privateKey: generateKeyPairSync("ec", { namedCurve: "prime256v1" }).privateKey, alg };
472
483
  }
473
484
  function storedTapKey(deviceEncryptionKeyHex, keyId, key, now = /* @__PURE__ */ new Date(), source = "imported") {
474
485
  const pem = key.privateKey.export({ type: "pkcs8", format: "pem" }).toString();
@@ -561,6 +572,9 @@ function tapSignatureBase(components, signatureParams) {
561
572
  }
562
573
  function rawSign(alg, privateKey, data) {
563
574
  if (alg === "ed25519") return cryptoSign(null, data, privateKey);
575
+ if (alg === "ecdsa-p256-sha256") {
576
+ return cryptoSign("sha256", data, { key: privateKey, dsaEncoding: "ieee-p1363" });
577
+ }
564
578
  return cryptoSign(alg === "rsa-pss-sha256" ? "sha256" : "sha512", data, {
565
579
  key: privateKey,
566
580
  padding: constants.RSA_PKCS1_PSS_PADDING,
@@ -945,6 +959,7 @@ export {
945
959
  parseTapPrivateKey,
946
960
  validateTapKeyId,
947
961
  validateTapSignatureAgent,
962
+ TAP_CREATE_ALGORITHMS,
948
963
  generateTapKey,
949
964
  storedTapKey,
950
965
  tapKeySummary,
@@ -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-XZZKUMHQ.js";
5
+ } from "./chunk-AZMCG2LI.js";
6
6
  import {
7
7
  READ_AUTH_ADDRESS_HEADER,
8
8
  READ_AUTH_SIGNATURE_HEADER,
9
9
  buildReadAuthMessage
10
- } from "./chunk-MGDBSENK.js";
10
+ } from "./chunk-IVCJPX7J.js";
11
11
 
12
12
  // src/lib/read-auth.ts
13
13
  async function signReadAuth(signal) {
@@ -8,7 +8,7 @@ import {
8
8
  getTaskmarketHome,
9
9
  mppAttributionMemo,
10
10
  parseMppChallenge
11
- } from "./chunk-MGDBSENK.js";
11
+ } from "./chunk-IVCJPX7J.js";
12
12
 
13
13
  // ../../packages/x402-payer/dist/api.js
14
14
  var X402_PAYER_API_VERSION = 1;
@@ -3258,6 +3258,8 @@ var AgentReputationSchema = z14.object({
3258
3258
  var AgentStatsSchema = z14.object({
3259
3259
  address: z14.string(),
3260
3260
  agentId: z14.string().nullable().optional(),
3261
+ /** ADR-0541: the wallet's stored display name; null until the backend has assigned one. */
3262
+ displayName: z14.string().nullable().optional(),
3261
3263
  actorType: ActorType.optional(),
3262
3264
  completedTasks: z14.number().nullable(),
3263
3265
  ratedTasks: z14.number().nullable(),
@@ -3388,6 +3390,8 @@ var LeaderboardEntrySchema = z14.object({
3388
3390
  rank: z14.number(),
3389
3391
  address: z14.string(),
3390
3392
  agentId: z14.string().nullable(),
3393
+ /** ADR-0541: the wallet's stored display name; null until the backend has assigned one. */
3394
+ displayName: z14.string().nullable().optional(),
3391
3395
  actorType: ActorType.optional(),
3392
3396
  /** ADR-0401: whether the worker is a human or an agent. */
3393
3397
  kind: WorkerKind.optional(),
@@ -4246,6 +4250,8 @@ var PendingActionSchema = z17.object({
4246
4250
  var TaskAwardSchema = z17.object({
4247
4251
  workerAddress: z17.string(),
4248
4252
  workerAgentId: z17.string().nullable(),
4253
+ /** ADR-0541: the worker's stored display name; null until one is assigned. */
4254
+ workerDisplayName: z17.string().nullable().optional(),
4249
4255
  workerActorType: z17.enum(["agent", "human"]),
4250
4256
  rank: z17.number().int().positive(),
4251
4257
  isPrimary: z17.boolean(),
@@ -4626,8 +4632,12 @@ var TaskResponseSchema = z17.object({
4626
4632
  // a response from an older backend, or from another endpoint, still parses.
4627
4633
  recentActivityCount: z17.number().int().nonnegative().optional(),
4628
4634
  requesterAgentId: z17.string().nullable().optional(),
4635
+ /** ADR-0541: the requester's stored display name; null until one is assigned. */
4636
+ requesterDisplayName: z17.string().nullable().optional(),
4629
4637
  requesterActorType: z17.enum(["agent", "human"]).optional(),
4630
4638
  workerAgentId: z17.string().nullable().optional(),
4639
+ /** ADR-0541: the claiming worker's stored display name; null until one is assigned. */
4640
+ workerDisplayName: z17.string().nullable().optional(),
4631
4641
  workerActorType: z17.enum(["agent", "human"]).optional(),
4632
4642
  auctionType: AuctionType.nullable().optional(),
4633
4643
  auctionStartPrice: z17.string().nullable().optional(),
@@ -4835,6 +4845,8 @@ var TaskActionNoticeSchema = z17.object({
4835
4845
  reward: z17.string(),
4836
4846
  /** The agent that declined. */
4837
4847
  worker: z17.string(),
4848
+ /** ADR-0541: the declining agent's stored display name; null until one is assigned. */
4849
+ workerDisplayName: z17.string().nullable().optional(),
4838
4850
  serviceId: z17.string().nullable(),
4839
4851
  /** When the hire was declined, and the transaction that declined it and refunded the reward. */
4840
4852
  at: z17.string(),
@@ -5000,8 +5012,11 @@ var AgentHireSchema = z19.object({
5000
5012
  serviceTitle: z19.string().nullable(),
5001
5013
  worker: z19.string().nullable(),
5002
5014
  workerAgentId: z19.string().nullable(),
5015
+ /** ADR-0541: stored display names; null until one is assigned. */
5016
+ workerDisplayName: z19.string().nullable().optional(),
5003
5017
  requester: z19.string(),
5004
5018
  requesterAgentId: z19.string().nullable(),
5019
+ requesterDisplayName: z19.string().nullable().optional(),
5005
5020
  status: z19.string(),
5006
5021
  /** The reward in the chain's payment token base units. */
5007
5022
  reward: z19.string(),
@@ -5307,7 +5322,7 @@ var AccountEmailSuggestionSchema = z23.object({
5307
5322
  username: z23.string(),
5308
5323
  available: z23.boolean()
5309
5324
  });
5310
- var AccountEmailClaimInputSchema = z23.object({ username: z23.string().max(64) });
5325
+ var AccountEmailClaimInputSchema = z23.object({ username: z23.string().max(64).optional() });
5311
5326
  var AccountEmailListInputSchema = z23.object({
5312
5327
  unread: z23.boolean().optional(),
5313
5328
  limit: z23.number().int().min(1).max(20).default(20),
@@ -6757,6 +6772,8 @@ var EcosystemNodeSchema = z30.object({
6757
6772
  kind: EcosystemNodeKindEnum,
6758
6773
  /** ERC-8004 identity token id, if registered. */
6759
6774
  agentId: z30.string().nullable(),
6775
+ /** ADR-0541: the wallet's stored display name; null until the backend has assigned one. */
6776
+ displayName: z30.string().nullable().optional(),
6760
6777
  completedTasks: z30.number(),
6761
6778
  /** Mean rating on the 0-100 scale ratings are submitted in (see rating.schemas.ts), null when unrated. */
6762
6779
  rating: z30.number().nullable(),
@@ -6917,6 +6934,9 @@ var EcosystemEventSchema = z30.object({
6917
6934
  * agent_joined.
6918
6935
  */
6919
6936
  worker: z30.string().nullable(),
6937
+ /** ADR-0541: stored display names of `requester` and `worker`; null when none is assigned yet. */
6938
+ requesterDisplayName: z30.string().nullable().optional(),
6939
+ workerDisplayName: z30.string().nullable().optional(),
6920
6940
  /** Reward for task_created, bid price for bid_placed, payment for task_paid; else null. */
6921
6941
  amount: z30.string().nullable(),
6922
6942
  /**
@@ -9822,290 +9842,6 @@ var BriefAgentHandoffSchema = z47.object({
9822
9842
  var USDC_DECIMALS = 6;
9823
9843
  var STANDARD_X402_ACTION_AMOUNT = "1000";
9824
9844
 
9825
- // ../../packages/shared/dist/lib/agentName.js
9826
- var MODIFIERS = [
9827
- "Neon",
9828
- "Void",
9829
- "Glitch",
9830
- "Chrome",
9831
- "Cipher",
9832
- "Null",
9833
- "Static",
9834
- "Neural",
9835
- "Pixel",
9836
- "Wire",
9837
- "Nano",
9838
- "Holo",
9839
- "Flux",
9840
- "Byte",
9841
- "Dark",
9842
- "Ghost",
9843
- "Crypto",
9844
- "Phase",
9845
- "Zero",
9846
- "Binary",
9847
- "Vector",
9848
- "Quantum",
9849
- "Photon",
9850
- "Plasma",
9851
- "Sonic",
9852
- "Cyber",
9853
- "Virtual",
9854
- "Atomic",
9855
- "Solar",
9856
- "Lunar",
9857
- "Stellar",
9858
- "Nova",
9859
- "Proto",
9860
- "Meta",
9861
- "Neo",
9862
- "Trans",
9863
- "Omni",
9864
- "Synth",
9865
- "Code",
9866
- "Data",
9867
- "Grid",
9868
- "Core",
9869
- "Arc",
9870
- "Edge",
9871
- "Sigma",
9872
- "Omega",
9873
- "Psi",
9874
- "Iron",
9875
- "Steel",
9876
- "Carbon",
9877
- "Cobalt",
9878
- "Indigo",
9879
- "Azure",
9880
- "Crimson",
9881
- "Amber",
9882
- "Jade",
9883
- "Obsidian",
9884
- "Violet",
9885
- "Scarlet",
9886
- "Teal",
9887
- "Onyx",
9888
- "Silver",
9889
- "Gold",
9890
- "Copper",
9891
- "Ivory",
9892
- "Ash",
9893
- "Slate",
9894
- "Infra",
9895
- "Sub",
9896
- "Ultra",
9897
- "Hyper",
9898
- "Laser",
9899
- "Turbo",
9900
- "Rogue",
9901
- "Feral",
9902
- "Stray",
9903
- "Phantom",
9904
- "Hollow",
9905
- "Rusted",
9906
- "Fractured"
9907
- ];
9908
- var ATMOSPHERE = [
9909
- "Dream",
9910
- "Drift",
9911
- "Pulse",
9912
- "Wave",
9913
- "Tide",
9914
- "Echo",
9915
- "Bloom",
9916
- "Surge",
9917
- "Dust",
9918
- "Mist",
9919
- "Storm",
9920
- "Ember",
9921
- "Haze",
9922
- "Rift",
9923
- "Veil",
9924
- "Spark",
9925
- "Glow",
9926
- "Blaze",
9927
- "Flash",
9928
- "Burst",
9929
- "Fade",
9930
- "Shift",
9931
- "Warp",
9932
- "Fold",
9933
- "Loop",
9934
- "Coil",
9935
- "Spiral",
9936
- "Prism",
9937
- "Mirror",
9938
- "Shard",
9939
- "Gleam",
9940
- "Shimmer",
9941
- "Dusk",
9942
- "Dawn",
9943
- "Daze",
9944
- "Trance",
9945
- "Slumber",
9946
- "Reverie",
9947
- "Mirage",
9948
- "Vision",
9949
- "Aura",
9950
- "Nimbus",
9951
- "Halo",
9952
- "Vortex",
9953
- "Helix",
9954
- "Matrix",
9955
- "Nexus",
9956
- "Current",
9957
- "Wake",
9958
- "Thread",
9959
- "Weave",
9960
- "Mesh",
9961
- "Static",
9962
- "Noise",
9963
- "Signal",
9964
- "Beacon",
9965
- "Trace",
9966
- "Glyph",
9967
- "Rune",
9968
- "Seal",
9969
- "Shadow",
9970
- "Shroud",
9971
- "Mantle",
9972
- "Cloak",
9973
- "Veil",
9974
- "Wraith",
9975
- "Specter",
9976
- "Shade",
9977
- "Fracture",
9978
- "Hollow",
9979
- "Bloom",
9980
- "Frost",
9981
- "Ash",
9982
- "Cinder",
9983
- "Flux",
9984
- "Torrent",
9985
- "Cascade",
9986
- "Deluge",
9987
- "Tempest",
9988
- "Nebula"
9989
- ];
9990
- var ENTITIES = [
9991
- "Phantom",
9992
- "Nomad",
9993
- "Walker",
9994
- "Drifter",
9995
- "Runner",
9996
- "Seeker",
9997
- "Mind",
9998
- "Soul",
9999
- "Rover",
10000
- "Hunter",
10001
- "Raider",
10002
- "Weaver",
10003
- "Caster",
10004
- "Dreamer",
10005
- "Oracle",
10006
- "Wraith",
10007
- "Prophet",
10008
- "Sage",
10009
- "Knight",
10010
- "Warden",
10011
- "Sentinel",
10012
- "Scout",
10013
- "Ranger",
10014
- "Stalker",
10015
- "Dancer",
10016
- "Caller",
10017
- "Blade",
10018
- "Arrow",
10019
- "Shield",
10020
- "Rune",
10021
- "Beacon",
10022
- "Star",
10023
- "Comet",
10024
- "Node",
10025
- "Root",
10026
- "Seed",
10027
- "Thread",
10028
- "Pulse",
10029
- "Beat",
10030
- "Chord",
10031
- "Key",
10032
- "Lock",
10033
- "Cipher",
10034
- "Qubit",
10035
- "Specter",
10036
- "Monk",
10037
- "Guard",
10038
- "Voice",
10039
- "Eye",
10040
- "Hand",
10041
- "Fist",
10042
- "Point",
10043
- "Mark",
10044
- "Brand",
10045
- "Signal",
10046
- "Torch",
10047
- "Light",
10048
- "Moon",
10049
- "Void",
10050
- "Zero",
10051
- "Bit",
10052
- "Core",
10053
- "Fiber",
10054
- "Wire",
10055
- "Cell",
10056
- "Spore",
10057
- "Gate",
10058
- "Portal",
10059
- "Lens",
10060
- "Crystal",
10061
- "Nexus",
10062
- "Axis",
10063
- "Vertex",
10064
- "Apex",
10065
- "Zenith",
10066
- "Nadir",
10067
- "Horizon",
10068
- "Meridian",
10069
- "Equinox",
10070
- "Solstice"
10071
- ];
10072
- var M = MODIFIERS.length;
10073
- var A = ATMOSPHERE.length;
10074
- var E = ENTITIES.length;
10075
- var N = M * A * E;
10076
- var MIX_K = 31;
10077
- function modInverse(a, n) {
10078
- let t = 0;
10079
- let nextT = 1;
10080
- let r = n;
10081
- let nextR = a;
10082
- while (nextR !== 0) {
10083
- const q = Math.floor(r / nextR);
10084
- [t, nextT] = [nextT, t - q * nextT];
10085
- [r, nextR] = [nextR, r - q * nextR];
10086
- }
10087
- if (r !== 1)
10088
- return 0;
10089
- return (t % n + n) % n;
10090
- }
10091
- var MIX_K_INV = modInverse(MIX_K, N);
10092
- function getAgentName(agentId) {
10093
- if (agentId === null || agentId === void 0)
10094
- return null;
10095
- const id3 = Number(agentId);
10096
- if (!Number.isFinite(id3))
10097
- return null;
10098
- const idNorm = (id3 % N + N) % N;
10099
- const mixed = idNorm * MIX_K % N;
10100
- const modIdx = mixed % M;
10101
- const atmIdx = Math.floor(mixed / M) % A;
10102
- const entIdx = Math.floor(mixed / (M * A)) % E;
10103
- const mod = MODIFIERS[modIdx];
10104
- const atm = ATMOSPHERE[atmIdx];
10105
- const ent = ENTITIES[entIdx];
10106
- return `${mod}${atm}${ent}`;
10107
- }
10108
-
10109
9845
  // ../../packages/shared/dist/lib/reference-codes.js
10110
9846
  var ALPHABET = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
10111
9847
  var CODE_LENGTH = 8;
@@ -16496,6 +16232,8 @@ var PublicBugReportSchema = z67.object({
16496
16232
  duplicateOfId: z67.string().uuid().nullable(),
16497
16233
  reporterAddress: z67.string(),
16498
16234
  reporterAgentId: z67.string().nullable(),
16235
+ /** ADR-0541: the reporter's stored display name; null until one is assigned. */
16236
+ reporterDisplayName: z67.string().nullable().optional(),
16499
16237
  context: z67.record(z67.unknown()),
16500
16238
  /** Wallets that said "I have this too". */
16501
16239
  affectedCount: z67.number().int(),
@@ -16521,6 +16259,8 @@ var BugReportCommentSchema = z67.object({
16521
16259
  id: z67.string().uuid(),
16522
16260
  authorAddress: z67.string(),
16523
16261
  authorAgentId: z67.string().nullable(),
16262
+ /** ADR-0541: the author's stored display name; null until one is assigned. */
16263
+ authorDisplayName: z67.string().nullable().optional(),
16524
16264
  /** The comment is by the report's reporter. */
16525
16265
  isReporter: z67.boolean(),
16526
16266
  /** Taskmarket staff wrote it; `authorAddress` is then not a wallet. */
@@ -19251,7 +18991,6 @@ export {
19251
18991
  isInitialBriefTurnMessage,
19252
18992
  BriefSessionViewSchema,
19253
18993
  STANDARD_X402_ACTION_AMOUNT,
19254
- getAgentName,
19255
18994
  normalizeReferenceCode,
19256
18995
  validateWorkflowDocument,
19257
18996
  normalizeWorkflowTemplateTags,
@@ -6,14 +6,14 @@ import {
6
6
  loadDeliverableRecord,
7
7
  readComputeView,
8
8
  taskStage
9
- } from "./chunk-FN5FZ4RL.js";
9
+ } from "./chunk-YENJWEM7.js";
10
10
  import {
11
11
  activeClaim,
12
12
  captureProblem,
13
13
  killedSession,
14
14
  loadSyncState,
15
15
  orphanOf
16
- } from "./chunk-IRKICJEV.js";
16
+ } from "./chunk-3NPMVKNZ.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-Z7MFEW73.js";
24
+ } from "./chunk-3HR7XRLE.js";
25
25
  import {
26
26
  apiUrl,
27
27
  selectedNetwork
28
- } from "./chunk-XZZKUMHQ.js";
28
+ } from "./chunk-AZMCG2LI.js";
29
29
  import {
30
30
  SandboxListOutputSchema
31
- } from "./chunk-MGDBSENK.js";
31
+ } from "./chunk-IVCJPX7J.js";
32
32
  import {
33
33
  AgentLaunchError
34
34
  } 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-YS3YH7U3.js";
4
+ } from "./chunk-ZPQLJAG4.js";
5
5
  import {
6
6
  signReadAuth
7
- } from "./chunk-FNSX2KLZ.js";
7
+ } from "./chunk-CH3GXKIO.js";
8
8
  import {
9
9
  taskAccessGrantHeaders
10
- } from "./chunk-FKQBRXQS.js";
10
+ } from "./chunk-NLHDU4CH.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-XZZKUMHQ.js";
18
+ } from "./chunk-AZMCG2LI.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-MGDBSENK.js";
26
+ } from "./chunk-IVCJPX7J.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-HZEK636T.js");
119
- const { signReadAuth: signReadAuth2 } = await import("./read-auth-UAZUJEEQ.js");
120
- const { taskAccessGrantHeaders: taskAccessGrantHeaders2 } = await import("./task-access-grants-5I7QQXZV.js");
118
+ const { apiGet: apiGet2 } = await import("./api-QATTK6I6.js");
119
+ const { signReadAuth: signReadAuth2 } = await import("./read-auth-B7NFDF6U.js");
120
+ const { taskAccessGrantHeaders: taskAccessGrantHeaders2 } = await import("./task-access-grants-IBD3JFGD.js");
121
121
  const taskId = /^\/api\/tasks\/([^/?]+)/.exec(path)?.[1] ?? "";
122
122
  return apiGet2(path, {
123
123
  headers: {
@@ -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-MGDBSENK.js";
5
+ } from "./chunk-IVCJPX7J.js";
6
6
 
7
7
  // src/lib/task-access-grants.ts
8
8
  import { promises as fs } from "fs";
@@ -22,7 +22,7 @@ import {
22
22
  unresolvedCount,
23
23
  updateSyncState,
24
24
  uploadWorkspace
25
- } from "./chunk-IRKICJEV.js";
25
+ } from "./chunk-3NPMVKNZ.js";
26
26
  import {
27
27
  AgentLaunchError
28
28
  } from "./chunk-YM4S6IE4.js";
@@ -8,7 +8,7 @@ import {
8
8
  unsafeHostPath,
9
9
  withFileLock,
10
10
  writeAtomic
11
- } from "./chunk-IRKICJEV.js";
11
+ } from "./chunk-3NPMVKNZ.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-YS3YH7U3.js";
19
+ } from "./chunk-ZPQLJAG4.js";
20
20
  import {
21
21
  getTaskmarketHome
22
- } from "./chunk-MGDBSENK.js";
22
+ } from "./chunk-IVCJPX7J.js";
23
23
  import {
24
24
  AgentLaunchError
25
25
  } from "./chunk-YM4S6IE4.js";
@@ -15,7 +15,7 @@ import {
15
15
  readMppTempoChallenge,
16
16
  reconcileX402Payment,
17
17
  withX402FileLock
18
- } from "./chunk-F532X4HL.js";
18
+ } from "./chunk-FUHULPDT.js";
19
19
  import {
20
20
  ApiError,
21
21
  apiGet,
@@ -36,14 +36,14 @@ import {
36
36
  withChainId,
37
37
  withIdempotentWrite,
38
38
  withTapSignature
39
- } from "./chunk-XZZKUMHQ.js";
39
+ } from "./chunk-AZMCG2LI.js";
40
40
  import {
41
41
  ComputeCreditBuyOutputSchema,
42
42
  ComputeCreditPricingSchema,
43
43
  ComputeCreditStatusOutputSchema,
44
44
  apiErrorEnvelopeOf,
45
45
  getTaskmarketHome
46
- } from "./chunk-MGDBSENK.js";
46
+ } from "./chunk-IVCJPX7J.js";
47
47
 
48
48
  // src/lib/x402-fee.ts
49
49
  import { randomUUID as randomUUID3 } from "crypto";
@@ -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-ZMPMQTQQ.js";
5
- import "./chunk-FN5FZ4RL.js";
6
- import "./chunk-IRKICJEV.js";
7
- import "./chunk-YS3YH7U3.js";
4
+ } from "./chunk-J2TAHVUS.js";
5
+ import "./chunk-YENJWEM7.js";
6
+ import "./chunk-3NPMVKNZ.js";
7
+ import "./chunk-ZPQLJAG4.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-Z7MFEW73.js";
19
+ } from "./chunk-3HR7XRLE.js";
20
20
  import {
21
21
  getX402PolicyPath,
22
22
  loadX402Policy,
23
23
  rpcUrlForNetwork
24
- } from "./chunk-F532X4HL.js";
24
+ } from "./chunk-FUHULPDT.js";
25
25
  import {
26
26
  apiUrl,
27
27
  keystoreExists,
28
28
  loadKeystore,
29
29
  withChainId
30
- } from "./chunk-XZZKUMHQ.js";
31
- import "./chunk-MGDBSENK.js";
30
+ } from "./chunk-AZMCG2LI.js";
31
+ import "./chunk-IVCJPX7J.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-B2PINQHQ.js";
17
+ } from "./chunk-LETSESYQ.js";
18
18
  import {
19
19
  ComputeCreditError,
20
20
  applyComputeCreditSetup,
@@ -37,14 +37,14 @@ import {
37
37
  releasePendingComputePurchase,
38
38
  resolvePendingComputePurchases,
39
39
  x402FeePost
40
- } from "./chunk-YS3YH7U3.js";
40
+ } from "./chunk-ZPQLJAG4.js";
41
41
  import {
42
42
  signReadAuth
43
- } from "./chunk-FNSX2KLZ.js";
43
+ } from "./chunk-CH3GXKIO.js";
44
44
  import {
45
45
  saveTaskAccessGrant,
46
46
  taskAccessGrantHeaders
47
- } from "./chunk-FKQBRXQS.js";
47
+ } from "./chunk-NLHDU4CH.js";
48
48
  import {
49
49
  MPP_TEMPO_DEFAULT_VALIDITY_SECONDS,
50
50
  X402PayError,
@@ -62,7 +62,7 @@ import {
62
62
  setX402PolicyRuleEnabled,
63
63
  signSponsoredTempoTransfer,
64
64
  signTaskmarketFeePayment
65
- } from "./chunk-F532X4HL.js";
65
+ } from "./chunk-FUHULPDT.js";
66
66
  import {
67
67
  ALL_NETWORKS,
68
68
  ApiError,
@@ -71,6 +71,7 @@ import {
71
71
  NETWORK_NAMES,
72
72
  NetworkRequiredError,
73
73
  TAP_ALGORITHMS,
74
+ TAP_CREATE_ALGORITHMS,
74
75
  allNetworksSelected,
75
76
  apiDelete,
76
77
  apiGet,
@@ -125,7 +126,7 @@ import {
125
126
  withErrorContext,
126
127
  withIdempotentWrite,
127
128
  withTapSignature
128
- } from "./chunk-XZZKUMHQ.js";
129
+ } from "./chunk-AZMCG2LI.js";
129
130
  import {
130
131
  AGENT_AVATAR_MAX_BYTES,
131
132
  AGENT_HIRES_ROLES,
@@ -323,7 +324,6 @@ import {
323
324
  formatPaymentAmount,
324
325
  formatTaskChecksErrors,
325
326
  formatUsdcBaseUnits,
326
- getAgentName,
327
327
  getTaskmarketHome,
328
328
  hiddenChecksResult,
329
329
  hireAcceptAtCapacity,
@@ -385,7 +385,7 @@ import {
385
385
  verifierProviderId,
386
386
  verifiersUnsupportedOnChain,
387
387
  viemChainFor
388
- } from "./chunk-MGDBSENK.js";
388
+ } from "./chunk-IVCJPX7J.js";
389
389
  import "./chunk-S7SJMJ2I.js";
390
390
 
391
391
  // src/index.ts
@@ -7412,9 +7412,9 @@ function explainEnrolFailure(error, chainId) {
7412
7412
  return error;
7413
7413
  }
7414
7414
  async function enrolTapKey(stored, chainId) {
7415
- if (stored.alg !== "ed25519") {
7415
+ if (stored.alg !== "ed25519" && stored.alg !== "ecdsa-p256-sha256") {
7416
7416
  throw new Error(
7417
- `Only an ed25519 TAP key can be enrolled with the simulated directory, not ${stored.alg}.`
7417
+ `Only an ed25519 or ECDSA P-256 TAP key can be enrolled with the simulated directory, not ${stored.alg}.`
7418
7418
  );
7419
7419
  }
7420
7420
  const auth = await signReadAuth();
@@ -7466,33 +7466,22 @@ async function readTapKeyStatus(stored, chainId) {
7466
7466
  }
7467
7467
 
7468
7468
  // src/commands/init.ts
7469
- function sanitizeEmailUsername(agentId, suffix) {
7470
- const maxBase = 30 - 1 - suffix.length;
7471
- if (maxBase < 2) return null;
7472
- const base = agentId.toLowerCase().replace(/[^a-z0-9]/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, "").slice(0, maxBase).replace(/-+$/, "");
7473
- if (base.length < 2) return null;
7474
- const candidate = `${base}-${suffix}`;
7475
- return /^[a-z0-9][a-z0-9-]{1,28}[a-z0-9]$/.test(candidate) ? candidate : null;
7476
- }
7477
- async function tryRegisterEmail(deviceId, apiToken, username, explicit, warnings) {
7469
+ async function tryRegisterEmail(deviceId, apiToken, warnings) {
7478
7470
  try {
7479
7471
  const { data: reg } = await apiPost("/api/emails/register", {
7480
7472
  deviceId,
7481
- apiToken,
7482
- username
7473
+ apiToken
7483
7474
  });
7484
7475
  return reg.emailAddress;
7485
7476
  } catch (err) {
7486
- if (explicit) {
7487
- const msg = err instanceof Error ? err.message : String(err);
7488
- warnings.push(
7489
- cliWarning(
7490
- "email_registration_failed",
7491
- `Email registration failed: ${msg}. Run: taskmarket email register --username ${username}`,
7492
- { username, retryCommand: `taskmarket email register --username ${username}` }
7493
- )
7494
- );
7495
- }
7477
+ const msg = err instanceof Error ? err.message : String(err);
7478
+ warnings.push(
7479
+ cliWarning(
7480
+ "email_registration_failed",
7481
+ `Email registration failed: ${msg}. Run: taskmarket email register`,
7482
+ { retryCommand: "taskmarket email register" }
7483
+ )
7484
+ );
7496
7485
  return null;
7497
7486
  }
7498
7487
  }
@@ -7582,9 +7571,6 @@ async function addTapKey() {
7582
7571
  }
7583
7572
  var initCommand = new Command2("init").description(
7584
7573
  "Create and register this machine's agent wallet (one-time; refuses when a wallet exists)"
7585
- ).option(
7586
- "--email <username>",
7587
- "Claim a custom email username (default: auto-generated from agent ID)"
7588
7574
  ).option(
7589
7575
  "--yes",
7590
7576
  "Confirm legal acceptance non-interactively after reviewing every current policy"
@@ -7593,7 +7579,7 @@ var initCommand = new Command2("init").description(
7593
7579
  "On a machine that already has a wallet, add its Solana wallet (new wallets get one anyway)"
7594
7580
  ).option(
7595
7581
  "--tap",
7596
- "Also create a TAP signing key (ed25519) and enrol it with the simulated directory where the network's chain uses it; on a machine that already has a wallet, add one. Off unless given."
7582
+ "Also create a TAP signing key (ECDSA P-256) and enrol it with the simulated directory where the network's chain uses it; on a machine that already has a wallet, add one. Off unless given."
7597
7583
  ).action(async (opts) => {
7598
7584
  if ((opts.solana || opts.tap) && await keystoreExists()) {
7599
7585
  if (opts.solana && opts.tap) {
@@ -7608,15 +7594,6 @@ var initCommand = new Command2("init").description(
7608
7594
  return;
7609
7595
  }
7610
7596
  await ensureInitNetwork();
7611
- if (opts.email) {
7612
- const check = await apiGet(
7613
- `/api/emails/check-username?username=${encodeURIComponent(opts.email)}`
7614
- );
7615
- if (!check.available) {
7616
- printError(`Email username "${opts.email}" is not available.`);
7617
- return;
7618
- }
7619
- }
7620
7597
  const { privateKey, address: address3 } = generateKeypair();
7621
7598
  const solanaWallet = await generateSolanaKeypair();
7622
7599
  const publicKey = deriveCompressedPublicKey(privateKey);
@@ -7687,9 +7664,8 @@ var initCommand = new Command2("init").description(
7687
7664
  networkInfo = response.result.data;
7688
7665
  } catch {
7689
7666
  }
7690
- const username = opts.email ?? (agentId && networkInfo ? sanitizeEmailUsername(agentId, String(selectedNetwork().chainId)) : null);
7691
7667
  const warnings = [];
7692
- const emailAddress = username ? await tryRegisterEmail(deviceId, apiToken, username, !!opts.email, warnings) : null;
7668
+ const emailAddress = await tryRegisterEmail(deviceId, apiToken, warnings);
7693
7669
  let chain;
7694
7670
  try {
7695
7671
  chain = chainInfoFor(networkInfo, selectedNetwork().chainId);
@@ -8371,7 +8347,8 @@ var addressCommand2 = new Command7("address").description("One wallet on the sel
8371
8347
  chainId: selectedNetwork().chainId,
8372
8348
  address: wanted,
8373
8349
  windowDays,
8374
- name: node?.agentId ? getAgentName(node.agentId) : null,
8350
+ // ADR-0541: the name Taskmarket stores for the wallet, never computed here.
8351
+ displayName: node?.displayName ?? null,
8375
8352
  node,
8376
8353
  events: page.items
8377
8354
  });
@@ -13456,7 +13433,7 @@ async function runAgentCommand(options) {
13456
13433
  try {
13457
13434
  const { assertAgentCompatibility } = await import("./compatibility-636WJOEX.js");
13458
13435
  const pi = assertAgentCompatibility();
13459
- const { runAgent } = await import("./launch-FOCL5JOR.js");
13436
+ const { runAgent } = await import("./launch-FQFOZYIN.js");
13460
13437
  result = await runAgent({
13461
13438
  model: options.model,
13462
13439
  pi,
@@ -13890,13 +13867,13 @@ function agentManagementCommands() {
13890
13867
  const status = new Command58("status").description(
13891
13868
  "Show the agent channels (locked, charged, refundable), purchases with an unknown outcome, the sandbox and compute credit. Reads only."
13892
13869
  ).action(async () => {
13893
- const { collectAgentStatus } = await import("./status-A636ECTT.js");
13870
+ const { collectAgentStatus } = await import("./status-IMWQR4AR.js");
13894
13871
  await run(() => collectAgentStatus());
13895
13872
  });
13896
13873
  const doctor = new Command58("doctor").description(
13897
13874
  "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."
13898
13875
  ).action(async () => {
13899
- const { runDoctor } = await import("./doctor-NTQ3ZJRU.js");
13876
+ const { runDoctor } = await import("./doctor-WW54ZCQR.js");
13900
13877
  const report = await run(() => runDoctor());
13901
13878
  if (report && !report.ok) process.exitCode = 1;
13902
13879
  });
@@ -13907,7 +13884,7 @@ function agentManagementCommands() {
13907
13884
  "Reconcile the open purchases of this channel, as status lists it; also reaches retired channels"
13908
13885
  ).action(
13909
13886
  async (invocationId, options) => {
13910
- const { reconcileChannelPurchases, reconcileInvocation } = await import("./reconcile-IKPAKGH3.js");
13887
+ const { reconcileChannelPurchases, reconcileInvocation } = await import("./reconcile-KHSXUVR3.js");
13911
13888
  const choice = { rail: options.rail, channel: options.channel };
13912
13889
  if (invocationId !== void 0) {
13913
13890
  await run(() => reconcileInvocation(invocationId, { choice }));
@@ -13939,7 +13916,7 @@ function agentManagementCommands() {
13939
13916
  `Not a USDC amount: ${options.amount} (digits, at most 6 decimals)`
13940
13917
  );
13941
13918
  }
13942
- const { openAgentChannels, requestTopUp, selectRail, withdrawalHatch } = await import("./channels-FWGJII6Y.js");
13919
+ const { openAgentChannels, requestTopUp, selectRail, withdrawalHatch } = await import("./channels-AH2WHLMC.js");
13943
13920
  const { rails } = await openAgentChannels();
13944
13921
  const result = await requestTopUp(selectRail(rails, options.rail), amount);
13945
13922
  return {
@@ -13959,8 +13936,8 @@ function agentManagementCommands() {
13959
13936
  await run(async () => {
13960
13937
  await requireExperimental();
13961
13938
  const { AGENT_VIEW_VERSION } = await import("./budget-view-J6L7X6EY.js");
13962
- const { closeChannel, openAgentChannels, selectChannel } = await import("./channels-FWGJII6Y.js");
13963
- const { reconcileLeasedPurchase } = await import("./reconcile-IKPAKGH3.js");
13939
+ const { closeChannel, openAgentChannels, selectChannel } = await import("./channels-AH2WHLMC.js");
13940
+ const { reconcileLeasedPurchase } = await import("./reconcile-KHSXUVR3.js");
13964
13941
  const opened = await openAgentChannels();
13965
13942
  const { rail, retired } = selectChannel(opened, options);
13966
13943
  const result = await closeChannel(
@@ -14014,7 +13991,7 @@ function agentManagementCommands() {
14014
13991
  async (options) => {
14015
13992
  await run(async () => {
14016
13993
  await requireExperimental();
14017
- const { runPull } = await import("./sync-pull-DVC4R6BN.js");
13994
+ const { runPull } = await import("./sync-pull-EN7CFU3J.js");
14018
13995
  const { terminalPrompter } = await import("./prompter-LSICEYSQ.js");
14019
13996
  return runPull(options, {
14020
13997
  interactive: Boolean(process.stdin.isTTY && process.stdout.isTTY),
@@ -18726,7 +18703,7 @@ function createDaemonCommand(seams = {}) {
18726
18703
  );
18727
18704
  }
18728
18705
  if (emailRequested && !emailAvailable) {
18729
- const hint = `${emailMissing} Run \`taskmarket email register --username <name>\` to get one.`;
18706
+ const hint = `${emailMissing} Run \`taskmarket email register\` to get one.`;
18730
18707
  if (!othersRun("email")) throw new Error(hint);
18731
18708
  if (explicitSources || emailLookupFailed) {
18732
18709
  process.stderr.write(`${hint} Following the other sources.
@@ -19021,21 +18998,15 @@ import { Command as Command91 } from "commander";
19021
18998
 
19022
18999
  // src/commands/email/register.ts
19023
19000
  import { Command as Command83 } from "commander";
19024
- var registerCommand = new Command83("register").description("Register an email address for this agent").requiredOption("--username <name>", "Desired username (e.g. myagent)").action(async (opts) => {
19025
- const check = await apiGet(
19026
- `/api/emails/check-username?username=${encodeURIComponent(opts.username)}`
19027
- );
19028
- if (!check.available) {
19029
- printError(`Username "${opts.username}" is not available.`);
19030
- return;
19031
- }
19001
+ var registerCommand = new Command83("register").description(
19002
+ "Register this agent email address, agent-<id>@taskmarket.dev (the backend assigns the id)"
19003
+ ).action(async () => {
19032
19004
  const keystore = await loadKeystore();
19033
19005
  const { data: result, idempotencyKey } = await apiPost(
19034
19006
  "/api/emails/register",
19035
19007
  {
19036
19008
  deviceId: keystore.deviceId,
19037
- apiToken: keystore.apiToken,
19038
- username: opts.username
19009
+ apiToken: keystore.apiToken
19039
19010
  }
19040
19011
  );
19041
19012
  printResult({ emailAddress: result.emailAddress }, { idempotencyKey });
@@ -29089,7 +29060,7 @@ tapCommand.command("import").description(
29089
29060
  "Import a TAP private key and its key id, stored encrypted in the keystore. Gated worker actions on tasks that require tap are then signed with it automatically."
29090
29061
  ).requiredOption("--key-id <id>", "The key id the verifier issued for this key").option(
29091
29062
  "--key-file <path>",
29092
- "File holding the private key: a PEM private key, or an ed25519 seed as 64 hex characters. Use - to read it from stdin.",
29063
+ "File holding the private key: a PEM private key (PKCS#8 or SEC1), or an ed25519 seed as 64 hex characters. Use - to read it from stdin.",
29093
29064
  "-"
29094
29065
  ).option(
29095
29066
  "--alg <alg>",
@@ -29134,9 +29105,16 @@ tapCommand.command("import").description(
29134
29105
  }
29135
29106
  );
29136
29107
  tapCommand.command("create").description(
29137
- "Create an ed25519 TAP key, stored encrypted in the keystore with no key id until it is enrolled. Never replaces a key that exists."
29138
- ).action(async () => {
29108
+ "Create an ECDSA P-256 TAP key (or ed25519 with --alg ed25519), stored encrypted in the keystore with no key id until it is enrolled. Never replaces a key that exists."
29109
+ ).option(
29110
+ "--alg <alg>",
29111
+ `Key type to create: ${TAP_CREATE_ALGORITHMS.join(", ")}`,
29112
+ "ecdsa-p256-sha256"
29113
+ ).action(async (opts) => {
29139
29114
  try {
29115
+ if (!TAP_CREATE_ALGORITHMS.includes(opts.alg)) {
29116
+ throw new Error(`--alg must be one of: ${TAP_CREATE_ALGORITHMS.join(", ")}`);
29117
+ }
29140
29118
  const keystore = await loadKeystore();
29141
29119
  if (keystore.tapKey) {
29142
29120
  throw new Error(
@@ -29144,7 +29122,13 @@ tapCommand.command("create").description(
29144
29122
  );
29145
29123
  }
29146
29124
  const dek = await fetchDeviceKey(keystore.deviceId, keystore.apiToken, keystore.keyServerUrl);
29147
- const tapKey = storedTapKey(dek, null, generateTapKey(), /* @__PURE__ */ new Date(), "created");
29125
+ const tapKey = storedTapKey(
29126
+ dek,
29127
+ null,
29128
+ generateTapKey(opts.alg),
29129
+ /* @__PURE__ */ new Date(),
29130
+ "created"
29131
+ );
29148
29132
  await saveKeystore({ ...keystore, tapKey });
29149
29133
  printResult({ ...tapKeySummary(tapKey), created: true });
29150
29134
  } catch (err) {
@@ -38,7 +38,7 @@ import {
38
38
  sha256Hex,
39
39
  specHash,
40
40
  taskStage
41
- } from "./chunk-FN5FZ4RL.js";
41
+ } from "./chunk-YENJWEM7.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-XEGCIN3K.js";
50
+ } from "./chunk-XBPINLPI.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-IRKICJEV.js";
62
+ } from "./chunk-3NPMVKNZ.js";
63
63
  import {
64
64
  TaskOperationError,
65
65
  claimTask,
@@ -78,7 +78,7 @@ import {
78
78
  requestArtifactUpload,
79
79
  submitUploadedArtifacts,
80
80
  taskAwardsOf
81
- } from "./chunk-B2PINQHQ.js";
81
+ } from "./chunk-LETSESYQ.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-YS3YH7U3.js";
91
+ } from "./chunk-ZPQLJAG4.js";
92
92
  import {
93
93
  signReadAuth
94
- } from "./chunk-FNSX2KLZ.js";
94
+ } from "./chunk-CH3GXKIO.js";
95
95
  import {
96
96
  taskAccessGrantHeaders
97
- } from "./chunk-FKQBRXQS.js";
97
+ } from "./chunk-NLHDU4CH.js";
98
98
  import {
99
99
  MAX_RETIRED_RAILS,
100
100
  NETWORK_NAMES,
@@ -118,7 +118,7 @@ import {
118
118
  routeOfCatalogRow,
119
119
  saveAgentPolicy,
120
120
  settledRetiredRails
121
- } from "./chunk-Z7MFEW73.js";
121
+ } from "./chunk-3HR7XRLE.js";
122
122
  import {
123
123
  BASE_CHANNEL_RAIL_ID,
124
124
  createBaseChannelPayer,
@@ -132,13 +132,13 @@ import {
132
132
  rpcUrlForNetwork,
133
133
  saveX402Policy,
134
134
  x402SpendWindowAvailability
135
- } from "./chunk-F532X4HL.js";
135
+ } from "./chunk-FUHULPDT.js";
136
136
  import {
137
137
  apiUrl,
138
138
  keystoreExists,
139
139
  loadKeystore,
140
140
  selectedNetwork
141
- } from "./chunk-XZZKUMHQ.js";
141
+ } from "./chunk-AZMCG2LI.js";
142
142
  import {
143
143
  IntentStatusResponseSchema,
144
144
  NetworkChainInfoSchema,
@@ -147,7 +147,7 @@ import {
147
147
  isRecordingPendingResponse,
148
148
  piCodingAgentTools,
149
149
  taskmarketChain
150
- } from "./chunk-MGDBSENK.js";
150
+ } from "./chunk-IVCJPX7J.js";
151
151
  import {
152
152
  AgentLaunchError
153
153
  } from "./chunk-YM4S6IE4.js";
@@ -1,9 +1,9 @@
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
  signReadAuth
4
- } from "./chunk-FNSX2KLZ.js";
5
- import "./chunk-XZZKUMHQ.js";
6
- import "./chunk-MGDBSENK.js";
4
+ } from "./chunk-CH3GXKIO.js";
5
+ import "./chunk-AZMCG2LI.js";
6
+ import "./chunk-IVCJPX7J.js";
7
7
  import "./chunk-S7SJMJ2I.js";
8
8
  export {
9
9
  signReadAuth
@@ -3,15 +3,15 @@ import {
3
3
  channelView,
4
4
  openAgentChannels,
5
5
  selectChannel
6
- } from "./chunk-Z7MFEW73.js";
6
+ } from "./chunk-3HR7XRLE.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-F532X4HL.js";
13
- import "./chunk-XZZKUMHQ.js";
14
- import "./chunk-MGDBSENK.js";
12
+ } from "./chunk-FUHULPDT.js";
13
+ import "./chunk-AZMCG2LI.js";
14
+ import "./chunk-IVCJPX7J.js";
15
15
  import {
16
16
  AgentLaunchError
17
17
  } from "./chunk-YM4S6IE4.js";
@@ -4,14 +4,14 @@ import {
4
4
  listSandboxes,
5
5
  readSyncStatus,
6
6
  readTaskStatus
7
- } from "./chunk-ZMPMQTQQ.js";
8
- import "./chunk-FN5FZ4RL.js";
9
- import "./chunk-IRKICJEV.js";
10
- import "./chunk-YS3YH7U3.js";
11
- import "./chunk-Z7MFEW73.js";
12
- import "./chunk-F532X4HL.js";
13
- import "./chunk-XZZKUMHQ.js";
14
- import "./chunk-MGDBSENK.js";
7
+ } from "./chunk-J2TAHVUS.js";
8
+ import "./chunk-YENJWEM7.js";
9
+ import "./chunk-3NPMVKNZ.js";
10
+ import "./chunk-ZPQLJAG4.js";
11
+ import "./chunk-3HR7XRLE.js";
12
+ import "./chunk-FUHULPDT.js";
13
+ import "./chunk-AZMCG2LI.js";
14
+ import "./chunk-IVCJPX7J.js";
15
15
  import "./chunk-YM4S6IE4.js";
16
16
  import "./chunk-XJOB4NMV.js";
17
17
  import "./chunk-S7SJMJ2I.js";
@@ -11,7 +11,7 @@ import {
11
11
  savedWorkspace,
12
12
  summarize,
13
13
  unsavedPaths
14
- } from "./chunk-XEGCIN3K.js";
14
+ } from "./chunk-XBPINLPI.js";
15
15
  import {
16
16
  BrokerConnector,
17
17
  SandboxUnavailableError,
@@ -27,12 +27,12 @@ import {
27
27
  releaseClaim,
28
28
  unresolvedCount,
29
29
  updateSyncState
30
- } from "./chunk-IRKICJEV.js";
30
+ } from "./chunk-3NPMVKNZ.js";
31
31
  import {
32
32
  apiUrl,
33
33
  loadKeystore
34
- } from "./chunk-XZZKUMHQ.js";
35
- import "./chunk-MGDBSENK.js";
34
+ } from "./chunk-AZMCG2LI.js";
35
+ import "./chunk-IVCJPX7J.js";
36
36
  import {
37
37
  AgentLaunchError
38
38
  } from "./chunk-YM4S6IE4.js";
@@ -3,8 +3,8 @@ import {
3
3
  loadTaskAccessGrant,
4
4
  saveTaskAccessGrant,
5
5
  taskAccessGrantHeaders
6
- } from "./chunk-FKQBRXQS.js";
7
- import "./chunk-MGDBSENK.js";
6
+ } from "./chunk-NLHDU4CH.js";
7
+ import "./chunk-IVCJPX7J.js";
8
8
  import "./chunk-S7SJMJ2I.js";
9
9
  export {
10
10
  loadTaskAccessGrant,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lucid-agents/taskmarket",
3
- "version": "1.43.0",
3
+ "version": "1.44.0",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "taskmarket": "./dist/index.js"