Skip to content

feat: fit the six tracks: haggling, Agent Market, contract check, payments CSV, relayer, swarm auction - #297

Merged
Lexirieru merged 17 commits into
mainfrom
feat/track-fit
Nov 12, 2026
Merged

Lexirieru merged 17 commits into
mainfrom
feat/track-fit

Conversation

@Lexirieru

Copy link
Copy Markdown
Contributor

@AncungAulia please test every prompt below on a local stack and review the UI part of this branch. Axel merges once you approve.

This branch makes HelloNear fit the six tracks better. It is shaped by the track prompts in nearai/near-hackathon-prompt-examples.

What's in it

Track Change Where
agents Haggling. Best price buyer makes one offer within the owner's budget, then buys at the agreed price or walks away. The tool, not the model, compares the answer with the budget. engine/src/tools.ts (make_offer), apps/be/src/shop.ts (?offer=)
agents NEAR AI Agent Market (market.near.ai). Search the real catalog, get an agent's exact price for a task from its x402 answer, and pick the cheapest agent within a budget. Quote only: paying needs USDC on NEAR mainnet. engine/src/market.ts, skill agent-market (in the General Assistant template)
security Recipient guard: contracts. near_view_account returns isContract. Recipient guard and Payments warn before paying a contract, with no card. Each check reads allow, warn or block with a reason. skills recipient-guard, payments
realworld Payments CSV for an accountant. GET /v1/minds/{id}/payments.csv, plus a Download CSV button on the Wallet screen. apps/be/src/payments.ts, WalletScreen.tsx
realworld Meta-transaction relayer (NEP-366). POST /v1/relay, only for owner calls to our registry (unequip_skill, set_wallet), and it never pays a deposit. apps/be/src/relay.ts
swarms Sealed-bid group-buying auction contract. Every agent is its own sub-account. A 20-buyer / 5-seller simulation with scripted strategies runs with no LLM. An independent audit's 9 findings are fixed. sc/swarm (RULES.md, simulation-report.md)
privacy README is honest about what is kept. A new table separates what the TEE protects from what the backend stores and how to delete it. Freeze is now called the kill switch. README.md

Please test: the prompts I ran in Chrome (localhost)

Setup:

  • Run the backend with:
    SHOP_PAY_TO=lin1er.testnet
    SHOP_SELLERS=lin1er.testnet:1,hellonear-registry.testnet:1.5:0.7
    
  • Run the engine with BACKEND_URL=http://127.0.0.1:4000.
  • Use a guest session.
# Mind Prompt Expected
1 Payments Mind Buy the gas price report, but I only want to pay 0.0006 NEAR. Haggle if it costs more. Steps: Compared prices (2 sellers, best 0.001), then Made an offer (Countered at 0.0008 NEAR, over budget). Reply: walked away, no money moved.
2 General Assistant Find me an agent on the NEAR AI Agent Market that can research competitors for a coffee shop in Jakarta. What would it cost? Real agents from market.near.ai, then 1 or 2 "Got an agent's price … USDC, not paid". Reply: nothing paid, hiring needs mainnet USDC.
3 General Assistant I need competitor research for a coffee shop in Jakarta. My budget is 1 USDC. Find the cheapest agent on the NEAR AI Agent Market that fits. Several quotes, each marked within or over budget, with the cheapest within budget recommended.
4 Payments Mind Pay 0.001 NEAR to hellonear-registry.testnet. A warning that it is a smart contract, and a question. No approval card.
5 Payments Mind Pay 0.001 NEAR to lin1er.testnet for the test. → Approve Sent. Then on Wallet: Download CSV appears, and the row reads -0.001 NEAR, not -0.00.
6 Payments Mind Send 10 USDC to 0x8ba1f109551bD432803012645Ac136ddd64DBA72 on Base. Regression: a cross-chain quote, signed by 1Click, preview only.

All six passed for me in Chrome after two fixes found on the way:

  • Prompt 1: the Mind announced the offer and stopped before making it.
  • Prompt 4: Payments went straight to the card.

Both now have live tests.

Please review: UI done on this branch (Axel asked for it here)

  • Wallet → Recent activity: a Download CSV button (lucide FileDownIcon), shown once there are payments.
  • Amounts: formatNearAmount (src/lib/format.ts) shows small payments and Spent today with up to 4 decimals, so -0.001, not -0.00. Balances keep formatNear.
  • Hire on Agent Market skill card:
    • HandshakeIcon, in the Money group;
    • copy says it only quotes during the testnet phase.
  • Best price buyer card: mentions the one-round haggle.
  • Step words:
    • make_offer: "Accepted at …" / "Countered at …, over budget";
    • market_search: "N agents";
    • market_quote: "X USDC, not paid";
    • near_view_account: "…, a contract".
  • Not done: no FE for the relayer, since nothing in the FE calls unequip_skill / set_wallet today. No swarm page either; the simulation report is the swarm's view for now.

Tests

Not done yet / needs Axel

  • Swarm contract on testnet: hellonear-swarm.testnet and auction.hellonear-swarm.testnet exist, but the reproducible deploy stopped on a build-path issue (.cargo/config.toml points the crate at ../target). That fix and the deploy come next, with Axel's approval already given.
  • Relayer env (RELAYER_ACCOUNT_ID, RELAYER_PRIVATE_KEY): not set anywhere yet. Changing be.env needs Axel's approval. The route answers 503 relay_not_configured until then.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Q5ZrzK8une3S2YyhDG746e

Lexirieru and others added 15 commits November 13, 2026 00:05
The privacy track's own example asks to keep nothing server-side; HelloNear
keeps chats and working memory so a Mind can remember its owner. A table now
says what the TEE protects, what the backend stores (not in a TEE), what is
encrypted, what is never stored, and how the owner deletes it. Each claim
points at the file that does it (threads.ts, memory.ts, crypto.ts, secrets).

Docs only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q5ZrzK8une3S2YyhDG746e
Three pieces the track prompts ask for:
- agents: a seller now has a floor (SHOP_SELLERS account:multiplier[:floor],
  default 0.8). `?seller=&offer=` answers accepted (at the offer) or one
  counter halfway to the list price, never under the floor; the paid step
  checks the payment reaches the agreed price.
- realworld: GET /v1/minds/{id}/payments.csv, owner only, columns an
  accountant reads without asking (date UTC, status in words, amount,
  counterparty, purpose, approved by, tx hash, NearBlocks link); RFC 4180
  quoting and formula-injection guard.
- realworld: POST /v1/relay relays a NEP-366 SignedDelegate to the registry
  only, and only unequip_skill / set_wallet with exactly 1 yoctoNEAR: the
  docs say the relayer pays inner deposits, so deposit-taking methods are
  never relayed. Sender = signed-in owner, ed25519 signature checked,
  expiry <= 1000 blocks, full-access key and fresh nonce checked over RPC,
  10 per owner per hour, 503 relay_not_configured without RELAYER_* env.

Tests (local Postgres, fakes): typecheck clean; test:unit 30/30; test 142
pass, 0 fail, 1 skipped. Load: load:shop 10 VUs ~10 s, 0 errors (quotes p95
100 ms, offer p95 91 ms, csv p95 391 ms); existing load 0 errors.
Not proven: a real testnet relay (no relayer account yet), Meteor signing a
delegate action.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q5ZrzK8une3S2YyhDG746e
AI Swarms track: buyer agents pool demand and run a sealed-bid round
against seller agents; it settles on NEAR and every agent is its own
sub-account. Rules first (sc/swarm/RULES.md): commit-reveal asks under a
group ceiling, cheapest revealed asks fill demand, one clearing price,
fill in join order when supply is short, pull-based withdraw (balance
zeroed first, restored by a never-panicking private callback), cancel and
refund after the deadline. Storage charged per write; checked math;
bounded close_round. NEP-297 events `hellonear_swarm`.

The simulation (tests/simulation.rs) runs 20 buyers and 5 sellers with
scripted strategies (cost-plus, a bluffer that never reveals, an adaptive
undercutter), no LLM calls, 3 rounds, fixed seed, and checks money is
conserved each round; sample output in simulation-report.md.

Tests (local sandbox): lib 16 passed; test_round 1 passed (7/7 runs after
waiting for the parent key at Final); simulation 1 passed (~108 s);
clippy 0 warnings; wasm builds (186 KB). CI now runs them.
Not done: nothing on testnet (accounts and deploy need Axel); the audit
skill was applied by hand, not run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q5ZrzK8une3S2YyhDG746e
… in Recipient guard

Agents and security tracks:
- market_search / market_quote (src/market.ts, skill agent-market, in the
  General Assistant template): search NEAR AI Agent Market's public catalog
  and get a listed agent's real price for the owner's task through A2A
  without a payment header (402, nothing starts, nothing moves). Paying is
  USDC on NEAR mainnet, so every result says this Mind can't pay it here.
  Handle must be one DNS label (no SSRF); a task with {{secrets. is refused.
- make_offer + buy_data offerNear (best-price): one offer within the
  owner's budget; the tool compares the answer with the budget in yocto and
  returns buy_at_price or walk_away, and after a walk-away buy_data refuses
  that item for the request (the first live run bought at the old quote
  after a counter over budget, so the tool decides, not the model).
- near_view_account returns isContract/codeHash; Recipient guard warns and
  asks before paying a contract and states allow / warn / block.

Tests: typecheck clean; test:unit 186/186 (market.test.ts added).
Live (NEAR AI + local Postgres): skills-market-negotiation 5/5 twice;
recipient guard 3/3 twice (contract case on real testnet RPC);
skills-commerce 8/8. Not run here: full `bun run test`, load test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q5ZrzK8une3S2YyhDG746e
… and relayer

Counts (53 tools, 34 skills, 62 API operations), the new tool and skill
rows, and the agents, security and realworld track rows. The agent-market
icon is the plug the web app shows for a skill it has no icon for yet.
The swarm auction and its receipts follow after its testnet deploy.

Docs only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q5ZrzK8une3S2YyhDG746e
…t Market

Axel asked for the UI of this branch to be done here, with Ancung
reviewing it.
- Wallet → Recent activity: a Download CSV button (lucide FileDownIcon)
  that links to GET …/payments.csv.
- Skill Hire on Agent Market: HandshakeIcon, the Money group, and card copy
  that says it only quotes during the testnet phase.
- Best price buyer's card mentions the one-round haggle.
- Step words for make_offer, market_search and market_quote, and a
  near_view_account step that says when the account is a contract.

Tests: typecheck clean; lint clean; vitest 278/278 (new: the step words).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q5ZrzK8une3S2YyhDG746e
…rged

An independent audit (near-contract-audit) found 9 issues; all fixed:
- High: round_closed listed every account and exceeded the 16 KiB log
  limit at 100x50, so a full round could never close. It is now a fixed
  summary; per-account results stay in get_round. Regression tests close
  100x50 rounds (64-char implicit names too) with logs under 2 KiB.
- Fixed timeline at open (commit_end, reveal_end); start_reveal is gone,
  anyone closes after reveal_end (or once all sellers revealed), cancel only
  60 min after reveal_end: no organizer timing power, no close/cancel race.
- Seller bond with commit, returned on reveal, forfeited to the buyers by
  units if not revealed: no free selective reveal or slot squatting.
- Commitment binds round and seller; salt 16-64 chars.
- U64 times in JSON; withdraw needs 1 yoctoNEAR.
Also found while testing: store collections only write at the end of a
call, so charge() measured no growth and storage came out of the
contract's balance (escrow). flush() before every charge; entries reserved
up front; withdraw zeroes instead of deleting.

Tests: lib 28 passed; test_round 1 passed (failed before the flush fix
with free balance below what it holds); simulation 1 passed (240 s,
prices 0.040/0.039/0.033, a bond forfeited each round, free balance
8.074 -> 8.082 NEAR); clippy 0 warnings; wasm 192,241 bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q5ZrzK8une3S2YyhDG746e
… contracts

Found in the Chrome e2e on a local stack (13 Nov):
- "Buy the gas price report, but I only want to pay 0.0006 NEAR. Haggle
  if it costs more." -> the Mind wrote "I'll make s1 one offer at your
  limit" and ended the run without calling make_offer. The playbook said
  to tell the owner first, then call it. Now: write nothing until the tool
  calls are done, then one reply.
- "Pay 0.001 NEAR to hellonear-registry.testnet." -> Payments looked the
  contract up and went straight to the approval card; only Recipient guard
  had the contract rule. Payments now refuses to call send_payment in that
  turn for isContract: true and asks first.

After the fixes, in Chrome: the offer is made (countered at 0.0008, over
budget, walked away, nothing paid) and the contract gets a warning with no
card. Live tests added for both; with NEAR AI's embedder down they were
run with semantic recall off (what the probe does): 6/6 haggle and
contract tests pass. engine test:unit 187/187.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q5ZrzK8une3S2YyhDG746e
formatNear shows balances with two decimals, rounded down, so a 0.001 NEAR
payment and Spent today read "0.00" on the Wallet screen (Axel, 13 Nov).
formatNearAmount keeps two decimals but shows up to four when the cents
would hide the amount, still rounded down; balances keep formatNear.

Checked in Chrome (local): "-0.001 NEAR" and "Spent today: 0.001 NEAR".
Tests: vitest 279/279 (new formatNearAmount cases); typecheck and lint clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q5ZrzK8une3S2YyhDG746e
…s budget

market_quote takes an optional maxUsdc and returns withinBudget, compared
in USDC's smallest unit by the tool, not the model. With a budget, the
agent-market playbook quotes up to four agents that take work now, lists
each with its verdict and recommends the cheapest within the budget. The
market's direct calls have a fixed price per agent, so this is choosing
between agents, not haggling with one (that needs the job board, an
account and mainnet funds: roadmap).

Chrome (local, live market.near.ai): "My budget is 1 USDC. Find the
cheapest agent…" -> two quotes (Kaminari, Sasmex, 0.25 USDC, within
budget), Kaminari recommended, nothing sent or paid.
Tests: typecheck clean; test:unit 188/188 (new withinBudget case).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q5ZrzK8une3S2YyhDG746e
Swarms track: the sealed-bid group-buying contract, its 20-buyer simulation
and how to run it. Agents track and tool/skill rows: the cheapest agent
within a budget. Roadmap: paying Agent Market agents on mainnet, haggling
through the job board, and Minds joining swarm rounds on chain.

Docs only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q5ZrzK8une3S2YyhDG746e
…deploy finds its WASM

With target-dir = ../target the reproducible build succeeded in Docker,
then cargo near deploy stopped with "No such file or directory": it looks
for the WASM inside the crate's own target. Locally, CARGO_TARGET_DIR=../target
still shares the registry's cache. CI caches both targets.

Tests (CARGO_TARGET_DIR=../target): lib 28 passed; test_round 1 passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q5ZrzK8une3S2YyhDG746e
@AncungAulia

Copy link
Copy Markdown
Contributor

@Lexirieru UI review done (the apps/fe part). The six prompts I couldn't run: this machine has no apps/be/.env or engine/.env and no Docker, so there's no local stack here with this branch. Since you ran all six in Chrome and they passed, the prompt test is on your side, or James's if he can.

UI, read in the diff: looks good.

  • formatNearAmount: 0.001 reads "0.001", rounded down, never up. An amount under 0.0001 would still read "0.00", but that's rare.
  • Step words are clear:
    • "Countered at 0.0008 NEAR, over budget"
    • "3 agents"
    • "0.5 USDC, not paid"
    • "lin1er.testnet, a contract"
  • The Agent Market card: Money group, handshake icon, and copy that says it only quotes for now.

One note, not blocking: Download CSV.

  • It's a plain <a href={apiUrl(…)} download>. On the hosted site the API is another origin (api.hellonear.xyz), so browsers ignore download there.
  • It still downloads as long as the backend sends Content-Disposition: attachment, which your PR says it does.
  • If the session has expired, though, the tab opens the JSON error instead of downloading.
  • A fetch plus a blob would avoid that. It's fine to leave it for after the freeze.

From my side the UI part is approved.

🤖 Generated with Claude Code

@Lin1er

Lin1er commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Backend review (James, apps/be only; UI and engine left to @AncungAulia). Read the diff of relay.ts, payments.ts (CSV), shop.ts (offers), server.ts and config.ts. CI be passed on 41d5c77; I did not run the tests locally.

No blockers from the backend side:

  • Relay: everything that can be refused is refused before anything is sent (canonical borsh, sender = signed-in owner, receiver = registry, the two methods with exactly 1 yoctoNEAR, gas cap, ed25519 signature over the NEP-461 hash, expiry/TTL, full-access key, nonce). Try-out users get demo_not_allowed.
  • CSV: reached through requireMind(user.id, …), so only the owner's Minds; formula cells are escaped.
  • Offers: the paid step checks the transfer against the agreed price, never under the seller's floor.

Two notes, not blocking:

  1. The relay limit (10 per owner per hour) lives in memory and counts per NEAR account. A backend restart resets it, and anyone can make new testnet accounts, so the relayer's gas is protected only by its balance. Fine for testnet; keep the relayer account's balance small.
  2. Hosted demo: after the merge, POST /v1/relay answers 503 relay_not_configured until a funded relayer account and key are added to the backend's env on the box. That is an env change, so I'll only do it when @Lexirieru asks (and someone has created and funded the account). Everything else needs no env change.

Lexirieru and others added 2 commits November 13, 2026 01:56
… and says when the session ended

Ancung's #297 review: on the hosted site the API is another origin, where
browsers ignore <a download>, and an expired session opened the JSON error
in the tab. The button now fetches with the session cookie, saves a blob
under the backend's filename and shows a toast on 401 or failure. The
backend exposes Content-Disposition to the web app's origin.

Tests: fe typecheck, lint, vitest 279/279; be typecheck, CSV integration
test 1/1 (now checks the exposed header). Clicking it in Chrome would save
a file, so that was not done; the route and headers were checked through
the same fetch earlier.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q5ZrzK8une3S2YyhDG746e
…Market logo

auction.hellonear-swarm.testnet: reproducible deploy from 64c9278 (tx
FkvHpxf9…), code hash 6Wn9K6b3…, source verified (SourceScan get_contract
returns the same hash). Round 0 ran on testnet: 3 buyer and 2 seller
sub-accounts, commit, reveal, close by a buyer, withdraw; 6 units filled at
one clearing price of 0.008 NEAR; buyers paid 0.048 and sellers earned
0.048 NEAR. README lists every tx, the Live now table and the deployed
table (root CLAUDE.md) include the contract, and the tech stack names the
NEAR AI Agent Market with its logo (market.near.ai's own favicon.svg).

Docs only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q5ZrzK8une3S2YyhDG746e
@Lexirieru

Copy link
Copy Markdown
Contributor Author

@AncungAulia @Nabil-Aufa an update on this PR, plus one ask for the landing page.

Ask: the NEAR AI Agent Market logo on the landing page

HelloNear now uses the NEAR AI Agent Market (market.near.ai): Minds search its agents and get real prices.

  • Please add its logo to the landing, next to the other "Built with" / "Works with" logos.
  • The file is design/brands/agent-market.svg. It is market.near.ai's own favicon.svg: an "a—m" mark in a circle that switches colours in dark mode.
  • The README already shows it in the tech stack.

What this branch adds for the six tracks

Track New Proof
agents Haggling: one offer within the owner's budget, then buy or walk away Chrome prompt 1
agents NEAR AI Agent Market: real agents and real x402 prices; quote only, since paying is mainnet USDC Chrome prompt 2
agents The cheapest agent within a budget Chrome prompt 3
security Contract check: Recipient guard and Payments warn before paying a smart contract (allow / warn / block) Chrome prompt 4
realworld Download CSV for an accountant, on the Wallet screen Chrome prompt 5
realworld Meta-transaction relayer (NEP-366), only for our registry, never pays a deposit backend tests
swarms Swarm auction contract, live and verified: auction.hellonear-swarm.testnet, with a real round on testnet (3 buyers, 2 sellers, 6 units at one clearing price of 0.008 NEAR; every tx in the README) README "The swarm auction: one real round on testnet"
privacy README states plainly what is kept and what isn't README
business Freeze is named the kill switch README

Also on this branch:

  • the "-0.00 NEAR" amount bug is fixed: it now reads -0.001;
  • the README roadmap adds hiring on the Agent Market on mainnet and haggling through its job board.

Replies to the reviews

  • Ancung, Download CSV across origins: fixed in 1f940cd.
    • The button now fetches the file with the session cookie and saves it under the backend's filename.
    • A toast shows when the session has ended.
    • The backend exposes Content-Disposition.
    • Tests: FE vitest 279/279; BE CSV test 1/1, which now checks the header.
  • Ancung, the six prompts: all passed in my Chrome run on a local stack (screens in the PR description). The new budget prompt (3) passed too.
  • James, the relay limit and the relayer env: agreed, nothing to change for testnet. The relayer stays off on the hosted demo until Axel asks.

Axel merges once you approve.

@Lexirieru
Lexirieru merged commit c2ce74f into main Nov 12, 2026
4 checks passed
@Lexirieru

Copy link
Copy Markdown
Contributor Author

Merged (c2ce74f), after all four CI workflows passed, sc included. Axel approved. @AncungAulia @Nabil-Aufa @Lin1er it deploys to the hosted demo automatically.

Next steps are in #298: the Agent Market logo on the landing page, and trying the six prompts plus Download CSV on the hosted demo with a new Mind from each template.

Two things on the box need Axel's approval:

  • SHOP_SELLERS, if the hosted shop has only one seller; haggling needs more than one to compare;
  • the relayer env. POST /v1/relay answers 503 relay_not_configured until it is set.

@Lexirieru

Copy link
Copy Markdown
Contributor Author

@Lin1er two env changes on the hosted box. Axel approved both (13 Nov). Please do them once c2ce74f is deployed.

1. A second shop seller, so haggling has prices to compare

  • Set: SHOP_SELLERS=lin1er.testnet:1.0,testing7.testnet:0.8 in be.env. This is the value apps/be/CLAUDE.md already names as intended. Each seller's floor is 0.8 by default. testing7.testnet is a plain account (no code).
  • Also needed: testing7.testnet must be on the shared demo wallet's address list, or get_quotes marks it onYourList: false and try-outs can't buy from it. That is a policy change the demo wallet's owner signs in Meteor. If you'd rather not touch the policy, use only sellers already on that list and tell me which ones.

2. The relayer (POST /v1/relay)

Done this way so the private key never leaves the box:

  1. On the box, generate an ed25519 keypair, for example with near-cli-rs near account create-account fund-later use-auto-generation … or any ed25519 tool. Post only the public key (ed25519:…) here.
  2. I create relayer.hellonear-swarm.testnet with that public key as its full-access key, funded with 1 NEAR from Axel's keychain. You noted the balance should stay small: the per-owner limit is in memory and resets on restart.
  3. You set RELAYER_ACCOUNT_ID=relayer.hellonear-swarm.testnet and RELAYER_PRIVATE_KEY=<the private key>, check that REGISTRY_CONTRACT_ID=hellonear-registry.testnet is set, and restart the backend.
  4. Check: a signed-in (non-guest) POST /v1/relay with an empty body answers 400, not 503 relay_not_configured. Without a session it is 401 either way.

Nothing else in this PR needs an env change.

@Lexirieru

Copy link
Copy Markdown
Contributor Author

@Lin1er the relayer account exists and is funded (replying here; this PR is where the env work lives):

  • Account: relayer.hellonear-swarm.testnet, created in tx 5W7A2nHs….
  • Balance: 1.0 NEAR.
  • Keys: the only access key is yours, ed25519:25gtyFjV3FjBfm2a5inHLDXU35oYkZwnjLWm4ntSHdZx, FullAccess (checked with view_access_key_list). No other key exists, so only the box can sign for it.

Go ahead with RELAYER_ACCOUNT_ID / RELAYER_PRIVATE_KEY and the restart once c2ce74f is live.

Thanks for checking SHOP_SELLERS. Whether testing7.testnet is on the demo wallet's list is the one thing left there.

@Lin1er

Lin1er commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Live on the hosted demo: main c2ce74f (automatic deploy after the merge).

  • Before: 799eb6b, and the box matched git at that revision. CI: passed: test,test,test,build.
  • GET /v1/health → {"ok":true,"engine":true,"revision":"c2ce74f"}. No rollback.
  • Rollback target: 799eb6b (/opt/hellonear/release-old).

Lexirieru added a commit that referenced this pull request Nov 12, 2026
docs: README after #297: Try it, API rows, NEAR usage, Hackathon phase, counts
@Lin1er

Lin1er commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

@Lexirieru env work on the hosted box, done after c2ce74f went live (19:33 UTC):

  • Relayer: RELAYER_ACCOUNT_ID=relayer.hellonear-swarm.testnet and RELAYER_PRIVATE_KEY are set in be.env (backed up first; the key in the file matches the box's key by hash and was never printed). REGISTRY_CONTRACT_ID=hellonear-registry.testnet was already there. Backend restarted at 19:41 UTC, and both relayer variables are in the running process.
    • Checked: POST /v1/relay without a session → 401. Not checked: the signed-in empty-body 400, because I have no non-guest session here (guests get 403 demo_not_allowed before the relay runs). One signed-in try from your side would confirm it.
  • SHOP_SELLERS: unchanged; it already was lin1er.testnet:1.0,testing7.testnet:0.8. Whether testing7.testnet is on the demo wallet's list is still open (James, in Meteor).
  • After the restart: all four services active, no backend http error since, app / api / landing answer 200, health c2ce74f, try-out e2e 22/22.
  • NEAR AI's embeddings endpoint still gives no answer in 30 s (19:45 UTC), so chats still run without semantic recall (Hosted chat down: NEAR AI embeddings endpoint times out, engine fails every run in prepare-memory-step #294).

@Lexirieru

Copy link
Copy Markdown
Contributor Author

@Lin1er thanks. On your open points:

  • testing7.testnet is already on the demo wallet's list. I ran the haggle prompt on the hosted demo as a guest (c2ce74f): get_quotes listed both sellers as "your wallet can pay" (s2 0.0008, s1 0.001), and it countered and walked away as expected. Nothing to do in Meteor.
  • The relay's signed-in 400: I can't sign in with a wallet from here either. @AncungAulia or Axel can confirm it with one signed-in request while testing After #297: Agent Market logo on the landing, and try the six-track prompts and Download CSV on the hosted demo #298; it isn't blocking.
  • The README 'Hackathon phase' row: right, it's out of date since 19:41. I'll fix it in a small docs PR.

Also from the hosted run:

  • Download CSV works across origins: the filename header is readable from app.hellonear.xyz.
  • NEAR Intents quotes are timing out on 1Click's side right now. /v0/quote answers 500 after 25 s ("Failed to receive response within timeout of 25000ms … routing key quote"), while /v0/tokens is fine. The Mind says so plainly and sends nothing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants