Skip to content

Feat: Add JS Timestamp Extension Sample - #656

Merged
Iwaniukooo11 merged 5 commits into
mainfrom
mateusziwaniuk/timestamp-js-sample-update-clean
Jul 27, 2026
Merged

Feat: Add JS Timestamp Extension Sample#656
Iwaniukooo11 merged 5 commits into
mainfrom
mateusziwaniuk/timestamp-js-sample-update-clean

Conversation

@Iwaniukooo11

Copy link
Copy Markdown
Member

PR Description: Feat: Add JS/TS Timestamp Extension Sample

Overview

This PR introduces a brand-new JavaScript/TypeScript implementation of the Timestamp Extension sample using @a2a-js/sdk v1.0.

The sample demonstrates how to enrich outgoing A2A messages and artifacts with compliance timestamps in a modular, decoupled, and automated manner.

Key Features

  1. Modular Architecture & Package Structure

    • timestamp_ext/: The core library package.
      • core.ts: Houses the main TimestampExtension helper class and metadata settings.
      • server.ts: Houses the wrapExecutor function to automatically timestamp outgoing events.
      • client.ts: Houses client-side interceptors (wrapClientFactory and clientInterceptor) to inject headers and stamp outgoing client messages.
    • Showcase Server (index.ts & agent_executor.ts): Launches an Express JSON-RPC agent server running an EchoExecutor that delegates response text generation to an EchoAgent class.
    • Integration Client Tests (test_client.ts): Validates the end-to-end client-server round trip, verifying that both message and artifact metadata timestamps are correctly generated and verified.
  2. Compliance & Testing Support

    • Supports fixed clock generation (via a custom clock callback) for deterministic end-to-end testing verification.
  3. Complete Showcase Documentation

    • Includes a fully detailed README.md containing architectural walkthroughs, usage guides for both server-side and client-side setup, and instructions on running the standalone server and tests.

@Iwaniukooo11 Iwaniukooo11 changed the title Mateusziwaniuk/timestamp js sample update clean Feat: Add JS Timestamp Extension Sample Jul 24, 2026
@Iwaniukooo11
Iwaniukooo11 force-pushed the mateusziwaniuk/timestamp-js-sample-update-clean branch from 2455820 to c1bfb58 Compare July 24, 2026 11:25
@Iwaniukooo11
Iwaniukooo11 force-pushed the mateusziwaniuk/timestamp-js-sample-update-clean branch from c1bfb58 to b4277e7 Compare July 24, 2026 11:31
@Iwaniukooo11
Iwaniukooo11 requested a review from JakubWorek July 24, 2026 11:53
@Iwaniukooo11
Iwaniukooo11 merged commit 8cb2002 into main Jul 27, 2026
11 checks passed
@Iwaniukooo11
Iwaniukooo11 deleted the mateusziwaniuk/timestamp-js-sample-update-clean branch July 27, 2026 09:00
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