Skip to content

Releases: techdivision/appsheet

v2.1.0: Per-Request User Context Support

24 Nov 18:28

Choose a tag to compare

Release v2.1.0: Per-Request User Context Support

πŸŽ‰ What's New

This release adds per-request user context support for multi-tenant MCP servers, enabling each request to execute with a specific user's permissions and context.

✨ Features

Per-Request User Context (#3)

  • ConnectionManager.get(name, runAsUserEmail?)

    • Creates user-specific AppSheetClient instances on-the-fly
    • Overrides global runAsUserEmail from schema when provided
    • No caching - lightweight operation
  • SchemaManager.table(conn, table, runAsUserEmail?)

    • Creates user-specific DynamicTable instances on-the-fly
    • Enables true multi-tenant MCP servers with per-request user context
    • Perfect for authenticated MCP tool handlers

Enhanced Schema Configuration

  • Added optional runAsUserEmail field to ConnectionDefinition
  • Allows setting global default user at connection level in schema

Architecture Improvements

  • Removed table client caching in SchemaManager
  • On-the-fly DynamicTable creation for better per-request handling
  • Simplified initialize() method - only registers connections

πŸ› Bug Fixes

  • Fixed package.json version from 0.2.0 to 2.1.0 (#4)

πŸ“š Usage Example

```typescript
// MCP Server with per-request user context
const db = new SchemaManager(SchemaLoader.fromYaml('./schema.yaml'));

server.tool('list_worklogs', async (params, context) => {
// Extract authenticated user from MCP context
const userEmail = context.user?.email;

// Create user-specific table client on-the-fly
const table = db.table('worklog', 'worklogs', userEmail);

// All operations execute with user's AppSheet permissions
return await table.findAll();
});
```

πŸ§ͺ Testing

  • βœ… 31 new tests (13 ConnectionManager + 18 SchemaManager)
  • βœ… Total test suite: 157 tests, all passing
  • βœ… Build successful
  • βœ… SemVer validated: MINOR (backward compatible)

πŸ“– Documentation

  • Updated CLAUDE.md with new features and usage patterns
  • Added comprehensive CHANGELOG.md
  • Added "Per-Request User Context" section with examples

πŸ”„ Migration

No migration required! This is a fully backward compatible MINOR release.

Existing code continues to work without changes:
```typescript
// Old code (still works)
const table = db.table('worklog', 'worklogs');

// New feature (optional)
const userTable = db.table('worklog', 'worklogs', '[email protected]');
```

πŸ“ Commits in this Release

  • feat(SOSO-248): add per-request user context support for multi-tenant MCP servers (e1af98d)
  • chore: release v2.1.0 with per-request user context support (c5e3097)
  • docs(SOSO-248): add integration concept for per-request user context support (a333bce)

πŸ”— Links

πŸ“¦ Installation

```bash
npm install @techdivision/[email protected]
```

πŸ™ Credits

This release was developed with assistance from Claude Code.


Breaking Changes: None
SemVer Level: MINOR
Backward Compatible: Yes βœ…

v2.0.0 - AppSheet Field Type Support & Validation

21 Nov 12:25

Choose a tag to compare

Release v2.0.0

Major breaking release with AppSheet field type support and comprehensive validation.

Breaking Changes ⚠️

  • Generic types replaced: string, number, boolean β†’ 27 AppSheet-specific types (Text, Email, Number, Price, etc.)
  • Shorthand field format removed: Must use full FieldDefinition object format
  • Property renamed: enum β†’ allowedValues

Features ✨

  • 27 AppSheet field types (SOSO-247)
    • Core: Text, Number, Date, DateTime, Time, Duration, YesNo
    • Specialized text: Name, Email, URL, Phone, Address
    • Specialized numbers: Decimal, Percent, Price
    • Selection: Enum, EnumList
    • Media: Image, File, Drawing, Signature
    • Tracking: ChangeCounter, ChangeTimestamp, ChangeLocation
    • Reference: Ref, RefList
    • Special: Color, Show
  • Comprehensive validation system
    • AppSheetTypeValidator: Type checking and enum validation
    • FormatValidator: Email, URL, phone number format validation
    • BaseTypeValidator: JavaScript type checking
  • Smart SchemaInspector
    • Automatic enum detection from actual data
    • Infers specialized types (Email, URL, Phone, etc.)
    • Configurable enum threshold (default: 3 unique values)

Documentation πŸ“š

  • MIGRATION.md - Complete migration guide from v1.x to v2.0.0
  • SOSO-246 Updated - DI integration documentation updated for v2.0.0
    • All examples use AppSheet field types
    • Validators documented as stateless (no DI required)
  • CLAUDE.md - Updated with v2.0.0 patterns

Tests πŸ§ͺ

  • 126 tests (all passing βœ…)
  • 81.88% overall coverage
  • 100% DynamicTable coverage
  • Comprehensive validation test suite

Migration

See MIGRATION.md for detailed upgrade instructions.

Quick Example

Before (v1.x):

fields:
  email: string
  age: number
  status:
    type: string
    enum: ["Active", "Inactive"]

After (v2.0.0):

fields:
  email:
    type: Email
    required: true
  age:
    type: Number
    required: false
  status:
    type: Enum
    required: true
    allowedValues: ["Active", "Inactive"]

Installation

npm install git+ssh://[email protected]:techdivision/appsheet.git#v2.0.0

Commits in this Release

  • docs(SOSO-246): update DI integration docs for v2.0.0 field types (8244be6)
  • docs: rename REQUIREMENTS.md to INTEGRATION_CONCEPT.md (SOSO-247) (09c300e)
  • test: add comprehensive tests for Phase 5 (SOSO-247) (c020941)
  • docs(SOSO-247): add comprehensive documentation for v2.0.0 (Phase 4) (91e16d5)
  • feat(SOSO-247): enhance SchemaInspector with smart type detection (Phase 3) (2a152f3)
  • feat(SOSO-247): extract validation logic to separate validator classes (Phase 2) (7465021)
  • feat(SOSO-247): implement AppSheet field types and validation (Phase 1) (4702551)
  • feat: add SOSO-247 requirements document (6f1dc6d)
  • docs: add TSyringe DI integration concept for SOSO-246 (322e051)

Links

Release 0.2.0

14 Nov 16:25

Choose a tag to compare

Changes in this Release

  • chore: bump version to 0.2.0 (fddf7d9)

Installation

npm install git+ssh://[email protected]:techdivision/appsheet.git#v0.2.0