@memberjunction/ai-agents 5.43.0 → 5.45.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.
Files changed (91) hide show
  1. package/README.md +8 -0
  2. package/dist/AgentRunner.d.ts +20 -0
  3. package/dist/AgentRunner.d.ts.map +1 -1
  4. package/dist/AgentRunner.js +62 -0
  5. package/dist/AgentRunner.js.map +1 -1
  6. package/dist/DuplicateReasoningAgentProvider.d.ts +35 -0
  7. package/dist/DuplicateReasoningAgentProvider.d.ts.map +1 -0
  8. package/dist/DuplicateReasoningAgentProvider.js +95 -0
  9. package/dist/DuplicateReasoningAgentProvider.js.map +1 -0
  10. package/dist/MJAIAgentRequestEntityServer.d.ts +7 -0
  11. package/dist/MJAIAgentRequestEntityServer.d.ts.map +1 -1
  12. package/dist/MJAIAgentRequestEntityServer.js +28 -1
  13. package/dist/MJAIAgentRequestEntityServer.js.map +1 -1
  14. package/dist/SkillImportExportService.d.ts +63 -0
  15. package/dist/SkillImportExportService.d.ts.map +1 -0
  16. package/dist/SkillImportExportService.js +148 -0
  17. package/dist/SkillImportExportService.js.map +1 -0
  18. package/dist/SkillMarkdownConverter.d.ts +82 -0
  19. package/dist/SkillMarkdownConverter.d.ts.map +1 -0
  20. package/dist/SkillMarkdownConverter.js +145 -0
  21. package/dist/SkillMarkdownConverter.js.map +1 -0
  22. package/dist/agent-types/loop-agent-response-type.d.ts +23 -2
  23. package/dist/agent-types/loop-agent-response-type.d.ts.map +1 -1
  24. package/dist/agent-types/loop-agent-response-type.js.map +1 -1
  25. package/dist/agent-types/loop-agent-type.d.ts.map +1 -1
  26. package/dist/agent-types/loop-agent-type.js +34 -1
  27. package/dist/agent-types/loop-agent-type.js.map +1 -1
  28. package/dist/base-agent.d.ts +434 -12
  29. package/dist/base-agent.d.ts.map +1 -1
  30. package/dist/base-agent.js +1215 -89
  31. package/dist/base-agent.js.map +1 -1
  32. package/dist/index.d.ts +11 -0
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +11 -0
  35. package/dist/index.js.map +1 -1
  36. package/dist/memory-manager-agent.d.ts +39 -0
  37. package/dist/memory-manager-agent.d.ts.map +1 -1
  38. package/dist/memory-manager-agent.js +118 -5
  39. package/dist/memory-manager-agent.js.map +1 -1
  40. package/dist/operations/AISkillMarkdownOperations.d.ts +11 -0
  41. package/dist/operations/AISkillMarkdownOperations.d.ts.map +1 -0
  42. package/dist/operations/AISkillMarkdownOperations.js +57 -0
  43. package/dist/operations/AISkillMarkdownOperations.js.map +1 -0
  44. package/dist/prompt-component-resolver.d.ts +73 -0
  45. package/dist/prompt-component-resolver.d.ts.map +1 -0
  46. package/dist/prompt-component-resolver.js +166 -0
  47. package/dist/prompt-component-resolver.js.map +1 -0
  48. package/dist/realtime/agent-media-library.d.ts +65 -0
  49. package/dist/realtime/agent-media-library.d.ts.map +1 -0
  50. package/dist/realtime/agent-media-library.js +160 -0
  51. package/dist/realtime/agent-media-library.js.map +1 -0
  52. package/dist/realtime/client-context-channel-server.d.ts +59 -0
  53. package/dist/realtime/client-context-channel-server.d.ts.map +1 -0
  54. package/dist/realtime/client-context-channel-server.js +78 -0
  55. package/dist/realtime/client-context-channel-server.js.map +1 -0
  56. package/dist/realtime/media-channel-server.d.ts +73 -0
  57. package/dist/realtime/media-channel-server.d.ts.map +1 -0
  58. package/dist/realtime/media-channel-server.js +145 -0
  59. package/dist/realtime/media-channel-server.js.map +1 -0
  60. package/dist/realtime/realtime-channel-server-data-context.d.ts +42 -0
  61. package/dist/realtime/realtime-channel-server-data-context.d.ts.map +1 -0
  62. package/dist/realtime/realtime-channel-server-data-context.js +29 -0
  63. package/dist/realtime/realtime-channel-server-data-context.js.map +1 -0
  64. package/dist/realtime/realtime-channel-server-host.d.ts.map +1 -1
  65. package/dist/realtime/realtime-channel-server-host.js +8 -2
  66. package/dist/realtime/realtime-channel-server-host.js.map +1 -1
  67. package/dist/realtime/realtime-client-session-service.d.ts +114 -6
  68. package/dist/realtime/realtime-client-session-service.d.ts.map +1 -1
  69. package/dist/realtime/realtime-client-session-service.js +289 -30
  70. package/dist/realtime/realtime-client-session-service.js.map +1 -1
  71. package/dist/realtime/realtime-coagent-config.d.ts +82 -3
  72. package/dist/realtime/realtime-coagent-config.d.ts.map +1 -1
  73. package/dist/realtime/realtime-coagent-config.js +147 -6
  74. package/dist/realtime/realtime-coagent-config.js.map +1 -1
  75. package/dist/realtime/realtime-recording-capture.d.ts +125 -0
  76. package/dist/realtime/realtime-recording-capture.d.ts.map +1 -0
  77. package/dist/realtime/realtime-recording-capture.js +317 -0
  78. package/dist/realtime/realtime-recording-capture.js.map +1 -0
  79. package/dist/realtime/realtime-recording-store.d.ts +105 -0
  80. package/dist/realtime/realtime-recording-store.d.ts.map +1 -0
  81. package/dist/realtime/realtime-recording-store.js +216 -0
  82. package/dist/realtime/realtime-recording-store.js.map +1 -0
  83. package/dist/realtime/realtime-session-runner.d.ts +33 -2
  84. package/dist/realtime/realtime-session-runner.d.ts.map +1 -1
  85. package/dist/realtime/realtime-session-runner.js +45 -2
  86. package/dist/realtime/realtime-session-runner.js.map +1 -1
  87. package/dist/realtime/realtime-tool-broker.d.ts +41 -3
  88. package/dist/realtime/realtime-tool-broker.d.ts.map +1 -1
  89. package/dist/realtime/realtime-tool-broker.js +67 -3
  90. package/dist/realtime/realtime-tool-broker.js.map +1 -1
  91. package/package.json +18 -17
@@ -1 +1 @@
1
- {"version":3,"file":"loop-agent-type.js","sourceRoot":"","sources":["../../src/agent-types/loop-agent-type.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;;;;;;;AAEH,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAG7D,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AAEnF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AAM,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC5C,wCAAwC;YACxC,MAAM,WAAW,GAA4B,EAAE,CAAC;YAChD,KAAK,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC7C,WAAW,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,6BAA6B,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;YACvE,CAAC;YACD,OAAO,WAAW,CAAC;QACvB,CAAC;aAAM,CAAC;YACJ,+DAA+D;YAC/D,OAAO,KAAK,CAAC;QACjB,CAAC;IACL,CAAC;CAGJ,CAAA;AAjkBY,aAAa;IADzB,aAAa,CAAC,aAAa,EAAE,eAAe,CAAC;GACjC,aAAa,CAikBzB"}
@@ -10,20 +10,38 @@
10
10
  * @author MemberJunction.com
11
11
  * @since 2.49.0
12
12
  */
13
- import { MJAIAgentTypeEntity, MJTemplateParamEntity, MJAIAgentRelationshipEntity, MJAIAgentNoteEntity, MJAIAgentExampleEntity } from '@memberjunction/core-entities';
13
+ import { MJAIAgentTypeEntity, MJTemplateParamEntity, MJAIAgentRelationshipEntity, MJAIAgentNoteEntity, MJAIAgentExampleEntity, MJAISkillEntity } from '@memberjunction/core-entities';
14
14
  import { MJAIAgentRunEntityExtended, MJAIAgentRunStepEntityExtended, MJAIPromptEntityExtended, MJAIAgentEntityExtended, MJAIPromptRunEntityExtended } from "@memberjunction/ai-core-plus";
15
15
  import { UserInfo, IMetadataProvider } from '@memberjunction/core';
16
16
  import { ChatMessage, ChatMessageContent, BaseRealtimeModel, IRealtimeSession } from '@memberjunction/ai';
17
17
  import { BaseAgentType } from './agent-types/base-agent-type.js';
18
+ import { type CodeLang } from '@memberjunction/context-crush/code';
18
19
  import { RealtimeSessionRunnerDeps } from './realtime/realtime-session-runner.js';
19
20
  import { RealtimeCoAgentConfig } from './realtime/realtime-coagent-config.js';
20
21
  import { AIEngine } from '@memberjunction/aiengine';
21
22
  import { AgentPreExecutionRAGResult } from './agent-pre-execution-rag.js';
22
- import { AIPromptParams, AIPromptRunResult, ExecuteAgentParams, AgentConfiguration, ExecuteAgentResult, AgentAction, AgentSubAgentRequest, BaseAgentNextStep, MessageLifecycleEvent, AgentChatMessage, AIModelSelectionInfo, ActionChange, ActionChangeScope, SubAgentChange, MediaOutput, FileOutputRef, SecondaryScopeConfig, SecondaryScopeValue, AgentPipelineRequest } from '@memberjunction/ai-core-plus';
23
+ import { AIPromptParams, AIPromptRunResult, ExecuteAgentParams, AgentConfiguration, ExecuteAgentResult, AgentAction, AgentSubAgentRequest, BaseAgentNextStep, MessageLifecycleEvent, AgentChatMessage, AIModelSelectionInfo, ActionChange, ActionChangeScope, SubAgentChange, MediaOutput, FileOutputRef, SecondaryScopeConfig, SecondaryScopeValue, AgentResponseForm, AgentPipelineRequest, AgentSkillActivationRequest, AgentSkillInvocation } from '@memberjunction/ai-core-plus';
23
24
  import { MJActionEntityExtended, ActionResult } from '@memberjunction/actions-base';
24
25
  import { ArtifactToolCall, StoredToolResult } from './ArtifactToolManager.js';
25
26
  import { MemoryWriteRequest, MemoryWriteResult } from './MemoryWriteManager.js';
26
27
  import { PipelineToolRegistry, PipelineExecutionResult } from './pipeline/index.js';
28
+ /**
29
+ * Resolved per-run configuration for structurally compressing inline action-result
30
+ * payloads via @memberjunction/context-crush. Undefined means crushing is disabled
31
+ * for the run (the agent opted out via `crushActionResults: false`).
32
+ */
33
+ export interface ActionResultCrushConfig {
34
+ /** Minimum stringified length of an object/array (or code string) value before crushing. */
35
+ threshold: number;
36
+ /** Optional character budget passed to CrushJSON (undefined = no row truncation). */
37
+ maxChars: number | undefined;
38
+ /**
39
+ * When set, large *string* output params are reduced with CrushCode for this language.
40
+ * Undefined (default) means code-string crushing is off — only structural JSON crushing
41
+ * applies. Opt in per agent type via the `crushCodeLang` prompt param or a subclass override.
42
+ */
43
+ codeLang: CodeLang | undefined;
44
+ }
27
45
  /**
28
46
  * The agent-invariant "base" catalog cached (process-wide) on AIEngine and reused across runs/steps.
29
47
  * Holds the resolved sub-agents + actions and their formatted markdown, plus the base merged
@@ -226,6 +244,13 @@ export declare class BaseAgent {
226
244
  * @private
227
245
  */
228
246
  private static readonly LARGE_BINARY_THRESHOLD;
247
+ /**
248
+ * Minimum stringified length (chars) of an object/array action-result value before
249
+ * structural JSON compression (CrushJSON) is applied. Small payloads aren't worth a
250
+ * legend, so they pass through verbatim.
251
+ * @private
252
+ */
253
+ private static readonly ACTION_RESULT_CRUSH_THRESHOLD;
229
254
  /**
230
255
  * Inspects a set of action output params for any value matching the FileOutputRef shape
231
256
  * (an object with `fileName`, `mimeType`, and either `fileData` or `fileId`).
@@ -388,6 +413,47 @@ export declare class BaseAgent {
388
413
  * @since 2.123.0
389
414
  */
390
415
  private _effectiveActions;
416
+ /**
417
+ * Effective sub-agents available to this agent after applying subAgentChanges — the sub-agent
418
+ * counterpart of {@link _effectiveActions}. Populated during gatherPromptTemplateData() and used
419
+ * for validation in {@link validateSubAgentNextStep} via {@link getEffectiveSubAgentsForValidation}.
420
+ * Without this, a sub-agent added at runtime (e.g. by Skill activation) would be advertised in the
421
+ * prompt catalog but rejected as "not found" when the agent tried to actually use it.
422
+ * @private
423
+ */
424
+ private _effectiveSubAgents;
425
+ /**
426
+ * IDs of skills already activated during this run. Prevents re-activation from re-appending
427
+ * the same instructions to context / re-pushing duplicate actionChanges/subAgentChanges entries
428
+ * when the LLM references an already-active skill again.
429
+ * @private
430
+ */
431
+ private _activatedSkillIDs;
432
+ /**
433
+ * Full observability records for every skill activated this run — one {@link AgentSkillInvocation}
434
+ * per activation, carrying activation type ('requested' | 'auto'), the provenance-of-authority
435
+ * gate values that admitted the skill, and the agent-stated reason when self-activated.
436
+ * Serialized onto `AIAgentRunStep.Skills`: Skill steps record their own activation(s), Prompt
437
+ * steps record the full set in effect for the turn, and Actions/Sub-Agent steps record the
438
+ * skill(s) that granted the executed tool (see {@link getSkillAttributionForAction} /
439
+ * {@link getSkillAttributionForSubAgent}).
440
+ */
441
+ private _skillInvocations;
442
+ /**
443
+ * Whether Plan Mode is active for this run — resolved once in {@link initializeAgentRun} via
444
+ * {@link resolvePlanModeGate}. True only when `agent.SupportsPlanMode` (capability, default ON)
445
+ * AND `params.planMode` (per-request, default OFF) are both true AND this is a root agent.
446
+ * @private
447
+ */
448
+ private _planModeActive;
449
+ /**
450
+ * Whether Plan Mode's approval gate has already been satisfied for this run — either because
451
+ * Plan Mode isn't active, or because a prior linked run's Plan step was approved. When active
452
+ * and NOT yet approved, `validateNextStep` blocks Actions/Sub-Agent steps until a Plan step
453
+ * has been presented and approved.
454
+ * @private
455
+ */
456
+ private _planApproved;
391
457
  /**
392
458
  * Counts only prompt (LLM) executions, NOT all agent steps.
393
459
  * Used for message expiration age calculations so that `expirationTurns`
@@ -399,6 +465,14 @@ export declare class BaseAgent {
399
465
  * prompt execution occurred after them.
400
466
  */
401
467
  private _promptTurnCount;
468
+ /**
469
+ * Per-run config for structurally compressing inline action-result payloads.
470
+ * Resolved once at run start from the agent-type prompt params (default on);
471
+ * read by formatActionResultsAsMarkdown so both the direct and loop callers
472
+ * share the same setting without threading it through every signature.
473
+ * @private
474
+ */
475
+ private _actionResultCrush;
402
476
  /**
403
477
  * Execution limits for dynamically added actions.
404
478
  * Maps action IDs to their MaxExecutionsPerRun limit.
@@ -544,6 +618,16 @@ export declare class BaseAgent {
544
618
  * @param config The loaded agent configuration (provides the system prompt, if any).
545
619
  * @returns The finalized {@link ExecuteAgentResult}.
546
620
  */
621
+ /**
622
+ * In-flight realtime turn rows keyed by transcript role (`'user'`/`'assistant'`), driving the
623
+ * create-on-start / update-on-complete persistence lifecycle. Reset at the start of every
624
+ * realtime session so a prior run can never leak an in-flight id into the next.
625
+ */
626
+ private realtimeInFlightTurns;
627
+ /** Active audio recording controller for the current realtime session, or `null` when recording is off. */
628
+ private realtimeRecording;
629
+ /** Storage account id the active recording stores to (RecordingStorageProviderID ?? AttachmentStorageProviderID). */
630
+ private realtimeRecordingAccountId;
547
631
  protected executeRealtimeSession<R = any>(params: ExecuteAgentParams, config: AgentConfiguration): Promise<ExecuteAgentResult<R>>;
548
632
  /**
549
633
  * Opens a **raw** {@link IRealtimeSession} for this agent — the duplex model connection a Realtime
@@ -758,14 +842,61 @@ export declare class BaseAgent {
758
842
  */
759
843
  private parseRealtimeToolParams;
760
844
  /**
761
- * Persists a single realtime transcript turn as a `ConversationDetail` stamped with the
762
- * session id. User turns are written as `Role='User'`, assistant turns as `Role='AI'`. Only
763
- * final transcripts are persisted (interim/partial updates are skipped to avoid churn).
764
- *
765
- * @param params The execution parameters (provides conversation id + context user).
766
- * @param transcript The transcript turn emitted by the model.
845
+ * Persists a realtime transcript turn as a `ConversationDetail` with a **create-on-start /
846
+ * update-on-complete** lifecycle, so each turn carries both a start (`__mj_CreatedAt`) and an
847
+ * immutable end (`TurnEndedAt`):
848
+ * - **Interim** (`IsFinal=false`): on the FIRST delta for a role, CREATE the row with
849
+ * `Status='In-Progress'` (so a live UI can show the turn streaming), stamping the recording-relative
850
+ * `UtteranceStartMs` and the speaker `UserID` (user turns only). Subsequent interim deltas are no-ops.
851
+ * - **Final** (`IsFinal=true`): UPDATE that in-flight row with the full text, `Status='Complete'`,
852
+ * `TurnEndedAt`, and `UtteranceEndMs`. If no interim was seen (some providers only emit final), the
853
+ * row is created and finalized in one step.
854
+ *
855
+ * Returns the new row's ID the first time a DISTINCT turn is created, and `null` when an existing
856
+ * in-flight row is merely updated — the runner uses that to count turns (not events). User turns are
857
+ * `Role='User'`, assistant turns `Role='AI'`. When recording is active, `MediaType='Audio'` and the
858
+ * media-relative utterance offsets are stamped from the recording clock.
859
+ *
860
+ * @param params The execution parameters (provides conversation id + context user + session id).
861
+ * @param transcript The transcript turn (interim delta or final) emitted by the model.
862
+ * @returns The created row id on first creation of a turn, else `null`.
767
863
  */
768
864
  private persistRealtimeTranscript;
865
+ /**
866
+ * Stamps the speaker identity and recording-relative media fields on a freshly-created turn row.
867
+ * `UserID` is set only for **user** turns (an AI turn has no human speaker). When recording is
868
+ * active, `MediaType='Audio'` and `UtteranceStartMs` is captured from the recording clock.
869
+ *
870
+ * @param detail The new conversation-detail row.
871
+ * @param transcript The transcript turn.
872
+ * @param params The execution parameters.
873
+ * @param atStart Whether this is the turn's start (stamps `UtteranceStartMs`).
874
+ */
875
+ private applyRealtimeTurnSpeakerAndMedia;
876
+ /**
877
+ * Resolves whether to record this realtime session, OFF by default, with the precedence
878
+ * **runtime param > agent (`RecordingDefault`) > off**, hard-gated by consent and a resolvable
879
+ * storage provider. Returns the recording controller + the resolved storage account, or `null`
880
+ * to record nothing (fail-closed). Never throws — any resolution problem disables recording.
881
+ *
882
+ * Storage resolves to **`AIAgent.RecordingStorageProviderID` ?? `AIAgent.AttachmentStorageProviderID`**
883
+ * (recordings default to the attachments account), then to that provider's first account. With no
884
+ * provider configured, or consent not granted, recording is OFF.
885
+ *
886
+ * @param params The execution parameters (agent + runtime `data.recording`).
887
+ * @returns `{ controller, storageAccountId }` when recording is enabled, else `null`.
888
+ */
889
+ private resolveRealtimeRecording;
890
+ /**
891
+ * Finalizes the active recording after the session closes: encodes the captured audio to a WAV,
892
+ * stores it via MJStorage to the resolved account, links it to the `AIAgentSession` (via
893
+ * `MJ: File Entity Record Links`), and stamps `RecordingFileID` / `RecordingMedia` /
894
+ * `RecordingStartedAt` on the session. Never throws — a recording failure must not fail the
895
+ * session run. No-op when recording is off, nothing was captured, or there is no session id.
896
+ *
897
+ * @param params The execution parameters (provides the session id + context user + provider).
898
+ */
899
+ private finalizeRealtimeRecording;
769
900
  /**
770
901
  * Checkpoints accumulated realtime usage onto the single long-lived prompt run. This is the
771
902
  * incremental, crash-safe write the runner invokes on a debounced cadence and at close.
@@ -870,6 +1001,16 @@ export declare class BaseAgent {
870
1001
  notes: MJAIAgentNoteEntity[];
871
1002
  examples: MJAIAgentExampleEntity[];
872
1003
  }>;
1004
+ /**
1005
+ * Inject this agent's scoped prompt parts into the conversation, role-faithfully.
1006
+ *
1007
+ * Parallels {@link InjectContextMemory}: resolves `MJ: Scoped Prompt Parts` for the agent's
1008
+ * primary prompt under the run's polymorphic scope (the SAME PrimaryScope/SecondaryScopes the
1009
+ * runtime threads for memory), and unshifts the assembled role-tagged messages onto
1010
+ * `conversationMessages`. In-memory + synchronous (parts are cached on `AIEngine`). No-op when
1011
+ * the agent has no active prompt or no parts resolve for the scope.
1012
+ */
1013
+ protected InjectScopedPromptParts(agent: MJAIAgentEntityExtended, conversationMessages: ChatMessage[], primaryScopeEntityId?: string, primaryScopeRecordId?: string, secondaryScopes?: Record<string, SecondaryScopeValue>): void;
873
1014
  /**
874
1015
  * Inject pre-execution RAG context for this agent using scoped search.
875
1016
  *
@@ -1031,6 +1172,34 @@ export declare class BaseAgent {
1031
1172
  * @since 2.123.0
1032
1173
  */
1033
1174
  protected getEffectiveActionsForValidation(agentId: string): MJActionEntityExtended[];
1175
+ /**
1176
+ * Gets the effective sub-agents for validation, using runtime subAgentChanges if available.
1177
+ * Falls back to the database-configured relationship set if _effectiveSubAgents is empty.
1178
+ * Mirrors {@link getEffectiveActionsForValidation}.
1179
+ *
1180
+ * @param agentId - The ID of the agent to get sub-agents for
1181
+ * @returns Array of effective sub-agents available to the agent
1182
+ * @protected
1183
+ */
1184
+ protected getEffectiveSubAgentsForValidation(agentId: string): MJAIAgentEntityExtended[];
1185
+ /**
1186
+ * Validates that the requested skill(s) are known and allowed for this agent (resolved via
1187
+ * {@link AIEngine.GetSkillsForAgent}, which enforces the agent's AcceptsSkills gate + the
1188
+ * catalog/grant Status chain). Subclasses can override to implement custom validation logic.
1189
+ *
1190
+ * Mirrors {@link validateActionsNextStep}'s fuzzy-name-matching UX: an exact case-insensitive
1191
+ * match is tried first, falling back to a CONTAINS match when exactly one candidate matches.
1192
+ *
1193
+ * @protected
1194
+ */
1195
+ protected validateSkillNextStep<P>(params: ExecuteAgentParams, nextStep: BaseAgentNextStep<P>, currentPayload: P, agentRun: MJAIAgentRunEntityExtended, currentStep: MJAIAgentRunStepEntityExtended): Promise<BaseAgentNextStep<P>>;
1196
+ /**
1197
+ * Validates that a 'Plan' next step (Plan Mode) has plan text to present. Subclasses can
1198
+ * override to add additional plan-quality checks (e.g. minimum length, required sections).
1199
+ *
1200
+ * @protected
1201
+ */
1202
+ protected validatePlanNextStep<P>(params: ExecuteAgentParams, nextStep: BaseAgentNextStep<P>, currentPayload: P, agentRun: MJAIAgentRunEntityExtended, currentStep: MJAIAgentRunStepEntityExtended): Promise<BaseAgentNextStep<P>>;
1034
1203
  /**
1035
1204
  * Validates that the Success next step is valid and can be executed by the current agent. Subclasses can override
1036
1205
  * this method to implement custom validation logic if needed.
@@ -1536,6 +1705,15 @@ export declare class BaseAgent {
1536
1705
  * @private
1537
1706
  */
1538
1707
  private formatSubAgentDetails;
1708
+ /**
1709
+ * Formats the skill CATALOG as compact markdown — name + description ONLY. This is
1710
+ * progressive disclosure by design: the LLM sees just enough to decide whether to activate a
1711
+ * skill (via a 'Skill' next step), but never sees `Instructions` until it does. Instructions
1712
+ * are appended separately in {@link buildSkillActivationMessage} on activation.
1713
+ *
1714
+ * @private
1715
+ */
1716
+ private formatSkillsCatalog;
1539
1717
  /**
1540
1718
  * Utility method to get agent prompt parameters for a given agent. This gets the
1541
1719
  * highest priority prompt for the agent, and then gets the parameters for that
@@ -1557,10 +1735,20 @@ export declare class BaseAgent {
1557
1735
  /**
1558
1736
  * Build the client tool prompt section for system prompt injection.
1559
1737
  *
1560
- * Tool sources (checked in order, all merged — first registration wins):
1561
- * 1. Metadata tools from AI Agent Client Tools junction table
1562
- * 2. Session-level enriched tools from ClientToolRequestManager (set by client SDK)
1563
- * 3. Tools provided directly in extraData.clientTools (runtime override)
1738
+ * Resolution is delegated to the shared, tier-agnostic {@link ResolveClientTools}
1739
+ * (`@memberjunction/ai-core-plus`) — the single source of truth used by the async
1740
+ * path (here), the realtime co-agent broker, and the conversations runtime. Tiers,
1741
+ * highest precedence first:
1742
+ *
1743
+ * 1. **override** — tools passed directly in the run's `data.clientTools`
1744
+ * 2. **session (dynamic)** — client-SDK enriched tools from {@link ClientToolRequestManager}
1745
+ * 3. **app** — tools the active surface published in the app-context capability manifest
1746
+ * 4. **static** — the agent's metadata tools from the `AI Agent Client Tools` junction
1747
+ *
1748
+ * NOTE (behavior change): the previous inline merge resolved *static-wins* (metadata
1749
+ * was added first and won name collisions). The unified resolver uses the more-correct
1750
+ * *override > session > app > static* — a runtime/dynamic tool now overrides a stale
1751
+ * static metadata tool of the same name. Collisions are rare in practice.
1564
1752
  */
1565
1753
  private buildClientToolPromptSection;
1566
1754
  /**
@@ -1630,6 +1818,36 @@ export declare class BaseAgent {
1630
1818
  * @private
1631
1819
  */
1632
1820
  private formatParamValueForResult;
1821
+ /**
1822
+ * Resolve the per-run action-result compression config from the agent-type prompt
1823
+ * params. Crushing is on by default and only disabled when an agent explicitly sets
1824
+ * `crushActionResults: false`, mirroring the `includeXxxDocs` opt-out convention.
1825
+ * @private
1826
+ */
1827
+ protected resolveActionResultCrush(params: ExecuteAgentParams): ActionResultCrushConfig | undefined;
1828
+ /**
1829
+ * AST-reduce a large code-string action-result value when the agent opted into a code
1830
+ * language (via `crushCodeLang` or a subclass override) and the value clears the size
1831
+ * threshold. Returns reduced code plus a one-line legend, or null to keep the string
1832
+ * verbatim (crushing disabled, too small, or no net saving).
1833
+ *
1834
+ * token optimization via @memberjunction/context-crush (CodeCompressor-inspired)
1835
+ * @private
1836
+ */
1837
+ private crushCodeValue;
1838
+ /**
1839
+ * Structurally compress a JSON action-result value when crushing is enabled for the run
1840
+ * and the value clears the size threshold. Accepts either the `JSON.stringify` of an
1841
+ * object/array param, or a raw string param that itself contains JSON (many actions
1842
+ * stringify their payloads, e.g. `run-adhoc-query`'s `Results`). Returns crushed text
1843
+ * plus a one-line legend, or null when crushing is disabled, the value is too small, the
1844
+ * value isn't valid JSON, or compression wouldn't actually save characters — so callers
1845
+ * fall back to verbatim (and, for strings, to code crushing) behavior.
1846
+ *
1847
+ * token optimization via @memberjunction/context-crush (SmartCrusher-inspired)
1848
+ * @private
1849
+ */
1850
+ private crushParamValue;
1633
1851
  /**
1634
1852
  * Formats a parameter value for display in action execution messages.
1635
1853
  * Truncates long strings and formats objects/arrays for readability.
@@ -1707,6 +1925,28 @@ export declare class BaseAgent {
1707
1925
  * @param {ExecuteAgentParams} params - The execution parameters
1708
1926
  */
1709
1927
  private initializeAgentRun;
1928
+ /**
1929
+ * Resolves whether Plan Mode is active for this run, and whether its approval gate is already
1930
+ * satisfied. Called once from {@link initializeAgentRun}, after `_depth` is set.
1931
+ *
1932
+ * - `active`: this is a root agent (`_depth === 0`) AND either `agent.RequirePlanMode`
1933
+ * (mandatory HITL — forces plan mode on every root run regardless of the per-request flag;
1934
+ * `SupportsPlanMode` is irrelevant when set) OR `agent.SupportsPlanMode` (capability,
1935
+ * default ON/opt-out) AND `params.planMode` (per-request, default OFF). Sub-agents never
1936
+ * gate on Plan Mode — only the top-level agent the user/caller invoked does.
1937
+ * - `approved`: only meaningful when `active`. True when `params.lastRunId` points to a prior
1938
+ * run whose Plan step's `MJ: AI Agent Requests` row resolved to `Approved` or `Responded`
1939
+ * (a `Rejected` plan — or no matching request at all — leaves the gate unsatisfied, sending
1940
+ * the agent back to present a revised plan).
1941
+ *
1942
+ * Override to change Plan Mode eligibility rules (e.g. gate on a specific agent category).
1943
+ *
1944
+ * @protected
1945
+ */
1946
+ protected resolvePlanModeGate(params: ExecuteAgentParams): Promise<{
1947
+ active: boolean;
1948
+ approved: boolean;
1949
+ }>;
1710
1950
  /**
1711
1951
  * Validates the agent with tracking.
1712
1952
  *
@@ -1737,6 +1977,14 @@ export declare class BaseAgent {
1737
1977
  payloadAtStart?: any;
1738
1978
  payloadAtEnd?: any;
1739
1979
  parentId?: string;
1980
+ /**
1981
+ * Skill-invocation records to persist on `AIAgentRunStep.Skills` for this step. When
1982
+ * omitted, Prompt steps default to the full set of skills currently in effect
1983
+ * ({@link _skillInvocations}) so prompt injection is always visible; all other step
1984
+ * types default to no skill linkage. Pass explicitly for Skill steps (the activation
1985
+ * performed) and Actions/Sub-Agent steps (the skill(s) that granted the tool).
1986
+ */
1987
+ skills?: AgentSkillInvocation[];
1740
1988
  }): Promise<MJAIAgentRunStepEntityExtended>;
1741
1989
  /**
1742
1990
  * Finalizes a step entity with completion status.
@@ -2118,6 +2366,172 @@ export declare class BaseAgent {
2118
2366
  * Format client tool results as a compact markdown summary for the conversation.
2119
2367
  */
2120
2368
  private formatClientToolResultsAsMarkdown;
2369
+ /**
2370
+ * Executes a 'Skill' next step: activates one or more skills the LLM requested by name.
2371
+ * Activating a skill (1) appends its full `Instructions` to the conversation so they take
2372
+ * effect for the remainder of the run, and (2) enables its bundled Actions/sub-agents by
2373
+ * pushing `root`-scoped `add` entries onto `params.actionChanges`/`params.subAgentChanges` —
2374
+ * the same runtime tool-surface-extension mechanism `ExecuteAgentParams` already exposes to
2375
+ * external callers. This is NOT a nested agent run; it never terminates the loop itself.
2376
+ *
2377
+ * Already-activated skills (tracked in `_activatedSkillIDs`) are skipped — re-requesting an
2378
+ * active skill is a harmless no-op rather than re-appending duplicate instructions.
2379
+ *
2380
+ * Decomposed into {@link resolveSkillActivations}, {@link buildSkillActivationMessage},
2381
+ * {@link enableSkillCapabilities}, and {@link recordSkillActivationStep} — override any of
2382
+ * those for fine-grained control (e.g. custom instruction formatting, additional side effects
2383
+ * on activation) without re-implementing the whole step.
2384
+ *
2385
+ * @protected
2386
+ */
2387
+ protected executeSkillStep(params: ExecuteAgentParams, config: AgentConfiguration, previousDecision: BaseAgentNextStep, stepCount?: number): Promise<BaseAgentNextStep>;
2388
+ /**
2389
+ * Pre-activates skills the caller explicitly requested via {@link ExecuteAgentParams.requestedSkillIDs}
2390
+ * (typically an end user's `/skill-name` composer mentions), at run start — so their Instructions
2391
+ * and bundled Actions/sub-agents take effect from the first turn rather than waiting for the model
2392
+ * to discover and activate them through the catalog.
2393
+ *
2394
+ * **Root-agent only** (skills never cascade to sub-agents), and each requested skill activates
2395
+ * **only if it survives the guard**: it must be in the set {@link AIEngine.GetSkillsForAgent}
2396
+ * allows for this agent (the AcceptsSkills gate) AND the acting user must have Run permission on it
2397
+ * — both enforced by passing `params.contextUser` to `GetSkillsForAgent`. Requested IDs that fail
2398
+ * either check are silently dropped, so a client can never force-activate a skill the user or agent
2399
+ * isn't entitled to. Reuses the same {@link recordSkillActivationStep} / {@link enableSkillCapabilities}
2400
+ * / {@link buildSkillActivationMessage} machinery as the model-initiated `Skill` step, so activation
2401
+ * is recorded and takes effect identically. Plan Mode is unaffected — pre-activation widens the tool
2402
+ * surface, but the plan-approval gate still blocks executing those tools until the plan is approved.
2403
+ *
2404
+ * @protected
2405
+ */
2406
+ protected preActivateRequestedSkills(params: ExecuteAgentParams): Promise<void>;
2407
+ /**
2408
+ * Handles user-requested skill IDs that failed the activation guard (agent-accepted ∩
2409
+ * user-permitted). A silent drop leaves both the user AND the agent blind to the refusal —
2410
+ * the agent then improvises around the missing capability instead of explaining it. This
2411
+ * emits a server-side warning log and injects a system note into the conversation so the
2412
+ * agent tells the user why the skill isn't available rather than working around it.
2413
+ *
2414
+ * @protected
2415
+ */
2416
+ protected notifyDroppedSkillRequests(droppedIds: string[], params: ExecuteAgentParams): void;
2417
+ /**
2418
+ * Resolves the LLM's requested skill names to `MJ: AI Skills` entities, restricted to what
2419
+ * {@link AIEngine.GetSkillsForAgent} allows for this agent (the AcceptsSkills gate + Status
2420
+ * chain). Names that don't resolve are silently dropped here — {@link validateSkillNextStep}
2421
+ * is responsible for rejecting unknown/disallowed names before execution ever reaches this
2422
+ * point, so by the time `executeSkillStep` runs, every requested name is expected to match.
2423
+ *
2424
+ * Override to change resolution semantics (e.g. resolve by ID instead of Name).
2425
+ *
2426
+ * @protected
2427
+ */
2428
+ protected resolveSkillActivations(requested: AgentSkillActivationRequest[], agent: MJAIAgentEntityExtended, contextUser?: UserInfo): MJAISkillEntity[];
2429
+ /**
2430
+ * Builds the message appended to `conversationMessages` when skill(s) activate — this is what
2431
+ * actually puts each skill's `Instructions` into effect for the rest of the run. Override to
2432
+ * change formatting (e.g. a more compact representation for a high skill-activation-count agent).
2433
+ *
2434
+ * @protected
2435
+ */
2436
+ protected buildSkillActivationMessage(skills: MJAISkillEntity[]): string;
2437
+ /**
2438
+ * Enables a skill's bundled Actions and sub-agents by pushing `specific`-scoped `add` entries
2439
+ * (targeted at exactly the activating agent's ID) onto `params.actionChanges` /
2440
+ * `params.subAgentChanges`. `specific`/`[agent.ID]` is the correct scope for "apply to THIS
2441
+ * agent, at whatever depth it runs, and never leak to its sub-agents":
2442
+ * - {@link doesChangeScopeApply} returns true only when the running agent's ID is in the list,
2443
+ * so it applies to the activating agent regardless of depth (a sub-agent that activates a
2444
+ * skill still gets its tools — which a `root`-scoped change would NOT do, since `root` means
2445
+ * "the depth-0 agent," not "the current agent").
2446
+ * - {@link filterActionChangesForSubAgent} / {@link filterSubAgentChangesForSubAgent} propagate
2447
+ * `specific` as-is, and each downstream agent checks `includes(itsOwnID)` → false, so the
2448
+ * grant never cascades to sub-agents the activating agent later delegates to.
2449
+ * Because `params` is the same object reference used for the rest of this run, every subsequent
2450
+ * turn's `gatherPromptTemplateData()` call picks up the change automatically — no extra plumbing.
2451
+ *
2452
+ * Override to change propagation scope (e.g. a subclass that wants skill-granted capabilities
2453
+ * to cascade to sub-agents could push `scope: 'all-subagents'` instead).
2454
+ *
2455
+ * @protected
2456
+ */
2457
+ protected enableSkillCapabilities(skill: MJAISkillEntity, params: ExecuteAgentParams): void;
2458
+ /**
2459
+ * Builds the {@link AgentSkillInvocation} observability record for a skill activation —
2460
+ * capturing WHO pulled the trigger and the provenance-of-authority gate values in effect at
2461
+ * activation time, so auditors can see exactly which configuration admitted the skill even
2462
+ * if that configuration later changes.
2463
+ *
2464
+ * @protected
2465
+ */
2466
+ protected buildSkillInvocation(skill: MJAISkillEntity, agent: MJAIAgentEntityExtended, activationType: AgentSkillInvocation['ActivationType'], reason?: string): AgentSkillInvocation;
2467
+ /**
2468
+ * Resolves which activated skill(s), if any, granted the given action to this agent — the
2469
+ * attribution recorded on the Actions step's `Skills` column. Returns `undefined` (no
2470
+ * linkage) when the action is one of the agent's NATIVE grants (an Active `MJ: AI Agent
2471
+ * Actions` row), even if an activated skill also bundles it: native authority takes
2472
+ * precedence, and `Skills = NULL` is the contract for "the agent had this tool anyway".
2473
+ *
2474
+ * @protected
2475
+ */
2476
+ protected getSkillAttributionForAction(actionId: string, agent: MJAIAgentEntityExtended): AgentSkillInvocation[] | undefined;
2477
+ /**
2478
+ * Resolves which activated skill(s), if any, granted the given sub-agent to this agent — the
2479
+ * attribution recorded on the Sub-Agent step's `Skills` column. Returns `undefined` when the
2480
+ * sub-agent is a NATIVE relationship (a `ParentID` child of this agent, or an Active
2481
+ * `MJ: AI Agent Relationships` referenced-sub-agent row), even if an activated skill also
2482
+ * bundles it — same native-precedence contract as {@link getSkillAttributionForAction}.
2483
+ *
2484
+ * @protected
2485
+ */
2486
+ protected getSkillAttributionForSubAgent(subAgent: MJAIAgentEntityExtended, agent: MJAIAgentEntityExtended): AgentSkillInvocation[] | undefined;
2487
+ /**
2488
+ * Creates and immediately finalizes the `AIAgentRunStep` (StepType='Skill') that records this
2489
+ * skill activation for observability/audit. The step's `Skills` column carries the single
2490
+ * {@link AgentSkillInvocation} performed (activation type, provenance of authority, and the
2491
+ * agent-stated reason when self-activated). Activation is not itself a failure mode today — it
2492
+ * always finalizes as successful — but subclasses can override to add richer InputData/OutputData
2493
+ * or to make activation conditionally fail (e.g. a licensing check).
2494
+ *
2495
+ * @protected
2496
+ */
2497
+ protected recordSkillActivationStep(skill: MJAISkillEntity, currentPayload: unknown, params: ExecuteAgentParams, invocation?: AgentSkillInvocation): Promise<void>;
2498
+ /**
2499
+ * Executes a 'Plan' next step (Plan Mode): records a `Plan` run-step, raises the standard
2500
+ * `MJ: AI Agent Requests` HITL request with an editable plan-approval `AgentResponseForm`, and
2501
+ * terminates this run awaiting the human's response — reusing the exact same pause/resume
2502
+ * infrastructure `executeChatStep` uses (`createFeedbackRequest` + the existing
2503
+ * `MJAIAgentRequestEntityServer.Save()` auto-resume-on-status-change hook). A rejected or
2504
+ * edited-and-resubmitted plan resumes as a new linked run via the normal run-chain mechanism;
2505
+ * `resolvePlanModeGate` re-checks approval on that new run so a rejection sends the agent back
2506
+ * to present a revised plan rather than through to execution.
2507
+ *
2508
+ * **Important**: the RETURNED `BaseAgentNextStep.step` is `'Chat'`, not `'Plan'` — 'Plan' is
2509
+ * only ever an intermediate classification (used for the `AIAgentRunStep.StepType` audit
2510
+ * record, which the UI reads to render a plan-approval card instead of a generic chat bubble).
2511
+ * The step returned to the framework must stay within `AIAgentRun.FinalStep`'s DB-CHECK-
2512
+ * constrained, terminal-only vocabulary — `'Plan'` is deliberately not part of it (see the
2513
+ * `BaseAgentNextStep.step` doc comment) — so a plan-approval pause is represented as the same
2514
+ * terminal shape `executeChatStep` already uses.
2515
+ *
2516
+ * @protected
2517
+ */
2518
+ protected executePlanStep(params: ExecuteAgentParams, previousDecision: BaseAgentNextStep): Promise<BaseAgentNextStep>;
2519
+ /**
2520
+ * Builds the editable plan-approval `AgentResponseForm`: the Markdown-rendered plan (with an
2521
+ * Edit toggle so the human can amend it before approving), an optional feedback field that
2522
+ * travels back to the agent with the decision (most useful on Reject — it steers the re-plan),
2523
+ * and an Approve/Reject button group. Override to change the card's layout (e.g. split the
2524
+ * plan into per-step checkboxes instead of one field).
2525
+ *
2526
+ * Approval is a HIGHER-ORDER signal, not just a form reply: conversation hosts detect
2527
+ * `decision === 'approve'` on this form and switch the conversation out of Plan Mode
2528
+ * (see ng-conversations' plan-decision handling), so the follow-up run executes the approved
2529
+ * plan instead of planning again. Rejection keeps Plan Mode on — the agent re-plans with the
2530
+ * feedback in context.
2531
+ *
2532
+ * @protected
2533
+ */
2534
+ protected buildPlanApprovalForm(planText: string): AgentResponseForm;
2121
2535
  private executeChatStep;
2122
2536
  /**
2123
2537
  * Creates a persistent AIAgentRequest row when a Chat step fires.
@@ -2443,6 +2857,14 @@ export declare class BaseAgent {
2443
2857
  * Used by recovery strategies to identify compactable result messages.
2444
2858
  */
2445
2859
  protected IsToolResultMessage(msg: ChatMessage): boolean;
2860
+ /**
2861
+ * Returns true if the message is a turn-generated result (action, tool, client tool,
2862
+ * sub-agent, or loop). These are the volatile, expirable messages that accumulate over
2863
+ * turns. Everything else — system/RAG context, injected memory, the original user
2864
+ * request — anchors the cache-stable prompt prefix and is protected from routine pruning.
2865
+ * @protected
2866
+ */
2867
+ protected IsVolatileResultMessage(msg: ChatMessage): boolean;
2446
2868
  protected estimateTokens(content: ChatMessage['content'], modelName?: string): number;
2447
2869
  /**
2448
2870
  * Provides an improved heuristic token count when tokenizer is unavailable.