Skip to content

Commit a08494c

Browse files
authored
fix: eliminate starlight-typedoc-plugin warnings with code comments (#557)
1 parent b07a588 commit a08494c

File tree

7 files changed

+22
-28
lines changed

7 files changed

+22
-28
lines changed

packages/agents-core/src/agent.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,6 @@ export interface AgentConfiguration<
150150
TContext = UnknownContext,
151151
TOutput extends AgentOutputType = TextOutput,
152152
> {
153-
/**
154-
* The name of the agent.
155-
*/
156153
name: string;
157154

158155
/**

packages/agents-core/src/helpers/message.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import {
99
/**
1010
* Creates a user message entry
1111
*
12-
* @param input The input message from the user
13-
* @param options Any additional options that will be directly passed to the model
14-
* @returns a message entry
12+
* @param input The input message from the user.
13+
* @param options Any additional options that will be directly passed to the model.
14+
* @returns A message entry.
1515
*/
1616
export function user(
1717
input: string | UserContent[],
@@ -36,9 +36,9 @@ export function user(
3636
/**
3737
* Creates a system message entry
3838
*
39-
* @param input The system prompt
40-
* @param options Any additional options that will be directly passed to the model
41-
* @returns a message entry
39+
* @param input The system prompt.
40+
* @param options Any additional options that will be directly passed to the model.
41+
* @returns A message entry.
4242
*/
4343
export function system(
4444
input: string,
@@ -55,9 +55,9 @@ export function system(
5555
/**
5656
* Creates an assistant message entry for example for multi-shot prompting
5757
*
58-
* @param input The assistant response
59-
* @param options Any additional options that will be directly passed to the model
60-
* @returns a message entry
58+
* @param content The assistant response.
59+
* @param options Any additional options that will be directly passed to the model.
60+
* @returns A message entry.
6161
*/
6262
export function assistant(
6363
content: string | AssistantContent[],

packages/agents-core/src/result.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,9 +377,9 @@ export class StreamedRunResult<
377377
/**
378378
* Returns a readable stream of the final text output of the agent run.
379379
*
380-
* @param options - Options for the stream.
381-
* @param options.compatibleWithNodeStreams - Whether to use Node.js streams or web standard streams.
382380
* @returns A readable stream of the final output of the agent run.
381+
* @remarks Pass `{ compatibleWithNodeStreams: true }` to receive a Node.js compatible stream
382+
* instance.
383383
*/
384384
toTextStream(): ReadableStream<string>;
385385
toTextStream(options?: { compatibleWithNodeStreams: true }): Readable;

packages/agents-core/src/run.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,11 +1169,8 @@ export class Runner extends RunHooks<any, AgentOutputType<unknown>> {
11691169
* @param agent - The starting agent to run.
11701170
* @param input - The initial input to the agent. You can pass a string or an array of
11711171
* `AgentInputItem`.
1172-
* @param options - The options for the run.
1173-
* @param options.stream - Whether to stream the run. If true, the run will emit events as the
1174-
* model responds.
1175-
* @param options.context - The context to run the agent with.
1176-
* @param options.maxTurns - The maximum number of turns to run the agent.
1172+
* @param options - Options for the run, including streaming behavior, execution context, and the
1173+
* maximum number of turns.
11771174
* @returns The result of the run.
11781175
*/
11791176
run<TAgent extends Agent<any, any>, TContext = undefined>(

packages/agents-core/src/runContext.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ export class RunContext<TContext = UnknownContext> {
4747
/**
4848
* Check if a tool call has been approved.
4949
*
50-
* @param toolName - The name of the tool.
51-
* @param callId - The call ID of the tool call.
50+
* @param approval - Details about the tool call being evaluated.
5251
* @returns `true` if the tool call has been approved, `false` if blocked and `undefined` if not yet approved or rejected.
5352
*/
54-
isToolApproved({ toolName, callId }: { toolName: string; callId: string }) {
53+
isToolApproved(approval: { toolName: string; callId: string }) {
54+
const { toolName, callId } = approval;
5555
const approvalEntry = this.#approvals.get(toolName);
5656
if (approvalEntry?.approved === true && approvalEntry.rejected === true) {
5757
logger.warn(
@@ -96,8 +96,8 @@ export class RunContext<TContext = UnknownContext> {
9696
/**
9797
* Approve a tool call.
9898
*
99-
* @param toolName - The name of the tool.
100-
* @param callId - The call ID of the tool call.
99+
* @param approvalItem - The tool approval item to approve.
100+
* @param options - Additional approval behavior options.
101101
*/
102102
approveTool(
103103
approvalItem: RunToolApprovalItem,

packages/agents-core/src/tool.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,8 @@ export type HostedMCPTool<Context = UnknownContext> = HostedTool & {
151151
/**
152152
* Creates a hosted MCP tool definition.
153153
*
154-
* @param serverLabel - The label identifying the MCP server.
155-
* @param serverUrl - The URL of the MCP server.
156-
* @param requireApproval - Whether tool calls require approval.
154+
* @param options - Configuration for the hosted MCP tool, including server connection details
155+
* and approval requirements.
157156
*/
158157
export function hostedMcpTool<Context = UnknownContext>(
159158
options: {

packages/agents-realtime/src/transportLayer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ export interface RealtimeTransportLayer
131131

132132
/**
133133
* Resets the conversation history / context to a specific state
134-
* @param history - The history to reset to
134+
* @param oldHistory - The history that is currently stored on the session.
135+
* @param newHistory - The history you want the session to use going forward.
135136
*/
136137
resetHistory(oldHistory: RealtimeItem[], newHistory: RealtimeItem[]): void;
137138

0 commit comments

Comments
 (0)