RunLatch documentation
Authority, explained.
Native NEAR only. Browser previews never replace Rust authority or an external wallet signature.
Understand the operating model
Docs connect the product language to contract rules, evidence boundaries and reproducible commands.
- Start with architecture and integer accounting.
- Check enforcement, callback and privacy boundaries.
- Use the reproduction and execution sections for exact evidence.
You leave withA source-backed map of what RunLatch authorizes, records and deliberately refuses.
Architecture & accounting
One Rust contract, one operator, project-bound Client Work Capsules, authenticated canonical provider quotes, a local scripted runner and fixed off-chain fixture checks. The browser cannot authorize money.
available_now = allocated − spent − reserved
available_to_commit = available_now − committed_futureReserve only the initial canonical transfer. Retain the separately calculated future commitment. Gas, storage funding, purchase spend and owner returns are different quantities. Native amounts use checked integer yoctoNEAR and decimal-string JSON; there is no fiat peg or exchange-rate claim.
Full source specification in this workspace: ARCHITECTURE.md and PRODUCT.md.
Contract API & limits
The implemented contract checks the direct agent account and bound public key, current project revision, immutable policy, provider/service scope, quote hash, exact resource fingerprint, expiry, request uniqueness, available funding and full commitment.
- Owner methods
create_project,create_capsule, exact purchase approval/rejection, project/capsule status, evidence and acceptance records, separate safe unused-fund close.- Provider method
publish_quoteunder the registered publisher account. Changed terms need a new quote ID.- Agent method
submit_purchase; zero attached deposit, one receiver/method key and finite positive gas allowance. Gas allowance is not a business spending limit.- Resolution
- Private callback only. A scheduled transfer or transaction inclusion is not confirmed settlement.
Current bounded storage: 64 capsules, 3 providers, 32 quotes per provider, 32 requests per capsule, up to64 provisioning events per capsule. Capsule history reserve262144 bytes is funded separately. The measured maximum sample is not an exhaustive worst-case guarantee.
API/source authority: contracts/runlatch/README.md, contracts/runlatch/src/.
Enforcement & failure
The AI cannot change authority, bless a hard denial or substitute a recipient. Pending approvals hold no money or quote/resource capacity. Exact owner approval rechecks the current state and atomically reserves before a transfer is scheduled.
Confirmed transfer failure releases its purchase reservation and contingent fixture commitment; it does not become spent. Missing or failed callbacks retain pending reservations. Revocation stops future authorization, not outgoing transfers already scheduled. No timer-based release, blind retry or public settlement setter exists.
Structured business denials can persist bounded records. Panics and invalid ABI/input transactions roll back; they do not leave a surviving denial receipt. Replay rejection does not overwrite the original request.
Tests: ACCEPTANCE_TESTS.md. The 11 November checkpoint re-ran 637 Node tests (115 backend, 216 frontend, 306 NEAR-path) and 112 Chromium browser tests with no failures. The last recorded Linux run passed 147 Rust/SDK tests, and three scripted agency runs passed in the isolated LOCAL Sandbox. SDK mock tests are not Sandbox or public testnet evidence. Counts do not imply a security audit or universal accessibility certification.
Outcome evidence
Authorization, reservation, submission, settlement, provisioning, objective check and human acceptance are independent facts. A payment may settle while provisioning or a task check fails.
website-resource-fixture-v1 checks a controlled manifest and fixture health/route observations. It does not contact a website, provision a real database or prove client satisfaction. Owner-recorded evidence proves who recorded the assertion, not that an independent oracle observed delivery.
Human acceptance is a separate authenticated action. Agents cannot impersonate the reviewer. Public landing examples are seeded illustrations with unavailable transaction/digest references rather than fabricated evidence.
Security & privacy assumptions
Human full-access keys never belong in an agent, browser bundle, source, prompt, screenshot or receipt. The restricted function-call key on the separate agent account permits only the approved contract purchase method, with zero deposit and finite gas allowance; contract argument and business rules still apply.
Provider content, URLs, artifacts and model output are untrusted data, not coding or spending instructions. Full prompts, keys and sensitive artifacts stay off-chain. Hashes provide change detection, not confidentiality or truth.
Project report disclosure defaults to no financials, expenses or operational identities. There is no client-login, public share-token or automatic upload service. The owner-controlled deployment key remains an explicit trust assumption. This local prototype is not audited or production custody.
Reproduce locally
Browser preview
npm.cmd ci
npm.cmd run dev
# Open http://127.0.0.1:3000
npm.cmd run typecheck
npm.cmd run lint
npm.cmd run build
npm.cmd test
npm.cmd run test:frontend
npm.cmd run test:nearTry “Alter recipient” → quote hash mismatch. Try “Hidden term” → full2.40 NEAR commitment is denied against2.30 available. Change the hypothetical allocation to4 NEAR → recurring approval required, with no funds held. These are browser simulations, not chain actions.
Actual isolated LOCAL contract tests
# In your approved Linux/WSL environment, from the checkout root:
sh scripts/setup/test-contract-linux.sh
sh scripts/setup/test-sandbox-linux.sh allFollow README.md and scripts/sandbox/README.md for approved tool/artifact preparation. Sandbox uses ephemeral identities, not real funds. The all-mode workflow covers success, failure, callback quarantine, restricted keys, exact commitments, resource checks and selected reports.
The recorded human testnet setup - four FINAL setup transactions - is not a funded purchase. Its single signed purchase attempt has no on-chain record and stays unresolved. Further account/key/signature/purchase actions need separate exact human approval. The owner workspace keeps the signature in an external wallet; existing demo accounts use human-terminal helpers. No public purchase explorer link exists. Never deploy the LOCAL callback-fault artifact.
Open Gate simulatorUsing a browser wallet
The recorded setup and LOCAL demo need no wallet connection. Optional browser signing requires an installed, unlocked compatible testnet extension and an account it already holds. RunLatch cannot create that connection without the extension.
- Open the owner workspace in the browser where the extension is installed.
- Click “Connect browser wallet”. A single detected wallet opens directly; if several answer, choose one. Missing-extension or connection feedback stays beside the button.
- For a transaction, separately prepare and inspect the exact action. The account and public key must match, and fresh final-block review precedes any wallet signing prompt.
No seed phrase or private key belongs in this app. There is no web-wallet fallback, hidden key installation or saved wallet session. Real-extension approval has not been verified; synthetic connection tests do not prove it. The existing demo setup is consumed and its purchase unresolved—do not repeat or resend it.
Return to the owner workspaceFonts & brand credits
Headings use Space Grotesk and body/UI use Inter, the families observed on Roster Finance. Exact values use IBM Plex Mono. Fontsource files are self-hosted and retain their unmodified SIL Open Font License notices under public/fonts/.
Technology marks identify actual tools used, not partners. React, Next.js, Tailwind CSS and Rust SVG geometry comes from Simple Icons; its CC0 distribution does not override individual brand rights. Rust artwork is attributed to the Rust Foundation under its art and trademark policy, with CC-BY4.0 and the conservatively listed CC-BY-SA4.0 attribution. Artwork is unmodified locally. React artwork source is Create React App, MIT, copyright2013-present Facebook, Inc. Next.js/Tailwind marks follow their published nominative-use guidelines. The dithercn mark is from its MIT-licensed site. NEAR is referenced by name only; its unverified logo is not served. No endorsement or legal-clearance claim is made.
Vercel, the Vercel design, Next.js and related marks, designs and logos are trademarks or registered trademarks of Vercel, Inc. or its affiliates in the US and other countries. No affiliation or endorsement is implied.
Roster is a visual reference only; none of its artwork, brand copy or screenshots is used in this website. Source/license details are recorded in THIRD_PARTY_NOTICES.md.
What an amount cap does not express
This compares mechanisms, not wallet brands. An amount-only limit is useful; it cannot express the whole project mandate by itself.
- Project and capsule allocation
- Parent ceiling and bounded task allocations, not just a per-purchase maximum.
- Canonical commercial terms
- Provider, recipient, asset, service, quantity, price and expiry belong to the authenticated quote.
- Full recurring commitment
- Due-now funds and future authority are checked separately. Unknown exposure is denied.
- Freshness and duplication
- Owner-authenticated revisions, unique requests and project-scoped canonical resource claims.
- Uncertain settlement
- A cap is not reconciliation. Unproven callbacks retain reservations; no timeout release or blind resend.
- Delivery and acceptance
- Payment cannot prove delivery. Provisioning, checks and owner acceptance are separate records.
- Selected report
- A read-only owner-selected projection; no hosted client access-control service is implied.
Execution and provenance
- BROWSER_FIXTURE
- Fixed project examples and exact TypeScript previews; no wallet, contract call or money movement. These remain separate from imported records.
- LOCAL_SDK_TEST
- Rust contract tests with mocked host promise outcomes. They test logic, not an actual transfer.
- LOCAL_SANDBOX
- Isolated Linux Sandbox execution. The demo workspace accepts explicitly selected LOCAL observation files, with internal consistency checks, not independent chain verification.
- NEAR_TESTNET
- Human setup is observed on public testnet: Gate
gate.runlatch-demo-1108.testnet, schema 2, and four FINAL setup transactions recorded on 11 November - work orderproject_demo_1110revision 1 with a 0.30 NEAR ceiling (FMKZhn3JU6k7KxEE9BLezanQoZmHufCHrrqHwSZudBza, block 277134275), capsulecapsule_demo_1110allocated 0.30 NEAR under immutable policyf5e891042ba5cbf5ef0d0ba3b4516d5f28c53eecea7f1b8ecebae1f002934535(AeNBkfXrftqN85JEFgJAwXdnHnbr4Nb8A65ysi4drKKj, block 277134741), one-use quotedb_quote_demo_1110at 0.05 NEAR with hashae846302dbae490ba2352bbce89162821b8882a9c237903f97692ad9007231a3still unconsumed (2TYs5yEFkjFRWiAMTuMqETQ2FosvoaLZnKhjRZEWF1Pn, block 277136000), and a submit-only function-call key onagent.runlatch-demo-1108.testnetwith a 0.05 NEAR gas allowance and the recovery key retained (H4cqJTWvx2GvSAaFMPt4JUjPk2EvrjsbpoYUuLfWufMK, block 277138478). One restricted purchasedb_purchase_demo_1111was signed exactly once (3N98awqyrxUbGqA7zGVsZtpT28pmdJf5j2cdXR8c3GkP, nonce 277138475000001, 100 Tgas, zero deposit) and returned only an asynchronous acknowledgement. FastNEAR, the official NEAR RPC and NEAR Blocks v3 all report no on-chain record, while the contract still shows 0.30 NEAR available with no spend, reservation, request or consumed quote. The attempt is unresolved, not failed and not settled; it is never resent, re-signed, released or replaced by an owner or recovery key. A returned hash or source label is not settlement proof. The owner workspace can prompt the Meteor extension v2 transport or a compatible injected wallet for an exact reviewed action and stores no session or key; browser signing is optional and not required for this demo. Existing demo accounts use separate human-terminal helpers. Seedocs/TESTNET_VERTICAL_SLICE_PLAN.mdfor the exact remaining gates.
Proposal selection is shared between the hero, Gate and commitment explorer. Seeded purchase selection is shared between the lifecycle, board inspector and receipt. An eligible proposal never manufactures a receipt, settlement or delivery evidence. The separate callback walkthrough remains explicitly simulated.
Inspect an actual LOCAL agency run
# In your approved Linux/WSL environment, from the checkout root:
sh scripts/setup/test-sandbox-linux.sh agency
# Then inspect the generated record from the checkout root:
node scripts/web/inspect-local-observation.ts <actual-generated-project-id>After a completed agency run, open the demo workspace and explicitly select .local/projects/<project-id>/observation.json. See canonical provider/quote records, exact integer yoctoNEAR balances and separate payment, provisioning, check and owner-action evidence. Files remain browser-memory-only; no public network, signature, automatic export or storage is enabled. Source details and prerequisites: docs/CONTRACT_OBSERVATION_DEMO.md.