Skip to content

Update to vcon-core-01 compliance#4

Closed
howethomas wants to merge 3 commits into
mainfrom
clever-kepler
Closed

Update to vcon-core-01 compliance#4
howethomas wants to merge 3 commits into
mainfrom
clever-kepler

Conversation

@howethomas
Copy link
Copy Markdown
Contributor

@howethomas howethomas commented Dec 12, 2025

Summary

  • Updated library to be fully compliant with IETF draft-ietf-vcon-vcon-core-01
  • Added comprehensive type definitions and validation
  • Added 3 tutorial examples demonstrating real-world usage
  • Expanded test coverage to 61 tests

Changes

Core Library

  • types.ts: Full vcon-core-01 interfaces (DialogType, DialogDisposition, Encoding, SessionId, etc.)
  • Dialog: New constants (DIALOG_TYPES, DISPOSITIONS, VALID_ENCODINGS), validation method
  • Attachment: Params-based constructor, external/inline data methods, validation
  • Party: Added sip, did, timezone fields; hasIdentifier(), getPrimaryIdentifier(), validate()
  • Vcon: Extension support (addExtension, addCriticalExtension), groups, enhanced API

Documentation

  • Complete API reference in README.md
  • CLAUDE.md for AI assistant instructions
  • 3 tutorial examples: text-chat, call-recording, video-conference

Breaking Changes

  • Encoding type: only 'base64url', 'json', 'none' (removed 'base64')
  • Attachment constructor: now takes params object
  • Dialog types: 'recording', 'text', 'transfer', 'incomplete'

Test plan

  • All 61 tests passing (npm test)
  • Build succeeds (npm run build)
  • All 3 examples run successfully (npm run examples)

🤖 Generated with Claude Code


Note

Implements full vcon-core-01 compliance across types and classes (new encodings, fields, validation, and APIs), adds examples and docs, and expands tests and scripts.

  • Core API (vcon-core-01)
    • src/types.ts: Add comprehensive spec-aligned types (DialogType, DialogDisposition, Encoding, SessionId, Group, Redacted/Amended), VCON_VERSION, and richer Party/CivicAddress.
    • src/dialog.ts: New constants (DIALOG_TYPES, DISPOSITIONS, VALID_ENCODINGS), switch to mediatype, allow parties int or array, add addExternalData/addInlineData, helpers (isRecording/isText/...), and validate().
    • src/attachment.ts: Params-based constructor, support inline/external data with helpers, VALID_ENCODINGS, toDict() date ISO, and validate().
    • src/party.ts: Add sip, did, timezone, helpers (hasIdentifier, getPrimaryIdentifier), validate(), and PartyHistory improvements.
    • src/vcon.ts: RFC3339 timestamps as strings, extension framework (addExtension, addCriticalExtension, hasExtension), addGroup, updated addAttachment/addAnalysis, getters/setters for subject/meta/redacted/amended, export vcon default to VCON_VERSION.
    • src/index.ts: Export new types/constants.
  • Breaking changes
    • Encodings restricted to base64url, json, none (remove base64).
    • Attachment now takes a params object.
    • Dialog types constrained to recording, text, transfer, incomplete; prefer mediatype over mimetype.
  • Docs & Examples
    • README.md: Overhauled with API reference, compliance notes, and usage.
    • examples/01-text-chat.ts, 02-call-recording.ts, 03-video-conference.ts with new npm scripts in package.json.
    • CLAUDE.md: Project overview and guidance.
  • Tests
    • Update/add tests for dialogs, attachments, parties, vcon (validation, constants, new APIs); broaden synthetic vCon coverage.

Written by Cursor Bugbot for commit df27da7. Configure here.

howethomas and others added 3 commits December 12, 2025 18:49
- Update types.ts with full vcon-core-01 interfaces (DialogType, DialogDisposition, Encoding, etc.)
- Update Dialog class with DIALOG_TYPES, DISPOSITIONS, VALID_ENCODINGS constants
- Update Attachment class with new params-based constructor and validation
- Update Party class with sip, did, timezone fields and validation methods
- Update Vcon class with extension support, groups, and enhanced API
- Add comprehensive tests for all new features (61 tests passing)
- Add 3 tutorial examples: text-chat, call-recording, video-conference
- Update README.md with complete API reference and tutorials
- Add CLAUDE.md for AI assistant instructions

Breaking changes:
- Encoding type now only allows 'base64url', 'json', 'none' (not 'base64')
- Attachment constructor now takes params object instead of positional args
- Dialog type values are now 'recording', 'text', 'transfer', 'incomplete'

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@howethomas howethomas closed this Dec 12, 2025
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.

1 participant