Reference
Company agent door
Lanyard serves one shared /mcp door using Base's agent-door runtime at e881e6f66ce7cd737d17dbeb945995aab83c30d8 and the checkout's pinned rer CLI. The catalogue below derives advertised protocol versions from that runtime. Discovery and canonical OAuth resource metadata describe the same registry. Company policy, Pause, named approvals, reviews and audit are at /agents; an agent credential cannot decide for a person.
A paired installation accepts owner-bound Business tokens with explicit consent. The signed settings roster binds Business subjects to native operator ids. A matching email never selects an account. Workforce admission and native roles are re-read; an inactive or unlinked person cannot sponsor. A token whose email differs from that native person is refused without moving the subject binding. Business team admin means Business policy editor only through the signed mapping; it does not create a workforce owner or manager. Current workforce preparation authority belongs to the native owner. Local preparation keys keep their original reduced authority.
The declared adoption is CORE plus the preparation prompt: tools, policy, Pause, audit and idempotency, with principal authorization always enforced. Events/subscriptions, multiple sponsors, outside mail and resource refresh are not claimed as adopted families. The runtime and manifest declare the same capabilities. Optional events, resources and subscriptions are omitted and typed-refused. Existing native mail, devices, imports, connectors and installation commands keep their own purposes.
Policy starts unset and refuses effects. Paired policy arrives as signed JWS at POST /api/rer/agent-policy; a standalone owner configures policy through the person JSON door. There is no policy bypass for legacy keys. An autonomous company rule permits preparation; Lanyard's native human-only publication, time approval, payroll export and learning decisions remain separate.
The public agent guide includes the catalogue generated from shared action-registry metadata. Authenticated discovery and initialization append the same registry-derived job guidance to Base instructions, including real tools, scopes, classes and the separate native human steps. The former /docs/agents-api address remains a compatible guide address. Each job below names its real tool, scope, classes, classifier facts and conformance evidence, followed by the declared templates, prompt, capacity limits and error recovery.
The specialist prompt derives its preparation jobs, descriptions, scopes and classes from that registry too. It requires current schemas and source revisions, stable write identities and fresh review after a conflict. Supplying prompt arguments cannot replace those instructions or complete a native human step.
Public MCP catalogue
Specialist: workforce coordinator. This catalogue is generated from the same action metadata as the native door. It contains no installation records or credentials.
Protocol negotiation
Read the canonical resource and required scopes from GET /.well-known/oauth-protected-resource. A request without a current bearer credential receives HTTP 401 and the resource-metadata challenge before negotiation. Use owner-authorized Business consent or a separately issued native preparation key; discovery cannot grant either.
Advertised protocol versions:
2026-07-282025-11-252025-06-18
Initialize with a supported protocolVersion and use that version on subsequent requests. Modern requests carry matching MCP-Protocol-Version, Mcp-Method and named-operation Mcp-Name headers, plus protocol metadata. A mismatch is refused before a native action. The server is stateless; initialization creates no session authority.
Tools by job
Read reduced preparation context
lanyard.context.read
Inspect native staffing and draft facts without contact, payroll identifiers or wage rates.
Scope: workforce:read. Classes: standard. Reduced read.
Classifier: standard; measure is one reduced read after current owner checks.
Classifier evidence: agent-surface.json: journey context expect; src/modules/agent-door/conformance/journey.mjs: BASE-AGENT-006.2.autonomous.context and BASE-AGENT-006.2.held.context compare computed classes and facts during normal rer verify.
Native clauses: AGENT-001.
Read a consented forecast
lanyard.demand.read
Read a consented forecast. Requires a current native comparison.read grant for this cafe.
Scope: comparison.read. Classes: standard. Reduced read.
Classifier: standard; measure is one reduced read after current owner and explicit cafe comparison-consent checks.
Classifier evidence: agent-surface.json: journey forecast expect; src/modules/agent-door/conformance/journey.mjs: BASE-AGENT-006.2.autonomous.forecast and BASE-AGENT-006.2.held.forecast compare computed classes and facts during normal rer verify.
Native clauses: DEMAND-001, LEARN-001.
Record an evidence-bound growth proposal
lanyard.learn.propose
Record an evidence-bound growth proposal. Preparation only; native human decisions remain separate.
Scope: comparison.read. Classes: standard. Preparation only; a native person decides subsequent approval, publication or export.
Classifier: standard; measure is one proposal after current owner and explicit cafe comparison-consent checks.
Classifier evidence: agent-surface.json: journey proposal expect; src/modules/agent-door/conformance/journey.mjs: BASE-AGENT-006.2.autonomous.proposal and BASE-AGENT-006.2.held.proposal compare computed classes and facts during normal rer verify; tests/agent-native.mjs: identityProof retains native approval, replay and refusal.
Native clauses: AGENT-001, LEARN-001, TRADEOFF-001.
Input capacity for weeks: minimum 1, maximum 26.
Input capacity for idempotency_key: minLength 1, maxLength 200.
Read consented learning evidence
lanyard.learn.read
Read consented learning evidence. Requires a current native comparison.read grant for this cafe.
Scope: comparison.read. Classes: standard. Reduced read.
Classifier: standard; measure is one reduced read after current owner and explicit cafe comparison-consent checks.
Classifier evidence: agent-surface.json: journey learning expect; src/modules/agent-door/conformance/journey.mjs: BASE-AGENT-006.2.autonomous.learning and BASE-AGENT-006.2.held.learning compare computed classes and facts during normal rer verify.
Native clauses: LEARN-001, TRADEOFF-001.
Input capacity for weeks: minimum 1, maximum 26.
Prepare an hours batch
lanyard.payroll.prepare
Prepare an hours batch. Preparation only; native human decisions remain separate.
Scope: workforce:prepare. Classes: standard. Preparation only; a native person decides subsequent approval, publication or export.
Classifier: standard; measure is the supplied source count, or currently approved unclaimed sources after current owner checks.
Classifier evidence: agent-surface.json: journey payroll expect; src/modules/agent-door/conformance/journey.mjs: BASE-AGENT-006.2.autonomous.payroll and BASE-AGENT-006.2.held.payroll compare computed classes and facts during normal rer verify; tests/agent-native.mjs: identityProof retains native approval, replay and refusal.
Native clauses: AGENT-001, PAYROLL-001.
Input capacity for ids: minItems 1, maxItems 500.
Input capacity for idempotency_key: minLength 1, maxLength 200.
Prepare a schedule draft
lanyard.roster.prepare
Prepare a schedule draft. Preparation only; native human decisions remain separate.
Scope: workforce:prepare. Classes: standard. Preparation only; a native person decides subsequent approval, publication or export.
Classifier: standard; measure is the number of proposed shifts after current owner and active-person checks.
Classifier evidence: agent-surface.json: journey roster expect; src/modules/agent-door/conformance/journey.mjs: BASE-AGENT-006.2.autonomous.roster and BASE-AGENT-006.2.held.roster compare computed classes and facts during normal rer verify; tests/agent-native.mjs: identityProof retains native approval, replay and refusal.
Native clauses: AGENT-001, ROSTER-002, SCHEDULE-001.
Input capacity for shifts: minItems 1, maxItems 250.
Input capacity for shifts[].breakMinutes: minimum 0, maximum 1440.
Input capacity for idempotency_key: minLength 1, maxLength 200.
Prepare time for human review
lanyard.time.prepare
Prepare time for human review. Preparation only; native human decisions remain separate.
Scope: workforce:prepare. Classes: standard. Preparation only; a native person decides subsequent approval, publication or export.
Classifier: standard; measure is one proposed time record after current owner and active-person checks.
Classifier evidence: agent-surface.json: journey time expect; src/modules/agent-door/conformance/journey.mjs: BASE-AGENT-006.2.autonomous.time and BASE-AGENT-006.2.held.time compare computed classes and facts during normal rer verify; tests/agent-native.mjs: identityProof retains native approval, replay and refusal.
Native clauses: AGENT-001, TIME-002.
Input capacity for breakMinutes: minimum 0, maximum 1440.
Input capacity for idempotency_key: minLength 1, maxLength 200.
Read a consented comparison
lanyard.tradeoff.compare
Read a consented comparison. Requires a current native comparison.read grant for this cafe.
Scope: comparison.read. Classes: standard. Reduced read.
Classifier: standard; measure is one reduced read after current owner and explicit cafe comparison-consent checks.
Classifier evidence: agent-surface.json: journey compare expect; src/modules/agent-door/conformance/journey.mjs: BASE-AGENT-006.2.autonomous.compare and BASE-AGENT-006.2.held.compare compare computed classes and facts during normal rer verify.
Native clauses: TRADEOFF-001.
Input capacity for weeks: minimum 1, maximum 26.
Specialist prompt
prepare_service_week: Read reduced context, prepare schedule, time and payroll drafts, and hand exact revisions to native human reviewers.
Retrieve with prompts / get and its name. No prompt arguments are required. Retrieval is authenticated and refuses unset policy, blocked or approval-required reads, and Pause; it executes no tool or native decision.
Resource templates and events
No public resource templates are declared. The authenticated resource template listing is empty; internal readers are not a public resource door.
No public event types or subscriptions are declared. Native activity and audit remain separate.
Capacity limits
Installation protection: 600 requests per minute per principal; 1048576 request-body bytes. Capacity overrun returns HTTP 429 with Retry-After; oversized bodies return HTTP 413. These are not daily business-volume limits.
Write identities contain 1 to 200 characters. Writes accept an optional integer expected_revision and require idempotency_key. No provider spend is registered; no enforceable spend cap or resource byte budget is claimed.
Errors and recovery
rate_limited: Capacity protection refused the request; retry only after Retry-After.unauthenticated: HTTP 401 challenges with protected-resource metadata; re-establish current consent and native admission.insufficient_scope: HTTP 403 names required scopes; an existing grant never silently widens.policy_unset: A person must finish policy setup at the returned URL before reads or effects.policy_blocked: The current company policy refuses the operation.approval_required: A named person must decide the exact server summary; prompt retrieval cannot decide it.agents_paused: A native person must resume access.policy_unavailable: Refresh an expired signed policy through the trusted Business.native_authority_required: Native owner or human-decision authority is required.resource_unavailable: Missing or inaccessible native input; refresh the permitted context.native_conflict: Current native facts refuse the preparation; review the source and retry with a new identity.invalid_arguments: Correct input against the listed tool schema.idempotency_conflict: The same write identity has different arguments; never retry it as the same operation.revision_conflict: Re-read the current revision and prepare again.capability_not_declared: The optional public family is unsupported; do not infer it from internal adapters.
Transport also refuses UnsupportedProtocolVersion, HeaderMismatch, unknown tools or prompts and malformed JSON. Source text is untrusted. Neither discovery nor a prompt grants workforce administration, staff contact, authoritative approval, publication, erasure or payroll transfer.
These tools call the existing native services. Standard reflects their actual internal preparation or reduced read, with no wage movement, external recipient, access grant or production publication. Classification uses current native records and proposed items; caller flags cannot lower it. Writes carry a server-generated summary and the native aggregate revision. Supply idempotency_key on writes and expected_revision when pinning the source. A changed key body conflicts; a stale source refuses. Native commands also retain the original operation identity, so door recovery cannot duplicate a draft. No provider cost or spend reservation is registered: spend is explicitly none. No Undo is offered where the native service has no reversal.
For ordinary worked-time payroll preparation, the standard measure counts the approved, unclaimed timesheet revisions eligible under the native period rules. The saved review or approval summary lists those same sources in draft order. Time held by an open pay period is excluded until that period is locked; an explicit selection containing held or unavailable time refuses. Locking or reopening a period changes the current measure and requires fresh source review. An explicit selection mixing eligible and held time refuses the whole call; it never silently prepares a subset. Reopening also invalidates a pending approval that reviewed the source while it was eligible. The measure counts source timesheets, not generated premium or segmented lines; non-work and premium-only measurement variants remain unproved. Policy approval permits preparation only; a native person still exports the exact draft.
The declared capabilities include prompts alongside tools, policy, pause, audit and idempotency. Events, resources and subscriptions are undeclared: discovery omits them and their public calls return typed capability_not_declared refusals. The eight native resource readers remain internal visibility adapters; the public resource catalogue and returned resource links are empty. Record access for this adoption uses the reduced context and consented comparison tools. Source text is untrusted. Keys, bearer credentials, payroll identifiers, rates, private contacts and download bytes are not returned.
To let company agents use comparison reads, the owner must separately grant comparison.read, name cafes, consent to aggregate cost disclosure and check Also allow signed company agents in Agent access. Existing grants do not acquire this permission. Revocation, expiry and owner-version changes remove it. A Business token cannot borrow a local key's grant, even by naming that key.
Native drafts and activity retain the agent, native sponsor, operation and named policy approvers; the draft says <agent> for <person>. A later native approval has its human actor. Shared-door records are retained; identities disclosed into retained door content cannot use unused-person erasure until coordinated redaction exists. Archives retain custody fences, audit, events and cached outcomes, while excluding active policy, Business binding, agent registration, pending approval/review authority and usage. Restore requires fresh pairing and policy. This is a custody limit, not completed employee-rights fulfillment.
The workforce coordinator reads current source facts, prepares supported drafts and hands exact revisions to native people. It refuses to invent worked time or treat a payroll file as proof of wages paid. Learning proposals require real pre-service forecast history, observed sales and an improved holdout result; a fresh installation cannot manufacture that history. The authenticated prepare_service_week prompt gives preparation instructions without reading installation records or executing any action. Policy and Pause apply to retrieval; all subsequent tools recheck native authority and grants.
The proposed broader contract surface is not a grant. Workforce administration, publication, authoritative approval, payroll transfer, staff contact and erasure are not agent tools under the currently judged AGENT-001. The conformance manifest declares only real native preparation and consented reads.
Compatibility preparation API
The existing endpoints below translate into the same shared door. They require an adopted policy and respect Pause, current authority, approval and audit. An Idempotency-Key header pins a compatibility mutation. Refusals include a machine code; MCP uses _meta["com.runeditrun/error"].
The owner creates a key in Agent access (in the account menu, top right). It expires after 30 days and can be revoked immediately. Keep it in a private LANYARD_AGENT_TOKEN environment variable; never log it. LANYARD_ORIGIN is the exact app origin.
curl -H "Authorization: Bearer $LANYARD_AGENT_TOKEN" "$LANYARD_ORIGIN/api/lanyard/agent/context"
curl -H "Authorization: Bearer $LANYARD_AGENT_TOKEN" -H 'Content-Type: application/json' \
--data-binary @private-command.json "$LANYARD_ORIGIN/api/lanyard/agent/command"Envelope: {"name":"COMMAND","input":{...}}.
| Command | Input | Human decision |
|---|---|---|
roster.prepare (a week's schedule) | week, the Monday that starts it as YYYY-MM-DD (2026-10-19 for the week of Oct 19, 2026); shifts array of staffId,start,end,breakMinutes,label | roster.publish with exact id,revision |
time.prepare | staffId,start,end,breakMinutes,reason; optional corrects ID | time.approve with exact id,revision |
payroll.prepare | optional ids array of approved timesheet IDs; omit for all eligible | payroll.export with exact id,revision |
Timestamps use ISO UTC. Get IDs from context. Responses identify saved drafts and required approvals. Conflicts return 409: refresh context and let a person resolve them. Agents cannot publish, approve, acknowledge, clock, import, grant access, download payroll or erase. Bearer keys do not authenticate human endpoints.
Human screens use /api/lanyard/state and POST /api/lanyard/command with the same envelope, native cookie and exact Origin. Decisions record actor, revision and time. /api/lanyard/batches/ID.csv downloads exported bytes after their SHA-256 integrity check.
Optional comparison reads
Only the owner can grant comparison.read while creating a key, with explicit consent to the warning that repeated aggregate costs can narrow down individual pay. Select named cafes; there is no all-cafes grant. Existing keys and new preparation-only keys gain no comparison access. The existing agent.create command accepts scopes: ["comparison.read"], cafes: ["Ocean Beach"], and comparisonConsent: true in addition to label.
Use GET /api/lanyard/agent/fairness/compare?week=YYYY-MM-DD&site=CAFE&weeks=8 with the bearer header. This read returns assignments, cohort fairness totals and permitted per-person fairness counts, scheduled and workweek overtime minutes, and alternative-level USD totals. It returns no rates, rate profiles, individual cents, payroll IDs, contact details, qualification evidence, feedback or download files. Extra-hour requests and offers appear only as cohort totals. Erased identities are labelled Former employee.
Each USD value is {status, cents, reasons}. known is an aggregate total, small-cell with null cents withholds a total with fewer than three nonzero employee contributors or a difference with fewer than three changed employees, and unknown with null cents retains missing input reasons. No withheld or unknown value is zero. Missing fairness inputs return an explicit unknown comparison rather than inventing alternatives. Scheduled weekly overtime remains an estimate, not payable or statutory overtime.
Each scoped read is recorded in owner activity with key, cafe and week. Revocation, expiry and owner-version changes refuse subsequent reads. Archives and Staff CSV imports never grant scopes. Fairness draft preparation and publication still require a native owner or home-cafe manager session.
Forecasts and measured learning proposals
Under the same comparison.read grant and named cafe limit, use GET /api/lanyard/agent/demand?site=CAFE&date=YYYY-MM-DD for forecast versions, hourly role demand and observed demand delta. Missing or incomplete inputs remain explicit. This projection omits raw sales rows, source identifiers, human free-text override reasons, personal attendance and labor cost fields.
Use GET /api/lanyard/agent/learning/proposals?site=CAFE&weeks=8 to inspect comparable days, excluded/unknown outcomes, the holdout comparison and the evidence digest. Then send learn.propose with site, weeks and that exact digest to the agent command endpoint. Changed evidence or assumptions require a fresh read. Recording a proposal never changes an assumption. Its audit identifies the key and role, with the measured reason retained on the proposal. Only a native owner or that cafe's manager approves, declines or reverts; even a scoped key cannot save or override a forecast or decide a proposal. Every scoped read is audited and the live grant is rechecked when recording a proposal.
Single-cafe partner roster API v1
In Settings, the owner creates a Partner roster API credential for one named cafe. Its fixed scope is roster.prepare and its version is v1; it has no comparison, time or payroll scope. It expires after 30 days. Copy the token once into private storage. Rotate credential atomically revokes the previous key and shows a new token once; Revoke credential takes effect immediately. Reloading a creation or rotation response cannot recover the clear token. Existing agent keys do not authenticate this API, and partner keys cannot enter legacy agent routes or native human routes.
- Read
GET /api/lanyard/partner/v1/contextwith the partner bearer token.
The response supplies contextVersion, installation timezone, the named site, active cafe staff identifiers and names, availability windows and job identifiers. It excludes contact details, rates and payroll identifiers.
- Send
POST /api/lanyard/partner/v1/roster-draftswith JSON and an
Idempotency-Key header containing 8 to 100 letters, digits or hyphens. The JSON object contains contextVersion from that read, a Monday week, and shifts using the existing roster preparation fields documented above. Each shift must belong to an active employee whose home cafe is the key's cafe; an explicit site must match it. This intentionally narrow slice grants no shared-staff or delegated multi-site authority.
- Inspect the returned draft identifier, revision, assigned shifts and
conflicts. Preparation does not publish. A native human uses the existing schedule review and exact-revision roster.publish decision separately; current qualification, availability, policy and period fences still apply.
A new request requires the current contextVersion; changed context returns 409 without writes. A week containing foreign-cafe draft, published or open rows is refused, even when the request would omit those rows. The partner may neither replace nor implicitly remove another cafe's assignments.
Replay identities are durably namespaced by credential and API version, with a SHA-256 digest of the exact request bytes. Identical retries, including concurrent requests and retries after restart, return the same saved draft response without another write. Changed bytes, including JSON whitespace, return 409 for the same identity. A saved response is a receipt for the original preparation, not a fresh publication or current draft review. Credential scope, version, named cafe, expiry, owner status and owner version are checked before returning it; staff who have been deactivated, erased or moved out of scope cannot be disclosed from an old response. Refresh context and use a new identity for changed work. Credentials never travel in installation archives; restoring draft data and replay receipts cannot restore their authority.
This native API establishes no external workflow connection or delivery. Signed event webhooks, observable provider delivery and reconciliation, authorized Zapier and Make event-to-draft workflows, and broader versioned time, coverage and report APIs remain open under LINK-001.
Recorded CORE verification
Normal rer verify runs the production build and declared CORE journey. The historical measured result on released rer 0.2.94 was 724/724 points, with CI=true SEED_VERIFY_SHARD=app pnpm exec rer verify --no-queue. Both BASE-AGENT-013.4.autonomous.proposal and BASE-AGENT-013.4.held.proposal pass, as does the specialist native journey. The successful proposal paths add output and audit checks, so this is the measured dynamic count rather than the earlier 643/645 result.
verification.history declares a contained, isolated test Worker and two narrow INSERT statements for native sales and forecast records. It creates 35 dated sales observations and seven pre-service forecasts, calculated and digested by Lanyard's native code. It never writes accounts, policy, approval, audit or protocol receipts and never advances the runtime clock. The autonomous and held rounds use the same retained history. Between them, the native owner declines the preceding open proposal through the production person command; the next proposal still follows the real learning, authority, policy and audit paths. Regenerate the Worker after changing native calculations with node scripts/build-agent-history.mjs.
The separate native journey uses its own real installation with an explicit UTC venue timezone. tests/agent-history.mjs previews/imports observed sales, saves a current forecast and proves that saving a completed-day forecast returns HTTP 400 without changing the native revision. Entered sales alone still yield zero comparable days and no proposal. Distinct time intervals succeed under both policies; overlaps remain refused. Identity, named exact-summary approval, attribution, one-effect replay, argument and revision conflicts, Pause and zero differs_from_policy all pass. Production backdating is unchanged.
Events, resources and subscriptions remain undeclared and typed-refused. The preparation prompt is declared and proved by the native journey under both supported protocol revisions; it grants no additional native authority. Multi-sponsor, mail edges, resource refresh, timed/queued lifecycles, dual host and owner-native administration remain unproved; shared clauses stay PARTIAL. No provider cost, enforceable spend cap or broader AGENT-001 authority is claimed.
The specialist native journey starts from the seed origin and its public resource metadata, follows the authentication challenge, initializes every advertised protocol version and discovers the preparation prompt and tool schemas. Each version completes the native preparation and separate person review under both autonomous and review policy. Its final schedule, time and payroll pages are checked at desktop and phone widths during normal verification. Screenshots can be saved separately.