@mozaik-ai/core 4.2.0-beta.12 → 4.2.0-beta.14
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 +31 -1
- package/dist/index.d.ts +31 -1
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -303,6 +303,15 @@ 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
|
+
}
|
|
306
315
|
|
|
307
316
|
type LoopControlDirective = InferenceDirective | ToolUseDirective | WaitDirective | CompleteDirective;
|
|
308
317
|
type InferenceDirective = {
|
|
@@ -325,6 +334,27 @@ type CompleteDirective = {
|
|
|
325
334
|
declare abstract class LoopAction {
|
|
326
335
|
abstract execute(agentLoop: AgentLoop): LoopControlDirective;
|
|
327
336
|
}
|
|
337
|
+
declare class RequestPreparationAction extends LoopAction {
|
|
338
|
+
private readonly request;
|
|
339
|
+
constructor(request: InferenceRequest);
|
|
340
|
+
execute(agentLoop: AgentLoop): LoopControlDirective;
|
|
341
|
+
}
|
|
342
|
+
declare class InferenceAction extends LoopAction {
|
|
343
|
+
execute(agentLoop: AgentLoop): LoopControlDirective;
|
|
344
|
+
}
|
|
345
|
+
declare class ToolUseAction extends LoopAction {
|
|
346
|
+
execute(agentLoop: AgentLoop): LoopControlDirective;
|
|
347
|
+
}
|
|
348
|
+
declare class CompleteAction extends LoopAction {
|
|
349
|
+
private reason;
|
|
350
|
+
constructor(reason: string);
|
|
351
|
+
execute(): LoopControlDirective;
|
|
352
|
+
}
|
|
353
|
+
declare class WaitAction extends LoopAction {
|
|
354
|
+
private reason;
|
|
355
|
+
constructor(reason: string);
|
|
356
|
+
execute(): LoopControlDirective;
|
|
357
|
+
}
|
|
328
358
|
|
|
329
359
|
type CreateLoopRuleParams = {
|
|
330
360
|
readonly priority?: number;
|
|
@@ -458,4 +488,4 @@ declare function defineAgentModule(config: AgentModuleConfig): {
|
|
|
458
488
|
runLoop: (loopId: string) => Promise<Loop>;
|
|
459
489
|
};
|
|
460
490
|
|
|
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 };
|
|
491
|
+
export { Agent, type AgentModuleConfig, type AgentRepository, AwaitingInference, AwaitingRequest, AwaitingToolOutput, CompleteAction, type GenerativeModel, InferenceAction, type InferenceRunner, type InferenceRunnerConfig, type LoopRepository, 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,15 @@ 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
|
+
}
|
|
306
315
|
|
|
307
316
|
type LoopControlDirective = InferenceDirective | ToolUseDirective | WaitDirective | CompleteDirective;
|
|
308
317
|
type InferenceDirective = {
|
|
@@ -325,6 +334,27 @@ type CompleteDirective = {
|
|
|
325
334
|
declare abstract class LoopAction {
|
|
326
335
|
abstract execute(agentLoop: AgentLoop): LoopControlDirective;
|
|
327
336
|
}
|
|
337
|
+
declare class RequestPreparationAction extends LoopAction {
|
|
338
|
+
private readonly request;
|
|
339
|
+
constructor(request: InferenceRequest);
|
|
340
|
+
execute(agentLoop: AgentLoop): LoopControlDirective;
|
|
341
|
+
}
|
|
342
|
+
declare class InferenceAction extends LoopAction {
|
|
343
|
+
execute(agentLoop: AgentLoop): LoopControlDirective;
|
|
344
|
+
}
|
|
345
|
+
declare class ToolUseAction extends LoopAction {
|
|
346
|
+
execute(agentLoop: AgentLoop): LoopControlDirective;
|
|
347
|
+
}
|
|
348
|
+
declare class CompleteAction extends LoopAction {
|
|
349
|
+
private reason;
|
|
350
|
+
constructor(reason: string);
|
|
351
|
+
execute(): LoopControlDirective;
|
|
352
|
+
}
|
|
353
|
+
declare class WaitAction extends LoopAction {
|
|
354
|
+
private reason;
|
|
355
|
+
constructor(reason: string);
|
|
356
|
+
execute(): LoopControlDirective;
|
|
357
|
+
}
|
|
328
358
|
|
|
329
359
|
type CreateLoopRuleParams = {
|
|
330
360
|
readonly priority?: number;
|
|
@@ -458,4 +488,4 @@ declare function defineAgentModule(config: AgentModuleConfig): {
|
|
|
458
488
|
runLoop: (loopId: string) => Promise<Loop>;
|
|
459
489
|
};
|
|
460
490
|
|
|
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 };
|
|
491
|
+
export { Agent, type AgentModuleConfig, type AgentRepository, AwaitingInference, AwaitingRequest, AwaitingToolOutput, CompleteAction, type GenerativeModel, InferenceAction, type InferenceRunner, type InferenceRunnerConfig, type LoopRepository, 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,17 @@ 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,
|
|
34
39
|
Participant: () => Participant,
|
|
40
|
+
RequestPreparationAction: () => RequestPreparationAction,
|
|
35
41
|
SituationSpecification: () => SituationSpecification,
|
|
36
42
|
SpaceEvent: () => SpaceEvent,
|
|
43
|
+
ToolUseAction: () => ToolUseAction,
|
|
44
|
+
WaitAction: () => WaitAction,
|
|
37
45
|
defineAgentModule: () => defineAgentModule,
|
|
38
46
|
defineRuntime: () => defineRuntime
|
|
39
47
|
});
|
|
@@ -587,6 +595,15 @@ var CompleteAction = class extends LoopAction {
|
|
|
587
595
|
return { type: "complete", reason: this.reason };
|
|
588
596
|
}
|
|
589
597
|
};
|
|
598
|
+
var WaitAction = class extends LoopAction {
|
|
599
|
+
constructor(reason) {
|
|
600
|
+
super();
|
|
601
|
+
this.reason = reason;
|
|
602
|
+
}
|
|
603
|
+
execute() {
|
|
604
|
+
return { type: "wait", reason: this.reason };
|
|
605
|
+
}
|
|
606
|
+
};
|
|
590
607
|
|
|
591
608
|
// src/domain/agent/loop/rule.ts
|
|
592
609
|
var LoopRule = class _LoopRule {
|
|
@@ -2614,9 +2631,17 @@ function defineAgentModule(config) {
|
|
|
2614
2631
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2615
2632
|
0 && (module.exports = {
|
|
2616
2633
|
Agent,
|
|
2634
|
+
AwaitingInference,
|
|
2635
|
+
AwaitingRequest,
|
|
2636
|
+
AwaitingToolOutput,
|
|
2637
|
+
CompleteAction,
|
|
2638
|
+
InferenceAction,
|
|
2617
2639
|
Participant,
|
|
2640
|
+
RequestPreparationAction,
|
|
2618
2641
|
SituationSpecification,
|
|
2619
2642
|
SpaceEvent,
|
|
2643
|
+
ToolUseAction,
|
|
2644
|
+
WaitAction,
|
|
2620
2645
|
defineAgentModule,
|
|
2621
2646
|
defineRuntime
|
|
2622
2647
|
});
|