Skip to content

Commit 2b53c3f

Browse files
committed
types
1 parent e64d05d commit 2b53c3f

38 files changed

Lines changed: 67 additions & 250 deletions

docs/classes/AgentPublicService.md

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ loggerService: any
2828

2929
Logger service instance, injected via DI, for logging agent operations.
3030
Used across all methods when GLOBAL_CONFIG.CC_LOGGER_ENABLE_INFO is true, consistent with DocService and PerfService logging patterns.
31-
*
3231

3332
### agentConnectionService
3433

@@ -38,7 +37,6 @@ agentConnectionService: any
3837

3938
Agent connection service instance, injected via DI, for underlying agent operations.
4039
Provides core functionality (e.g., getAgent, execute) called by public methods, aligning with ClientAgent’s execution model.
41-
*
4240

4341
### createAgentRef
4442

@@ -49,7 +47,6 @@ createAgentRef: (methodName: string, clientId: string, agentName: string) => Pro
4947
Creates a reference to an agent for a specific client and method context.
5048
Wraps AgentConnectionService.getAgent with MethodContextService for scoping, logging via LoggerService if GLOBAL_CONFIG.CC_LOGGER_ENABLE_INFO is true.
5149
Used in ClientAgent (e.g., to initialize agent refs) and PerfService (e.g., to track agent usage via clientId).
52-
* * *
5350

5451
### execute
5552

@@ -60,7 +57,6 @@ execute: (input: string, mode: ExecutionMode, methodName: string, clientId: stri
6057
Executes a command on the agent with a specified execution mode.
6158
Wraps AgentConnectionService.execute with MethodContextService, logging via LoggerService if GLOBAL_CONFIG.CC_LOGGER_ENABLE_INFO is true.
6259
Mirrors ClientAgent’s EXECUTE_FN, triggering BusService events (e.g., commitExecutionBegin) and PerfService tracking (e.g., startExecution).
63-
* * * * *
6460

6561
### run
6662

@@ -71,7 +67,6 @@ run: (input: string, methodName: string, clientId: string, agentName: string) =>
7167
Runs a stateless completion on the agent with the given input.
7268
Wraps AgentConnectionService.run with MethodContextService, logging via LoggerService if GLOBAL_CONFIG.CC_LOGGER_ENABLE_INFO is true.
7369
Mirrors ClientAgent’s RUN_FN, used for quick completions without state persistence, tracked by PerfService.
74-
* * * *
7570

7671
### waitForOutput
7772

@@ -82,7 +77,6 @@ waitForOutput: (methodName: string, clientId: string, agentName: string) => Prom
8277
Waits for the agent’s output after an operation.
8378
Wraps AgentConnectionService.waitForOutput with MethodContextService, logging via LoggerService if GLOBAL_CONFIG.CC_LOGGER_ENABLE_INFO is true.
8479
Used in ClientAgent (e.g., post-execution output retrieval), complementing execute and run.
85-
* * *
8680

8781
### commitToolOutput
8882

@@ -93,7 +87,6 @@ commitToolOutput: (toolId: string, content: string, methodName: string, clientId
9387
Commits tool output to the agent’s history, typically for OpenAI-style tool calls.
9488
Wraps AgentConnectionService.commitToolOutput with MethodContextService, logging via LoggerService if GLOBAL_CONFIG.CC_LOGGER_ENABLE_INFO is true.
9589
Supports ClientAgent’s tool execution (e.g., TOOL_EXECUTOR), documented in DocService (e.g., tool schemas).
96-
* * * * *
9790

9891
### commitSystemMessage
9992

@@ -104,7 +97,6 @@ commitSystemMessage: (message: string, methodName: string, clientId: string, age
10497
Commits a system message to the agent’s history.
10598
Wraps AgentConnectionService.commitSystemMessage with MethodContextService, logging via LoggerService if GLOBAL_CONFIG.CC_LOGGER_ENABLE_INFO is true.
10699
Used in ClientAgent (e.g., system prompt updates), documented in DocService (e.g., system prompts).
107-
* * * *
108100

109101
### commitDeveloperMessage
110102

@@ -115,7 +107,6 @@ commitDeveloperMessage: (message: string, methodName: string, clientId: string,
115107
Commits a developer message to the agent’s history.
116108
Wraps AgentConnectionService.commitDeveloperMessage with MethodContextService, logging via LoggerService if GLOBAL_CONFIG.CC_LOGGER_ENABLE_INFO is true.
117109
Used for developer-specific messages, enhancing debugging and tracking in agent operations.
118-
* * * *
119110

120111
### commitToolRequest
121112

@@ -127,8 +118,6 @@ Commits a tool request to the agent’s history.
127118
Wraps AgentConnectionService.commitToolRequest with MethodContextService, logging via LoggerService if GLOBAL_CONFIG.CC_LOGGER_ENABLE_INFO is true.
128119
Used for submitting tool requests, typically in scenarios where multiple tools are involved in agent operations.
129120

130-
* * * *
131-
132121
### commitAssistantMessage
133122

134123
```ts
@@ -138,7 +127,6 @@ commitAssistantMessage: (message: string, methodName: string, clientId: string,
138127
Commits an assistant message to the agent’s history.
139128
Wraps AgentConnectionService.commitAssistantMessage with MethodContextService, logging via LoggerService if GLOBAL_CONFIG.CC_LOGGER_ENABLE_INFO is true.
140129
Supports ClientAgent’s assistant responses, tracked by PerfService and documented in DocService.
141-
* * * *
142130

143131
### commitUserMessage
144132

@@ -149,7 +137,6 @@ commitUserMessage: (message: string, mode: ExecutionMode, methodName: string, cl
149137
Commits a user message to the agent’s history without triggering an answer.
150138
Wraps AgentConnectionService.commitUserMessage with MethodContextService, logging via LoggerService if GLOBAL_CONFIG.CC_LOGGER_ENABLE_INFO is true.
151139
Used in ClientAgent for user input logging, complementing execute and run.
152-
* * * *
153140

154141
### commitFlush
155142

@@ -160,7 +147,6 @@ commitFlush: (methodName: string, clientId: string, agentName: string) => Promis
160147
Commits a flush of the agent’s history, clearing stored data.
161148
Wraps AgentConnectionService.commitFlush with MethodContextService, logging via LoggerService if GLOBAL_CONFIG.CC_LOGGER_ENABLE_INFO is true.
162149
Supports ClientAgent session resets, tracked by PerfService for performance cleanup.
163-
* * *
164150

165151
### commitAgentChange
166152

@@ -171,7 +157,6 @@ commitAgentChange: (methodName: string, clientId: string, agentName: string) =>
171157
Commits a change of agent to prevent subsequent tool executions.
172158
Wraps AgentConnectionService.commitAgentChange with MethodContextService, logging via LoggerService if GLOBAL_CONFIG.CC_LOGGER_ENABLE_INFO is true.
173159
Used in ClientAgent to manage agent transitions, documented in DocService (e.g., agent dependencies).
174-
* * *
175160

176161
### commitStopTools
177162

@@ -182,7 +167,6 @@ commitStopTools: (methodName: string, clientId: string, agentName: string) => Pr
182167
Commits a stop to prevent the next tool from being executed.
183168
Wraps AgentConnectionService.commitStopTools with MethodContextService, logging via LoggerService if GLOBAL_CONFIG.CC_LOGGER_ENABLE_INFO is true.
184169
Supports ClientAgent’s tool execution control (e.g., TOOL_EXECUTOR interruption).
185-
* * *
186170

187171
### commitCancelOutput
188172

@@ -193,7 +177,6 @@ commitCancelOutput: (methodName: string, clientId: string, agentName: string) =>
193177
Commits a stop to prevent the next tool from being executed.
194178
Wraps AgentConnectionService.commitCancelOutput with MethodContextService, logging via LoggerService if GLOBAL_CONFIG.CC_LOGGER_ENABLE_INFO is true.
195179
Supports ClientAgent’s tool execution control (e.g., TOOL_EXECUTOR interruption).
196-
* * *
197180

198181
### dispose
199182

@@ -204,4 +187,3 @@ dispose: (methodName: string, clientId: string, agentName: string) => Promise<vo
204187
Disposes of the agent, cleaning up resources.
205188
Wraps AgentConnectionService.dispose with MethodContextService, logging via LoggerService if GLOBAL_CONFIG.CC_LOGGER_ENABLE_INFO is true.
206189
Aligns with PerfService’s dispose (e.g., session cleanup) and BusService’s dispose (e.g., subscription cleanup).
207-
* * *

docs/classes/ClientAgent.md

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ An instance of `ToolAbortController` used to manage the lifecycle of abort signa
3636
Provides an `AbortSignal` to signal and handle abort events for asynchronous operations.
3737

3838
This property is used to control and cancel ongoing tool executions when necessary, such as during agent changes or tool stops.
39-
*
4039

4140
### _agentChangeSubject
4241

@@ -45,7 +44,6 @@ _agentChangeSubject: Subject<unique symbol>
4544
```
4645

4746
Subject for signaling agent changes, halting subsequent tool executions via commitAgentChange.
48-
*
4947

5048
### _resqueSubject
5149

@@ -54,7 +52,6 @@ _resqueSubject: Subject<unique symbol>
5452
```
5553

5654
Subject for signaling model resurrection events, triggered by _resurrectModel during error recovery.
57-
*
5855

5956
### _toolErrorSubject
6057

@@ -63,7 +60,6 @@ _toolErrorSubject: Subject<unique symbol>
6360
```
6461

6562
Subject for signaling tool execution errors, emitted by createToolCall on failure.
66-
*
6763

6864
### _toolStopSubject
6965

@@ -72,7 +68,6 @@ _toolStopSubject: Subject<unique symbol>
7268
```
7369

7470
Subject for signaling tool execution stops, triggered by commitStopTools.
75-
*
7671

7772
### _cancelOutputSubject
7873

@@ -81,7 +76,6 @@ _cancelOutputSubject: Subject<unique symbol>
8176
```
8277

8378
Subject for signaling tool execution stops, triggered by commitCancelOutput.
84-
*
8579

8680
### _toolCommitSubject
8781

@@ -90,7 +84,6 @@ _toolCommitSubject: Subject<void>
9084
```
9185

9286
Subject for signaling tool output commitments, triggered by commitToolOutput.
93-
*
9487

9588
### _outputSubject
9689

@@ -99,7 +92,6 @@ _outputSubject: Subject<string>
9992
```
10093

10194
Subject for emitting transformed outputs, used by _emitOutput and waitForOutput.
102-
*
10395

10496
### execute
10597

@@ -109,7 +101,6 @@ execute: (input: string, mode: ExecutionMode) => Promise<void>
109101

110102
Executes the incoming message and processes tool calls if present, queued to prevent overlapping executions.
111103
Implements IAgent.execute, delegating to EXECUTE_FN with queuing via functools-kit’s queued decorator.
112-
* *
113104

114105
### run
115106

@@ -119,7 +110,6 @@ run: (input: string) => Promise<string>
119110

120111
Runs a stateless completion for the incoming message, queued to prevent overlapping executions.
121112
Implements IAgent.run, delegating to RUN_FN with queuing via functools-kit’s queued decorator.
122-
*
123113

124114
## Methods
125115

@@ -144,7 +134,7 @@ are fetched asynchronously using the `systemDynamic` function.
144134
This method is used to construct the system-level context for the agent, which can include
145135
predefined static messages and dynamically generated messages based on the agent's state or configuration.
146136

147-
* including both static and dynamically generated messages.
137+
including both static and dynamically generated messages.
148138

149139
### _emitOutput
150140

@@ -155,7 +145,6 @@ _emitOutput(mode: ExecutionMode, rawResult: string): Promise<void>;
155145
Emits the transformed output after validation, invoking callbacks and emitting events via BusService.
156146
Attempts model resurrection via _resurrectModel if validation fails, throwing an error if unrecoverable.
157147
Supports SwarmConnectionService by broadcasting agent outputs within the swarm.
158-
* * *
159148

160149
### _resurrectModel
161150

@@ -166,7 +155,6 @@ _resurrectModel(mode: ExecutionMode, reason?: string): Promise<string>;
166155
Resurrects the model in case of failures using configured strategies (flush, recomplete, custom).
167156
Updates history with failure details and returns a placeholder or transformed result, signaling via _resqueSubject.
168157
Supports error recovery for CompletionSchemaService’s getCompletion calls.
169-
* * *
170158

171159
### waitForOutput
172160

@@ -185,7 +173,6 @@ getCompletion(mode: ExecutionMode, tools: IAgentTool[]): Promise<IModelMessage>;
185173

186174
Retrieves a completion message from the model using the current history and tools.
187175
Applies validation and resurrection strategies (via _resurrectModel) if needed, integrating with CompletionSchemaService.
188-
*
189176

190177
### commitUserMessage
191178

@@ -195,7 +182,6 @@ commitUserMessage(message: string, mode: ExecutionMode): Promise<void>;
195182

196183
Commits a user message to the history without triggering a response, notifying the system via BusService.
197184
Supports SessionConnectionService by logging user interactions within a session.
198-
*
199185

200186
### commitFlush
201187

@@ -240,7 +226,6 @@ commitSystemMessage(message: string): Promise<void>;
240226

241227
Commits a system message to the history, notifying the system via BusService without triggering execution.
242228
Supports system-level updates, coordinated with SessionConnectionService.
243-
*
244229

245230
### commitDeveloperMessage
246231

@@ -250,7 +235,6 @@ commitDeveloperMessage(message: string): Promise<void>;
250235

251236
Commits a developer message to the history, notifying the system via BusService without triggering execution.
252237
Useful for logging developer notes or debugging information, coordinated with SessionConnectionService.
253-
*
254238

255239
### commitToolRequest
256240

@@ -262,8 +246,6 @@ Commits a tool request to the agent's history and emits an event via BusService.
262246
This method is used to log tool requests and notify the system of the requested tool calls.
263247
The tool requests are transformed into tool call objects using the `createToolRequest` utility.
264248

265-
*
266-
267249
### commitAssistantMessage
268250

269251
```ts
@@ -272,7 +254,6 @@ commitAssistantMessage(message: string): Promise<void>;
272254

273255
Commits an assistant message to the history without triggering execution, notifying the system via BusService.
274256
Useful for logging assistant responses, coordinated with HistoryConnectionService.
275-
*
276257

277258
### commitToolOutput
278259

@@ -282,7 +263,6 @@ commitToolOutput(toolId: string, content: string): Promise<void>;
282263

283264
Commits tool output to the history, signaling completion via _toolCommitSubject and notifying the system via BusService.
284265
Integrates with ToolSchemaService by linking tool output to tool calls.
285-
* *
286266

287267
### dispose
288268

docs/classes/ClientCompute.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ group: docs
77

88
Implements `ICompute<Compute>`
99

10-
* * * Manages client-side computations, state subscriptions, and lifecycle events.
10+
Manages client-side computations, state subscriptions, and lifecycle events.
1111

1212
## Constructor
1313

@@ -29,15 +29,15 @@ params: IComputeParams<Compute>
2929
__@DISPOSE_SLOT_FN_SYMBOL@3163: any
3030
```
3131

32-
* Stores the composed dispose function.
32+
Stores the composed dispose function.
3333

3434
### __@GET_COMPUTE_DATA_FN_SYMBOL@3164
3535

3636
```ts
3737
__@GET_COMPUTE_DATA_FN_SYMBOL@3164: any
3838
```
3939

40-
* Memoized function for retrieving compute data.
40+
Memoized function for retrieving compute data.
4141

4242
## Methods
4343

@@ -47,30 +47,28 @@ __@GET_COMPUTE_DATA_FN_SYMBOL@3164: any
4747
getComputeData(): Promise<any>;
4848
```
4949

50-
* Retrieves the computation data using a memoized function.
51-
*
50+
Retrieves the computation data using a memoized function.
5251

5352
### calculate
5453

5554
```ts
5655
calculate(stateName: StateName): Promise<void>;
5756
```
5857

59-
* Triggers a recalculation based on a state change and clears memoized data.
58+
Triggers a recalculation based on a state change and clears memoized data.
6059

6160
### update
6261

6362
```ts
6463
update(): Promise<void>;
6564
```
6665

67-
* Forces an update of the computation and clears memoized data.
66+
Forces an update of the computation and clears memoized data.
6867

6968
### dispose
7069

7170
```ts
7271
dispose(): Promise<void>;
7372
```
7473

75-
* Cleans up resources, unsubscribes from state changes, and triggers onDispose callback.
76-
*
74+
Cleans up resources, unsubscribes from state changes, and triggers onDispose callback.

docs/classes/ClientHistory.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ push<Payload extends object = object>(message: IModelMessage<Payload>): Promise<
4646
4747
Pushes a message into the history and emits a corresponding event via BusService.
4848
Adds the message to the underlying storage (params.items) and notifies the system, supporting ClientAgent’s history updates.
49-
*
5049
5150
### pop
5251
@@ -77,7 +76,6 @@ Converts the history into an array of messages tailored for the agent, used by C
7776
Filters messages with _filterCondition, limits to GLOBAL_CONFIG.CC_KEEP_MESSAGES, handles resque/flush resets,
7877
and prepends prompt and system messages (from params and GLOBAL_CONFIG.CC_AGENT_SYSTEM_PROMPT).
7978
Ensures tool call consistency by linking tool outputs to calls, supporting CompletionSchemaService’s context needs.
80-
* *
8179
8280
### dispose
8381

0 commit comments

Comments
 (0)