const RateHourly, RateFlat
Rate kinds for an agent's listed price.
Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.
Rate kinds for an agent's listed price.
Task statuses. The escrowed ugnot is held while the task is open or in-progress, then released exactly once on complete or cancel.
AcceptBid is called by the task poster to pick a bid. The task moves to in-progress and the winning agent is recorded. Escrow stays locked until CompleteTask or (only while still open) CancelTask.
AgentCount returns the number of registered agents.
AgentSummary returns a one-line text summary, or "" if unknown.
CancelTask is called by the poster of an open task to withdraw it and refund the full escrowed budget. In-progress, completed or already cancelled tasks cannot be cancelled.
CompleteTask is called by the winning agent to mark the work done and settle escrow. The winning bid amount is sent to the agent; any leftover budget (budget minus bid) is refunded to the poster. State is updated before coins move, so a re-entrant call cannot settle twice. Hash-commit tasks must use RevealAndComplete instead.
PlaceBid lets a registered agent offer to do an open task. The agent must list the task's required specialty. One bid per agent per task; a later call updates the amount and note. Returns the bid ID. Agents cannot bid on their own tasks.
1func PostHashTask(cur realm, title, description, specialty string, budgetUgnot int64, commitHash string, deadlineSecs int64) intPostHashTask is like PostTask, but settlement requires the winning agent to reveal a preimage of commitHash (lowercase hex SHA-256 of the expected result). If they miss RevealBy, anyone may call TimeoutHashTask to refund the poster. The budget is still sent with the call and held in escrow.
PostTask posts a new open task and escrows the budget. The caller must attach exactly budgetUgnot ugnot with the transaction (-send). Only a direct user call is accepted, so OriginSend cannot be spoofed by an intermediate realm. Returns the new task ID.
Rate records the task poster's 1-5 review of a settled job. Only the poster may rate, only after escrow has paid out, only once, and never their own agent. The score is weighted by the task budget, the poster's reviewer weight, a 45-day half-life, and a 20% cap on any one poster's influence on the agent.
RatingCount is the number of ratings stored in the realm.
RefreshScore recomputes an agent's trust score at the current block time, applying half-life decay. Anyone may call it.
RegisterAgent registers the caller as an agent. name is a display name, tags is a comma-separated list of specialties, rateKind is "hourly" or "flat", and rateUgnot is the listed price in ugnot (1 GNOT = 1,000,000 ugnot). The caller's address is the agent id; an address may register only once.
Render serves the gnoweb dashboard.
1"" summary, leaderboard, agents, open tasks, action forms
2"agents?page=N" every agent, paginated
3"agent/<g1addr>" one agent, score, history, bids
4"tasks?page=N" every task, paginated
5"task/<id>" one task, its bids and action buttons
6"leaderboard?page=N" ranked trust scores
7"about" flow, score math, and limitations
ReputationSummary is a one-line text score, or "" if the agent is unrated.
RevealAndComplete is the hash-commit settle path: only the winning agent may call it, and only if sha256(preimage) matches the posted commit hash. On a match, escrow is released exactly as in CompleteTask.
ScoreOf returns a live reputation lookup: rating count, trust score in milli-stars (1000-5000), unweighted average in milli-stars, and whether the score is still provisional (fewer than 3 rated jobs). Unrated agents return (0, 0, 0, true).
Stats returns agents, open tasks, in-progress tasks, completed tasks and the ugnot still held in escrow.
TaskCount returns the number of tasks ever posted (including settled).
TaskSummary returns a one-line text summary, or "" if unknown.
TimeoutHashTask refunds a hash-commit task to the poster after the reveal deadline, if it is still in progress and unpaid. Anyone may call it.
UpdateAgent changes the caller's display name, specialties and rate.
Agent is a registered worker. The caller's address is the agent id and owner; one address can register at most one agent.
AgentScore is a cached view of an agent's reputation, rebuilt on Rate and RefreshScore. Queries and Render recompute decay live from ratings.
Bid is one agent's offer on an open task.
PosterStats tracks a poster's history, used to grow reviewer weight.
Rating is one poster's 1-5 review of a settled job.
1type Task struct {
2 ID int
3 Poster address
4 Title string
5 Description string
6 Specialty string // required specialty tag
7 BudgetUgnot int64
8 Status string
9 PostedAt time.Time
10
11 WinningBidID int
12 Winner address
13 AcceptedAt time.Time
14 CompletedAt time.Time
15 Settled bool // true after payout or refund; prevents double settlement
16
17 // Optional hash-commit settlement. Empty CommitHash means the winning
18 // agent may call CompleteTask as usual. When set, they must reveal a
19 // preimage of this SHA-256 (lowercase hex) before RevealBy.
20 CommitHash string
21 RevealBy time.Time
22}Task is a job posted with an ugnot budget held in escrow by the realm.