@mozaik-ai/core 3.1.4 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -12
- package/dist/index.d.mts +39 -40
- package/dist/index.d.ts +39 -40
- package/dist/index.js +93 -71
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +90 -68
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -154,9 +154,9 @@ Use `InferenceVisitor` for concerns that should stay separate from agent logic:
|
|
|
154
154
|
|
|
155
155
|
---
|
|
156
156
|
|
|
157
|
-
### Context
|
|
157
|
+
### Model Context
|
|
158
158
|
|
|
159
|
-
`
|
|
159
|
+
`ModelContext` is the structured input passed to the model. It is composed of ordered **`ContextItem`** objects — each representing a single unit of context.
|
|
160
160
|
|
|
161
161
|
**Client-provided items** (you add these):
|
|
162
162
|
|
|
@@ -171,26 +171,26 @@ Use `InferenceVisitor` for concerns that should stay separate from agent logic:
|
|
|
171
171
|
- `Reasoning` — the model's internal reasoning trace
|
|
172
172
|
|
|
173
173
|
```ts
|
|
174
|
-
import {
|
|
174
|
+
import { ModelContext, DeveloperMessage, UserMessage, InMemoryContextRepository } from "@mozaik-ai/core"
|
|
175
175
|
|
|
176
|
-
const context =
|
|
176
|
+
const context = ModelContext.create("project-id")
|
|
177
177
|
.addItem(DeveloperMessage.create("You are a helpful assistant."))
|
|
178
178
|
.addItem(UserMessage.create("What is the capital of France?"))
|
|
179
179
|
|
|
180
|
-
const repo = new
|
|
180
|
+
const repo = new InMemoryModelContextRepository()
|
|
181
181
|
await repo.save(context)
|
|
182
182
|
|
|
183
183
|
// later...
|
|
184
184
|
const restored = await repo.getByProjectId("project-id")
|
|
185
185
|
```
|
|
186
186
|
|
|
187
|
-
|
|
187
|
+
ModelContext can be persisted and restored via `ModelContextRepository`. The built-in `InMemoryModelContextRepository` is suitable for development; implement `ModelContextRepository` to connect any storage backend.
|
|
188
188
|
|
|
189
189
|
---
|
|
190
190
|
|
|
191
191
|
### OpenResponses
|
|
192
192
|
|
|
193
|
-
`OpenAIResponses` is the framework's inference provider. It implements the **OpenResponses** specification ([openresponses.org](https://www.openresponses.org/)), mapping Mozaik's typed `
|
|
193
|
+
`OpenAIResponses` is the framework's inference provider. It implements the **OpenResponses** specification ([openresponses.org](https://www.openresponses.org/)), mapping Mozaik's typed `ModelContext` to the OpenAI Responses API and back.
|
|
194
194
|
|
|
195
195
|
It is the default provider used by `AgentRuntime` and handles:
|
|
196
196
|
|
|
@@ -239,7 +239,7 @@ society.enter("Analyze the impact of AI on software development", model, context
|
|
|
239
239
|
society.stop()
|
|
240
240
|
```
|
|
241
241
|
|
|
242
|
-
All agents receive the same `
|
|
242
|
+
All agents receive the same `ModelContext`, enabling **collaborative context building** — each agent's output is visible to others through the shared context as the execution progresses.
|
|
243
243
|
|
|
244
244
|
> **Experimental:** `AgentSociety` is in active development. The API is stable enough to build on, but expect refinements — particularly around context isolation, coordination primitives, and agent-to-agent messaging. Feedback and contributions are welcome.
|
|
245
245
|
|
|
@@ -254,10 +254,10 @@ import {
|
|
|
254
254
|
Agent,
|
|
255
255
|
AgentRuntime,
|
|
256
256
|
HookId,
|
|
257
|
-
|
|
257
|
+
ModelContext,
|
|
258
258
|
DeveloperMessage,
|
|
259
259
|
Gpt54Mini,
|
|
260
|
-
|
|
260
|
+
InMemoryModelContextRepository,
|
|
261
261
|
Tool,
|
|
262
262
|
} from "@mozaik-ai/core"
|
|
263
263
|
|
|
@@ -289,9 +289,9 @@ const agent = new Agent(runtime)
|
|
|
289
289
|
|
|
290
290
|
// Set up model and context
|
|
291
291
|
const model = new Gpt54Mini([weatherTool])
|
|
292
|
-
const context =
|
|
292
|
+
const context = ModelContext.create("demo").addItem(DeveloperMessage.create("You are a weather assistant."))
|
|
293
293
|
|
|
294
|
-
const repo = new
|
|
294
|
+
const repo = new InMemoryModelContextRepository()
|
|
295
295
|
await repo.save(context)
|
|
296
296
|
|
|
297
297
|
// Run
|
package/dist/index.d.mts
CHANGED
|
@@ -6,20 +6,21 @@ declare abstract class ContextItem {
|
|
|
6
6
|
abstract toJSON(): any;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
declare class
|
|
9
|
+
declare class ModelContext {
|
|
10
10
|
readonly id: string;
|
|
11
11
|
readonly projectId: string;
|
|
12
12
|
readonly items: ContextItem[];
|
|
13
13
|
constructor(id: string, projectId: string, items: ContextItem[]);
|
|
14
|
-
addItem(item: ContextItem):
|
|
15
|
-
applyModelOutput(items: ContextItem[]):
|
|
14
|
+
addItem(item: ContextItem): ModelContext;
|
|
15
|
+
applyModelOutput(items: ContextItem[]): ModelContext;
|
|
16
16
|
getItems(): ContextItem[];
|
|
17
|
-
|
|
17
|
+
getLastItem(): ContextItem;
|
|
18
|
+
static create(projectId: string): ModelContext;
|
|
18
19
|
static rehydrate(data: {
|
|
19
20
|
id: string;
|
|
20
21
|
projectId: string;
|
|
21
22
|
items: ContextItem[];
|
|
22
|
-
}):
|
|
23
|
+
}): ModelContext;
|
|
23
24
|
toJSON(): any;
|
|
24
25
|
}
|
|
25
26
|
|
|
@@ -147,10 +148,10 @@ declare class FunctionCallOutput extends ContextItem {
|
|
|
147
148
|
toJSON(): any;
|
|
148
149
|
}
|
|
149
150
|
|
|
150
|
-
interface
|
|
151
|
-
save(context:
|
|
152
|
-
get(id: string): Promise<
|
|
153
|
-
getByProjectId(projectId: string): Promise<
|
|
151
|
+
interface ModelContextRepository {
|
|
152
|
+
save(context: ModelContext): Promise<void>;
|
|
153
|
+
get(id: string): Promise<ModelContext>;
|
|
154
|
+
getByProjectId(projectId: string): Promise<ModelContext[]>;
|
|
154
155
|
}
|
|
155
156
|
|
|
156
157
|
interface ReasoningEffort<Effort extends string> {
|
|
@@ -175,8 +176,8 @@ interface ToolCallingCapability {
|
|
|
175
176
|
|
|
176
177
|
declare class InferenceRequest {
|
|
177
178
|
readonly model: GenerativeModel & ReasoningEffort<string> & ToolCallingCapability;
|
|
178
|
-
readonly context:
|
|
179
|
-
constructor(model: GenerativeModel & ReasoningEffort<string> & ToolCallingCapability, context:
|
|
179
|
+
readonly context: ModelContext;
|
|
180
|
+
constructor(model: GenerativeModel & ReasoningEffort<string> & ToolCallingCapability, context: ModelContext);
|
|
180
181
|
}
|
|
181
182
|
|
|
182
183
|
declare class InputTokenDetails {
|
|
@@ -211,7 +212,7 @@ declare class OpenAIResponses implements ModelRuntime {
|
|
|
211
212
|
constructor();
|
|
212
213
|
infer(inferenceRequest: InferenceRequest): Promise<InferenceResponse>;
|
|
213
214
|
extractTokenUsage(response: OpenAI.Responses.Response): TokenUsage | undefined;
|
|
214
|
-
mapContextToRequest(context:
|
|
215
|
+
mapContextToRequest(context: ModelContext): any[];
|
|
215
216
|
extractContextItems(response: any): ContextItem[];
|
|
216
217
|
}
|
|
217
218
|
|
|
@@ -271,17 +272,17 @@ declare class Gpt54Mini implements GenerativeModel, ReasoningEffort<OpenAIReason
|
|
|
271
272
|
getTools(): Tool[];
|
|
272
273
|
}
|
|
273
274
|
|
|
274
|
-
interface
|
|
275
|
+
interface Specification<T> {
|
|
275
276
|
isSatisfiedBy(candidate: T): boolean;
|
|
276
|
-
and(other:
|
|
277
|
-
or(other:
|
|
278
|
-
not():
|
|
277
|
+
and(other: Specification<T>): Specification<T>;
|
|
278
|
+
or(other: Specification<T>): Specification<T>;
|
|
279
|
+
not(): Specification<T>;
|
|
279
280
|
}
|
|
280
|
-
declare abstract class
|
|
281
|
+
declare abstract class BaseSpecification<T> implements Specification<T> {
|
|
281
282
|
abstract isSatisfiedBy(candidate: T): boolean;
|
|
282
|
-
and(other:
|
|
283
|
-
or(other:
|
|
284
|
-
not():
|
|
283
|
+
and(other: Specification<T>): Specification<T>;
|
|
284
|
+
or(other: Specification<T>): Specification<T>;
|
|
285
|
+
not(): Specification<T>;
|
|
285
286
|
}
|
|
286
287
|
|
|
287
288
|
interface Action<T> {
|
|
@@ -291,35 +292,35 @@ interface AsyncAction<T> {
|
|
|
291
292
|
apply(candidate: T): Promise<T>;
|
|
292
293
|
}
|
|
293
294
|
interface AsyncRule<T> {
|
|
294
|
-
|
|
295
|
+
specification: Specification<T>;
|
|
295
296
|
action: AsyncAction<T>;
|
|
296
297
|
apply(candidate: T): Promise<T>;
|
|
297
298
|
}
|
|
298
299
|
declare class If<T> implements AsyncRule<T> {
|
|
299
|
-
|
|
300
|
+
specification: Specification<T>;
|
|
300
301
|
action: AsyncAction<T>;
|
|
301
|
-
constructor({
|
|
302
|
-
|
|
302
|
+
constructor({ specification, action }: {
|
|
303
|
+
specification: Specification<T>;
|
|
303
304
|
action: AsyncAction<T>;
|
|
304
305
|
});
|
|
305
306
|
apply(candidate: T): Promise<T>;
|
|
306
307
|
}
|
|
307
308
|
declare class Loop<T> implements AsyncRule<T> {
|
|
308
|
-
|
|
309
|
+
specification: Specification<T>;
|
|
309
310
|
action: AsyncAction<T>;
|
|
310
|
-
constructor({
|
|
311
|
-
|
|
311
|
+
constructor({ specification, action }: {
|
|
312
|
+
specification: Specification<T>;
|
|
312
313
|
action: AsyncAction<T>;
|
|
313
314
|
});
|
|
314
315
|
apply(candidate: T): Promise<T>;
|
|
315
316
|
}
|
|
316
317
|
|
|
317
|
-
declare class
|
|
318
|
+
declare class InMemoryModelContextRepository implements ModelContextRepository {
|
|
318
319
|
private readonly store;
|
|
319
320
|
private readonly projectIndex;
|
|
320
|
-
save(context:
|
|
321
|
-
get(id: string): Promise<
|
|
322
|
-
getByProjectId(projectId: string): Promise<
|
|
321
|
+
save(context: ModelContext): Promise<void>;
|
|
322
|
+
get(id: string): Promise<ModelContext>;
|
|
323
|
+
getByProjectId(projectId: string): Promise<ModelContext[]>;
|
|
323
324
|
private clone;
|
|
324
325
|
}
|
|
325
326
|
|
|
@@ -370,10 +371,8 @@ interface RuntimeContext {
|
|
|
370
371
|
userMessage: UserMessage;
|
|
371
372
|
inferenceRequest?: InferenceRequest;
|
|
372
373
|
model: GenerativeModel & ReasoningEffort<string> & ToolCallingCapability;
|
|
373
|
-
context:
|
|
374
|
+
context: ModelContext;
|
|
374
375
|
inferenceResponse?: InferenceResponse;
|
|
375
|
-
functionCallOutput?: FunctionCallOutput;
|
|
376
|
-
modelMessage?: ModelMessage;
|
|
377
376
|
error?: Error;
|
|
378
377
|
}
|
|
379
378
|
|
|
@@ -381,12 +380,12 @@ declare class AgentRuntime {
|
|
|
381
380
|
private hooksRegistry;
|
|
382
381
|
private stateHandlerRegistry;
|
|
383
382
|
constructor();
|
|
384
|
-
onInferencePending(
|
|
385
|
-
onFunctionCallPending(
|
|
383
|
+
onInferencePending(runtimeContext: RuntimeContext): Promise<void>;
|
|
384
|
+
onFunctionCallPending(runtimeContext: RuntimeContext): Promise<void>;
|
|
386
385
|
onError(context: RuntimeContext): Promise<void>;
|
|
387
386
|
onModelMessageReceived(context: RuntimeContext): Promise<void>;
|
|
388
387
|
on(hookId: HookId, callback: (data: any) => Promise<void>): Promise<void>;
|
|
389
|
-
start(userMessage: UserMessage, model: GenerativeModel & ReasoningEffort<string> & ToolCallingCapability, context:
|
|
388
|
+
start(userMessage: UserMessage, model: GenerativeModel & ReasoningEffort<string> & ToolCallingCapability, context: ModelContext): Promise<void>;
|
|
390
389
|
}
|
|
391
390
|
|
|
392
391
|
interface InferenceVisitor {
|
|
@@ -414,7 +413,7 @@ declare class Agent {
|
|
|
414
413
|
onStart(context: RuntimeContext): Promise<void>;
|
|
415
414
|
setInferenceVisitor(visitor: InferenceVisitor): void;
|
|
416
415
|
setFunctionCallVisitor(visitor: FunctionCallVisitor): void;
|
|
417
|
-
run(userMessage: string, model: GenerativeModel & ReasoningEffort<string> & ToolCallingCapability, context:
|
|
416
|
+
run(userMessage: string, model: GenerativeModel & ReasoningEffort<string> & ToolCallingCapability, context: ModelContext): Promise<void>;
|
|
418
417
|
}
|
|
419
418
|
|
|
420
419
|
declare class AgentSociety {
|
|
@@ -423,9 +422,9 @@ declare class AgentSociety {
|
|
|
423
422
|
private isActive;
|
|
424
423
|
constructor(name: string);
|
|
425
424
|
join(agent: Agent): void;
|
|
426
|
-
enter(messageText: string, model: GenerativeModel & ReasoningEffort<string> & ToolCallingCapability, context:
|
|
425
|
+
enter(messageText: string, model: GenerativeModel & ReasoningEffort<string> & ToolCallingCapability, context: ModelContext): void;
|
|
427
426
|
start(): Promise<void>;
|
|
428
427
|
stop(): void;
|
|
429
428
|
}
|
|
430
429
|
|
|
431
|
-
export { type Action, Agent, AgentRuntime, AgentSociety, type AsyncAction, type AsyncRule,
|
|
430
|
+
export { type Action, Agent, AgentRuntime, AgentSociety, type AsyncAction, type AsyncRule, BaseSpecification, ContextItem, DeveloperMessage, FunctionCall, FunctionCallOutput, type GenerativeModel, Gpt54, Gpt54Mini, Gpt54Nano, If, InMemoryModelContextRepository, InferenceRequest, InferenceResponse, type InferenceVisitor, InputTokenDetails, Loop, ModelContext, type ModelContextRepository, ModelMessage, OpenAIResponses, OutputTokenDetails, Reasoning, type Specification, TokenUsage, type Tool, UserMessage };
|
package/dist/index.d.ts
CHANGED
|
@@ -6,20 +6,21 @@ declare abstract class ContextItem {
|
|
|
6
6
|
abstract toJSON(): any;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
declare class
|
|
9
|
+
declare class ModelContext {
|
|
10
10
|
readonly id: string;
|
|
11
11
|
readonly projectId: string;
|
|
12
12
|
readonly items: ContextItem[];
|
|
13
13
|
constructor(id: string, projectId: string, items: ContextItem[]);
|
|
14
|
-
addItem(item: ContextItem):
|
|
15
|
-
applyModelOutput(items: ContextItem[]):
|
|
14
|
+
addItem(item: ContextItem): ModelContext;
|
|
15
|
+
applyModelOutput(items: ContextItem[]): ModelContext;
|
|
16
16
|
getItems(): ContextItem[];
|
|
17
|
-
|
|
17
|
+
getLastItem(): ContextItem;
|
|
18
|
+
static create(projectId: string): ModelContext;
|
|
18
19
|
static rehydrate(data: {
|
|
19
20
|
id: string;
|
|
20
21
|
projectId: string;
|
|
21
22
|
items: ContextItem[];
|
|
22
|
-
}):
|
|
23
|
+
}): ModelContext;
|
|
23
24
|
toJSON(): any;
|
|
24
25
|
}
|
|
25
26
|
|
|
@@ -147,10 +148,10 @@ declare class FunctionCallOutput extends ContextItem {
|
|
|
147
148
|
toJSON(): any;
|
|
148
149
|
}
|
|
149
150
|
|
|
150
|
-
interface
|
|
151
|
-
save(context:
|
|
152
|
-
get(id: string): Promise<
|
|
153
|
-
getByProjectId(projectId: string): Promise<
|
|
151
|
+
interface ModelContextRepository {
|
|
152
|
+
save(context: ModelContext): Promise<void>;
|
|
153
|
+
get(id: string): Promise<ModelContext>;
|
|
154
|
+
getByProjectId(projectId: string): Promise<ModelContext[]>;
|
|
154
155
|
}
|
|
155
156
|
|
|
156
157
|
interface ReasoningEffort<Effort extends string> {
|
|
@@ -175,8 +176,8 @@ interface ToolCallingCapability {
|
|
|
175
176
|
|
|
176
177
|
declare class InferenceRequest {
|
|
177
178
|
readonly model: GenerativeModel & ReasoningEffort<string> & ToolCallingCapability;
|
|
178
|
-
readonly context:
|
|
179
|
-
constructor(model: GenerativeModel & ReasoningEffort<string> & ToolCallingCapability, context:
|
|
179
|
+
readonly context: ModelContext;
|
|
180
|
+
constructor(model: GenerativeModel & ReasoningEffort<string> & ToolCallingCapability, context: ModelContext);
|
|
180
181
|
}
|
|
181
182
|
|
|
182
183
|
declare class InputTokenDetails {
|
|
@@ -211,7 +212,7 @@ declare class OpenAIResponses implements ModelRuntime {
|
|
|
211
212
|
constructor();
|
|
212
213
|
infer(inferenceRequest: InferenceRequest): Promise<InferenceResponse>;
|
|
213
214
|
extractTokenUsage(response: OpenAI.Responses.Response): TokenUsage | undefined;
|
|
214
|
-
mapContextToRequest(context:
|
|
215
|
+
mapContextToRequest(context: ModelContext): any[];
|
|
215
216
|
extractContextItems(response: any): ContextItem[];
|
|
216
217
|
}
|
|
217
218
|
|
|
@@ -271,17 +272,17 @@ declare class Gpt54Mini implements GenerativeModel, ReasoningEffort<OpenAIReason
|
|
|
271
272
|
getTools(): Tool[];
|
|
272
273
|
}
|
|
273
274
|
|
|
274
|
-
interface
|
|
275
|
+
interface Specification<T> {
|
|
275
276
|
isSatisfiedBy(candidate: T): boolean;
|
|
276
|
-
and(other:
|
|
277
|
-
or(other:
|
|
278
|
-
not():
|
|
277
|
+
and(other: Specification<T>): Specification<T>;
|
|
278
|
+
or(other: Specification<T>): Specification<T>;
|
|
279
|
+
not(): Specification<T>;
|
|
279
280
|
}
|
|
280
|
-
declare abstract class
|
|
281
|
+
declare abstract class BaseSpecification<T> implements Specification<T> {
|
|
281
282
|
abstract isSatisfiedBy(candidate: T): boolean;
|
|
282
|
-
and(other:
|
|
283
|
-
or(other:
|
|
284
|
-
not():
|
|
283
|
+
and(other: Specification<T>): Specification<T>;
|
|
284
|
+
or(other: Specification<T>): Specification<T>;
|
|
285
|
+
not(): Specification<T>;
|
|
285
286
|
}
|
|
286
287
|
|
|
287
288
|
interface Action<T> {
|
|
@@ -291,35 +292,35 @@ interface AsyncAction<T> {
|
|
|
291
292
|
apply(candidate: T): Promise<T>;
|
|
292
293
|
}
|
|
293
294
|
interface AsyncRule<T> {
|
|
294
|
-
|
|
295
|
+
specification: Specification<T>;
|
|
295
296
|
action: AsyncAction<T>;
|
|
296
297
|
apply(candidate: T): Promise<T>;
|
|
297
298
|
}
|
|
298
299
|
declare class If<T> implements AsyncRule<T> {
|
|
299
|
-
|
|
300
|
+
specification: Specification<T>;
|
|
300
301
|
action: AsyncAction<T>;
|
|
301
|
-
constructor({
|
|
302
|
-
|
|
302
|
+
constructor({ specification, action }: {
|
|
303
|
+
specification: Specification<T>;
|
|
303
304
|
action: AsyncAction<T>;
|
|
304
305
|
});
|
|
305
306
|
apply(candidate: T): Promise<T>;
|
|
306
307
|
}
|
|
307
308
|
declare class Loop<T> implements AsyncRule<T> {
|
|
308
|
-
|
|
309
|
+
specification: Specification<T>;
|
|
309
310
|
action: AsyncAction<T>;
|
|
310
|
-
constructor({
|
|
311
|
-
|
|
311
|
+
constructor({ specification, action }: {
|
|
312
|
+
specification: Specification<T>;
|
|
312
313
|
action: AsyncAction<T>;
|
|
313
314
|
});
|
|
314
315
|
apply(candidate: T): Promise<T>;
|
|
315
316
|
}
|
|
316
317
|
|
|
317
|
-
declare class
|
|
318
|
+
declare class InMemoryModelContextRepository implements ModelContextRepository {
|
|
318
319
|
private readonly store;
|
|
319
320
|
private readonly projectIndex;
|
|
320
|
-
save(context:
|
|
321
|
-
get(id: string): Promise<
|
|
322
|
-
getByProjectId(projectId: string): Promise<
|
|
321
|
+
save(context: ModelContext): Promise<void>;
|
|
322
|
+
get(id: string): Promise<ModelContext>;
|
|
323
|
+
getByProjectId(projectId: string): Promise<ModelContext[]>;
|
|
323
324
|
private clone;
|
|
324
325
|
}
|
|
325
326
|
|
|
@@ -370,10 +371,8 @@ interface RuntimeContext {
|
|
|
370
371
|
userMessage: UserMessage;
|
|
371
372
|
inferenceRequest?: InferenceRequest;
|
|
372
373
|
model: GenerativeModel & ReasoningEffort<string> & ToolCallingCapability;
|
|
373
|
-
context:
|
|
374
|
+
context: ModelContext;
|
|
374
375
|
inferenceResponse?: InferenceResponse;
|
|
375
|
-
functionCallOutput?: FunctionCallOutput;
|
|
376
|
-
modelMessage?: ModelMessage;
|
|
377
376
|
error?: Error;
|
|
378
377
|
}
|
|
379
378
|
|
|
@@ -381,12 +380,12 @@ declare class AgentRuntime {
|
|
|
381
380
|
private hooksRegistry;
|
|
382
381
|
private stateHandlerRegistry;
|
|
383
382
|
constructor();
|
|
384
|
-
onInferencePending(
|
|
385
|
-
onFunctionCallPending(
|
|
383
|
+
onInferencePending(runtimeContext: RuntimeContext): Promise<void>;
|
|
384
|
+
onFunctionCallPending(runtimeContext: RuntimeContext): Promise<void>;
|
|
386
385
|
onError(context: RuntimeContext): Promise<void>;
|
|
387
386
|
onModelMessageReceived(context: RuntimeContext): Promise<void>;
|
|
388
387
|
on(hookId: HookId, callback: (data: any) => Promise<void>): Promise<void>;
|
|
389
|
-
start(userMessage: UserMessage, model: GenerativeModel & ReasoningEffort<string> & ToolCallingCapability, context:
|
|
388
|
+
start(userMessage: UserMessage, model: GenerativeModel & ReasoningEffort<string> & ToolCallingCapability, context: ModelContext): Promise<void>;
|
|
390
389
|
}
|
|
391
390
|
|
|
392
391
|
interface InferenceVisitor {
|
|
@@ -414,7 +413,7 @@ declare class Agent {
|
|
|
414
413
|
onStart(context: RuntimeContext): Promise<void>;
|
|
415
414
|
setInferenceVisitor(visitor: InferenceVisitor): void;
|
|
416
415
|
setFunctionCallVisitor(visitor: FunctionCallVisitor): void;
|
|
417
|
-
run(userMessage: string, model: GenerativeModel & ReasoningEffort<string> & ToolCallingCapability, context:
|
|
416
|
+
run(userMessage: string, model: GenerativeModel & ReasoningEffort<string> & ToolCallingCapability, context: ModelContext): Promise<void>;
|
|
418
417
|
}
|
|
419
418
|
|
|
420
419
|
declare class AgentSociety {
|
|
@@ -423,9 +422,9 @@ declare class AgentSociety {
|
|
|
423
422
|
private isActive;
|
|
424
423
|
constructor(name: string);
|
|
425
424
|
join(agent: Agent): void;
|
|
426
|
-
enter(messageText: string, model: GenerativeModel & ReasoningEffort<string> & ToolCallingCapability, context:
|
|
425
|
+
enter(messageText: string, model: GenerativeModel & ReasoningEffort<string> & ToolCallingCapability, context: ModelContext): void;
|
|
427
426
|
start(): Promise<void>;
|
|
428
427
|
stop(): void;
|
|
429
428
|
}
|
|
430
429
|
|
|
431
|
-
export { type Action, Agent, AgentRuntime, AgentSociety, type AsyncAction, type AsyncRule,
|
|
430
|
+
export { type Action, Agent, AgentRuntime, AgentSociety, type AsyncAction, type AsyncRule, BaseSpecification, ContextItem, DeveloperMessage, FunctionCall, FunctionCallOutput, type GenerativeModel, Gpt54, Gpt54Mini, Gpt54Nano, If, InMemoryModelContextRepository, InferenceRequest, InferenceResponse, type InferenceVisitor, InputTokenDetails, Loop, ModelContext, type ModelContextRepository, ModelMessage, OpenAIResponses, OutputTokenDetails, Reasoning, type Specification, TokenUsage, type Tool, UserMessage };
|