@ixo/asks-mcp 1.12.0-dev.1 → 1.12.0-dev.3

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.
Files changed (2) hide show
  1. package/dist/asks-mcp.mjs +29 -62
  2. package/package.json +1 -1
package/dist/asks-mcp.mjs CHANGED
@@ -7499,43 +7499,6 @@ var init_callTag = __esm({
7499
7499
  }
7500
7500
  });
7501
7501
 
7502
- // ../../app/lib/networkName.ts
7503
- var NETWORK;
7504
- var init_networkName = __esm({
7505
- "../../app/lib/networkName.ts"() {
7506
- "use strict";
7507
- NETWORK = process.env.NEXT_PUBLIC_CHAIN_NETWORK || "testnet";
7508
- }
7509
- });
7510
-
7511
- // ../../app/lib/sandbox.ts
7512
- var init_sandbox = __esm({
7513
- "../../app/lib/sandbox.ts"() {
7514
- "use strict";
7515
- init_networkName();
7516
- }
7517
- });
7518
-
7519
- // ../../app/lib/networks.ts
7520
- var ORIGIN, originOf, PRO, proOrigin;
7521
- var init_networks = __esm({
7522
- "../../app/lib/networks.ts"() {
7523
- "use strict";
7524
- init_networkName();
7525
- init_sandbox();
7526
- ORIGIN = {
7527
- mainnet: (process.env.NEXT_PUBLIC_MAINNET_APP_URL || "https://asks.world").replace(/\/+$/, ""),
7528
- testnet: (process.env.NEXT_PUBLIC_TESTNET_APP_URL || "https://test.asks.world").replace(/\/+$/, "")
7529
- };
7530
- originOf = (network2) => ORIGIN[network2 === "mainnet" ? "mainnet" : "testnet"];
7531
- PRO = { [ORIGIN.mainnet]: "https://pro.asks.world", [ORIGIN.testnet]: "https://pro.test.asks.world" };
7532
- proOrigin = (origin2) => {
7533
- const bare = origin2.replace(/\/+$/, "");
7534
- return PRO[bare] ?? bare;
7535
- };
7536
- }
7537
- });
7538
-
7539
7502
  // src/world.ts
7540
7503
  function reviewSlugOf(facts) {
7541
7504
  const slug = facts.slug ?? (facts.campaign ? slugOfTag(facts.campaign) : null);
@@ -7545,28 +7508,27 @@ function reviewSlugOf(facts) {
7545
7508
  function askPage(site, collectionId, facts) {
7546
7509
  const base6 = site.replace(/\/+$/, "");
7547
7510
  const review = reviewSlugOf(facts);
7548
- if (review) return `${proOrigin(base6)}/pro/reviews/${collectionId}`;
7511
+ if (review) return `${base6}/pro/reviews/${collectionId}`;
7549
7512
  const slug = facts.slug ?? (facts.campaign ? slugOfTag(facts.campaign) : null);
7550
7513
  return slug ? `${base6}/opencall/${slug}` : `${base6}/t/${collectionId}`;
7551
7514
  }
7552
7515
  function answerPage(site, collectionId, claimId, facts) {
7553
7516
  const base6 = site.replace(/\/+$/, "");
7554
7517
  const review = reviewSlugOf(facts);
7555
- return review ? `${proOrigin(base6)}/pro/reviews/${collectionId}/report/${encodeURIComponent(claimId)}` : `${base6}/r/${collectionId}/trace/${encodeURIComponent(claimId)}`;
7518
+ return review ? `${base6}/pro/reviews/${collectionId}/report/${encodeURIComponent(claimId)}` : `${base6}/r/${collectionId}/trace/${encodeURIComponent(claimId)}`;
7556
7519
  }
7557
7520
  function inviteLink(site, token, review) {
7558
- return review ? `${proOrigin(site)}/pro/i/${token}` : `${site.replace(/\/+$/, "")}/opencall/i/${token}`;
7521
+ return review ? `${site.replace(/\/+$/, "")}/pro/i/${token}` : `${site.replace(/\/+$/, "")}/opencall/i/${token}`;
7559
7522
  }
7560
7523
  var isReviewTitle, proPage, marketplacePage, roomPage;
7561
7524
  var init_world = __esm({
7562
7525
  "src/world.ts"() {
7563
7526
  "use strict";
7564
7527
  init_callTag();
7565
- init_networks();
7566
7528
  isReviewTitle = (title) => /^Expert review:/.test(title ?? "");
7567
- proPage = (site, handle2) => `${proOrigin(site)}/pro/pros/${handle2}`;
7568
- marketplacePage = (site, slug) => `${proOrigin(site)}/pro/marketplaces/${slug}`;
7569
- roomPage = (site, collectionId, pro) => `${proOrigin(site)}/pro/reviews/${collectionId}/with/${encodeURIComponent(pro.replace(/^@/, ""))}`;
7529
+ proPage = (site, handle2) => `${site.replace(/\/+$/, "")}/pro/pros/${handle2}`;
7530
+ marketplacePage = (site, slug) => `${site.replace(/\/+$/, "")}/pro/marketplaces/${slug}`;
7531
+ roomPage = (site, collectionId, pro) => `${site.replace(/\/+$/, "")}/pro/reviews/${collectionId}/with/${encodeURIComponent(pro.replace(/^@/, ""))}`;
7570
7532
  }
7571
7533
  });
7572
7534
 
@@ -263806,7 +263768,7 @@ function callReadout(terms, ctx) {
263806
263768
  const proMoney = call2.sponsor && call2.share && hire ? `Money: ${feeLine({ split: call2.share, sponsorName: call2.sponsor.name, net: m.entryEach, symbol: ctx.symbol, network: ctx.network ?? "mainnet" })} Up to ${m.entryUpTo} ${m.entryUpTo === 1 ? "report is" : "reports are"} paid, each one that passes all ${n} lines; there is no pick. Held on the ask's own account before anyone enters.` : null;
263807
263769
  const out = [
263808
263770
  `${review ? "Pro ask" : hire ? "Hiring call" : "Open call"} "${call2.slug}" \xB7 posted by ${call2.poster} \xB7 ${stageWords(call2, ctx.now)}`,
263809
- ...review && ctx.site ? [`Its page: ${proOrigin(ctx.site)}/pro/reviews/${ctx.id}`] : [],
263771
+ ...review && ctx.site ? [`Its page: ${ctx.site.replace(/\/+$/, "")}/pro/reviews/${ctx.id}`] : [],
263810
263772
  ...call2.sponsor ? [`Zone: ${call2.sponsor.name} (sponsor "${call2.sponsor.slug}"), which hosts this pro ask; its pros are LinkedIn verified.`] : [],
263811
263773
  call2.title,
263812
263774
  call2.lede,
@@ -263830,7 +263792,6 @@ var init_callRead = __esm({
263830
263792
  init_dollars();
263831
263793
  init_share();
263832
263794
  init_feeLine();
263833
- init_networks();
263834
263795
  day = (iso) => new Date(iso).toUTCString().replace(/:\d\d GMT$/, " UTC");
263835
263796
  percent = (value) => `${Number(value.toFixed(6))} %`;
263836
263797
  shareWords = (share, when3) => `${percent(share.network + share.node)} ${when3}`;
@@ -264314,7 +264275,7 @@ async function postNextLegNow(slug, ctx) {
264314
264275
  tag: tagOf(draft),
264315
264276
  ...draft.fields.cover?.url ? { cover: draft.fields.cover.url } : {},
264316
264277
  /* A review's page is in its world (world.ts); every other call's on Open Call. */
264317
- url: draft.fields.kind === "review" ? `${proOrigin(ctx.site)}/pro/reviews/${slug}` : `${ctx.site.replace(/\/+$/, "")}/opencall/${slug}`,
264278
+ url: draft.fields.kind === "review" ? `${ctx.site.replace(/\/+$/, "")}/pro/reviews/${slug}` : `${ctx.site.replace(/\/+$/, "")}/opencall/${slug}`,
264318
264279
  ...dates?.closes ? { endsAt: new Date(new Date(dates.pick ?? dates.closes).getTime() + 30 * 24 * 3600 * 1e3) } : {}
264319
264280
  },
264320
264281
  { onMinted: remember2 }
@@ -264428,7 +264389,6 @@ var init_call2 = __esm({
264428
264389
  init_net();
264429
264390
  init_hq();
264430
264391
  init_dollars();
264431
- init_networks();
264432
264392
  init_checkers();
264433
264393
  init_callTerms();
264434
264394
  init_callTerms();
@@ -265429,7 +265389,7 @@ async function sharePage(site, signer2, act, fetchImpl) {
265429
265389
  const prefAt = Date.now();
265430
265390
  const message = handsShareMessage(owner, prefAt, act);
265431
265391
  const answer = await post(site, "/api/hands/share", { address: signer2.address, ...signer2.principal ? { onBehalfOf: signer2.principal } : {}, prefAt, act, proof: { kind: "adr36", message, ...await signWords(signer2.mnemonic, message) } }, fetchImpl);
265432
- if (answer.ok && typeof answer.body.code === "string") return { url: `${proOrigin(site)}/pro/p/${answer.body.code}` };
265392
+ if (answer.ok && typeof answer.body.code === "string") return { url: `${site.replace(/\/+$/, "")}/pro/p/${answer.body.code}` };
265433
265393
  if (answer.status === 404 && !codeOf2(answer)) return { refused: "this site does not make private links yet" };
265434
265394
  return { refused: refusalOf(answer) };
265435
265395
  }
@@ -265440,7 +265400,7 @@ function pageWords(page, site) {
265440
265400
  return [
265441
265401
  `@${p.handle} \xB7 ${p.name}${p.headline ? ` \xB7 ${p.headline}` : ""}`,
265442
265402
  page.linkedin ? `LinkedIn verified since ${page.linkedin.verifiedAt.slice(0, 10)}${page.linkedin.profileUrl ? ` \xB7 ${page.linkedin.profileUrl}` : ""}` : "Not LinkedIn verified yet",
265443
- page.linkedin?.credentialUrl ? `LinkedIn credential (a W3C VC signed by asks.world; it says only that this account logged in to this LinkedIn account): ${page.linkedin.credentialUrl}${page.linkedin.verifyUrl ? ` \xB7 verify: ${page.linkedin.verifyUrl}` : ""}` : page.linkedin?.credential ? "LinkedIn credential: kept private while the page is private (the owner downloads it on their profile page; it is published when the page goes public)." : "",
265403
+ page.linkedin?.credentialUrl ? `LinkedIn credential (it shows this account logged in to this LinkedIn account; any app can check it): ${page.linkedin.credentialUrl}${page.linkedin.verifyUrl ? ` \xB7 check it: ${page.linkedin.verifyUrl}` : ""}` : "",
265444
265404
  `Address: ${page.address}${p.location ? ` \xB7 ${p.location}` : ""}${p.timezone ? ` (${p.timezone})` : ""}`,
265445
265405
  `Does: ${p.does.length ? p.does.join(", ") : "not said"} \xB7 Rate: ${rate} \xB7 Availability: ${p.availability} \xB7 Invitable by handle: ${p.invitable ? "yes" : "no"}`,
265446
265406
  p.listed === false ? "Private: not shown on asks.world or in search; only someone who types the exact handle or address can invite them." : "Public: shown on asks.world, anyone can find it.",
@@ -265484,7 +265444,6 @@ var init_invites = __esm({
265484
265444
  "src/invites.ts"() {
265485
265445
  "use strict";
265486
265446
  init_world();
265487
- init_networks();
265488
265447
  init_dollars();
265489
265448
  init_accountProof();
265490
265449
  init_inviteProof();
@@ -266923,12 +266882,11 @@ var CODE_TTL_MS, CODE, memoFor, connectLinkWithCode, pairingSite;
266923
266882
  var init_pairing = __esm({
266924
266883
  "src/pairing.ts"() {
266925
266884
  "use strict";
266926
- init_networks();
266927
266885
  CODE_TTL_MS = 30 * 6e4;
266928
266886
  CODE = /^[a-f0-9]{16}$/;
266929
266887
  memoFor = (code10) => `openhands-connect:${code10}`;
266930
266888
  connectLinkWithCode = (site, agent, code10) => `${site}/connect?agent=${encodeURIComponent(agent)}&code=${code10}`;
266931
- pairingSite = (site, pairing) => pairing.reviews ? `${proOrigin(site)}/pro` : site;
266889
+ pairingSite = (site, pairing) => pairing.reviews ? `${site.replace(/\/+$/, "")}/pro` : site;
266932
266890
  }
266933
266891
  });
266934
266892
 
@@ -292326,7 +292284,7 @@ import { randomBytes as randomBytes7 } from "node:crypto";
292326
292284
  // package.json
292327
292285
  var package_default = {
292328
292286
  name: "@ixo/asks-mcp",
292329
- version: "1.12.0-dev.1",
292287
+ version: "1.12.0-dev.3",
292330
292288
  description: "The Openhands Network MCP server: read the board, answer asks, post work and get paid on the ixo chain, with a key of its own on your machine.",
292331
292289
  license: "Apache-2.0",
292332
292290
  repository: {
@@ -292809,8 +292767,17 @@ var meta3 = (name8) => {
292809
292767
  // src/server.ts
292810
292768
  init_world();
292811
292769
 
292770
+ // ../../app/lib/networkName.ts
292771
+ var NETWORK = process.env.NEXT_PUBLIC_CHAIN_NETWORK || "testnet";
292772
+
292773
+ // ../../app/lib/networks.ts
292774
+ var ORIGIN = {
292775
+ mainnet: (process.env.NEXT_PUBLIC_MAINNET_APP_URL || "https://asks.world").replace(/\/+$/, ""),
292776
+ testnet: (process.env.NEXT_PUBLIC_TESTNET_APP_URL || "https://test.asks.world").replace(/\/+$/, "")
292777
+ };
292778
+ var originOf = (network2) => ORIGIN[network2 === "mainnet" ? "mainnet" : "testnet"];
292779
+
292812
292780
  // src/config.ts
292813
- init_networks();
292814
292781
  init_env();
292815
292782
  init_net();
292816
292783
  init_given();
@@ -292821,7 +292788,6 @@ var plansEnabled = () => typeof process !== "undefined" && process.env.NEXT_PUBL
292821
292788
 
292822
292789
  // src/config.ts
292823
292790
  var siteOf = () => (ownEnv().OPENHANDS_SITE || originOf(currentNetwork2())).replace(/\/$/, "");
292824
- var expertSiteOf = () => proOrigin(siteOf());
292825
292791
  function adoptAskDenom(facts) {
292826
292792
  adopt({ askDenom: facts.askDenom });
292827
292793
  }
@@ -293007,7 +292973,6 @@ function photoAskRefusal(terms, site, collectionId) {
293007
292973
  }
293008
292974
 
293009
292975
  // src/server.ts
293010
- init_networks();
293011
292976
  init_net();
293012
292977
 
293013
292978
  // ../../packages/openhands-sdk/src/data/install.ts
@@ -293790,7 +293755,6 @@ import { basename, isAbsolute, join as join2 } from "node:path";
293790
293755
  init_cid4();
293791
293756
  init_envelope();
293792
293757
  init_report();
293793
- init_networks();
293794
293758
  var MAX_FILES = 12;
293795
293759
  var MAX_FILE_BYTES = 1e7;
293796
293760
  var reportInput = {
@@ -293863,7 +293827,7 @@ function summaryOf2(report, files, digest2) {
293863
293827
  `Digest: ${digest2}`
293864
293828
  ];
293865
293829
  }
293866
- var receiptLine = (site, collectionId, claimId, reviewSlug) => `Receipt: ${reviewSlug ? `${proOrigin(site)}/pro/reviews/${collectionId}/report/${encodeURIComponent(claimId)}` : `${site}/r/${collectionId}/trace/${encodeURIComponent(claimId)}`}`;
293830
+ var receiptLine = (site, collectionId, claimId, reviewSlug) => `Receipt: ${reviewSlug ? `${site.replace(/\/+$/, "")}/pro/reviews/${collectionId}/report/${encodeURIComponent(claimId)}` : `${site}/r/${collectionId}/trace/${encodeURIComponent(claimId)}`}`;
293867
293831
  async function sendReport(send, world) {
293868
293832
  for (const path of send.paths) {
293869
293833
  if (!isAbsolute(path) || CONTROL.test(path)) return `Refused: give each file as a full path (starting with /), with no line breaks in it. Nothing was sent.`;
@@ -294365,7 +294329,7 @@ async function build2(options, server2, parts) {
294365
294329
  const local = options.mode === "local";
294366
294330
  const NETWORK2 = currentNetwork2();
294367
294331
  const SITE = siteOf();
294368
- const EXPERT_SITE = expertSiteOf();
294332
+ const EXPERT_SITE = siteOf();
294369
294333
  const forward = Object.entries(options.forwardHeaders ?? {});
294370
294334
  const fetch2 = (input, init) => {
294371
294335
  const url4 = typeof input === "string" ? input : input instanceof URL ? input.href : input.url;
@@ -297382,7 +297346,9 @@ No private link was made: ${link5.refused}.`;
297382
297346
  return text4(`${invitesModule.pageWords(page, SITE)}
297383
297347
  ${page.shared ? 'Private link: there is one (it is shown only when made; set_my_page with share_link: "replace" gives a new one and switches the old one off).' : 'Private link: none (set_my_page with share_link: "create" makes one).'}
297384
297348
 
297385
- Edit the profile at ${EXPERT_SITE}/pro/profile.${page.linkedin ? "" : " Next: connect_linkedin verifies it, so you can be invited to pro asks."}`);
297349
+ ${page.linkedin?.credentialUrl || page.linkedin?.credential ? `${credentialWords(page.linkedin, page.profile.listed !== false)}
297350
+
297351
+ ` : ""}Edit the profile at ${EXPERT_SITE}/pro/profile.${page.linkedin ? "" : " Next: connect_linkedin verifies it, so you can be invited to pro asks."}`);
297386
297352
  });
297387
297353
  if (offered("list_marketplaces")) server2.registerTool("list_marketplaces", { ...meta3("list_marketplaces"), inputSchema: {} }, async () => {
297388
297354
  const marketplaces = await Promise.resolve().then(() => (init_marketplaces(), marketplaces_exports));
@@ -297473,6 +297439,7 @@ Show it to the person. Then call again with the same page and confirm: true to s
297473
297439
  return text4(`Published ${mine.name}'s page: ${marketplacePage(SITE, answer.slug)}. Signed ${acting ? `for ${owner} by this agent` : `by ${owner}`}. Pages refresh within five minutes.`);
297474
297440
  }
297475
297441
  );
297442
+ const credentialWords = (linkedin, listed) => linkedin?.credentialUrl && listed ? `You also have a LinkedIn credential: it shows you logged in to this LinkedIn account, and any app can check it. Its public link: ${linkedin.credentialUrl}. Download it at ${EXPERT_SITE}/pro/profile.` : `You also have a LinkedIn credential: it shows you logged in to this LinkedIn account, and any app can check it. ${listed && !linkedin?.credential && !linkedin?.credentialUrl ? "It appears on your page once the page is published." : "Only you can see it while your page is private; it goes public when the page does."} Download it at ${EXPERT_SITE}/pro/profile.`;
297476
297443
  if (offered("connect_linkedin")) server2.registerTool(
297477
297444
  "connect_linkedin",
297478
297445
  {
@@ -297505,7 +297472,7 @@ Show it to the person. Then call again with the same page and confirm: true to s
297505
297472
  ...!page && /^[a-z][a-z0-9-]{2,29}$/.test(vanity) ? { handle: vanity } : {}
297506
297473
  };
297507
297474
  return text4(
297508
- `LinkedIn verified${profile?.name ? ` as ${profile.name}` : ""}. Next: I'll fill your pro page from LinkedIn; you only add the work you take and your rate.
297475
+ `LinkedIn verified${profile?.name ? ` as ${profile.name}` : ""}. ${status.credential ? `${credentialWords(page?.linkedin ?? null, page?.profile.listed !== false)} ` : ""}Next: I'll fill your pro page from LinkedIn; you only add the work you take and your rate.
297509
297476
 
297510
297477
  (Pre-fill set_my_page with this, only where the page does not already say it${page ? "; they have a page, so keep its handle" : ""}. Ask only what LinkedIn lacks: the work they take, rate, availability, a line about them. Then preview.)
297511
297478
  ${asData("linkedin", JSON.stringify(prefill, null, 2))}`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ixo/asks-mcp",
3
- "version": "1.12.0-dev.1",
3
+ "version": "1.12.0-dev.3",
4
4
  "description": "The Openhands Network MCP server: read the board, answer asks, post work and get paid on the ixo chain, with a key of its own on your machine.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {