Skip to content

Commit c5a7820

Browse files
committed
types
1 parent 311403d commit c5a7820

9 files changed

Lines changed: 13 additions & 21 deletions

src/interfaces/Agent.interface.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export interface TAbortSignal extends AbortSignal { }
3131

3232
/**
3333
* Type representing possible values for tool parameters.
34-
* @typedef {string | number | boolean | null} ToolValue
34+
* Supports basic data types for flexible parameter passing.
3535
*/
3636
export type ToolValue = string | number | boolean | null;
3737

@@ -642,12 +642,12 @@ export interface IAgent {
642642

643643
/**
644644
* Type representing the unique name of an agent within the swarm.
645-
* @typedef {string} AgentName
645+
* Used to identify and reference specific agent instances.
646646
*/
647647
export type AgentName = string;
648648

649649
/**
650650
* Type representing the unique name of a tool within the swarm.
651-
* @typedef {string} ToolName
651+
* Used to identify and reference specific tool implementations.
652652
*/
653653
export type ToolName = string;

src/interfaces/Completion.interface.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,6 @@ export interface ICompletionSchema {
105105

106106
/**
107107
* Type representing the unique name of a completion mechanism within the swarm.
108-
* @typedef {string} CompletionName
108+
* Used to identify and reference specific completion implementations.
109109
*/
110110
export type CompletionName = string;

src/interfaces/Embedding.interface.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { IStorageCallbacks, IStorageSchema } from "./Storage.interface";
77
/**
88
* Type representing an array of numbers as embeddings.
99
* Used to encode text or data for similarity comparisons in storage or search operations.
10-
* @typedef {number[]} Embeddings
1110
*/
1211
export type Embeddings = number[];
1312

@@ -120,6 +119,6 @@ export interface IEmbeddingSchema {
120119

121120
/**
122121
* Type representing the unique name of an embedding mechanism within the swarm.
123-
* @typedef {string} EmbeddingName
122+
* Used to identify and reference specific embedding implementations.
124123
*/
125124
export type EmbeddingName = string;

src/interfaces/Outline.interface.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,19 @@ import { CompletionName } from "./Completion.interface";
44
/**
55
* Generic type representing arbitrary param for outline operations.
66
* Used as a flexible placeholder for input param in outline schemas and arguments.
7-
* @typedef {any} IOutlineParam
87
*/
98
export type IOutlineParam = any;
109

1110
/**
1211
* Generic type representing arbitrary data param for outline operations.
1312
* Used as a flexible placeholder for data param in outline schemas and results.
14-
* @typedef {any} IOutlineData
1513
*/
1614
export type IOutlineData = any;
1715

1816
/**
1917
* Type representing the format definition for outline data.
2018
* Can be either a full JSON schema format or an object-based format.
2119
* Used to specify the expected structure for outline operations.
22-
* @typedef {IOutlineSchemaFormat | IOutlineObjectFormat} IOutlineFormat
2320
*/
2421
export type IOutlineFormat = IOutlineSchemaFormat | IOutlineObjectFormat;
2522

@@ -437,7 +434,6 @@ export interface IOutlineSchema<
437434

438435
/**
439436
* Type representing the unique name of an outline within the system.
440-
* Used to identify specific outline configurations.
441-
* @typedef {string} OutlineName
437+
* Used to identify and reference specific outline configurations.
442438
*/
443439
export type OutlineName = string;

src/interfaces/Policy.interface.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ export interface IPolicyParams extends IPolicySchema, IPolicyCallbacks {
254254

255255
/**
256256
* Type representing the unique name of a policy within the swarm.
257-
* @typedef {string} PolicyName
257+
* Used to identify and reference specific policy implementations.
258258
*/
259259
export type PolicyName = string;
260260

src/interfaces/Session.interface.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,20 +182,18 @@ export interface ISession {
182182

183183
/**
184184
* Type representing the unique identifier for a session.
185-
* @typedef {string} SessionId
185+
* Used to track and reference specific session instances.
186186
*/
187187
export type SessionId = string;
188188

189189
/**
190190
* Type representing the operational mode of a session.
191-
* Defines the session's behavior: full session, connection setup, or single completion.
192-
* @typedef {"session" | "makeConnection" | "complete"} SessionMode
191+
* Defines the session's behavior: full session, connection setup, single completion, or scoped operation.
193192
*/
194193
export type SessionMode = "session" | "makeConnection" | "complete" | "scope";
195194

196195
/**
197196
* Type representing the source of execution within a session.
198197
* Tools emit "tool" messages (ignored in user history), while users emit "user" messages.
199-
* @typedef {"tool" | "user"} ExecutionMode
200198
*/
201199
export type ExecutionMode = "tool" | "user";

src/interfaces/State.interface.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { ILogger } from "./Logger.interface";
44
/**
55
* Type representing the data structure of a state.
66
* Can be any type, serving as a generic placeholder for state values.
7-
* @typedef {any} IStateData
87
*/
98
export type IStateData = any;
109

@@ -188,6 +187,6 @@ export interface IState<T extends IStateData = IStateData> {
188187

189188
/**
190189
* Type representing the unique name of a state within the swarm.
191-
* @typedef {string} StateName
190+
* Used to identify and reference specific state instances.
192191
*/
193192
export type StateName = string;

src/interfaces/Storage.interface.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { IBus } from "./Bus.interface";
99

1010
/**
1111
* Type representing the unique identifier for storage items.
12-
* @typedef {string | number} StorageId
12+
* Can be either a string or number for flexible item identification.
1313
*/
1414
type StorageId = string | number;
1515

@@ -262,6 +262,6 @@ export interface IStorage<T extends IStorageData = IStorageData> {
262262

263263
/**
264264
* Type representing the unique name of a storage within the swarm.
265-
* @typedef {string} StorageName
265+
* Used to identify and reference specific storage instances.
266266
*/
267267
export type StorageName = string;

src/interfaces/Swarm.interface.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ export interface ISwarm {
274274

275275
/**
276276
* Type representing the unique name of a swarm within the system.
277-
* @typedef {string} SwarmName
277+
* Used to identify and reference specific swarm instances.
278278
*/
279279
export type SwarmName = string;
280280

0 commit comments

Comments
 (0)