@memberjunction/ai-agents 6.2.0 → 6.3.0-edge.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 (96) hide show
  1. package/README.md +21 -1
  2. package/dist/AgentContextAssembler.d.ts +127 -0
  3. package/dist/AgentContextAssembler.d.ts.map +1 -0
  4. package/dist/AgentContextAssembler.js +482 -0
  5. package/dist/AgentContextAssembler.js.map +1 -0
  6. package/dist/AgentDataPreloader.d.ts +5 -1
  7. package/dist/AgentDataPreloader.d.ts.map +1 -1
  8. package/dist/AgentDataPreloader.js +13 -7
  9. package/dist/AgentDataPreloader.js.map +1 -1
  10. package/dist/AgentFeedbackCoordinator.d.ts +169 -0
  11. package/dist/AgentFeedbackCoordinator.d.ts.map +1 -0
  12. package/dist/AgentFeedbackCoordinator.js +593 -0
  13. package/dist/AgentFeedbackCoordinator.js.map +1 -0
  14. package/dist/AgentStepDispatcher.d.ts +211 -0
  15. package/dist/AgentStepDispatcher.d.ts.map +1 -0
  16. package/dist/AgentStepDispatcher.js +729 -0
  17. package/dist/AgentStepDispatcher.js.map +1 -0
  18. package/dist/AgentTreeBudgetTracker.d.ts +163 -0
  19. package/dist/AgentTreeBudgetTracker.d.ts.map +1 -0
  20. package/dist/AgentTreeBudgetTracker.js +415 -0
  21. package/dist/AgentTreeBudgetTracker.js.map +1 -0
  22. package/dist/AgentWakeTriggerService.d.ts +41 -1
  23. package/dist/AgentWakeTriggerService.d.ts.map +1 -1
  24. package/dist/AgentWakeTriggerService.js +154 -8
  25. package/dist/AgentWakeTriggerService.js.map +1 -1
  26. package/dist/MJAIAgentRequestEntityServer.d.ts +32 -1
  27. package/dist/MJAIAgentRequestEntityServer.d.ts.map +1 -1
  28. package/dist/MJAIAgentRequestEntityServer.js +105 -3
  29. package/dist/MJAIAgentRequestEntityServer.js.map +1 -1
  30. package/dist/PayloadManager.d.ts.map +1 -1
  31. package/dist/PayloadManager.js +14 -1
  32. package/dist/PayloadManager.js.map +1 -1
  33. package/dist/SkillMarkdownConverter.d.ts +1 -1
  34. package/dist/SkillMarkdownConverter.d.ts.map +1 -1
  35. package/dist/SkillMarkdownConverter.js +4 -4
  36. package/dist/SkillMarkdownConverter.js.map +1 -1
  37. package/dist/agent-pre-execution-rag.d.ts +5 -0
  38. package/dist/agent-pre-execution-rag.d.ts.map +1 -1
  39. package/dist/agent-pre-execution-rag.js +5 -0
  40. package/dist/agent-pre-execution-rag.js.map +1 -1
  41. package/dist/agent-types/base-agent-type.d.ts.map +1 -1
  42. package/dist/agent-types/base-agent-type.js +8 -1
  43. package/dist/agent-types/base-agent-type.js.map +1 -1
  44. package/dist/agent-types/loop-agent-prompt-params.d.ts +18 -0
  45. package/dist/agent-types/loop-agent-prompt-params.d.ts.map +1 -1
  46. package/dist/agent-types/loop-agent-prompt-params.js +2 -0
  47. package/dist/agent-types/loop-agent-prompt-params.js.map +1 -1
  48. package/dist/base-agent.d.ts +105 -133
  49. package/dist/base-agent.d.ts.map +1 -1
  50. package/dist/base-agent.js +395 -1472
  51. package/dist/base-agent.js.map +1 -1
  52. package/dist/catalog-narrowing.d.ts +112 -5
  53. package/dist/catalog-narrowing.d.ts.map +1 -1
  54. package/dist/catalog-narrowing.js +181 -6
  55. package/dist/catalog-narrowing.js.map +1 -1
  56. package/dist/index.d.ts +6 -1
  57. package/dist/index.d.ts.map +1 -1
  58. package/dist/index.js +6 -1
  59. package/dist/index.js.map +1 -1
  60. package/dist/pipeline/operators.d.ts.map +1 -1
  61. package/dist/pipeline/operators.js +1 -1
  62. package/dist/pipeline/operators.js.map +1 -1
  63. package/dist/pipeline/pipeline-executor.d.ts +29 -1
  64. package/dist/pipeline/pipeline-executor.d.ts.map +1 -1
  65. package/dist/pipeline/pipeline-executor.js +159 -2
  66. package/dist/pipeline/pipeline-executor.js.map +1 -1
  67. package/dist/pipeline/pipeline.types.d.ts +19 -1
  68. package/dist/pipeline/pipeline.types.d.ts.map +1 -1
  69. package/dist/pipeline/template.d.ts +11 -0
  70. package/dist/pipeline/template.d.ts.map +1 -1
  71. package/dist/pipeline/template.js +56 -6
  72. package/dist/pipeline/template.js.map +1 -1
  73. package/dist/realtime/bridge-room-transcript-sink.d.ts.map +1 -1
  74. package/dist/realtime/bridge-room-transcript-sink.js +28 -1
  75. package/dist/realtime/bridge-room-transcript-sink.js.map +1 -1
  76. package/dist/realtime/media-channel-server.js +1 -1
  77. package/dist/realtime/media-channel-server.js.map +1 -1
  78. package/dist/realtime/realtime-client-session-service.d.ts +122 -2
  79. package/dist/realtime/realtime-client-session-service.d.ts.map +1 -1
  80. package/dist/realtime/realtime-client-session-service.js +413 -4
  81. package/dist/realtime/realtime-client-session-service.js.map +1 -1
  82. package/dist/realtime/realtime-coagent-config.d.ts +4 -2
  83. package/dist/realtime/realtime-coagent-config.d.ts.map +1 -1
  84. package/dist/realtime/realtime-coagent-config.js +27 -38
  85. package/dist/realtime/realtime-coagent-config.js.map +1 -1
  86. package/dist/realtime/realtime-delegation-narrator.js +1 -1
  87. package/dist/realtime/realtime-delegation-narrator.js.map +1 -1
  88. package/dist/realtime/realtime-session-runner.d.ts +2 -0
  89. package/dist/realtime/realtime-session-runner.d.ts.map +1 -1
  90. package/dist/realtime/realtime-session-runner.js +24 -3
  91. package/dist/realtime/realtime-session-runner.js.map +1 -1
  92. package/dist/unsafe-object-keys.d.ts +20 -0
  93. package/dist/unsafe-object-keys.d.ts.map +1 -0
  94. package/dist/unsafe-object-keys.js +42 -0
  95. package/dist/unsafe-object-keys.js.map +1 -0
  96. package/package.json +20 -20
@@ -1 +1 @@
1
- {"version":3,"file":"base-agent-type.d.ts","sourceRoot":"","sources":["../../src/agent-types/base-agent-type.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,WAAW,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,kBAAkB,EAAC,MAAM,8BAA8B,C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AClB,YAAY,EAAE,MAAM,CAAC;QACrB,IAAI,EAAE,GAAG,CAAC;QACV,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,GAAG,CAAC;KACpB,GACF,CAAC,GAAG,IAAI;CAGd"}
@@ -12,7 +12,8 @@
12
12
  */
13
13
  import { CURRENT_PAYLOAD_PLACEHOLDER } from '../constants.js';
14
14
  import { MJGlobal, JSONValidator } from '@memberjunction/global';
15
- import { LogError, IsVerboseLoggingEnabled } from '@memberjunction/core';
15
+ import { LogError, LogStatus, IsVerboseLoggingEnabled } from '@memberjunction/core';
16
+ import { StripUnsafeObjectKeys } from '../unsafe-object-keys.js';
16
17
  /**
17
18
  * Abstract base class for agent type implementations.
18
19
  *
@@ -221,6 +222,12 @@ export class BaseAgentType {
221
222
  else {
222
223
  response = promptResult.result;
223
224
  }
225
+ // Model output can carry injected text. Drop keys such as `__proto__` so no later walk of
226
+ // this object can follow them onto Object.prototype.
227
+ const removedKeys = StripUnsafeObjectKeys(response);
228
+ if (removedKeys.length > 0) {
229
+ LogStatus(`${this.constructor.name}: ignored unsafe keys in response: ${removedKeys.join(", ")}`);
230
+ }
224
231
  // Clean validation syntax from the response
225
232
  response = this._jsonValidator.cleanValidationSyntax(response);
226
233
  if (IsVerboseLoggingEnabled()) {
@@ -1 +1 @@
1
- {"version":3,"file":"base-agent-type.js","sourceRoot":"","sources":["../../src/agent-types/base-agent-type.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAI3D,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAmBzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,OAAgB,aAAa;IAAnC;QACI;;;WAGG;QACO,mBAAc,GAAkB,IAAI,aAAa,EAA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BAAuB,CAChC,cAAmB,EACnB,eAAqC,EACrC,cAAiB,EACjB,cAAmB,EACnB,WAAiC;QAEjC,sCAAsC;QACtC,oDAAoD;QACpD,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAW,yBAAyB;QAChC,OAAO,IAAI,CAAC,CAAC,4CAA4C;IAC7D,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,IAAW,wBAAwB;QAC/B,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;;;;OASG;IACI,8BAA8B;QACjC,OAAO,kEAAkE;YAClE,kEAAkE,CAAC;IAC9E,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACI,KAAK,CAAC,kBAAkB,CAC3B,IAA0B,EAC1B,MAA0B,EAC1B,MAA6B,EAC7B,OAAU,EACV,cAAmB;QAEnB,2EAA2E;QAC3E,4DAA4D;QAC5D,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;;;;OASG;IACI,wBAAwB,CAAM,cAAmB;QACpD,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;;;;OASG;IACH,IAAW,0BAA0B;QACjC,OAAO,IAAI,CAAC,CAAE,4CAA4C;IAC9D,CAAC;IAED;;;;;;;;;;OAUG;IACI,mBAAmB,CACtB,OAQC;QAMD,OAAO,IAAI,CAAC,CAAE,6BAA6B;IAC/C,CAAC;IAED;;;;;;;;;;OAUG;IACI,kBAAkB,CACrB,eAQC;QAED,OAAO,IAAI,CAAC,CAAE,6BAA6B;IAC/C,CAAC"}
@@ -536,6 +536,24 @@ export interface LoopAgentTypePromptParams {
536
536
  * @default -1
537
537
  */
538
538
  maxActionsInPrompt?: number;
539
+ /**
540
+ * Dedicated catalog limit for skills injected into the system prompt.
541
+ * - When omitted (`undefined`), falls back to `maxActionsInPrompt`.
542
+ * - When set to `-1` or `0`, disables skill narrowing even when `maxActionsInPrompt > 0`.
543
+ * - When set to a positive integer `N` and the agent has more than `N` available skills,
544
+ * runs two-stage hybrid skill prioritization (Stage 1 hybrid query-fit + agent frequency +
545
+ * recency pre-filter followed by Stage 2 `AgentDecisionService` narrowing when `decisionsEnabled`
546
+ * is true, or direct top-N hybrid selection when `decisionsEnabled` is false).
547
+ * Explicitly assigned agent skills (`MJ: AI Agent Skills`) are always pinned.
548
+ */
549
+ maxSkillsInPrompt?: number;
550
+ /**
551
+ * Maximum number of unpinned skill candidates sent to `AgentDecisionService` after Stage 1
552
+ * hybrid pre-ranking (`RankSkillsByHybridRelevance`). Prevents prompt bloat when an agent
553
+ * has access to hundreds or thousands of auto-activatable skills.
554
+ * @default 30
555
+ */
556
+ maxSkillDecisionCandidates?: number;
539
557
  /**
540
558
  * Character cap for one client tool result in the conversation. -1 (the default) or 0 keeps
541
559
  * the whole result. A positive N keeps the first N characters and adds a note saying how much
@@ -1 +1 @@
1
- {"version":3,"file":"loop-agent-prompt-params.d.ts","sourceRoot":"","sources":["../../src/agent-types/loop-agent-prompt-params.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,0BAA0B;IACvC;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,OA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CAAC,EAAE,OAAO,CAAC;IAE5B;;;;;;OAMG;IACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE9B;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,aAAa,GAAG,WAAW,CAAC,CAAC;CAC/E;AAED;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,IAAI,CAAC;AAEhD;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAE/C,iFAAiF;AACjF,eAAO,MAAM,eAAe,EAAE,SAAS,YAAY,EAA4B,CAAC;AAEhF;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAEpE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,CAEhE;AAED;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,yBAAyB,CAuChF,CAAC"}
1
+ {"version":3,"file":"loop-agent-prompt-params.d.ts","sourceRoot":"","sources":["../../src/agent-types/loop-agent-prompt-params.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,0BAA0B;IACvC;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAA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9B;;;;;;;;;;;;;;;;OAgBG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;;;;;;;;OASG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;;;OAKG;IACH,0BAA0B,CAAC,EAAE,MAAM,CAAC;IAEpC;;;;;OAKG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAElC;;;;;;;;;;;;;OAaG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B;;;;;;OAMG;IACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE9B;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,aAAa,GAAG,WAAW,CAAC,CAAC;CAC/E;AAED;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,IAAI,CAAC;AAEhD;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAE/C,iFAAiF;AACjF,eAAO,MAAM,eAAe,EAAE,SAAS,YAAY,EAA4B,CAAC;AAEhF;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAEpE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,CAEhE;AAED;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,yBAAyB,CAyChF,CAAC"}
@@ -106,6 +106,8 @@ export const DEFAULT_LOOP_AGENT_PROMPT_PARAMS = {
106
106
  enableHandoff: false,
107
107
  maxSubAgentsInPrompt: -1,
108
108
  maxActionsInPrompt: -1,
109
+ maxSkillsInPrompt: -1,
110
+ maxSkillDecisionCandidates: 30,
109
111
  clientToolResultMaxChars: -1,
110
112
  decisionDiscovery: false,
111
113
  untrustedActionNames: [],
@@ -1 +1 @@
1
- {"version":3,"file":"loop-agent-prompt-params.js","sourceRoot":"","sources":["../../src/agent-types/loop-agent-prompt-params.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAsHH;;;GAGG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAyC;IACvF,OAAO,EAAE,IAAI;IACb,aAAa,EAAE,IAAI;IACnB,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,IAAI;IACb,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,IAAI;IAChB,iBAAiB,EAAE,IAAI;IACvB,QAAQ,EAAE,IAAI;IACd,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,IAAI;IACd,2GAA2G;IAC3G,KAAK,EAAE,KAAK;IACZ,OAAO,EAAE,KAAK;CACjB,CAAC;AAmfF;;;;GAIG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAC;AAE/C,iFAAiF;AACjF,MAAM,CAAC,MAAM,eAAe,GAA4B,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;AAEhF;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,KAAc;IACzC,OAAO,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,KAAK,KAAK,CAAC,CAAC;AACxD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAc;IAC9C,OAAO,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;AACjD,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAwC;IACjF,6BAA6B,EAAE,EAAE,GAAG,qCAAqC,EAAE;IAC3E,kBAAkB,EAAE,IAAI;IACxB,gBAAgB,EAAE,IAAI;IACtB,uBAAuB,EAAE,IAAI;IAC7B,kBAAkB,EAAE,IAAI;IACxB,2BAA2B,EAAE,IAAI;IACjC,uBAAuB,EAAE,IAAI;IAC7B,sBAAsB,EAAE,IAAI;IAC5B,uBAAuB,EAAE,IAAI;IAC7B,qBAAqB,EAAE,IAAI;IAC3B,uBAAuB,EAAE,MAAM;IAC/B,iBAAiB,EAAE,MAAM;IACzB,kBAAkB,EAAE,EAAE;IACtB,wBAAwB,EAAE,IAAI;IAC9B,4BAA4B,EAAE,IAAI;IAClC,mBAAmB,EAAE,IAAI;IACzB,mGAAmG;IACnG,gBAAgB,EAAE,KAAK;IACvB,oBAAoB,EAAE,KAAK;IAC3B,iBAAiB,EAAE,GAAG;IACtB,oBAAoB,EAAE,8BAA8B;IACpD,wBAAwB,EAAE,2BAA2B;IACrD,kBAAkB,EAAE,kBAAkB;IACtC,YAAY,EAAE,KAAK;IACnB,mBAAmB,EAAE,IAAI;IACzB,iBAAiB,EAAE,GAAG;IACtB,8EAA8E;IAC9E,oBAAoB,EAAE,KAAK;IAC3B,4EAA4E;IAC5E,gBAAgB,EAAE,KAAK;IACvB,aAAa,EAAE,KAAK;IACpB,oBAAoB,EAAE,CAAC,CAAC;IACxB,kBAAkB,EAAE,CAAC,CAAC;IACtB,wBAAwB,EAAE,CAAC,CAAC;IAC5B,iBAAiB,EAAE,KAAK;IACxB,oBAAoB,EAAE,EAAE;IACxB,kBAAkB,EAAE,EAAE;IACtB,iBAAiB,EAAE,EAAE;CACxB,CAAC"}
1
+ {"version":3,"file":"loop-agent-prompt-params.js","sourceRoot":"","sources":["../../src/agent-types/loop-agent-prompt-params.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAsHH;;;GAGG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAyC;IACvF,OAAO,EAAE,IAAI;IACb,aAAa,EAAE,IAAI;IACnB,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,IAAI;IACb,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,IAAI;IAChB,iBAAiB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AAgB,EAAE,KAAK;IACvB,oBAAoB,EAAE,KAAK;IAC3B,iBAAiB,EAAE,GAAG;IACtB,oBAAoB,EAAE,8BAA8B;IACpD,wBAAwB,EAAE,2BAA2B;IACrD,kBAAkB,EAAE,kBAAkB;IACtC,YAAY,EAAE,KAAK;IACnB,mBAAmB,EAAE,IAAI;IACzB,iBAAiB,EAAE,GAAG;IACtB,8EAA8E;IAC9E,oBAAoB,EAAE,KAAK;IAC3B,4EAA4E;IAC5E,gBAAgB,EAAE,KAAK;IACvB,aAAa,EAAE,KAAK;IACpB,oBAAoB,EAAE,CAAC,CAAC;IACxB,kBAAkB,EAAE,CAAC,CAAC;IACtB,iBAAiB,EAAE,CAAC,CAAC;IACrB,0BAA0B,EAAE,EAAE;IAC9B,wBAAwB,EAAE,CAAC,CAAC;IAC5B,iBAAiB,EAAE,KAAK;IACxB,oBAAoB,EAAE,EAAE;IACxB,kBAAkB,EAAE,EAAE;IACtB,iBAAiB,EAAE,EAAE;CACxB,CAAC"}
@@ -125,12 +125,15 @@ export interface ExecuteSingleActionOptions {
125
125
  * - `'audience'` — the action engine refused the action for the run's audience (`AUDIENCE_UNSUPPORTED`): it cannot
126
126
  * limit what it returns to what everyone in a shared conversation may see, so it is locked out for the run. Not a
127
127
  * configuration or credential error, and the model is told so.
128
+ * - `'tainted'` — the run read untrusted content under a task-graph envelope and the action is `disallowWhenTainted`
129
+ * (`TAINTED_EGRESS_BLOCKED`), so it is locked out until a person reviews that content. Not a configuration or
130
+ * credential error either, and the model is told so.
128
131
  * - `'identical-arguments'` — the action already failed {@link IDENTICAL_FAILURE_THRESHOLD} times
129
132
  * with these exact arguments.
130
133
  * - `'attempts-exhausted'` — the action has failed {@link ACTION_FAILURE_BUDGET} consecutive times
131
134
  * across any arguments.
132
135
  */
133
- export type ActionCircuitBreakerReason = 'fatal' | 'audience' | 'identical-arguments' | 'attempts-exhausted';
136
+ export type ActionCircuitBreakerReason = 'fatal' | 'audience' | 'tainted' | 'identical-arguments' | 'attempts-exhausted';
134
137
  /**
135
138
  * What {@link BaseAgent.classifyActionFailure} names for a failed action: the breaker rule that fired, a refusal by
136
139
  * the user's agent policy (`'policy'` — governance, not a parameter error, so the guidance must not tell the model
@@ -248,6 +251,18 @@ export declare class BaseAgent {
248
251
  * @protected
249
252
  */
250
253
  protected _treeBudget: AgentTreeBudget | undefined;
254
+ private __budgetTracker?;
255
+ /** Collaborator tracking hierarchical token, cost, wall-clock, and attempt budgets across the agent tree. */
256
+ private get _budgetTracker();
257
+ private __feedbackCoordinator?;
258
+ /** Collaborator coordinating HITL feedback requests, assignment strategy resolution, and List routing. */
259
+ private get _feedbackCoordinator();
260
+ private __contextAssembler?;
261
+ /** Collaborator assembling outgoing message arrays, trailing runtime-state fragments, and prompt catalogs. */
262
+ private get _contextAssembler();
263
+ private __stepDispatcher?;
264
+ /** Collaborator dispatching step/loop formatting, payload mapping, and template resolution. */
265
+ private get _stepDispatcher();
251
266
  /**
252
267
  * Gets the shared {@link AgentTreeBudget} tracking cumulative steps, tokens, cost,
253
268
  * and elapsed wall-clock duration across the root agent and all descendant sub-agents.
@@ -302,6 +317,13 @@ export declare class BaseAgent {
302
317
  * @private
303
318
  */
304
319
  private _audienceLockedActions;
320
+ /**
321
+ * Actions refused because the run read untrusted content under a task-graph envelope (`TAINTED_EGRESS_BLOCKED`) —
322
+ * locked out like {@link _fatalActionFailures}, under their own breaker reason (`'tainted'`) so the model is told
323
+ * a person must review that content first rather than that the action is misconfigured.
324
+ * @private
325
+ */
326
+ private _taintLockedActions;
305
327
  /**
306
328
  * The run's audience readers beyond the caller (`ExecuteAgentParams.Audience`), hydrated from the user cache:
307
329
  * `[]` when the audience adds nobody, `undefined` until hydrated for this run. Set after the permission check
@@ -418,17 +440,21 @@ export declare class BaseAgent {
418
440
  */
419
441
  protected recordActionFailure(action: AgentAction, actionEntity: MJActionEntityExtended | undefined, message: string | null | undefined, normalizedParams: string): void;
420
442
  /**
421
- * Locks an action out for the rest of the run: later calls short-circuit on the breaker's `'fatal'` rule, or on
422
- * its `'audience'` rule for an action the engine refused for the run's audience.
443
+ * Locks an action out for the rest of the run: later calls short-circuit on the breaker's `'fatal'` rule, on
444
+ * its `'audience'` rule for an action the engine refused for the run's audience, or on its `'tainted'` rule for
445
+ * an action refused because the run read untrusted content.
423
446
  */
424
447
  private lockOutAction;
425
448
  /** Clears the run-scoped circuit-breaker state (both lockouts and the failure history) for a new run. */
426
449
  private resetActionCircuitBreaker;
427
450
  /**
428
- * The blocked result for an action locked out for the run — refused for the audience (`'audience'`), or failed
429
- * with an unrecoverable configuration or credential error (`'fatal'`) — or null when it is not locked out.
451
+ * The blocked result for an action locked out for the run — refused for the audience (`'audience'`), refused
452
+ * because the run read untrusted content (`'tainted'`), or failed with an unrecoverable configuration or
453
+ * credential error (`'fatal'`) — or null when it is not locked out.
430
454
  */
431
455
  private lockedOutActionResult;
456
+ /** What the model is told about an action locked out because the run read untrusted content (`'tainted'`). */
457
+ private taintLockoutText;
432
458
  /**
433
459
  * Clears the parameter-aware failure history for an action after it succeeds, so the
434
460
  * identical-arguments rule and the consecutive-attempt budget start over.
@@ -526,6 +552,21 @@ export declare class BaseAgent {
526
552
  * @protected
527
553
  */
528
554
  protected recordTaintedSource(stepNumber: number, sourceName: string, trustLevel: AgentTaintedSource['trustLevel']): void;
555
+ /**
556
+ * Starts a run tainted when it executes a task-graph node whose input is tainted
557
+ * (`ExecuteAgentParams.SecurityEnvelope.IsRunTainted`): the node's input derives from untrusted content no
558
+ * completed Human step reviewed, so the run is tainted before it reads anything itself, exactly as the run
559
+ * that ingested the content was. Private: a security seed is not an extension point, and an override that
560
+ * skipped it would start a tainted run clean.
561
+ */
562
+ private seedTaintFromSecurityEnvelope;
563
+ /**
564
+ * Starts a sub-agent run tainted when its parent, running outside any task graph, was tainted
565
+ * (`ExecuteAgentParams.ParentRunTainted`): it works from the parent's context. A sub-agent of a graph
566
+ * node is seeded through its envelope instead ({@link seedTaintFromSecurityEnvelope}). Private for
567
+ * the same reason.
568
+ */
569
+ private seedTaintFromParentRun;
529
570
  /**
530
571
  * Folds a finished sub-agent's tainted sources into this run's, attributed to the sub-agent step,
531
572
  * so delegating a web search taints the parent exactly as searching itself would. Runs whether or
@@ -625,8 +666,8 @@ export declare class BaseAgent {
625
666
  */
626
667
  private _awaitingWorkflowTaskID;
627
668
  /**
628
- * Stores the ID of an AIAgentRequest created when a Chat step fires.
629
- * Populated by executeChatStep(), returned in ExecuteAgentResult.feedbackRequestId.
669
+ * Stores the ID of an AIAgentRequest created when a Chat or Plan step fires.
670
+ * Populated by createFeedbackRequest(), returned in ExecuteAgentResult.feedbackRequestId.
630
671
  * Only set for root agents (depth 0), not sub-agents.
631
672
  * @private
632
673
  */
@@ -1219,6 +1260,7 @@ export declare class BaseAgent {
1219
1260
  */
1220
1261
  protected get DefaultAgentTimeoutMS(): number;
1221
1262
  Execute<C = any, R = any>(params: ExecuteAgentParams<C>): Promise<ExecuteAgentResult<R>>;
1263
+ private executeRun;
1222
1264
  /**
1223
1265
  * {@link Execute}'s per-run teardown, called from its top-level `finally` on every exit path.
1224
1266
  * The run leaves the watchdog first, before the subclass {@link finalizeRun} hook, so a hook
@@ -1262,16 +1304,22 @@ export declare class BaseAgent {
1262
1304
  * A malformed audience counts as adding one (the run fails before the gates are reached anyway).
1263
1305
  */
1264
1306
  private runAudienceAddsReader;
1307
+ /**
1308
+ * What this run carries that a graph would have to carry too, or null when nothing: an audience that adds a
1309
+ * reader, host-assigned search scopes, a tenant or secondary dimension (`ActionRunScopeIsBounded`), bound
1310
+ * action parameters, the caller's tenant context, or taint. A graph runs outside the run — its nodes are claimed later
1311
+ * by a dispatcher, as a background worker — so each of these is lost unless the graph's security envelope
1312
+ * carries it.
1313
+ */
1314
+ private taskGraphConstraint;
1265
1315
  /**
1266
1316
  * Why this run is not offered task graphs and refuses one the model writes, or null when it may use them — the one
1267
- * predicate, so every condition that withholds graphs is added in one place. A graph runs outside the run: its
1268
- * action nodes are dispatched by the task-graph runner (MJServer's `TaskGraphActionRunner`) with no `Audience`,
1269
- * no `RunScope` and no run `Context`, outside {@link ExecuteSingleAction}, and an agent node starts a run
1270
- * (`TaskGraphAgentRunner`) that carries neither the audience nor the scope. So graphs are withheld when the
1271
- * audience adds a reader, and when the run's validated scope carries a tenant or a secondary dimension
1272
- * (`ActionRunScopeIsBounded`): a model-written Scoped Search node would search outside the run's tenant, and an
1273
- * agent node would drop it. Likewise when the host assigned the run's search scopes (`SearchScopeIDs`): a graph's
1274
- * Scoped Search node would fall back to the agent's own search access.
1317
+ * predicate, read by the prompt (`promptWithholding`) and by {@link executeTasksStep} alike, so the two cannot
1318
+ * disagree. A constrained run ({@link taskGraphConstraint}) may use graphs only when the registered submitter
1319
+ * enforces security envelopes (`TaskGraphSubmitter.SupportsSecurityEnvelope`): then the envelope carries the
1320
+ * audience, the validated run scope (tenant, dimensions and search scopes), the bound parameters, the caller's
1321
+ * tenant context and the taint into every node. Nothing the caller passes opens this gate. What the envelope
1322
+ * cannot carry keeps the refusal: a malformed audience, and a tenant context JSON would change.
1275
1323
  */
1276
1324
  private taskGraphWithholdingReason;
1277
1325
  /** Whether this run withholds task graphs ({@link taskGraphWithholdingReason}). */
@@ -3677,7 +3725,8 @@ export declare class BaseAgent {
3677
3725
  private reachableCatalogNarrowingLimits;
3678
3726
  /**
3679
3727
  * Every item of the three lists as a narrowing candidate. An action or sub-agent with
3680
- * `MinExecutionsPerRun` set, and the Find Candidate tools, are pinned: always shown.
3728
+ * `MinExecutionsPerRun` set, explicitly assigned `MJ: AI Agent Skills` (when the agent also has
3729
+ * unpinned auto-activatable skills), and the Find Candidate tools, are pinned: always shown.
3681
3730
  */
3682
3731
  private catalogNarrowingCandidates;
3683
3732
  /**
@@ -3978,12 +4027,21 @@ export declare class BaseAgent {
3978
4027
  * @throws {Error} If the action fails to execute
3979
4028
  */
3980
4029
  ExecuteSingleAction(params: ExecuteAgentParams, action: AgentAction, actionEntity: MJActionEntityExtended, contextUser?: UserInfo, options?: ExecuteSingleActionOptions): Promise<ActionResult>;
4030
+ /**
4031
+ * Refuses a `disallowWhenTainted` action (`Action.Config_Object`) in a run that executes under a
4032
+ * task-graph security envelope (`ExecuteAgentParams.SecurityEnvelope`: a graph's agent node, its
4033
+ * continuation turn, or a sub-agent of either) once the run is tainted — checked on every call against
4034
+ * the run's current taint. The node's runner takes those actions away from a run that starts tainted;
4035
+ * this is what stops one that becomes tainted mid-run (it read a web page, then tries to send mail).
4036
+ */
4037
+ private checkTaintedEgress;
3981
4038
  /**
3982
4039
  * Checks per-(Agent, User) action policy narrowing rules (`MJ: AI Agent User Policies`)
3983
- * before dispatching an action. Returns a synthetic ActionResult when the action is denied,
3984
- * deferred outside a configured time window, or requires explicit user approval.
4040
+ * before dispatching an action. Loads the user's policy on cold cache (failing closed on
4041
+ * lookup error) and returns a synthetic ActionResult when the action is denied, deferred
4042
+ * outside a configured time window, or requires explicit user approval.
3985
4043
  */
3986
- protected checkUserActionPolicy(params: ExecuteAgentParams, action: AgentAction, actionEntity: MJActionEntityExtended, contextUser?: UserInfo): ActionResult | null;
4044
+ protected checkUserActionPolicy(params: ExecuteAgentParams, action: AgentAction, actionEntity: MJActionEntityExtended, contextUser?: UserInfo): Promise<ActionResult | null>;
3987
4045
  /**
3988
4046
  * Makes a SLICED conversation window safe to send on its own.
3989
4047
  *
@@ -4183,7 +4241,7 @@ export declare class BaseAgent {
4183
4241
  protected buildActionResultsMessage(actionSummaries: ActionResultSummary[]): string;
4184
4242
  /**
4185
4243
  * Formats an array of action result summaries as compact markdown instead of
4186
- * pretty-printed JSON. This typically saves 60-70 % of the tokens that the
4244
+ * pretty-printed JSON. This typically saves 60-70 % of the tokens that the
4187
4245
  * old `JSON.stringify(actionSummaries, null, 2)` approach consumed, while
4188
4246
  * remaining equally parseable by LLMs.
4189
4247
  *
@@ -4205,7 +4263,7 @@ export declare class BaseAgent {
4205
4263
  protected formatActionResultsAsMarkdown(actionSummaries: ActionResultSummary[]): string;
4206
4264
  /**
4207
4265
  * Formats an ExecuteAgentResult as compact markdown for inclusion in
4208
- * conversation messages. Extracts only the fields that are meaningful
4266
+ * conversation messages. Extracts only the fields that are meaningful
4209
4267
  * to the calling agent (success, status, error, and payload) and
4210
4268
  * presents them in a concise format.
4211
4269
  *
@@ -4215,23 +4273,6 @@ export declare class BaseAgent {
4215
4273
  * @private
4216
4274
  */
4217
4275
  private formatSubAgentResultAsMarkdown;
4218
- /**
4219
- * Formats a single output parameter value for inclusion in action result
4220
- * markdown. Scalars are shown inline with backtick formatting; objects and
4221
- * arrays use compact (single-line) JSON to avoid the indentation overhead
4222
- * of pretty-printed JSON.
4223
- *
4224
- * By default, values are **not truncated** — the expiration/compaction lifecycle
4225
- * handles context window management. Truncating at formatting time permanently
4226
- * discards data before the LLM ever sees it. Pass an explicit maxLength only
4227
- * when you have a specific reason to limit output size.
4228
- *
4229
- * @param value - The parameter value (any type)
4230
- * @param maxLength - Maximum character length before truncation (0 = no limit, default 0)
4231
- * @returns Formatted string
4232
- * @private
4233
- */
4234
- private formatParamValueForResult;
4235
4276
  /**
4236
4277
  * Resolve the per-run action-result compression config from the agent-type prompt
4237
4278
  * params. Crushing is on by default and only disabled when an agent explicitly sets
@@ -4239,34 +4280,11 @@ export declare class BaseAgent {
4239
4280
  * @private
4240
4281
  */
4241
4282
  protected resolveActionResultCrush(params: ExecuteAgentParams): ActionResultCrushConfig | undefined;
4242
- /**
4243
- * AST-reduce a large code-string action-result value when the agent opted into a code
4244
- * language (via `crushCodeLang` or a subclass override) and the value clears the size
4245
- * threshold. Returns reduced code plus a one-line legend, or null to keep the string
4246
- * verbatim (crushing disabled, too small, or no net saving).
4247
- *
4248
- * token optimization via @memberjunction/context-crush (CodeCompressor-inspired)
4249
- * @private
4250
- */
4251
- private crushCodeValue;
4252
- /**
4253
- * Structurally compress a JSON action-result value when crushing is enabled for the run
4254
- * and the value clears the size threshold. Accepts either the `JSON.stringify` of an
4255
- * object/array param, or a raw string param that itself contains JSON (many actions
4256
- * stringify their payloads, e.g. `run-adhoc-query`'s `Results`). Returns crushed text
4257
- * plus a one-line legend, or null when crushing is disabled, the value is too small, the
4258
- * value isn't valid JSON, or compression wouldn't actually save characters — so callers
4259
- * fall back to verbatim (and, for strings, to code crushing) behavior.
4260
- *
4261
- * token optimization via @memberjunction/context-crush (SmartCrusher-inspired)
4262
- * @private
4263
- */
4264
- private crushParamValue;
4265
4283
  /**
4266
4284
  * Formats a parameter value for display in action execution messages.
4267
4285
  * Truncates long strings and formats objects/arrays for readability.
4268
4286
  *
4269
- * @param {any} value - The parameter value to format
4287
+ * @param {unknown} value - The parameter value to format
4270
4288
  * @param {number} maxLength - Maximum length before truncation (default: 100)
4271
4289
  * @returns {string} Formatted value suitable for message display
4272
4290
  * @private
@@ -4914,22 +4932,6 @@ export declare class BaseAgent {
4914
4932
  * @private
4915
4933
  */
4916
4934
  private applySubAgentOutputMapping;
4917
- /**
4918
- * Sets a value in a target object, supporting array append operations.
4919
- * If the key ends with [], the value is appended to an array instead of replacing.
4920
- *
4921
- * @param target - Target object to modify
4922
- * @param key - Property key, optionally ending with [] for array append
4923
- * @param value - Value to set or append
4924
- * @private
4925
- */
4926
- /**
4927
- * Sets a value on a target object, honouring the `[]` array-append suffix.
4928
- *
4929
- * Delegates for the same reason as {@link getValueFromPath} — `results[]` must mean append in
4930
- * both engines, or a workflow accumulates in one and overwrites in the other.
4931
- */
4932
- private setMappedValue;
4933
4935
  /**
4934
4936
  * Applies sub-agent input mapping to prepare initial payload for related sub-agent.
4935
4937
  * Maps parent payload paths to sub-agent initial payload paths.
@@ -5245,6 +5247,22 @@ export declare class BaseAgent {
5245
5247
  * @protected
5246
5248
  */
5247
5249
  protected executeTasksStep(params: ExecuteAgentParams, previousDecision: BaseAgentNextStep): Promise<BaseAgentNextStep>;
5250
+ /**
5251
+ * How a sub-agent run inherits this run's taint (S2). A sub-agent works from this run's context, so it
5252
+ * starts tainted when this run is tainted now, and carries the taint into its memory writes and any graph
5253
+ * it submits. When this run executes under a task-graph envelope (`params.SecurityEnvelope`), the
5254
+ * sub-agent gets that envelope with `IsRunTainted` set, and so refuses `disallowWhenTainted` actions as
5255
+ * an agent node does. A run outside any graph hands down only the taint (`ParentRunTainted`): its
5256
+ * sub-agent is held to what the run itself is, not to a gate the run is not under.
5257
+ */
5258
+ private subAgentTaint;
5259
+ /**
5260
+ * The security envelope a graph this run submits carries: the run's bound parameters, the readers its audience
5261
+ * adds, its validated scope exactly as each action dispatch is handed it ({@link runScopeFor}), the caller's
5262
+ * tenant context and its taint — merged with the envelope this run itself executes under, when it is a
5263
+ * task-graph node (`ExecuteAgentParams.SecurityEnvelope`), keeping the stricter of each part.
5264
+ */
5265
+ private taskGraphSecurityEnvelope;
5248
5266
  /**
5249
5267
  * Executes a `'Handoff'` next step: records the `'Handoff'` step entity with the resolved
5250
5268
  * target agent ID, stores {@link _handoffResult} for {@link ExecuteAgentResult.handoff},
@@ -5294,32 +5312,18 @@ export declare class BaseAgent {
5294
5312
  */
5295
5313
  private raiseFeedbackRequest;
5296
5314
  /**
5297
- * Creates a persistent AIAgentRequest row when a Chat step fires.
5298
- * Resolves the target user via the assignment chain:
5299
- * 1. contextUser (explicit caller)
5300
- * 2. AgentRun.UserID (run initiator)
5301
- * 3. Conversation.UserID (conversation fallback)
5302
- * 4. Agent.OwnerUserID (agent owner)
5303
- * 5. null (system-level, visible to admins)
5315
+ * Creates a persistent AIAgentRequest row when a Chat or Plan step fires.
5316
+ * Resolves the target user via the assignment chain (delegating to
5317
+ * {@link AgentFeedbackCoordinator.CreateFeedbackRequest}):
5318
+ * 1. ExecuteAgentParams.assignmentStrategy (per-invocation override)
5319
+ * 2. Agent Type's AssignmentStrategy
5320
+ * 3. Agent's Category AssignmentStrategy (walks up ParentID tree)
5321
+ * 4. Request Type's DefaultAssignmentStrategy
5322
+ * 5. Fallback: contextUser (explicit caller) or null (system-level, visible to admins)
5304
5323
  *
5305
5324
  * @private
5306
5325
  */
5307
5326
  private createFeedbackRequest;
5308
- /**
5309
- * Walks the assignment strategy resolution chain (bottom-up, first-non-null wins):
5310
- * 1. ExecuteAgentParams.assignmentStrategy (per-invocation)
5311
- * 2. Agent Type's AssignmentStrategy
5312
- * 3. Agent's Category AssignmentStrategy (walks up ParentID tree)
5313
- * 4. Request Type's DefaultAssignmentStrategy
5314
- * 5. Fallback: null (caller uses contextUser + warning)
5315
- * @private
5316
- */
5317
- private resolveAssignmentStrategy;
5318
- /**
5319
- * Walks up the agent's category hierarchy looking for an AssignmentStrategy.
5320
- * Uses AIEngine.Instance.AgentCategories (cached during engine Config).
5321
- */
5322
- private resolveCategoryAssignmentStrategy;
5323
5327
  /**
5324
5328
  * Resolves the file storage account ID for this agent's file artifacts.
5325
5329
  *
@@ -5335,32 +5339,6 @@ export declare class BaseAgent {
5335
5339
  * @returns The resolved FileStorageAccount ID, or null if none configured
5336
5340
  */
5337
5341
  protected getStorageAccountID(params: ExecuteAgentParams): Promise<string | null>;
5338
- /**
5339
- * Resolves the target user ID from a resolved assignment strategy.
5340
- * For simple strategies (RunUser, AgentOwner, SpecificUser), resolves immediately.
5341
- * For List/SharedInbox strategies, delegates to list-based resolution.
5342
- * Falls back to contextUser with a warning if no strategy is provided.
5343
- * @private
5344
- */
5345
- private resolveUserFromStrategy;
5346
- /**
5347
- * Determines the request type ID based on the Chat step's context.
5348
- * - If the responseForm has only approve/reject-style buttons, uses "Approval"
5349
- * - If there's a responseForm with fields, uses "Information"
5350
- * - Otherwise defaults to "Information"
5351
- *
5352
- * Request types come from the AI engine's cached `MJ: AI Agent Request Types` rows
5353
- * (`AIEngineBase.ResolveAgentRequestTypeID`), the same source the agent actions use.
5354
- * @private
5355
- */
5356
- private resolveRequestTypeId;
5357
- /**
5358
- * Inspects an AgentResponseForm to determine the best request type name.
5359
- * Returns "Approval" if the form is a simple two-option approve/reject pattern,
5360
- * otherwise returns "Information".
5361
- * @private
5362
- */
5363
- private detectRequestTypeName;
5364
5342
  /**
5365
5343
  * Executes a ForEach loop with actual for loop
5366
5344
  */
@@ -5442,12 +5420,6 @@ export declare class BaseAgent {
5442
5420
  * Flow agents don't inject loop results, so for them this is just the Failed step.
5443
5421
  */
5444
5422
  private failLoopBeforeFirstIteration;
5445
- /**
5446
- * One loop error as readable text. Joining the error objects directly wrote "[object Object]"
5447
- * into the step's ErrorMessage. Falls back to JSON when an iteration threw something with no
5448
- * message (a thrown non-Error).
5449
- */
5450
- private describeLoopError;
5451
5423
  /** All loop errors as text for a step's ErrorMessage. */
5452
5424
  private formatLoopErrors;
5453
5425
  /**
@@ -5455,7 +5427,7 @@ export declare class BaseAgent {
5455
5427
  * depending on whether the loop body executed actions or sub-agents:
5456
5428
  *
5457
5429
  * - **Action iterations**: `priorStepResult` is an `ActionResultSummary[]`, set by
5458
- * `executeActionsStep()` (line ~7003). These are formatted via `formatActionResultsAsMarkdown()`.
5430
+ * `executeActionsStep()`. These are formatted via `formatActionResultsAsMarkdown()`.
5459
5431
  *
5460
5432
  * - **Sub-agent iterations**: `priorStepResult` is a **pre-formatted markdown string**,
5461
5433
  * set by the loop handlers (`executeSingleForEachIteration` / `executeSingleWhileIteration`)