Skip to content

docs: align api.md and bring test client up to current feature set#6

Merged
nedpals merged 2 commits into
masterfrom
claude/api-docs-and-test-client
Jun 29, 2026
Merged

docs: align api.md and bring test client up to current feature set#6
nedpals merged 2 commits into
masterfrom
claude/api-docs-and-test-client

Conversation

@nedpals

@nedpals nedpals commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to the README refresh (already merged). This PR brings the API reference and the browser test client in line with the agent's current feature set. No protocol or server code changes — documentation and the demo client only.

docs/api.md

  • Fix the intro wording: the agent runs a multi-server architecture (Device / Client / CA Bootstrap), not "two-server" as the text said while the table listed three.

client/test-client.html

Previously the demo only knew about basic text/uri reads and writes. It now exercises the shipped capabilities:

  • Tag capabilities displayed per scan (family, memory size, max NDEF size, writable/lockable, read-only state, password support) — read from the capabilities object already present on every tagData broadcast.
  • Write verification results surfaced (tag type/UID, bytes written, verified, attempts, locked) — the writeResponse payload was previously discarded.
  • Expanded write record types: mailto, tel, sms, geo, smartposter, mime, vcard, aar — with type-specific Title and MIME-type inputs.
  • Lock after write option (sends lock: true) and an Erase Tag action (writes an empty record).

Backwards compatibility

All changes are backwards compatible:

  • The documented protocol features were introduced additively (new optional fields on existing messages, new opt-in message types) — older clients keep working.
  • The test client degrades gracefully against an older agent: the capabilities and verification panels are guarded with v-if and hide themselves when the data is absent; unsupported record types / lock / erase surface as a normal caught error rather than breaking the UI.

Testing

  • Verified the documented message types and record types against server/constants.go and server/handlers.go.
  • Confirmed the capability field names match nfc/capabilities.go and that NFCClient.write() resolves with the response payload (top-level uid/tagType/verified/etc.).

🤖 Generated with Claude Code


Generated by Claude Code

claude added 2 commits June 29, 2026 12:34
- api.md: fix "two-server" wording (the agent runs three servers)
- test-client: display per-scan tag capabilities (family, memory, max NDEF,
  writable/lockable, read-only, password support)
- test-client: surface write verification results (tag, bytes written,
  verified, attempts, locked)
- test-client: expand write record types (mailto/tel/sms/geo/smartposter/
  mime/vcard/aar) with type-specific title and MIME fields
- test-client: add "lock after write" option and an Erase Tag action

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KoUv6XnHGJoEhE3fLEWMQz
Only render the verification panel when the server returns structured
fields (uid/verified), and guard each line individually, so an agent
that returns a minimal writeResponse payload doesn't show "Tag: ()".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KoUv6XnHGJoEhE3fLEWMQz
@nedpals
nedpals merged commit 507c112 into master Jun 29, 2026
2 of 3 checks passed
@nedpals
nedpals deleted the claude/api-docs-and-test-client branch July 5, 2026 04:43
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.

2 participants