Skip to content

feat: add name.com API tool with username/token auth - #854

Merged
avoidwork merged 3 commits into
mainfrom
feat/add-namecom-api-tool
Aug 23, 2026
Merged

feat: add name.com API tool with username/token auth#854
avoidwork merged 3 commits into
mainfrom
feat/add-namecom-api-tool

Conversation

@avoidwork

@avoidwork avoidwork commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Description

Add a name.com API tool wrapping 72 operations across 17 tag groups as a single unified tool with an action parameter. Authentication uses NAMECOM_USERNAME and NAMECOM_TOKEN environment variables (Basic Auth). Covers domain management, DNS records, transfers, email/URL forwarding, vanity nameservers, DNSSEC, webhook notifications, orders, refunds, TLD pricing, premium domains, and contact verification.

Type of Change

  • New feature (non-breaking change which adds functionality)

Testing

  • 107 unit tests in tests/unit/tools/namecom.test.js covering:
    • Schema validation for all 40+ action names
    • Credential validation (missing username/token)
    • URL allowlist validation (api.name.com, api.dev.name.com)
    • Action routing and parameter passing
    • Error handling for credential errors
  • Full test suite: 1192 tests passing
  • Lint: passes (oxlint + oxfmt)

Coverage

  • Line coverage maintained

Checklist

  • npm run lint passes
  • Tests pass with maintained line coverage
  • No forbidden patterns used
  • Conventional Commit style applied

Changed Files

  • src/tools/namecom/index.js — name.com API tool (535 lines, 40+ actions)
  • src/tools/index.js — tool registration (import, permissions, classifications)
  • tests/unit/tools/namecom.test.js — 107 unit tests
  • openspec/specs/namecom-api/spec.md — 25 spec requirements
  • openspec/changes/archive/2026-08-23-add-namecom-api-tool/ — archived OpenSpec change

Closes #853

@avoidwork avoidwork self-assigned this Aug 23, 2026
Implement namecom tool wrapping 72 API operations across 17 tag groups:
- Domain management (list, create, update, lock, unlock, renew, contacts, nameservers)
- DNS records (CRUD operations)
- URL/Email forwarding (CRUD operations)
- Vanity nameservers (CRUD operations)
- DNSSEC management
- Transfers (list, create, cancel, eligibility)
- Webhook notifications
- Domain info, TLD pricing, premium domains
- Contact verification
- Orders and refunds

Authentication via NAMECOM_USERNAME/NAMECOM_TOKEN env vars (Basic Auth).
URL allowlist validation, 30s timeout, rate limit handling.

Register tool in src/tools/index.js with network:outbound permission.
Archived specs to openspec/changes/archive/2026-08-23-add-namecom-api-tool/
Synced spec delta to openspec/specs/namecom-api/spec.md (+25 requirements)
@avoidwork avoidwork changed the title feat: add name.com API tool specs feat: add name.com API tool with username/token auth Aug 23, 2026
@avoidwork

avoidwork commented Aug 23, 2026

Copy link
Copy Markdown
Owner Author

Implementation Audit Results

Goal Fulfillment

  • ✅ All 17 tag groups implemented (Domains, DNS, URL Forwardings, Email Forwardings, Vanity Nameservers, DNSSECs, Transfers, Webhook Notifications, Domain Info, Contact Verification, Orders, Account Info, Accounts, Refunds, TLD Pricing, Premium Domains, Hello)
  • ✅ All 72 API operations mapped to 40+ action handlers
  • ✅ Authentication via NAMECOM_USERNAME/NAMECOM_TOKEN env vars (Basic Auth)
  • ✅ URL allowlist validation (api.name.com, api.dev.name.com)
  • ✅ 30s timeout on all requests
  • ✅ Rate limit handling (429 with x-ratelimit-reset parsing)
  • ✅ Error normalization (HTTP errors, JSON error bodies, 204 No Content)
  • ✅ Zod schema with all 40+ action names as enum
  • ✅ Common optional fields (domainName, perPage, page, type, name, value, ttl, etc.)
  • ✅ params record for action-specific fields not covered by named fields

Spec Compliance

  • ✅ 25 spec requirements in openspec/specs/namecom-api/spec.md
  • ✅ All requirements have at least one scenario
  • ✅ Requirements use SHALL/MUST normative language
  • ✅ Scenarios use WHEN/THEN format with 4 hashtags

Task Completion

  • ✅ All 99 tasks in tasks.md marked [x]
  • ✅ Tasks map to spec requirements

Quality Check

  • ✅ 107 unit tests covering schema validation, credential checks, action routing, error handling
  • ✅ Full test suite: 1192 tests passing, 0 failing
  • ✅ Lint passes (oxlint + oxfmt)
  • ✅ No forbidden patterns (no eval, no hardcoded secrets, no console.log, no empty catch)
  • ✅ JSDoc comments on all public functions with @PARAM and @returns
  • ✅ 2-space indentation, max 100 char line length
  • ✅ camelCase for functions, UPPER_SNAKE_CASE for constants
  • ✅ Tool registered in src/tools/index.js with correct permissions and classifications

Changed Files

  • src/tools/namecom/index.js — 535 lines, 40+ action handlers
  • src/tools/index.js — 4 lines added (import, permissions, classifications, TOOLS entry)
  • tests/unit/tools/namecom.test.js — 367 lines, 107 tests
  • openspec/specs/namecom-api/spec.md — 25 requirements
  • openspec/changes/archive/2026-08-23-add-namecom-api-tool/ — archived OpenSpec change

@avoidwork
avoidwork merged commit 1468150 into main Aug 23, 2026
2 checks passed
@avoidwork
avoidwork deleted the feat/add-namecom-api-tool branch August 23, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add name.com API tool with username/token auth

1 participant