Skip to content

Add reference documentation to public API members#179

Merged
nikhilNava merged 5 commits into
mainfrom
copilot/improve-js-distro-docs
Jun 23, 2026
Merged

Add reference documentation to public API members#179
nikhilNava merged 5 commits into
mainfrom
copilot/improve-js-distro-docs

Conversation

Copilot AI commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

The generated reference docs at learn.microsoft.com have gaps where exported properties, enum members, class methods, and function parameters lack descriptions. This adds JSDoc descriptions across the public API surface so regenerated docs are complete. Documentation-only — no behavior changes.

Changes

  • OpenTelemetryConstants (a365/constants.ts): description on every static attribute-key/metric/env-var property (~120).
  • contracts.ts: per-member docs for enums (InvocationRole, MessageRole, FinishReason, Modality, InferenceOperationType, GuardrailRiskSeverity, GuardrailTargetType) and properties on Request (A365Request), Channel, AgentDetails, UserDetails, ServiceEndpoint, message-part interfaces, *Details/*Response types, ParentSpanRef, and SpanDetails.
  • Agent365Exporter: constructor, export, shutdown, forceFlush.
  • TokenResolver / ContextualTokenResolver: @param descriptions.
  • Remaining exports: GenAI main-agent constants + processor methods, hosting types (ActivityLike, TurnContextLike, AuthorizationLike, MiddlewareLike, HostingAdapterLike, SendActivitiesHandler), ExporterEventNames.

Notes

  • Scoped to descriptions only; did not adopt a lint rule (e.g. completed-docs) to enforce coverage — repo uses ESLint, not TSLint, and that would exceed the issue's scope. Available as a follow-up if enforcement is desired.
  • Used inline code over {@link} for external symbols (ExportResultCode.*) to avoid unresolved-link warnings in typedoc output.

Example — InvocationRole members now render with descriptions:

/** Represents different roles that can invoke an agent. */
export enum InvocationRole {
  /** The agent was invoked by a human user. */
  Human = "Human",
  /** The agent was invoked by another agent. */
  Agent = "Agent",
  /** The agent was invoked by a system event or trigger. */
  Event = "Event",
  /** The invoking role could not be determined. */
  Unknown = "Unknown",
}

Copilot AI changed the title [WIP] Improve JavaScript distro documentation Add reference documentation to public API members Jun 19, 2026
Copilot AI requested a review from nikhilNava June 19, 2026 22:47
@nikhilNava nikhilNava marked this pull request as ready for review June 22, 2026 20:41
Copilot AI review requested due to automatic review settings June 22, 2026 20:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves the generated TypeDoc reference documentation by adding/expanding JSDoc descriptions across the public API surface (A365 + GenAI main-agent), without changing runtime behavior.

Changes:

  • Added JSDoc for GenAI “main agent” processors and their exported constants.
  • Added per-member JSDoc across A365 public contracts (enums, message parts, request/channel/identity details, guardrail types).
  • Added/expanded JSDoc for the Agent365 exporter surface (options, constructor, lifecycle methods) and hosting-layer structural types.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/genai/mainAgent/processor.ts Adds method-level JSDoc for span/log processors and lifecycle no-ops.
src/genai/mainAgent/constants.ts Adds JSDoc for exported main-agent attribute-key constants.
src/a365/hosting/types.ts Adds field/type documentation for hosting structural interfaces and handler type.
src/a365/hosting/agenticTokenCache.ts Adds JSDoc for the AuthorizationLike.exchangeToken contract.
src/a365/exporter/ExporterEventNames.ts Adds enum member descriptions for exporter event names.
src/a365/exporter/Agent365ExporterOptions.ts Adds @param/@returns docs for token resolver delegate types.
src/a365/exporter/Agent365Exporter.ts Adds JSDoc for constructor, export, shutdown, and forceFlush.
src/a365/contracts.ts Adds per-member documentation for public A365 contracts and constants.
src/a365/constants.ts Adds JSDoc on the OpenTelemetryConstants public static members and improves class header doc.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/a365/hosting/agenticTokenCache.ts

@rads-1996 rads-1996 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nikhilNava nikhilNava merged commit 06bb0d1 into main Jun 23, 2026
6 checks passed
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.

4 participants