@framers/agentos 0.1.49 → 0.1.50

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.
Files changed (86) hide show
  1. package/dist/api/AgentOS.d.ts +1 -53
  2. package/dist/api/AgentOS.d.ts.map +1 -1
  3. package/dist/api/AgentOS.js +5 -256
  4. package/dist/api/AgentOS.js.map +1 -1
  5. package/dist/api/AgentOSOrchestrator.d.ts +5 -276
  6. package/dist/api/AgentOSOrchestrator.d.ts.map +1 -1
  7. package/dist/api/AgentOSOrchestrator.js +107 -772
  8. package/dist/api/AgentOSOrchestrator.js.map +1 -1
  9. package/dist/api/StreamChunkEmitter.d.ts +32 -0
  10. package/dist/api/StreamChunkEmitter.d.ts.map +1 -0
  11. package/dist/api/StreamChunkEmitter.js +141 -0
  12. package/dist/api/StreamChunkEmitter.js.map +1 -0
  13. package/dist/api/TaskOutcomeTelemetryManager.d.ts +107 -0
  14. package/dist/api/TaskOutcomeTelemetryManager.d.ts.map +1 -0
  15. package/dist/api/TaskOutcomeTelemetryManager.js +331 -0
  16. package/dist/api/TaskOutcomeTelemetryManager.js.map +1 -0
  17. package/dist/api/errors.d.ts +17 -0
  18. package/dist/api/errors.d.ts.map +1 -0
  19. package/dist/api/errors.js +25 -0
  20. package/dist/api/errors.js.map +1 -0
  21. package/dist/api/turn-phases/conversation-history.d.ts +22 -0
  22. package/dist/api/turn-phases/conversation-history.d.ts.map +1 -0
  23. package/dist/api/turn-phases/conversation-history.js +55 -0
  24. package/dist/api/turn-phases/conversation-history.js.map +1 -0
  25. package/dist/api/turn-phases/index.d.ts +5 -0
  26. package/dist/api/turn-phases/index.d.ts.map +1 -0
  27. package/dist/api/turn-phases/index.js +5 -0
  28. package/dist/api/turn-phases/index.js.map +1 -0
  29. package/dist/api/turn-phases/long-term-memory.d.ts +35 -0
  30. package/dist/api/turn-phases/long-term-memory.d.ts.map +1 -0
  31. package/dist/api/turn-phases/long-term-memory.js +82 -0
  32. package/dist/api/turn-phases/long-term-memory.js.map +1 -0
  33. package/dist/api/turn-phases/prompt-profile.d.ts +22 -0
  34. package/dist/api/turn-phases/prompt-profile.d.ts.map +1 -0
  35. package/dist/api/turn-phases/prompt-profile.js +34 -0
  36. package/dist/api/turn-phases/prompt-profile.js.map +1 -0
  37. package/dist/api/turn-phases/rolling-summary.d.ts +28 -0
  38. package/dist/api/turn-phases/rolling-summary.d.ts.map +1 -0
  39. package/dist/api/turn-phases/rolling-summary.js +87 -0
  40. package/dist/api/turn-phases/rolling-summary.js.map +1 -0
  41. package/dist/api/types/OrchestratorConfig.d.ts +89 -0
  42. package/dist/api/types/OrchestratorConfig.d.ts.map +1 -0
  43. package/dist/api/types/OrchestratorConfig.js +6 -0
  44. package/dist/api/types/OrchestratorConfig.js.map +1 -0
  45. package/dist/core/agents/index.d.ts +7 -0
  46. package/dist/core/agents/index.d.ts.map +1 -0
  47. package/dist/core/agents/index.js +7 -0
  48. package/dist/core/agents/index.js.map +1 -0
  49. package/dist/core/ai_utilities/HybridUtilityAI.d.ts +54 -0
  50. package/dist/core/ai_utilities/HybridUtilityAI.d.ts.map +1 -1
  51. package/dist/core/ai_utilities/HybridUtilityAI.js +119 -1
  52. package/dist/core/ai_utilities/HybridUtilityAI.js.map +1 -1
  53. package/dist/core/ai_utilities/index.d.ts +5 -0
  54. package/dist/core/ai_utilities/index.d.ts.map +1 -0
  55. package/dist/core/ai_utilities/index.js +5 -0
  56. package/dist/core/ai_utilities/index.js.map +1 -0
  57. package/dist/core/audio/index.d.ts +5 -0
  58. package/dist/core/audio/index.d.ts.map +1 -0
  59. package/dist/core/audio/index.js +5 -0
  60. package/dist/core/audio/index.js.map +1 -0
  61. package/dist/core/conversation/index.d.ts +8 -0
  62. package/dist/core/conversation/index.d.ts.map +1 -0
  63. package/dist/core/conversation/index.js +8 -0
  64. package/dist/core/conversation/index.js.map +1 -0
  65. package/dist/core/index.d.ts +45 -0
  66. package/dist/core/index.d.ts.map +1 -0
  67. package/dist/core/index.js +66 -0
  68. package/dist/core/index.js.map +1 -0
  69. package/dist/core/orchestration/index.d.ts +6 -0
  70. package/dist/core/orchestration/index.d.ts.map +1 -0
  71. package/dist/core/orchestration/index.js +6 -0
  72. package/dist/core/orchestration/index.js.map +1 -0
  73. package/dist/core/streaming/AsyncStreamClientBridge.d.ts +29 -0
  74. package/dist/core/streaming/AsyncStreamClientBridge.d.ts.map +1 -0
  75. package/dist/core/streaming/AsyncStreamClientBridge.js +130 -0
  76. package/dist/core/streaming/AsyncStreamClientBridge.js.map +1 -0
  77. package/dist/core/streaming/index.d.ts +4 -0
  78. package/dist/core/streaming/index.d.ts.map +1 -0
  79. package/dist/core/streaming/index.js +4 -0
  80. package/dist/core/streaming/index.js.map +1 -0
  81. package/dist/core/tools/index.d.ts +13 -0
  82. package/dist/core/tools/index.d.ts.map +1 -0
  83. package/dist/core/tools/index.js +8 -0
  84. package/dist/core/tools/index.js.map +1 -0
  85. package/dist/speech/providers/BuiltInAdaptiveVadProvider.d.ts +1 -1
  86. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"long-term-memory.js","sourceRoot":"","sources":["../../../src/api/turn-phases/long-term-memory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACL,+BAA+B,GAEhC,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,6CAA6C,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAqB,MAAM,gCAAgC,CAAC;AAkCvF,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAC9C,KAA+B;IAE/B,MAAM,EACJ,mBAAmB,EACnB,uBAAuB,EACvB,oBAAoB,GACrB,GAAG,KAAK,CAAC;IAEV,MAAM,aAAa,GAAG,OAAO,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;IAC7D,MAAM,SAAS,GACb,OAAO,CAAC,oBAAoB,EAAE,MAAM,EAAE,IAAI,CAAC;QAC3C,OAAO,CAAC,oBAAoB,E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,WAAW,GAAG,eAAe,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;gBACjD,WAAW,GAAG,eAAe,CAAC,WAAW,CAAC;YAC5C,CAAC;YAED,mBAAmB,CAAC,WAAW,CAAC,8BAA8B,EAAE;gBAC9D,oBAAoB,EAAE,aAAa;gBACnC,cAAc,EAAE,IAAI,CAAC,GAAG,EAAE;aACY,CAAC,CAAC;QAC5C,CAAC;aAAM,IAAI,YAAY,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAClD,YAAY,GAAG,aAAa,CAAC;QAC/B,CAAC;QAED,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC;IAClE,CAAC;IAAC,OAAO,cAAmB,EAAE,CAAC;QAC7B,OAAO,CAAC,IAAI,CACV,gDAAgD,KAAK,CAAC,QAAQ,2BAA2B,EACzF,cAAc,CACf,CAAC;QACF,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY,EAAE,iBAAiB,EAAE,CAAC;IAC5G,CAAC;AACH,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @fileoverview Prompt profile routing phase.
3
+ * Selects a prompt profile (concise/deep/planner/reviewer) based on conversation state.
4
+ */
5
+ import type { ConversationContext } from '../../core/conversation/ConversationContext';
6
+ import { type PromptProfileConfig } from '../../core/prompting/PromptProfileRouter';
7
+ import { type GMITurnInput } from '../../cognitive_substrate/IGMI';
8
+ export interface PromptProfilePhaseInput {
9
+ conversationContext: ConversationContext | undefined;
10
+ promptProfileConfig: PromptProfileConfig | null;
11
+ modeForRouting: string;
12
+ gmiInput: GMITurnInput;
13
+ didCompact: boolean;
14
+ }
15
+ export interface PromptProfileSelection {
16
+ presetId: string;
17
+ systemInstructions?: string;
18
+ reason?: string;
19
+ }
20
+ export type PromptProfilePhaseResult = PromptProfileSelection | null;
21
+ export declare function executePromptProfilePhase(input: PromptProfilePhaseInput): PromptProfilePhaseResult;
22
+ //# sourceMappingURL=prompt-profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-profile.d.ts","sourceRoot":"","sources":["../../../src/api/turn-phases/prompt-profile.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AACvF,OAAO,EAEL,KAAK,mBAAmB,EAEzB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAEvF,MAAM,WAAW,uBAAuB;IACtC,mBAAmB,EAAE,mBAAmB,GAAG,SAAS,CAAC;IACrD,mBAAmB,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAChD,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,YAAY,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,wBAAwB,GAAG,sBAAsB,GAAG,IAAI,CAAC;AAErE,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,uBAAuB,GAC7B,wBAAwB,CAkC1B"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * @fileoverview Prompt profile routing phase.
3
+ * Selects a prompt profile (concise/deep/planner/reviewer) based on conversation state.
4
+ */
5
+ import { selectPromptProfile, } from '../../core/prompting/PromptProfileRouter.js';
6
+ import { GMIInteractionType } from '../../cognitive_substrate/IGMI.js';
7
+ export function executePromptProfilePhase(input) {
8
+ if (!input.conversationContext || !input.promptProfileConfig)
9
+ return null;
10
+ try {
11
+ const rawPrev = input.conversationContext.getMetadata('promptProfileState');
12
+ const previousState = rawPrev && typeof rawPrev === 'object' && typeof rawPrev.presetId === 'string'
13
+ ? rawPrev
14
+ : null;
15
+ const userMessage = input.gmiInput.type === GMIInteractionType.TEXT && typeof input.gmiInput.content === 'string'
16
+ ? input.gmiInput.content
17
+ : input.gmiInput.type === GMIInteractionType.MULTIMODAL_CONTENT
18
+ ? JSON.stringify(input.gmiInput.content)
19
+ : '';
20
+ const selection = selectPromptProfile(input.promptProfileConfig, {
21
+ conversationId: input.conversationContext.sessionId,
22
+ mode: input.modeForRouting,
23
+ userMessage,
24
+ didCompact: input.didCompact,
25
+ }, previousState);
26
+ input.conversationContext.setMetadata('promptProfileState', selection.nextState);
27
+ return selection.result;
28
+ }
29
+ catch (routerError) {
30
+ console.warn('Prompt-profile routing failed (continuing without it).', routerError);
31
+ return null;
32
+ }
33
+ }
34
+ //# sourceMappingURL=prompt-profile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-profile.js","sourceRoot":"","sources":["../../../src/api/turn-phases/prompt-profile.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACL,mBAAmB,GAGpB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAqB,MAAM,gCAAgC,CAAC;AAkBvF,MAAM,UAAU,yBAAyB,CACvC,KAA8B;IAE9B,IAAI,CAAC,KAAK,CAAC,mBAAmB,IAAI,CAAC,KAAK,CAAC,mBAAmB;QAAE,OAAO,IAAI,CAAC;IAE1E,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,KAAK,CAAC,mBAAmB,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC;QAC5E,MAAM,aAAa,GACjB,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAQ,OAAe,CAAC,QAAQ,KAAK,QAAQ;YACrF,CAAC,CAAE,OAA0C;YAC7C,CAAC,CAAC,IAAI,CAAC;QAEX,MAAM,WAAW,GACf,KAAK,CAAC,QAAQ,CAAC,IAAI,KAAK,kBAAkB,CAAC,IAAI,IAAI,OAAO,KAAK,CAAC,QAAQ,CAAC,OAAO,KAAK,QAAQ;YAC3F,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO;YACxB,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,KAAK,kBAAkB,CAAC,kBAAkB;gBAC7D,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC;gBACxC,CAAC,CAAC,EAAE,CAAC;QAEX,MAAM,SAAS,GAAG,mBAAmB,CACnC,KAAK,CAAC,mBAAmB,EACzB;YACE,cAAc,EAAE,KAAK,CAAC,mBAAmB,CAAC,SAAS;YACnD,IAAI,EAAE,KAAK,CAAC,cAAc;YAC1B,WAAW;YACX,UAAU,EAAE,KAAK,CAAC,UAAU;SAC7B,EACD,aAAa,CACd,CAAC;QAEF,KAAK,CAAC,mBAAmB,CAAC,WAAW,CAAC,oBAAoB,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QACjF,OAAO,SAAS,CAAC,MAAM,CAAC;IAC1B,CAAC;IAAC,OAAO,WAAgB,EAAE,CAAC;QAC1B,OAAO,CAAC,IAAI,CAAC,wDAAwD,EAAE,WAAW,CAAC,CAAC;QACpF,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @fileoverview Rolling summary compaction phase.
3
+ * Selects a compaction profile and runs maybeCompactConversationMessages.
4
+ */
5
+ import type { ConversationContext } from '../../core/conversation/ConversationContext';
6
+ import type { AIModelProviderManager } from '../../core/llm/providers/AIModelProviderManager';
7
+ import { type RollingSummaryCompactionConfig, type RollingSummaryCompactionResult } from '../../core/conversation/RollingSummaryCompactor';
8
+ import type { RollingSummaryCompactionProfilesConfig } from '../types/OrchestratorConfig';
9
+ export interface RollingSummaryPhaseInput {
10
+ conversationContext: ConversationContext | undefined;
11
+ modeForRouting: string;
12
+ streamId: string;
13
+ /** Base compaction config from orchestrator config (may be null/disabled). */
14
+ rollingSummaryCompactionConfig: RollingSummaryCompactionConfig | null;
15
+ rollingSummaryCompactionProfilesConfig: RollingSummaryCompactionProfilesConfig | null;
16
+ rollingSummarySystemPrompt: string;
17
+ rollingSummaryStateKey: string;
18
+ modelProviderManager: AIModelProviderManager;
19
+ }
20
+ export interface RollingSummaryPhaseResult {
21
+ result: RollingSummaryCompactionResult | null;
22
+ profileId: string | null;
23
+ configForTurn: RollingSummaryCompactionConfig | null;
24
+ enabled: boolean;
25
+ summaryText: string;
26
+ }
27
+ export declare function executeRollingSummaryPhase(input: RollingSummaryPhaseInput): Promise<RollingSummaryPhaseResult>;
28
+ //# sourceMappingURL=rolling-summary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolling-summary.d.ts","sourceRoot":"","sources":["../../../src/api/turn-phases/rolling-summary.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AACvF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iDAAiD,CAAC;AAC9F,OAAO,EAEL,KAAK,8BAA8B,EACnC,KAAK,8BAA8B,EACpC,MAAM,iDAAiD,CAAC;AACzD,OAAO,KAAK,EAAE,sCAAsC,EAAE,MAAM,6BAA6B,CAAC;AAe1F,MAAM,WAAW,wBAAwB;IACvC,mBAAmB,EAAE,mBAAmB,GAAG,SAAS,CAAC;IACrD,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,8BAA8B,EAAE,8BAA8B,GAAG,IAAI,CAAC;IACtE,sCAAsC,EAAE,sCAAsC,GAAG,IAAI,CAAC;IACtF,0BAA0B,EAAE,MAAM,CAAC;IACnC,sBAAsB,EAAE,MAAM,CAAC;IAC/B,oBAAoB,EAAE,sBAAsB,CAAC;CAC9C;AAED,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,8BAA8B,GAAG,IAAI,CAAC;IAC9C,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,aAAa,EAAE,8BAA8B,GAAG,IAAI,CAAC;IACrD,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAsB,0BAA0B,CAC9C,KAAK,EAAE,wBAAwB,GAC9B,OAAO,CAAC,yBAAyB,CAAC,CAmFpC"}
@@ -0,0 +1,87 @@
1
+ /**
2
+ * @fileoverview Rolling summary compaction phase.
3
+ * Selects a compaction profile and runs maybeCompactConversationMessages.
4
+ */
5
+ import { maybeCompactConversationMessages, } from '../../core/conversation/RollingSummaryCompactor.js';
6
+ /** Picks a profile ID by matching `mode` against keys in a map (prefix/substring match). */
7
+ function pickByMode(map, mode) {
8
+ if (!map || Object.keys(map).length === 0)
9
+ return null;
10
+ const modeNorm = mode.trim().toLowerCase();
11
+ const exact = map[modeNorm];
12
+ if (exact)
13
+ return exact;
14
+ const match = Object.entries(map)
15
+ .map(([key, value]) => ({ key: key.trim().toLowerCase(), value }))
16
+ .filter(({ key }) => key && (modeNorm === key || modeNorm.startsWith(key) || modeNorm.includes(key)))
17
+ .sort((a, b) => b.key.length - a.key.length)[0];
18
+ return match?.value ?? null;
19
+ }
20
+ export async function executeRollingSummaryPhase(input) {
21
+ let configForTurn = input.rollingSummaryCompactionConfig;
22
+ let systemPromptForTurn = input.rollingSummarySystemPrompt;
23
+ let profileId = null;
24
+ // Select profile if profiles config is provided
25
+ if (input.rollingSummaryCompactionProfilesConfig) {
26
+ const profilesConfig = input.rollingSummaryCompactionProfilesConfig;
27
+ const picked = pickByMode(profilesConfig.defaultProfileByMode, input.modeForRouting) ??
28
+ profilesConfig.defaultProfileId;
29
+ profileId = picked;
30
+ const profile = profilesConfig.profiles?.[picked];
31
+ if (profile?.config)
32
+ configForTurn = profile.config;
33
+ if (profile?.systemPrompt)
34
+ systemPromptForTurn = profile.systemPrompt;
35
+ }
36
+ let result = null;
37
+ if (input.conversationContext && configForTurn) {
38
+ try {
39
+ const llmCaller = async (call) => {
40
+ const providerIdResolved = call.providerId ||
41
+ input.modelProviderManager.getProviderForModel(call.modelId)?.providerId ||
42
+ input.modelProviderManager.getDefaultProvider()?.providerId;
43
+ if (!providerIdResolved) {
44
+ throw new Error(`No provider resolved for rolling-summary model '${call.modelId}'.`);
45
+ }
46
+ const provider = input.modelProviderManager.getProvider(providerIdResolved);
47
+ if (!provider) {
48
+ throw new Error(`Provider '${providerIdResolved}' not found for rolling-summary compaction.`);
49
+ }
50
+ const response = await provider.generateCompletion(call.modelId, call.messages, call.options);
51
+ const choice = response?.choices?.[0];
52
+ const responseContent = choice?.message?.content ?? choice?.text ?? '';
53
+ if (typeof responseContent === 'string')
54
+ return responseContent.trim();
55
+ if (Array.isArray(responseContent)) {
56
+ return responseContent
57
+ .map((part) => (typeof part?.text === 'string' ? part.text : ''))
58
+ .filter(Boolean)
59
+ .join('\n')
60
+ .trim();
61
+ }
62
+ return String(responseContent ?? '').trim();
63
+ };
64
+ const stateKey = input.rollingSummaryStateKey;
65
+ const compaction = await maybeCompactConversationMessages({
66
+ messages: input.conversationContext.getAllMessages(),
67
+ sessionMetadata: input.conversationContext.getAllMetadata(),
68
+ config: configForTurn,
69
+ llmCaller: ({ providerId, modelId, messages, options }) => llmCaller({ providerId, modelId, messages, options }),
70
+ systemPrompt: systemPromptForTurn,
71
+ stateKey,
72
+ });
73
+ result = compaction;
74
+ if (compaction.updatedSessionMetadata &&
75
+ Object.prototype.hasOwnProperty.call(compaction.updatedSessionMetadata, stateKey)) {
76
+ input.conversationContext.setMetadata(stateKey, compaction.updatedSessionMetadata[stateKey]);
77
+ }
78
+ }
79
+ catch (compactionError) {
80
+ console.warn(`Rolling summary compaction failed for stream ${input.streamId} (continuing without it).`, compactionError);
81
+ }
82
+ }
83
+ const enabled = Boolean(configForTurn?.enabled);
84
+ const summaryText = enabled && typeof result?.summaryText === 'string' ? result.summaryText.trim() : '';
85
+ return { result, profileId, configForTurn, enabled, summaryText };
86
+ }
87
+ //# sourceMappingURL=rolling-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AO,EAAE,EAAE,EAAE,CACxD,SAAS,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;gBACvD,YAAY,EAAE,mBAAmB;gBACjC,QAAQ;aACT,CAAC,CAAC;YAEH,MAAM,GAAG,UAAU,CAAC;YACpB,IACE,UAAU,CAAC,sBAAsB;gBACjC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,sBAAsB,EAAE,QAAQ,CAAC,EACjF,CAAC;gBACD,KAAK,CAAC,mBAAmB,CAAC,WAAW,CAAC,QAAQ,EAAG,UAAU,CAAC,sBAA8B,CAAC,QAAQ,CAAC,CAAC,CAAC;YACxG,CAAC;QACH,CAAC;QAAC,OAAO,eAAoB,EAAE,CAAC;YAC9B,OAAO,CAAC,IAAI,CACV,gDAAgD,KAAK,CAAC,QAAQ,2BAA2B,EACzF,eAAe,CAChB,CAAC;QACJ,CAAC;IACH,CAAC;IAED,MAAM,OAAO,GAAG,OAAO,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IAChD,MAAM,WAAW,GACf,OAAO,IAAI,OAAO,MAAM,EAAE,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAEtF,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;AACpE,CAAC"}
@@ -0,0 +1,89 @@
1
+ /**
2
+ * @fileoverview Configuration types for the AgentOSOrchestrator.
3
+ * Extracted from AgentOSOrchestrator.ts for readability.
4
+ */
5
+ import type { RollingSummaryCompactionConfig } from '../../core/conversation/RollingSummaryCompactor';
6
+ import type { PromptProfileConfig } from '../../core/prompting/PromptProfileRouter';
7
+ import type { GMIManager } from '../../cognitive_substrate/GMIManager';
8
+ import type { IToolOrchestrator } from '../../core/tools/IToolOrchestrator';
9
+ import type { ConversationManager } from '../../core/conversation/ConversationManager';
10
+ import type { StreamingManager } from '../../core/streaming/StreamingManager';
11
+ import type { AIModelProviderManager } from '../../core/llm/providers/AIModelProviderManager';
12
+ import type { ITurnPlanner } from '../../core/orchestration/TurnPlanner';
13
+ import type { IRollingSummaryMemorySink } from '../../core/conversation/IRollingSummaryMemorySink';
14
+ import type { ILongTermMemoryRetriever } from '../../core/conversation/ILongTermMemoryRetriever';
15
+ export interface RollingSummaryCompactionProfileDefinition {
16
+ config: RollingSummaryCompactionConfig;
17
+ systemPrompt?: string;
18
+ }
19
+ export interface RollingSummaryCompactionProfilesConfig {
20
+ defaultProfileId: string;
21
+ defaultProfileByMode?: Record<string, string>;
22
+ profiles: Record<string, RollingSummaryCompactionProfileDefinition>;
23
+ }
24
+ export type LongTermMemoryRecallProfile = 'aggressive' | 'balanced' | 'conservative';
25
+ export interface AgentOSLongTermMemoryRecallConfig {
26
+ profile?: LongTermMemoryRecallProfile;
27
+ cadenceTurns?: number;
28
+ forceOnCompaction?: boolean;
29
+ maxContextChars?: number;
30
+ topKByScope?: Partial<Record<'user' | 'persona' | 'organization', number>>;
31
+ }
32
+ export type TenantRoutingMode = 'multi_tenant' | 'single_tenant';
33
+ export interface AgentOSTenantRoutingConfig {
34
+ mode?: TenantRoutingMode;
35
+ defaultOrganizationId?: string;
36
+ strictOrganizationIsolation?: boolean;
37
+ }
38
+ export type TaskOutcomeTelemetryScope = 'global' | 'organization' | 'organization_persona';
39
+ export interface AgentOSTaskOutcomeTelemetryConfig {
40
+ enabled?: boolean;
41
+ rollingWindowSize?: number;
42
+ scope?: TaskOutcomeTelemetryScope;
43
+ emitAlerts?: boolean;
44
+ alertBelowWeightedSuccessRate?: number;
45
+ alertMinSamples?: number;
46
+ alertCooldownMs?: number;
47
+ }
48
+ export interface AgentOSAdaptiveExecutionConfig {
49
+ enabled?: boolean;
50
+ minSamples?: number;
51
+ minWeightedSuccessRate?: number;
52
+ forceAllToolsWhenDegraded?: boolean;
53
+ forceFailOpenWhenDegraded?: boolean;
54
+ }
55
+ export type TaskOutcomeKpiWindowEntry = {
56
+ status: 'success' | 'partial' | 'failed';
57
+ score: number;
58
+ timestamp: number;
59
+ };
60
+ export interface ITaskOutcomeTelemetryStore {
61
+ loadWindows(): Promise<Record<string, TaskOutcomeKpiWindowEntry[]>>;
62
+ saveWindow(scopeKey: string, entries: TaskOutcomeKpiWindowEntry[]): Promise<void>;
63
+ }
64
+ export interface AgentOSOrchestratorConfig {
65
+ maxToolCallIterations?: number;
66
+ defaultAgentTurnTimeoutMs?: number;
67
+ enableConversationalPersistence?: boolean;
68
+ promptProfileConfig?: PromptProfileConfig | null;
69
+ rollingSummaryCompactionConfig?: RollingSummaryCompactionConfig | null;
70
+ rollingSummaryCompactionProfilesConfig?: RollingSummaryCompactionProfilesConfig | null;
71
+ rollingSummarySystemPrompt?: string;
72
+ rollingSummaryStateKey?: string;
73
+ longTermMemoryRecall?: AgentOSLongTermMemoryRecallConfig;
74
+ tenantRouting?: AgentOSTenantRoutingConfig;
75
+ taskOutcomeTelemetry?: AgentOSTaskOutcomeTelemetryConfig;
76
+ adaptiveExecution?: AgentOSAdaptiveExecutionConfig;
77
+ }
78
+ export interface AgentOSOrchestratorDependencies {
79
+ gmiManager: GMIManager;
80
+ toolOrchestrator: IToolOrchestrator;
81
+ conversationManager: ConversationManager;
82
+ streamingManager: StreamingManager;
83
+ modelProviderManager: AIModelProviderManager;
84
+ turnPlanner?: ITurnPlanner;
85
+ rollingSummaryMemorySink?: IRollingSummaryMemorySink;
86
+ longTermMemoryRetriever?: ILongTermMemoryRetriever;
87
+ taskOutcomeTelemetryStore?: ITaskOutcomeTelemetryStore;
88
+ }
89
+ //# sourceMappingURL=OrchestratorConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OrchestratorConfig.d.ts","sourceRoot":"","sources":["../../../src/api/types/OrchestratorConfig.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,8BAA8B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/B,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,+BAA+B,CAAC,EAAE,OAAO,CAAC;IAC1C,mBAAmB,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACjD,8BAA8B,CAAC,EAAE,8BAA8B,GAAG,IAAI,CAAC;IACvE,sCAAsC,CAAC,EAAE,sCAAsC,GAAG,IAAI,CAAC;IACvF,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,oBAAoB,CAAC,EAAE,iCAAiC,CAAC;IACzD,aAAa,CAAC,EAAE,0BAA0B,CAAC;IAC3C,oBAAoB,CAAC,EAAE,iCAAiC,CAAC;IACzD,iBAAiB,CAAC,EAAE,8BAA8B,CAAC;CACpD;AAED,MAAM,WAAW,+BAA+B;IAC9C,UAAU,EAAE,UAAU,CAAC;IACvB,gBAAgB,EAAE,iBAAiB,CAAC;IACpC,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,oBAAoB,EAAE,sBAAsB,CAAC;IAC7C,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B,wBAAwB,CAAC,EAAE,yBAAyB,CAAC;IACrD,uBAAuB,CAAC,EAAE,wBAAwB,CAAC;IACnD,yBAAyB,CAAC,EAAE,0BAA0B,CAAC;CACxD"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @fileoverview Configuration types for the AgentOSOrchestrator.
3
+ * Extracted from AgentOSOrchestrator.ts for readability.
4
+ */
5
+ export {};
6
+ //# sourceMappingURL=OrchestratorConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OrchestratorConfig.js","sourceRoot":"","sources":["../../../src/api/types/OrchestratorConfig.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
@@ -0,0 +1,7 @@
1
+ export * from './IAgent.js';
2
+ export * from './IAgentFactory.js';
3
+ export * from './AgentCore.js';
4
+ export * from './AgentFactory.js';
5
+ export * from './AgentPoolAgent.js';
6
+ export * from './AgentPoolConfig.js';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/agents/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,7 @@
1
+ export * from './IAgent.js';
2
+ export * from './IAgentFactory.js';
3
+ export * from './AgentCore.js';
4
+ export * from './AgentFactory.js';
5
+ export * from './AgentPoolAgent.js';
6
+ export * from './AgentPoolConfig.js';
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/agents/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC"}
@@ -1 +1,55 @@
1
+ /**
2
+ * @fileoverview Hybrid IUtilityAI that delegates to LLM-based or statistical
3
+ * implementations depending on the task. LLM methods are preferred for
4
+ * summarization, classification, and keyword extraction; statistical methods
5
+ * for tokenization, stemming, n-grams, readability, and similarity.
6
+ *
7
+ * Falls back gracefully: if one backend is unavailable, the other is tried.
8
+ */
9
+ import type { IUtilityAI, UtilityAIConfigBase, ParseJsonOptions, SummarizationOptions, ClassificationOptions, ClassificationResult, KeywordExtractionOptions, TokenizationOptions, StemmingOptions, SimilarityOptions, SentimentAnalysisOptions, SentimentResult, LanguageDetectionOptions, LanguageDetectionResult, TextNormalizationOptions, NGramOptions, ReadabilityOptions, ReadabilityResult } from './IUtilityAI';
10
+ export interface HybridUtilityAIConfig extends UtilityAIConfigBase {
11
+ /** LLM-based implementation (used for generative tasks). */
12
+ llm?: IUtilityAI;
13
+ /** Statistical/NLP implementation (used for deterministic tasks). */
14
+ statistical?: IUtilityAI;
15
+ }
16
+ /**
17
+ * Routes each utility method to the most appropriate backend:
18
+ * - **LLM**: summarization, classification, keyword extraction, JSON repair
19
+ * - **Statistical**: tokenization, stemming, n-grams, readability, similarity
20
+ * - **Either with preference**: sentiment, language detection
21
+ *
22
+ * If the preferred backend is unavailable, falls back to the other.
23
+ */
24
+ export declare class HybridUtilityAI implements IUtilityAI {
25
+ readonly utilityId: string;
26
+ private readonly llm;
27
+ private readonly stat;
28
+ constructor(config: HybridUtilityAIConfig);
29
+ initialize(config: UtilityAIConfigBase & Record<string, any>): Promise<void>;
30
+ private preferLLM;
31
+ private preferStat;
32
+ summarize(textToSummarize: string, options?: SummarizationOptions): Promise<string>;
33
+ classifyText(textToClassify: string, options: ClassificationOptions): Promise<ClassificationResult>;
34
+ extractKeywords(textToAnalyze: string, options?: KeywordExtractionOptions): Promise<string[]>;
35
+ parseJsonSafe<T = any>(jsonString: string, options?: ParseJsonOptions<T>): Promise<T | null>;
36
+ tokenize(text: string, options?: TokenizationOptions): Promise<string[]>;
37
+ stemTokens(tokens: string[], options?: StemmingOptions): Promise<string[]>;
38
+ normalizeText(text: string, options?: TextNormalizationOptions): Promise<string>;
39
+ generateNGrams(tokens: string[], options: NGramOptions): Promise<Record<number, string[][]>>;
40
+ calculateReadability(text: string, options: ReadabilityOptions): Promise<ReadabilityResult>;
41
+ calculateSimilarity(text1: string, text2: string, options?: SimilarityOptions): Promise<number>;
42
+ analyzeSentiment(text: string, options?: SentimentAnalysisOptions): Promise<SentimentResult>;
43
+ detectLanguage(text: string, options?: LanguageDetectionOptions): Promise<LanguageDetectionResult[]>;
44
+ checkHealth(): Promise<{
45
+ isHealthy: boolean;
46
+ details?: any;
47
+ dependencies?: Array<{
48
+ name: string;
49
+ isHealthy: boolean;
50
+ details?: any;
51
+ }>;
52
+ }>;
53
+ shutdown(): Promise<void>;
54
+ }
1
55
  //# sourceMappingURL=HybridUtilityAI.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HybridUtilityAI.d.ts","sourceRoot":"","sources":["../../../src/core/ai_utilities/HybridUtilityAI.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"HybridUtilityAI.d.ts","sourceRoot":"","sources":["../../../src/core/ai_utilities/HybridUtilityAI.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,UAAU,EACV,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,wBAAwB,EACxB,eAAe,EACf,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,EACxB,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB;IAChE,4DAA4D;IAC5D,GAAG,CAAC,EAAE,UAAU,CAAC;IACjB,qEAAqE;IACrE,WAAW,CAAC,EAAE,UAAU,CAAC;CAC1B;AAED;;;;;;;GAOG;AACH,qBAAa,eAAgB,YAAW,UAAU;IAChD,SAAgB,SAAS,EAAE,MAAM,CAAC;IAClC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAyB;IAC7C,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAyB;gBAElC,MAAM,EAAE,qBAAqB;IASnC,UAAU,CAAC,MAAM,EAAE,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAOlF,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,UAAU;IAMZ,SAAS,CAAC,eAAe,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC;IAInF,YAAY,CAAC,cAAc,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W,IAAI,OAAO,CAAC;QAAE,SAAS,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,GAAG,CAAC;QAAC,YAAY,CAAC,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,OAAO,CAAC;YAAC,OAAO,CAAC,EAAE,GAAG,CAAA;SAAE,CAAC,CAAA;KAAE,CAAC;IAwBxI,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAMhC"}
@@ -1,2 +1,120 @@
1
- "use strict";
1
+ /**
2
+ * @fileoverview Hybrid IUtilityAI that delegates to LLM-based or statistical
3
+ * implementations depending on the task. LLM methods are preferred for
4
+ * summarization, classification, and keyword extraction; statistical methods
5
+ * for tokenization, stemming, n-grams, readability, and similarity.
6
+ *
7
+ * Falls back gracefully: if one backend is unavailable, the other is tried.
8
+ */
9
+ /**
10
+ * Routes each utility method to the most appropriate backend:
11
+ * - **LLM**: summarization, classification, keyword extraction, JSON repair
12
+ * - **Statistical**: tokenization, stemming, n-grams, readability, similarity
13
+ * - **Either with preference**: sentiment, language detection
14
+ *
15
+ * If the preferred backend is unavailable, falls back to the other.
16
+ */
17
+ export class HybridUtilityAI {
18
+ constructor(config) {
19
+ this.llm = config.llm;
20
+ this.stat = config.statistical;
21
+ if (!this.llm && !this.stat) {
22
+ throw new Error('HybridUtilityAI requires at least one backend (llm or statistical)');
23
+ }
24
+ this.utilityId = config.utilityId ?? `hybrid-${this.llm?.utilityId ?? 'none'}-${this.stat?.utilityId ?? 'none'}`;
25
+ }
26
+ async initialize(config) {
27
+ await Promise.all([
28
+ this.llm?.initialize?.(config),
29
+ this.stat?.initialize?.(config),
30
+ ]);
31
+ }
32
+ preferLLM() {
33
+ return this.llm ?? this.stat;
34
+ }
35
+ preferStat() {
36
+ return this.stat ?? this.llm;
37
+ }
38
+ // --- LLM-preferred methods ---
39
+ async summarize(textToSummarize, options) {
40
+ return this.preferLLM().summarize(textToSummarize, options);
41
+ }
42
+ async classifyText(textToClassify, options) {
43
+ return this.preferLLM().classifyText(textToClassify, options);
44
+ }
45
+ async extractKeywords(textToAnalyze, options) {
46
+ return this.preferLLM().extractKeywords(textToAnalyze, options);
47
+ }
48
+ async parseJsonSafe(jsonString, options) {
49
+ // Try statistical (fast parsing) first, fall back to LLM (repair)
50
+ try {
51
+ const result = await this.preferStat().parseJsonSafe(jsonString, options);
52
+ if (result !== null)
53
+ return result;
54
+ }
55
+ catch { /* fall through */ }
56
+ if (this.llm && this.stat) {
57
+ return this.llm.parseJsonSafe(jsonString, options);
58
+ }
59
+ return null;
60
+ }
61
+ // --- Statistical-preferred methods ---
62
+ async tokenize(text, options) {
63
+ return this.preferStat().tokenize(text, options);
64
+ }
65
+ async stemTokens(tokens, options) {
66
+ return this.preferStat().stemTokens(tokens, options);
67
+ }
68
+ async normalizeText(text, options) {
69
+ return this.preferStat().normalizeText(text, options);
70
+ }
71
+ async generateNGrams(tokens, options) {
72
+ return this.preferStat().generateNGrams(tokens, options);
73
+ }
74
+ async calculateReadability(text, options) {
75
+ return this.preferStat().calculateReadability(text, options);
76
+ }
77
+ async calculateSimilarity(text1, text2, options) {
78
+ return this.preferStat().calculateSimilarity(text1, text2, options);
79
+ }
80
+ // --- Either with preference ---
81
+ async analyzeSentiment(text, options) {
82
+ return this.preferStat().analyzeSentiment(text, options);
83
+ }
84
+ async detectLanguage(text, options) {
85
+ return this.preferStat().detectLanguage(text, options);
86
+ }
87
+ // --- Health & lifecycle ---
88
+ async checkHealth() {
89
+ const deps = [];
90
+ if (this.llm) {
91
+ try {
92
+ const h = await this.llm.checkHealth();
93
+ deps.push({ name: `llm:${this.llm.utilityId}`, ...h });
94
+ }
95
+ catch (e) {
96
+ deps.push({ name: `llm:${this.llm.utilityId}`, isHealthy: false, details: e.message });
97
+ }
98
+ }
99
+ if (this.stat) {
100
+ try {
101
+ const h = await this.stat.checkHealth();
102
+ deps.push({ name: `stat:${this.stat.utilityId}`, ...h });
103
+ }
104
+ catch (e) {
105
+ deps.push({ name: `stat:${this.stat.utilityId}`, isHealthy: false, details: e.message });
106
+ }
107
+ }
108
+ return {
109
+ isHealthy: deps.every((d) => d.isHealthy),
110
+ dependencies: deps,
111
+ };
112
+ }
113
+ async shutdown() {
114
+ await Promise.all([
115
+ this.llm?.shutdown?.(),
116
+ this.stat?.shutdown?.(),
117
+ ]);
118
+ }
119
+ }
2
120
  //# sourceMappingURL=HybridUtilityAI.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"HybridUtilityAI.js","sourceRoot":"","sources":["../../../src/core/ai_utilities/HybridUtilityAI.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"HybridUtilityAI.js","sourceRoot":"","sources":["../../../src/core/ai_utilities/HybridUtilityAI.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA8BH;;;;;;;GAOG;AACH,MAAM,OAAO,eAAe;IAK1B,YAAY,MAA6B;QACvC,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC;QAC/B,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YAC5B,MAAM,IAAI,KAAK,CAAC,oEAAoE,CAAC,CAAC;QACxF,CAAC;QACD,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,UAAU,IAAI,CAAC,GAAG,EAAE,SAAS,IAAI,MAAM,IAAI,IAAI,CAAC,IAAI,EAAE,SAAS,IAAI,MAAM,EAAE,CAAC;IACnH,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,MAAiD;QAChE,MAAM,OAAO,CAAC,GAAG,CAAC;YAChB,IAAI,CAAC,GAAG,EAAE,UAAU,EAAE,CAAC,MAAM,CAAC;YAC9B,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,CAAC,MAAM,CAAC;SAChC,CAAC,CAAC;IACL,CAAC;IAEO,SAAS;QACf,OAAO,IA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SACxB,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -0,0 +1,5 @@
1
+ export * from './IUtilityAI.js';
2
+ export * from './LLMUtilityAI.js';
3
+ export * from './StatisticalUtilityAI.js';
4
+ export * from './HybridUtilityAI.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/ai_utilities/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './IUtilityAI.js';
2
+ export * from './LLMUtilityAI.js';
3
+ export * from './StatisticalUtilityAI.js';
4
+ export * from './HybridUtilityAI.js';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/ai_utilities/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './AdaptiveVAD.js';
2
+ export * from './AudioProcessor.js';
3
+ export * from './EnvironmentalCalibrator.js';
4
+ export * from './SilenceDetector.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/audio/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './AdaptiveVAD.js';
2
+ export * from './AudioProcessor.js';
3
+ export * from './EnvironmentalCalibrator.js';
4
+ export * from './SilenceDetector.js';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/audio/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,8 @@
1
+ export * from './ConversationContext.js';
2
+ export * from './ConversationManager.js';
3
+ export * from './ConversationMessage.js';
4
+ export * from './ILongTermMemoryRetriever.js';
5
+ export * from './IRollingSummaryMemorySink.js';
6
+ export * from './LongTermMemoryPolicy.js';
7
+ export * from './RollingSummaryCompactor.js';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/conversation/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC"}
@@ -0,0 +1,8 @@
1
+ export * from './ConversationContext.js';
2
+ export * from './ConversationManager.js';
3
+ export * from './ConversationMessage.js';
4
+ export * from './ILongTermMemoryRetriever.js';
5
+ export * from './IRollingSummaryMemorySink.js';
6
+ export * from './LongTermMemoryPolicy.js';
7
+ export * from './RollingSummaryCompactor.js';
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/conversation/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC"}