@mozaik-ai/core 4.2.0-beta.13 → 4.2.0-beta.15
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/dist/index.d.mts +34 -1
- package/dist/index.d.ts +34 -1
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -303,6 +303,18 @@ declare abstract class LoopSpecification {
|
|
|
303
303
|
or(other: LoopSpecification): LoopSpecification;
|
|
304
304
|
not(): LoopSpecification;
|
|
305
305
|
}
|
|
306
|
+
declare class AwaitingInference extends LoopSpecification {
|
|
307
|
+
isSatisfiedBy(agentLoop: AgentLoop): boolean;
|
|
308
|
+
}
|
|
309
|
+
declare class AwaitingRequest extends LoopSpecification {
|
|
310
|
+
isSatisfiedBy(agentLoop: AgentLoop): boolean;
|
|
311
|
+
}
|
|
312
|
+
declare class AwaitingToolOutput extends LoopSpecification {
|
|
313
|
+
isSatisfiedBy(agentLoop: AgentLoop): boolean;
|
|
314
|
+
}
|
|
315
|
+
declare class ModelAnswered extends LoopSpecification {
|
|
316
|
+
isSatisfiedBy(agentLoop: AgentLoop): boolean;
|
|
317
|
+
}
|
|
306
318
|
|
|
307
319
|
type LoopControlDirective = InferenceDirective | ToolUseDirective | WaitDirective | CompleteDirective;
|
|
308
320
|
type InferenceDirective = {
|
|
@@ -325,6 +337,27 @@ type CompleteDirective = {
|
|
|
325
337
|
declare abstract class LoopAction {
|
|
326
338
|
abstract execute(agentLoop: AgentLoop): LoopControlDirective;
|
|
327
339
|
}
|
|
340
|
+
declare class RequestPreparationAction extends LoopAction {
|
|
341
|
+
private readonly request;
|
|
342
|
+
constructor(request: InferenceRequest);
|
|
343
|
+
execute(agentLoop: AgentLoop): LoopControlDirective;
|
|
344
|
+
}
|
|
345
|
+
declare class InferenceAction extends LoopAction {
|
|
346
|
+
execute(agentLoop: AgentLoop): LoopControlDirective;
|
|
347
|
+
}
|
|
348
|
+
declare class ToolUseAction extends LoopAction {
|
|
349
|
+
execute(agentLoop: AgentLoop): LoopControlDirective;
|
|
350
|
+
}
|
|
351
|
+
declare class CompleteAction extends LoopAction {
|
|
352
|
+
private reason;
|
|
353
|
+
constructor(reason: string);
|
|
354
|
+
execute(): LoopControlDirective;
|
|
355
|
+
}
|
|
356
|
+
declare class WaitAction extends LoopAction {
|
|
357
|
+
private reason;
|
|
358
|
+
constructor(reason: string);
|
|
359
|
+
execute(): LoopControlDirective;
|
|
360
|
+
}
|
|
328
361
|
|
|
329
362
|
type CreateLoopRuleParams = {
|
|
330
363
|
readonly priority?: number;
|
|
@@ -458,4 +491,4 @@ declare function defineAgentModule(config: AgentModuleConfig): {
|
|
|
458
491
|
runLoop: (loopId: string) => Promise<Loop>;
|
|
459
492
|
};
|
|
460
493
|
|
|
461
|
-
export { Agent, type AgentModuleConfig, type AgentRepository, type GenerativeModel, type InferenceRunner, type InferenceRunnerConfig, type LoopRepository, type ModelMessageItem, Participant, type SharedState, type SituationContext, type SituationHandler, type SituationProcessor, SituationSpecification, SpaceEvent, type Tool, type ToolUseRequest, type ToolUseResult, type ToolUseRunner, defineAgentModule, defineRuntime };
|
|
494
|
+
export { Agent, type AgentModuleConfig, type AgentRepository, AwaitingInference, AwaitingRequest, AwaitingToolOutput, CompleteAction, type GenerativeModel, InferenceAction, type InferenceRunner, type InferenceRunnerConfig, type LoopRepository, ModelAnswered, type ModelMessageItem, Participant, RequestPreparationAction, type SharedState, type SituationContext, type SituationHandler, type SituationProcessor, SituationSpecification, SpaceEvent, type Tool, ToolUseAction, type ToolUseRequest, type ToolUseResult, type ToolUseRunner, WaitAction, defineAgentModule, defineRuntime };
|
package/dist/index.d.ts
CHANGED
|
@@ -303,6 +303,18 @@ declare abstract class LoopSpecification {
|
|
|
303
303
|
or(other: LoopSpecification): LoopSpecification;
|
|
304
304
|
not(): LoopSpecification;
|
|
305
305
|
}
|
|
306
|
+
declare class AwaitingInference extends LoopSpecification {
|
|
307
|
+
isSatisfiedBy(agentLoop: AgentLoop): boolean;
|
|
308
|
+
}
|
|
309
|
+
declare class AwaitingRequest extends LoopSpecification {
|
|
310
|
+
isSatisfiedBy(agentLoop: AgentLoop): boolean;
|
|
311
|
+
}
|
|
312
|
+
declare class AwaitingToolOutput extends LoopSpecification {
|
|
313
|
+
isSatisfiedBy(agentLoop: AgentLoop): boolean;
|
|
314
|
+
}
|
|
315
|
+
declare class ModelAnswered extends LoopSpecification {
|
|
316
|
+
isSatisfiedBy(agentLoop: AgentLoop): boolean;
|
|
317
|
+
}
|
|
306
318
|
|
|
307
319
|
type LoopControlDirective = InferenceDirective | ToolUseDirective | WaitDirective | CompleteDirective;
|
|
308
320
|
type InferenceDirective = {
|
|
@@ -325,6 +337,27 @@ type CompleteDirective = {
|
|
|
325
337
|
declare abstract class LoopAction {
|
|
326
338
|
abstract execute(agentLoop: AgentLoop): LoopControlDirective;
|
|
327
339
|
}
|
|
340
|
+
declare class RequestPreparationAction extends LoopAction {
|
|
341
|
+
private readonly request;
|
|
342
|
+
constructor(request: InferenceRequest);
|
|
343
|
+
execute(agentLoop: AgentLoop): LoopControlDirective;
|
|
344
|
+
}
|
|
345
|
+
declare class InferenceAction extends LoopAction {
|
|
346
|
+
execute(agentLoop: AgentLoop): LoopControlDirective;
|
|
347
|
+
}
|
|
348
|
+
declare class ToolUseAction extends LoopAction {
|
|
349
|
+
execute(agentLoop: AgentLoop): LoopControlDirective;
|
|
350
|
+
}
|
|
351
|
+
declare class CompleteAction extends LoopAction {
|
|
352
|
+
private reason;
|
|
353
|
+
constructor(reason: string);
|
|
354
|
+
execute(): LoopControlDirective;
|
|
355
|
+
}
|
|
356
|
+
declare class WaitAction extends LoopAction {
|
|
357
|
+
private reason;
|
|
358
|
+
constructor(reason: string);
|
|
359
|
+
execute(): LoopControlDirective;
|
|
360
|
+
}
|
|
328
361
|
|
|
329
362
|
type CreateLoopRuleParams = {
|
|
330
363
|
readonly priority?: number;
|
|
@@ -458,4 +491,4 @@ declare function defineAgentModule(config: AgentModuleConfig): {
|
|
|
458
491
|
runLoop: (loopId: string) => Promise<Loop>;
|
|
459
492
|
};
|
|
460
493
|
|
|
461
|
-
export { Agent, type AgentModuleConfig, type AgentRepository, type GenerativeModel, type InferenceRunner, type InferenceRunnerConfig, type LoopRepository, type ModelMessageItem, Participant, type SharedState, type SituationContext, type SituationHandler, type SituationProcessor, SituationSpecification, SpaceEvent, type Tool, type ToolUseRequest, type ToolUseResult, type ToolUseRunner, defineAgentModule, defineRuntime };
|
|
494
|
+
export { Agent, type AgentModuleConfig, type AgentRepository, AwaitingInference, AwaitingRequest, AwaitingToolOutput, CompleteAction, type GenerativeModel, InferenceAction, type InferenceRunner, type InferenceRunnerConfig, type LoopRepository, ModelAnswered, type ModelMessageItem, Participant, RequestPreparationAction, type SharedState, type SituationContext, type SituationHandler, type SituationProcessor, SituationSpecification, SpaceEvent, type Tool, ToolUseAction, type ToolUseRequest, type ToolUseResult, type ToolUseRunner, WaitAction, defineAgentModule, defineRuntime };
|
package/dist/index.js
CHANGED
|
@@ -31,9 +31,18 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
33
|
Agent: () => Agent,
|
|
34
|
+
AwaitingInference: () => AwaitingInference,
|
|
35
|
+
AwaitingRequest: () => AwaitingRequest,
|
|
36
|
+
AwaitingToolOutput: () => AwaitingToolOutput,
|
|
37
|
+
CompleteAction: () => CompleteAction,
|
|
38
|
+
InferenceAction: () => InferenceAction,
|
|
39
|
+
ModelAnswered: () => ModelAnswered,
|
|
34
40
|
Participant: () => Participant,
|
|
41
|
+
RequestPreparationAction: () => RequestPreparationAction,
|
|
35
42
|
SituationSpecification: () => SituationSpecification,
|
|
36
43
|
SpaceEvent: () => SpaceEvent,
|
|
44
|
+
ToolUseAction: () => ToolUseAction,
|
|
45
|
+
WaitAction: () => WaitAction,
|
|
37
46
|
defineAgentModule: () => defineAgentModule,
|
|
38
47
|
defineRuntime: () => defineRuntime
|
|
39
48
|
});
|
|
@@ -587,6 +596,15 @@ var CompleteAction = class extends LoopAction {
|
|
|
587
596
|
return { type: "complete", reason: this.reason };
|
|
588
597
|
}
|
|
589
598
|
};
|
|
599
|
+
var WaitAction = class extends LoopAction {
|
|
600
|
+
constructor(reason) {
|
|
601
|
+
super();
|
|
602
|
+
this.reason = reason;
|
|
603
|
+
}
|
|
604
|
+
execute() {
|
|
605
|
+
return { type: "wait", reason: this.reason };
|
|
606
|
+
}
|
|
607
|
+
};
|
|
590
608
|
|
|
591
609
|
// src/domain/agent/loop/rule.ts
|
|
592
610
|
var LoopRule = class _LoopRule {
|
|
@@ -2614,9 +2632,18 @@ function defineAgentModule(config) {
|
|
|
2614
2632
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2615
2633
|
0 && (module.exports = {
|
|
2616
2634
|
Agent,
|
|
2635
|
+
AwaitingInference,
|
|
2636
|
+
AwaitingRequest,
|
|
2637
|
+
AwaitingToolOutput,
|
|
2638
|
+
CompleteAction,
|
|
2639
|
+
InferenceAction,
|
|
2640
|
+
ModelAnswered,
|
|
2617
2641
|
Participant,
|
|
2642
|
+
RequestPreparationAction,
|
|
2618
2643
|
SituationSpecification,
|
|
2619
2644
|
SpaceEvent,
|
|
2645
|
+
ToolUseAction,
|
|
2646
|
+
WaitAction,
|
|
2620
2647
|
defineAgentModule,
|
|
2621
2648
|
defineRuntime
|
|
2622
2649
|
});
|