@memberjunction/ai-agents 6.2.0-edge.0 → 6.2.0-edge.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -0
- package/dist/AgentDataPreloader.d.ts +4 -0
- package/dist/AgentDataPreloader.d.ts.map +1 -1
- package/dist/AgentDataPreloader.js +10 -2
- package/dist/AgentDataPreloader.js.map +1 -1
- package/dist/AgentDecisionService.d.ts +83 -0
- package/dist/AgentDecisionService.d.ts.map +1 -0
- package/dist/AgentDecisionService.js +155 -0
- package/dist/AgentDecisionService.js.map +1 -0
- package/dist/AgentRunner.d.ts +16 -4
- package/dist/AgentRunner.d.ts.map +1 -1
- package/dist/AgentRunner.js +55 -32
- package/dist/AgentRunner.js.map +1 -1
- package/dist/ArtifactToolManager.d.ts +4 -4
- package/dist/ArtifactToolManager.js +10 -10
- package/dist/ConversationToolManager.d.ts +16 -3
- package/dist/ConversationToolManager.d.ts.map +1 -1
- package/dist/ConversationToolManager.js +28 -5
- package/dist/ConversationToolManager.js.map +1 -1
- package/dist/KnowledgeAgent.d.ts.map +1 -1
- package/dist/KnowledgeAgent.js +6 -6
- package/dist/KnowledgeAgent.js.map +1 -1
- package/dist/PayloadChangeAnalyzer.d.ts +4 -0
- package/dist/PayloadChangeAnalyzer.d.ts.map +1 -1
- package/dist/PayloadChangeAnalyzer.js +10 -2
- package/dist/PayloadChangeAnalyzer.js.map +1 -1
- package/dist/PayloadFeedbackManager.d.ts +120 -13
- package/dist/PayloadFeedbackManager.d.ts.map +1 -1
- package/dist/PayloadFeedbackManager.js +244 -88
- package/dist/PayloadFeedbackManager.js.map +1 -1
- package/dist/PayloadManager.d.ts +27 -0
- package/dist/PayloadManager.d.ts.map +1 -1
- package/dist/PayloadManager.js +47 -15
- package/dist/PayloadManager.js.map +1 -1
- package/dist/agent-context-injector.d.ts +47 -3
- package/dist/agent-context-injector.d.ts.map +1 -1
- package/dist/agent-context-injector.js +77 -10
- package/dist/agent-context-injector.js.map +1 -1
- package/dist/agent-memory-context-builder.d.ts +13 -0
- package/dist/agent-memory-context-builder.d.ts.map +1 -1
- package/dist/agent-memory-context-builder.js +24 -5
- package/dist/agent-memory-context-builder.js.map +1 -1
- package/dist/agent-types/base-agent-type.d.ts +16 -0
- package/dist/agent-types/base-agent-type.d.ts.map +1 -1
- package/dist/agent-types/base-agent-type.js +20 -1
- package/dist/agent-types/base-agent-type.js.map +1 -1
- package/dist/agent-types/flow-agent-type.d.ts +106 -0
- package/dist/agent-types/flow-agent-type.d.ts.map +1 -1
- package/dist/agent-types/flow-agent-type.js +299 -29
- package/dist/agent-types/flow-agent-type.js.map +1 -1
- package/dist/agent-types/flow-graph-executor.d.ts +12 -1
- package/dist/agent-types/flow-graph-executor.d.ts.map +1 -1
- package/dist/agent-types/flow-graph-executor.js +25 -1
- package/dist/agent-types/flow-graph-executor.js.map +1 -1
- package/dist/agent-types/loop-agent-prompt-params.d.ts +258 -11
- package/dist/agent-types/loop-agent-prompt-params.d.ts.map +1 -1
- package/dist/agent-types/loop-agent-prompt-params.js +49 -2
- package/dist/agent-types/loop-agent-prompt-params.js.map +1 -1
- package/dist/agent-types/loop-agent-response-type.d.ts +12 -1
- package/dist/agent-types/loop-agent-response-type.d.ts.map +1 -1
- package/dist/agent-types/loop-agent-response-type.js.map +1 -1
- package/dist/agent-types/loop-agent-type.d.ts +6 -0
- package/dist/agent-types/loop-agent-type.d.ts.map +1 -1
- package/dist/agent-types/loop-agent-type.js +42 -3
- package/dist/agent-types/loop-agent-type.js.map +1 -1
- package/dist/artifact-target-plan.d.ts +2 -0
- package/dist/artifact-target-plan.d.ts.map +1 -1
- package/dist/artifact-target-plan.js +5 -1
- package/dist/artifact-target-plan.js.map +1 -1
- package/dist/base-agent.d.ts +886 -5
- package/dist/base-agent.d.ts.map +1 -1
- package/dist/base-agent.js +2567 -164
- package/dist/base-agent.js.map +1 -1
- package/dist/catalog-narrowing.d.ts +136 -0
- package/dist/catalog-narrowing.d.ts.map +1 -0
- package/dist/catalog-narrowing.js +212 -0
- package/dist/catalog-narrowing.js.map +1 -0
- package/dist/constants.d.ts +57 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +70 -0
- package/dist/constants.js.map +1 -0
- package/dist/decision-discovery.d.ts +401 -0
- package/dist/decision-discovery.d.ts.map +1 -0
- package/dist/decision-discovery.js +511 -0
- package/dist/decision-discovery.js.map +1 -0
- package/dist/finish-if-mode-warnings.d.ts +39 -0
- package/dist/finish-if-mode-warnings.d.ts.map +1 -0
- package/dist/finish-if-mode-warnings.js +78 -0
- package/dist/finish-if-mode-warnings.js.map +1 -0
- package/dist/finish-if-state.d.ts +72 -0
- package/dist/finish-if-state.d.ts.map +1 -0
- package/dist/finish-if-state.js +109 -0
- package/dist/finish-if-state.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/memory-manager-agent.d.ts +119 -13
- package/dist/memory-manager-agent.d.ts.map +1 -1
- package/dist/memory-manager-agent.js +237 -74
- package/dist/memory-manager-agent.js.map +1 -1
- package/dist/memory-note-gate.d.ts +208 -0
- package/dist/memory-note-gate.d.ts.map +1 -0
- package/dist/memory-note-gate.js +294 -0
- package/dist/memory-note-gate.js.map +1 -0
- package/dist/native-tools/action-tool-builder.d.ts +8 -0
- package/dist/native-tools/action-tool-builder.d.ts.map +1 -1
- package/dist/native-tools/action-tool-builder.js +22 -6
- package/dist/native-tools/action-tool-builder.js.map +1 -1
- package/dist/native-tools/control-tools.d.ts +8 -0
- package/dist/native-tools/control-tools.d.ts.map +1 -1
- package/dist/native-tools/control-tools.js +25 -9
- package/dist/native-tools/control-tools.js.map +1 -1
- package/dist/native-tools/dual-channel.d.ts +2 -0
- package/dist/native-tools/dual-channel.d.ts.map +1 -1
- package/dist/native-tools/dual-channel.js +5 -1
- package/dist/native-tools/dual-channel.js.map +1 -1
- package/dist/native-tools/tool-result-turns.d.ts +9 -0
- package/dist/native-tools/tool-result-turns.d.ts.map +1 -1
- package/dist/native-tools/tool-result-turns.js +15 -3
- package/dist/native-tools/tool-result-turns.js.map +1 -1
- package/dist/pipeline/coerce.d.ts +14 -0
- package/dist/pipeline/coerce.d.ts.map +1 -1
- package/dist/pipeline/coerce.js +37 -9
- package/dist/pipeline/coerce.js.map +1 -1
- package/dist/pipeline/jsonpath-eval.d.ts +4 -0
- package/dist/pipeline/jsonpath-eval.d.ts.map +1 -1
- package/dist/pipeline/jsonpath-eval.js +10 -2
- package/dist/pipeline/jsonpath-eval.js.map +1 -1
- package/dist/pipeline/operators.js +16 -16
- package/dist/pipeline/path.d.ts +6 -0
- package/dist/pipeline/path.d.ts.map +1 -1
- package/dist/pipeline/path.js +17 -5
- package/dist/pipeline/path.js.map +1 -1
- package/dist/pipeline/pipeline-executor.js +10 -10
- package/dist/pipeline/predicate.d.ts +4 -0
- package/dist/pipeline/predicate.d.ts.map +1 -1
- package/dist/pipeline/predicate.js +15 -7
- package/dist/pipeline/predicate.js.map +1 -1
- package/dist/pipeline/providers/action-provider.js +2 -2
- package/dist/pipeline/providers/artifact-tool-provider.js +2 -2
- package/dist/pipeline/providers/serialize.d.ts +4 -0
- package/dist/pipeline/providers/serialize.d.ts.map +1 -1
- package/dist/pipeline/providers/serialize.js +10 -2
- package/dist/pipeline/providers/serialize.js.map +1 -1
- package/dist/pipeline/template.d.ts +4 -0
- package/dist/pipeline/template.d.ts.map +1 -1
- package/dist/pipeline/template.js +15 -7
- package/dist/pipeline/template.js.map +1 -1
- package/dist/realtime/agent-media-library.d.ts +10 -0
- package/dist/realtime/agent-media-library.d.ts.map +1 -1
- package/dist/realtime/agent-media-library.js +29 -9
- package/dist/realtime/agent-media-library.js.map +1 -1
- package/dist/realtime/bridge-realtime-session-factory.d.ts +5 -2
- package/dist/realtime/bridge-realtime-session-factory.d.ts.map +1 -1
- package/dist/realtime/bridge-realtime-session-factory.js +7 -4
- package/dist/realtime/bridge-realtime-session-factory.js.map +1 -1
- package/dist/realtime/bridge-room-transcript-sink.d.ts.map +1 -1
- package/dist/realtime/bridge-room-transcript-sink.js +15 -9
- package/dist/realtime/bridge-room-transcript-sink.js.map +1 -1
- package/dist/realtime/media-channel-server.js +2 -2
- package/dist/realtime/meeting-controls-state.d.ts +2 -0
- package/dist/realtime/meeting-controls-state.d.ts.map +1 -1
- package/dist/realtime/meeting-controls-state.js +6 -2
- package/dist/realtime/meeting-controls-state.js.map +1 -1
- package/dist/realtime/realtime-channel-server-data-context.d.ts +2 -0
- package/dist/realtime/realtime-channel-server-data-context.d.ts.map +1 -1
- package/dist/realtime/realtime-channel-server-data-context.js +5 -1
- package/dist/realtime/realtime-channel-server-data-context.js.map +1 -1
- package/dist/realtime/realtime-channel-server-host.js +2 -2
- package/dist/realtime/realtime-client-session-service.d.ts +58 -12
- package/dist/realtime/realtime-client-session-service.d.ts.map +1 -1
- package/dist/realtime/realtime-client-session-service.js +91 -31
- package/dist/realtime/realtime-client-session-service.js.map +1 -1
- package/dist/realtime/realtime-coagent-config.d.ts +2 -0
- package/dist/realtime/realtime-coagent-config.d.ts.map +1 -1
- package/dist/realtime/realtime-coagent-config.js +6 -2
- package/dist/realtime/realtime-coagent-config.js.map +1 -1
- package/dist/realtime/realtime-recording-store.d.ts +15 -0
- package/dist/realtime/realtime-recording-store.d.ts.map +1 -1
- package/dist/realtime/realtime-recording-store.js +31 -7
- package/dist/realtime/realtime-recording-store.js.map +1 -1
- package/dist/realtime/realtime-session-runner.d.ts +4 -4
- package/dist/realtime/realtime-session-runner.js +9 -9
- package/dist/realtime/realtime-session-runner.js.map +1 -1
- package/dist/realtime/realtime-vendor-resolution.d.ts +8 -3
- package/dist/realtime/realtime-vendor-resolution.d.ts.map +1 -1
- package/dist/realtime/realtime-vendor-resolution.js +3 -3
- package/dist/realtime/realtime-vendor-resolution.js.map +1 -1
- package/dist/rubric-evaluation-agent-runner.d.ts +2 -0
- package/dist/rubric-evaluation-agent-runner.d.ts.map +1 -0
- package/dist/rubric-evaluation-agent-runner.js +38 -0
- package/dist/rubric-evaluation-agent-runner.js.map +1 -0
- package/dist/runtime-state-fragment.d.ts +101 -0
- package/dist/runtime-state-fragment.d.ts.map +1 -0
- package/dist/runtime-state-fragment.js +173 -0
- package/dist/runtime-state-fragment.js.map +1 -0
- package/dist/self-check.d.ts +98 -0
- package/dist/self-check.d.ts.map +1 -0
- package/dist/self-check.js +74 -0
- package/dist/self-check.js.map +1 -0
- package/dist/types/payload-operations.d.ts +8 -0
- package/dist/types/payload-operations.d.ts.map +1 -1
- package/dist/types/payload-operations.js +21 -5
- package/dist/types/payload-operations.js.map +1 -1
- package/dist/utils/ConversationMessageResolver.d.ts +4 -0
- package/dist/utils/ConversationMessageResolver.d.ts.map +1 -1
- package/dist/utils/ConversationMessageResolver.js +10 -2
- package/dist/utils/ConversationMessageResolver.js.map +1 -1
- package/dist/volatile-child-prompt.d.ts +33 -0
- package/dist/volatile-child-prompt.d.ts.map +1 -0
- package/dist/volatile-child-prompt.js +76 -0
- package/dist/volatile-child-prompt.js.map +1 -0
- package/package.json +21 -18
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Catalog narrowing (typed-decision plan, Task 3.7): the pure half.
|
|
3
|
+
*
|
|
4
|
+
* On a run's first prompt, `BaseAgent` asks one decision about its catalog: one Likelihood per
|
|
5
|
+
* action, sub-agent and skill, against the request that opened the run. These helpers turn the
|
|
6
|
+
* catalog into those questions, and the answers into the items the prompt hides. The call, the
|
|
7
|
+
* per-run cache and the `Catalog narrowing` step live on `BaseAgent`.
|
|
8
|
+
*
|
|
9
|
+
* Narrowing only HIDES entries from the prompt. It never removes a permission: the effective action
|
|
10
|
+
* and sub-agent sets that validation reads stay whole, so the model can still use anything it is
|
|
11
|
+
* permitted to. It is off unless `maxActionsInPrompt` or `maxSubAgentsInPrompt` is a positive number
|
|
12
|
+
* and the list is longer than it.
|
|
13
|
+
*
|
|
14
|
+
* Hidden must never mean unreachable, so a narrowed list starts with a note saying how many items it
|
|
15
|
+
* hides and how to reach them ({@link CatalogNarrowingNote}), and actions are narrowed only when the
|
|
16
|
+
* agent has Find Candidate Actions ({@link ReachableCatalogNarrowingLimits}).
|
|
17
|
+
*
|
|
18
|
+
* Narrowing is prose-only. It shortens the catalog the prompt describes, never the tools declared
|
|
19
|
+
* for native tool calling: there, a call to an undeclared tool is refused, so a hidden item has to
|
|
20
|
+
* stay declared to stay callable.
|
|
21
|
+
*
|
|
22
|
+
* @module @memberjunction/ai-agents
|
|
23
|
+
*/
|
|
24
|
+
import type { ChatMessage, DecisionAnswer, DecisionQuestion } from '@memberjunction/ai';
|
|
25
|
+
/** The lists narrowing can shorten. */
|
|
26
|
+
export type CatalogNarrowingKind = 'action' | 'agent' | 'skill';
|
|
27
|
+
/**
|
|
28
|
+
* The action through which the model reaches an action narrowing hid. Calling an action takes its
|
|
29
|
+
* parameters, which only its catalog entry or this search gives, so actions are narrowed only when
|
|
30
|
+
* the agent has it.
|
|
31
|
+
*/
|
|
32
|
+
export declare const CATALOG_NARROWING_FIND_ACTIONS = "Find Candidate Actions";
|
|
33
|
+
/**
|
|
34
|
+
* Actions never narrowed out, by name: the search tools the model uses to look past its catalog.
|
|
35
|
+
* Hiding Find Candidate Actions would turn "hidden" into "unreachable".
|
|
36
|
+
*/
|
|
37
|
+
export declare const CATALOG_NARROWING_ALWAYS_SHOWN_ACTIONS: readonly string[];
|
|
38
|
+
/** The most characters of the opening request sent to the decision model as its state. */
|
|
39
|
+
export declare const CATALOG_NARROWING_REQUEST_MAX_CHARS = 8000;
|
|
40
|
+
/** How many items each list may show. `0` means the list is not narrowed. */
|
|
41
|
+
export interface CatalogNarrowingLimits {
|
|
42
|
+
/** From `maxActionsInPrompt`. */
|
|
43
|
+
Actions: number;
|
|
44
|
+
/** From `maxSubAgentsInPrompt`. */
|
|
45
|
+
SubAgents: number;
|
|
46
|
+
/** Skills have no limit of their own, so they share `maxActionsInPrompt`. */
|
|
47
|
+
Skills: number;
|
|
48
|
+
}
|
|
49
|
+
/** One catalog entry offered to narrowing. */
|
|
50
|
+
export interface CatalogNarrowingCandidate {
|
|
51
|
+
Kind: CatalogNarrowingKind;
|
|
52
|
+
ID: string;
|
|
53
|
+
Name: string;
|
|
54
|
+
Description: string;
|
|
55
|
+
/**
|
|
56
|
+
* Always shown, and so never asked about: an action or sub-agent with `MinExecutionsPerRun`
|
|
57
|
+
* set, or one of {@link CATALOG_NARROWING_ALWAYS_SHOWN_ACTIONS}.
|
|
58
|
+
*/
|
|
59
|
+
Pinned: boolean;
|
|
60
|
+
}
|
|
61
|
+
/** What narrowing did to one list. */
|
|
62
|
+
export interface CatalogNarrowingListOutcome {
|
|
63
|
+
/** Items in the list when it was narrowed. */
|
|
64
|
+
Total: number;
|
|
65
|
+
/** The most asked items kept. Pinned items are kept on top of it. */
|
|
66
|
+
Limit: number;
|
|
67
|
+
/** The names shown, in catalog order, pinned ones included. */
|
|
68
|
+
Kept: string[];
|
|
69
|
+
/** The names always shown. */
|
|
70
|
+
Pinned: string[];
|
|
71
|
+
/** Each asked item's probability, by name. */
|
|
72
|
+
Probabilities: Record<string, number>;
|
|
73
|
+
}
|
|
74
|
+
/** A run's narrowing: what each list hides, and what each narrowed list kept. */
|
|
75
|
+
export interface CatalogNarrowingOutcome {
|
|
76
|
+
/** Normalized IDs of the items judged and not kept, per list. Anything else is shown. */
|
|
77
|
+
Hidden: Record<CatalogNarrowingKind, ReadonlySet<string>>;
|
|
78
|
+
/** One entry per list the decision was asked about. */
|
|
79
|
+
Lists: Partial<Record<CatalogNarrowingKind, CatalogNarrowingListOutcome>>;
|
|
80
|
+
}
|
|
81
|
+
/** A narrowing that hides nothing: the result when narrowing is off or fails open. */
|
|
82
|
+
export declare function NoCatalogNarrowing(): CatalogNarrowingOutcome;
|
|
83
|
+
/**
|
|
84
|
+
* Reads the per-list limits from merged agent-type prompt params. Anything but a number of at
|
|
85
|
+
* least 1 is `0`, which leaves the list whole: the default of -1 turns narrowing off.
|
|
86
|
+
*/
|
|
87
|
+
export declare function ResolveCatalogNarrowingLimits(promptParams: Record<string, unknown> | undefined): CatalogNarrowingLimits;
|
|
88
|
+
/** Whether a list of `count` items is narrowed under `limit`: only a positive limit it exceeds. */
|
|
89
|
+
export declare function IsCatalogListNarrowed(limit: number, count: number): boolean;
|
|
90
|
+
/** The limit that applies to one list. */
|
|
91
|
+
export declare function CatalogNarrowingLimitFor(limits: CatalogNarrowingLimits, kind: CatalogNarrowingKind): number;
|
|
92
|
+
/** Whether an action is one of {@link CATALOG_NARROWING_ALWAYS_SHOWN_ACTIONS}. */
|
|
93
|
+
export declare function IsAlwaysShownAction(name: string | null | undefined): boolean;
|
|
94
|
+
/**
|
|
95
|
+
* The limits with narrowing turned off for any list whose hidden items the model could not reach.
|
|
96
|
+
* Actions need {@link CATALOG_NARROWING_FIND_ACTIONS} among the agent's actions. Sub-agents and
|
|
97
|
+
* skills are called by name alone, and the note on a narrowed list names what it hides, so they
|
|
98
|
+
* need nothing.
|
|
99
|
+
*/
|
|
100
|
+
export declare function ReachableCatalogNarrowingLimits(limits: CatalogNarrowingLimits, actionNames: readonly string[]): CatalogNarrowingLimits;
|
|
101
|
+
/**
|
|
102
|
+
* The request that opened the run: the text of the last user message when the run starts, before
|
|
103
|
+
* the framework adds anything. Only text blocks count. Capped at
|
|
104
|
+
* {@link CATALOG_NARROWING_REQUEST_MAX_CHARS}. Empty when there is none.
|
|
105
|
+
*/
|
|
106
|
+
export declare function OpeningRequestText(messages: ChatMessage[] | undefined): string;
|
|
107
|
+
/**
|
|
108
|
+
* The candidates the decision is asked about: the unpinned items of each narrowed list. A list
|
|
109
|
+
* whose unpinned items already fit its limit keeps them all, so it is not asked about.
|
|
110
|
+
*/
|
|
111
|
+
export declare function CatalogNarrowingCandidatesToAsk(candidates: CatalogNarrowingCandidate[], limits: CatalogNarrowingLimits): CatalogNarrowingCandidate[];
|
|
112
|
+
/** The Likelihood question for one candidate. */
|
|
113
|
+
export declare function CatalogNarrowingQuestion(candidate: CatalogNarrowingCandidate): string;
|
|
114
|
+
/** One Likelihood per asked candidate, keyed by its position in `asked`. */
|
|
115
|
+
export declare function BuildCatalogNarrowingQuestions(asked: CatalogNarrowingCandidate[]): Record<string, DecisionQuestion>;
|
|
116
|
+
/**
|
|
117
|
+
* Keeps the `limit` asked items of each list with the highest probability, ties in catalog order,
|
|
118
|
+
* and hides the rest. Pinned items are always kept. Returns `undefined` when any asked item has no
|
|
119
|
+
* Likelihood answer with a finite probability, so the caller can show the full catalog instead of
|
|
120
|
+
* acting on a partial judgment.
|
|
121
|
+
*/
|
|
122
|
+
export declare function SelectCatalogNarrowing(candidates: CatalogNarrowingCandidate[], asked: CatalogNarrowingCandidate[], answers: Record<string, DecisionAnswer>, limits: CatalogNarrowingLimits): CatalogNarrowingOutcome | undefined;
|
|
123
|
+
/**
|
|
124
|
+
* The items of one list the prompt shows: every item not in `hidden`, in their original order.
|
|
125
|
+
* Returns `items` itself when nothing is hidden, so an un-narrowed list is untouched.
|
|
126
|
+
*/
|
|
127
|
+
export declare function ApplyCatalogNarrowing<T extends {
|
|
128
|
+
ID: string;
|
|
129
|
+
}>(items: T[], hidden: ReadonlySet<string> | undefined): T[];
|
|
130
|
+
/**
|
|
131
|
+
* The line a narrowed list starts with: how many items it hides, and how the model reaches them.
|
|
132
|
+
* Actions point to {@link CATALOG_NARROWING_FIND_ACTIONS}, since calling one takes its parameters.
|
|
133
|
+
* Sub-agents and skills are called by name alone, so the note names them.
|
|
134
|
+
*/
|
|
135
|
+
export declare function CatalogNarrowingNote(kind: CatalogNarrowingKind, hiddenNames: readonly string[]): string;
|
|
136
|
+
//# sourceMappingURL=catalog-narrowing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-narrowing.d.ts","sourceRoot":"","sources":["../src/catalog-narrowing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,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AC,MAAM,EAAE,cAAc,CAAC,EACvC,MAAM,EAAE,sBAAsB,GAC/B,uBAAuB,GAAG,SAAS,CAmBrC;AAkCD;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,SAAS,GAAG,CAAC,EAAE,CAKxH;AAID;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,oBAAoB,EAAE,WAAW,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAWvG"}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Catalog narrowing (typed-decision plan, Task 3.7): the pure half.
|
|
3
|
+
*
|
|
4
|
+
* On a run's first prompt, `BaseAgent` asks one decision about its catalog: one Likelihood per
|
|
5
|
+
* action, sub-agent and skill, against the request that opened the run. These helpers turn the
|
|
6
|
+
* catalog into those questions, and the answers into the items the prompt hides. The call, the
|
|
7
|
+
* per-run cache and the `Catalog narrowing` step live on `BaseAgent`.
|
|
8
|
+
*
|
|
9
|
+
* Narrowing only HIDES entries from the prompt. It never removes a permission: the effective action
|
|
10
|
+
* and sub-agent sets that validation reads stay whole, so the model can still use anything it is
|
|
11
|
+
* permitted to. It is off unless `maxActionsInPrompt` or `maxSubAgentsInPrompt` is a positive number
|
|
12
|
+
* and the list is longer than it.
|
|
13
|
+
*
|
|
14
|
+
* Hidden must never mean unreachable, so a narrowed list starts with a note saying how many items it
|
|
15
|
+
* hides and how to reach them ({@link CatalogNarrowingNote}), and actions are narrowed only when the
|
|
16
|
+
* agent has Find Candidate Actions ({@link ReachableCatalogNarrowingLimits}).
|
|
17
|
+
*
|
|
18
|
+
* Narrowing is prose-only. It shortens the catalog the prompt describes, never the tools declared
|
|
19
|
+
* for native tool calling: there, a call to an undeclared tool is refused, so a hidden item has to
|
|
20
|
+
* stay declared to stay callable.
|
|
21
|
+
*
|
|
22
|
+
* @module @memberjunction/ai-agents
|
|
23
|
+
*/
|
|
24
|
+
import { NormalizeUUID } from '@memberjunction/global';
|
|
25
|
+
const CATALOG_NARROWING_KINDS = ['action', 'agent', 'skill'];
|
|
26
|
+
/**
|
|
27
|
+
* The action through which the model reaches an action narrowing hid. Calling an action takes its
|
|
28
|
+
* parameters, which only its catalog entry or this search gives, so actions are narrowed only when
|
|
29
|
+
* the agent has it.
|
|
30
|
+
*/
|
|
31
|
+
export const CATALOG_NARROWING_FIND_ACTIONS = 'Find Candidate Actions';
|
|
32
|
+
/**
|
|
33
|
+
* Actions never narrowed out, by name: the search tools the model uses to look past its catalog.
|
|
34
|
+
* Hiding Find Candidate Actions would turn "hidden" into "unreachable".
|
|
35
|
+
*/
|
|
36
|
+
export const CATALOG_NARROWING_ALWAYS_SHOWN_ACTIONS = [CATALOG_NARROWING_FIND_ACTIONS, 'Find Candidate Agents'];
|
|
37
|
+
/** The most characters of the opening request sent to the decision model as its state. */
|
|
38
|
+
export const CATALOG_NARROWING_REQUEST_MAX_CHARS = 8000;
|
|
39
|
+
/** A narrowing that hides nothing: the result when narrowing is off or fails open. */
|
|
40
|
+
export function NoCatalogNarrowing() {
|
|
41
|
+
return { Hidden: { action: new Set(), agent: new Set(), skill: new Set() }, Lists: {} };
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Reads the per-list limits from merged agent-type prompt params. Anything but a number of at
|
|
45
|
+
* least 1 is `0`, which leaves the list whole: the default of -1 turns narrowing off.
|
|
46
|
+
*/
|
|
47
|
+
export function ResolveCatalogNarrowingLimits(promptParams) {
|
|
48
|
+
const actions = positiveLimit(promptParams?.maxActionsInPrompt);
|
|
49
|
+
return { Actions: actions, SubAgents: positiveLimit(promptParams?.maxSubAgentsInPrompt), Skills: actions };
|
|
50
|
+
}
|
|
51
|
+
function positiveLimit(value) {
|
|
52
|
+
return typeof value === 'number' && value >= 1 ? Math.floor(value) : 0;
|
|
53
|
+
}
|
|
54
|
+
/** Whether a list of `count` items is narrowed under `limit`: only a positive limit it exceeds. */
|
|
55
|
+
export function IsCatalogListNarrowed(limit, count) {
|
|
56
|
+
return limit > 0 && count > limit;
|
|
57
|
+
}
|
|
58
|
+
/** The limit that applies to one list. */
|
|
59
|
+
export function CatalogNarrowingLimitFor(limits, kind) {
|
|
60
|
+
switch (kind) {
|
|
61
|
+
case 'action':
|
|
62
|
+
return limits.Actions;
|
|
63
|
+
case 'agent':
|
|
64
|
+
return limits.SubAgents;
|
|
65
|
+
case 'skill':
|
|
66
|
+
return limits.Skills;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/** Whether two action names match, ignoring case and surrounding spaces. */
|
|
70
|
+
function sameActionName(a, b) {
|
|
71
|
+
return (a ?? '').trim().toLowerCase() === b.toLowerCase();
|
|
72
|
+
}
|
|
73
|
+
/** Whether an action is one of {@link CATALOG_NARROWING_ALWAYS_SHOWN_ACTIONS}. */
|
|
74
|
+
export function IsAlwaysShownAction(name) {
|
|
75
|
+
return CATALOG_NARROWING_ALWAYS_SHOWN_ACTIONS.some(n => sameActionName(name, n));
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* The limits with narrowing turned off for any list whose hidden items the model could not reach.
|
|
79
|
+
* Actions need {@link CATALOG_NARROWING_FIND_ACTIONS} among the agent's actions. Sub-agents and
|
|
80
|
+
* skills are called by name alone, and the note on a narrowed list names what it hides, so they
|
|
81
|
+
* need nothing.
|
|
82
|
+
*/
|
|
83
|
+
export function ReachableCatalogNarrowingLimits(limits, actionNames) {
|
|
84
|
+
const canFindActions = actionNames.some(n => sameActionName(n, CATALOG_NARROWING_FIND_ACTIONS));
|
|
85
|
+
return canFindActions ? limits : { ...limits, Actions: 0 };
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* The request that opened the run: the text of the last user message when the run starts, before
|
|
89
|
+
* the framework adds anything. Only text blocks count. Capped at
|
|
90
|
+
* {@link CATALOG_NARROWING_REQUEST_MAX_CHARS}. Empty when there is none.
|
|
91
|
+
*/
|
|
92
|
+
export function OpeningRequestText(messages) {
|
|
93
|
+
const last = (messages ?? []).filter(m => m.role === 'user').pop();
|
|
94
|
+
if (!last) {
|
|
95
|
+
return '';
|
|
96
|
+
}
|
|
97
|
+
const text = typeof last.content === 'string'
|
|
98
|
+
? last.content
|
|
99
|
+
: (last.content ?? []).filter(b => b.type === 'text').map(b => b.content).join('\n');
|
|
100
|
+
return text.trim().slice(0, CATALOG_NARROWING_REQUEST_MAX_CHARS);
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* The candidates the decision is asked about: the unpinned items of each narrowed list. A list
|
|
104
|
+
* whose unpinned items already fit its limit keeps them all, so it is not asked about.
|
|
105
|
+
*/
|
|
106
|
+
export function CatalogNarrowingCandidatesToAsk(candidates, limits) {
|
|
107
|
+
return CATALOG_NARROWING_KINDS.flatMap(kind => {
|
|
108
|
+
const limit = CatalogNarrowingLimitFor(limits, kind);
|
|
109
|
+
const list = candidates.filter(c => c.Kind === kind);
|
|
110
|
+
if (!IsCatalogListNarrowed(limit, list.length)) {
|
|
111
|
+
return [];
|
|
112
|
+
}
|
|
113
|
+
const unpinned = list.filter(c => !c.Pinned);
|
|
114
|
+
return unpinned.length > limit ? unpinned : [];
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
/** The Likelihood question for one candidate. */
|
|
118
|
+
export function CatalogNarrowingQuestion(candidate) {
|
|
119
|
+
const description = (candidate.Description ?? '').trim();
|
|
120
|
+
return `This ${candidate.Kind} is useful for the request: ${candidate.Name}${description ? `: ${description}` : ''}`;
|
|
121
|
+
}
|
|
122
|
+
function questionKey(index) {
|
|
123
|
+
return `c${index + 1}`;
|
|
124
|
+
}
|
|
125
|
+
/** One Likelihood per asked candidate, keyed by its position in `asked`. */
|
|
126
|
+
export function BuildCatalogNarrowingQuestions(asked) {
|
|
127
|
+
const questions = {};
|
|
128
|
+
asked.forEach((candidate, i) => {
|
|
129
|
+
questions[questionKey(i)] = { Kind: 'Likelihood', Instructions: CatalogNarrowingQuestion(candidate) };
|
|
130
|
+
});
|
|
131
|
+
return questions;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Keeps the `limit` asked items of each list with the highest probability, ties in catalog order,
|
|
135
|
+
* and hides the rest. Pinned items are always kept. Returns `undefined` when any asked item has no
|
|
136
|
+
* Likelihood answer with a finite probability, so the caller can show the full catalog instead of
|
|
137
|
+
* acting on a partial judgment.
|
|
138
|
+
*/
|
|
139
|
+
export function SelectCatalogNarrowing(candidates, asked, answers, limits) {
|
|
140
|
+
const probabilities = askedProbabilities(asked, answers);
|
|
141
|
+
if (!probabilities) {
|
|
142
|
+
return undefined;
|
|
143
|
+
}
|
|
144
|
+
const outcome = NoCatalogNarrowing();
|
|
145
|
+
for (const kind of CATALOG_NARROWING_KINDS) {
|
|
146
|
+
const askedOfKind = asked.map((c, i) => ({ Candidate: c, Probability: probabilities[i] })).filter(a => a.Candidate.Kind === kind);
|
|
147
|
+
if (askedOfKind.length === 0) {
|
|
148
|
+
continue;
|
|
149
|
+
}
|
|
150
|
+
const limit = CatalogNarrowingLimitFor(limits, kind);
|
|
151
|
+
// Array.prototype.sort is stable, so equal probabilities keep catalog order.
|
|
152
|
+
const hidden = [...askedOfKind].sort((a, b) => b.Probability - a.Probability).slice(limit).map(a => NormalizeUUID(a.Candidate.ID));
|
|
153
|
+
const hiddenSet = new Set(hidden);
|
|
154
|
+
outcome.Hidden[kind] = hiddenSet;
|
|
155
|
+
outcome.Lists[kind] = listOutcome(candidates.filter(c => c.Kind === kind), askedOfKind, hiddenSet, limit);
|
|
156
|
+
}
|
|
157
|
+
return outcome;
|
|
158
|
+
}
|
|
159
|
+
/** Each asked item's probability, by position, or `undefined` when any is missing or not finite. */
|
|
160
|
+
function askedProbabilities(asked, answers) {
|
|
161
|
+
const probabilities = [];
|
|
162
|
+
for (let i = 0; i < asked.length; i++) {
|
|
163
|
+
const answer = answers[questionKey(i)];
|
|
164
|
+
if (answer?.Kind !== 'Likelihood' || typeof answer.Probability !== 'number' || !Number.isFinite(answer.Probability)) {
|
|
165
|
+
return undefined;
|
|
166
|
+
}
|
|
167
|
+
probabilities.push(answer.Probability);
|
|
168
|
+
}
|
|
169
|
+
return probabilities;
|
|
170
|
+
}
|
|
171
|
+
function listOutcome(list, askedOfKind, hidden, limit) {
|
|
172
|
+
const probabilities = {};
|
|
173
|
+
for (const a of askedOfKind) {
|
|
174
|
+
probabilities[a.Candidate.Name] = a.Probability;
|
|
175
|
+
}
|
|
176
|
+
return {
|
|
177
|
+
Total: list.length,
|
|
178
|
+
Limit: limit,
|
|
179
|
+
Kept: list.filter(c => !hidden.has(NormalizeUUID(c.ID))).map(c => c.Name),
|
|
180
|
+
Pinned: list.filter(c => c.Pinned).map(c => c.Name),
|
|
181
|
+
Probabilities: probabilities,
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* The items of one list the prompt shows: every item not in `hidden`, in their original order.
|
|
186
|
+
* Returns `items` itself when nothing is hidden, so an un-narrowed list is untouched.
|
|
187
|
+
*/
|
|
188
|
+
export function ApplyCatalogNarrowing(items, hidden) {
|
|
189
|
+
if (!hidden || hidden.size === 0) {
|
|
190
|
+
return items;
|
|
191
|
+
}
|
|
192
|
+
return items.filter(item => !hidden.has(NormalizeUUID(item?.ID)));
|
|
193
|
+
}
|
|
194
|
+
const NOTE_NOUNS = { action: 'action', agent: 'sub-agent', skill: 'skill' };
|
|
195
|
+
/**
|
|
196
|
+
* The line a narrowed list starts with: how many items it hides, and how the model reaches them.
|
|
197
|
+
* Actions point to {@link CATALOG_NARROWING_FIND_ACTIONS}, since calling one takes its parameters.
|
|
198
|
+
* Sub-agents and skills are called by name alone, so the note names them.
|
|
199
|
+
*/
|
|
200
|
+
export function CatalogNarrowingNote(kind, hiddenNames) {
|
|
201
|
+
const count = hiddenNames.length;
|
|
202
|
+
const lead = `${count} of your ${NOTE_NOUNS[kind]}s ${count === 1 ? 'is' : 'are'} not described below`;
|
|
203
|
+
switch (kind) {
|
|
204
|
+
case 'action':
|
|
205
|
+
return `${lead}. If none below fits the task, call ${CATALOG_NARROWING_FIND_ACTIONS} to find one and its parameters, then call it by name.`;
|
|
206
|
+
case 'agent':
|
|
207
|
+
return `${lead}: ${hiddenNames.join(', ')}. Call one by name if it fits the task.`;
|
|
208
|
+
case 'skill':
|
|
209
|
+
return `${lead}: ${hiddenNames.join(', ')}. Activate one by name if it fits the task.`;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
//# sourceMappingURL=catalog-narrowing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-narrowing.js","sourceRoot":"","sources":["../src/catalog-narrowing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAKvD,MAAM,uBAAuB,GAAoC,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AAE9F;;;;GAIG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,wBAAwB,CAAC;AAEvE;;;GAGG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAsB,CAAC,8BAA8B,EAAE,uBAAuB,CAAC,CAAC;AAEnI,0FAA0F;AAC1F,MAAM,CAAC,MAAM,mCAAmC,GAAG,IAAI,CAAC;AA+CxD,sFAAsF;AACtF,MAAM,UAAU,kBAAkB;IAC9B,OAAO,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,GAAG,EAAU,EAAE,KAAK,EAAE,IAAI,GAAG,EAAU,EAAE,KAAK,EAAE,IAAI,GAAG,EAAU,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;AACpH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,6BAA6B,CAAC,YAAiD;IAC3F,MAAM,OAAO,GAAG,aAAa,CAA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
|
1
|
+
/**
|
|
2
|
+
* @fileoverview The one source of truth for the string literals the agent runtime and its prompt
|
|
3
|
+
* templates agree on: template placeholder names, the trailing runtime-state fragment's tag
|
|
4
|
+
* literals and section headings, and the markers that identify a template still rendering volatile
|
|
5
|
+
* state itself.
|
|
6
|
+
*
|
|
7
|
+
* Why a standalone module: `base-agent.ts` imports the modules that need these
|
|
8
|
+
* (`volatile-child-prompt.ts`, `runtime-state-fragment.ts`, the agent types), so hanging them on
|
|
9
|
+
* `BaseAgent` would make every one of those imports circular. This file imports nothing, so anything
|
|
10
|
+
* in the package can depend on it.
|
|
11
|
+
*
|
|
12
|
+
* @module @memberjunction/ai-agents
|
|
13
|
+
*/
|
|
14
|
+
/** Template variable the loop agent fills with the current payload (`{{ _CURRENT_PAYLOAD | dump }}`). */
|
|
15
|
+
export declare const CURRENT_PAYLOAD_PLACEHOLDER = "_CURRENT_PAYLOAD";
|
|
16
|
+
/** Template variable holding the rendered scratchpad notes. */
|
|
17
|
+
export declare const SCRATCHPAD_NOTES_PLACEHOLDER = "_SCRATCHPAD_NOTES";
|
|
18
|
+
/** Template variable holding the rendered scratchpad task list. */
|
|
19
|
+
export declare const SCRATCHPAD_TASKS_PLACEHOLDER = "_SCRATCHPAD_TASKS";
|
|
20
|
+
/** Template variable holding the scratchpad task summary, e.g. "1 of 2 tasks complete". */
|
|
21
|
+
export declare const SCRATCHPAD_TASK_SUMMARY_PLACEHOLDER = "_SCRATCHPAD_TASK_SUMMARY";
|
|
22
|
+
/** System placeholder (see `SystemPlaceholderManager`) for today's date. */
|
|
23
|
+
export declare const CURRENT_DATE_PLACEHOLDER = "_CURRENT_DATE";
|
|
24
|
+
/** System placeholder for the current day of the week. */
|
|
25
|
+
export declare const CURRENT_DAY_OF_WEEK_PLACEHOLDER = "_CURRENT_DAY_OF_WEEK";
|
|
26
|
+
/** System placeholder for the current time. */
|
|
27
|
+
export declare const CURRENT_TIME_PLACEHOLDER = "_CURRENT_TIME";
|
|
28
|
+
/**
|
|
29
|
+
* Agent-level template variables (not system placeholders) that change every iteration. A child
|
|
30
|
+
* prompt referencing any of these mutates the system prompt per iteration, which is what
|
|
31
|
+
* `IsVolatileChildPrompt` detects.
|
|
32
|
+
*/
|
|
33
|
+
export declare const VOLATILE_AGENT_VARIABLES: readonly string[];
|
|
34
|
+
/**
|
|
35
|
+
* Temporal system placeholders that are stable for a run and therefore NOT volatile.
|
|
36
|
+
* `_CURRENT_TIMEZONE` is in the "Date & Time" category but does not change between iterations.
|
|
37
|
+
*/
|
|
38
|
+
export declare const STABLE_TEMPORAL_PLACEHOLDERS: ReadonlySet<string>;
|
|
39
|
+
/** Tag wrapping the runtime-state blocks in the trailing fragment. */
|
|
40
|
+
export declare const RUNTIME_STATE_TAG = "mj-runtime-state";
|
|
41
|
+
/** Tag wrapping a relocated agent specialization (child prompt) in the trailing fragment. */
|
|
42
|
+
export declare const AGENT_SPECIALIZATION_TAG = "mj-agent-specialization";
|
|
43
|
+
/** Heading of the date/time block, in the fragment and in the legacy system-prompt layout alike. */
|
|
44
|
+
export declare const RUNTIME_STATE_DATETIME_HEADING = "## Current Date/Time";
|
|
45
|
+
/** Heading of the scratchpad block. */
|
|
46
|
+
export declare const RUNTIME_STATE_SCRATCHPAD_HEADING = "## Scratchpad State";
|
|
47
|
+
/** Heading of the payload block. */
|
|
48
|
+
export declare const RUNTIME_STATE_PAYLOAD_HEADING = "## Current State";
|
|
49
|
+
/**
|
|
50
|
+
* Strings whose presence in a system prompt's UNRENDERED template text means that template still
|
|
51
|
+
* renders the volatile state itself — the legacy Loop layout on a database whose template has not
|
|
52
|
+
* synced, or any custom template that embeds the payload. `BaseAgent` suppresses the trailing
|
|
53
|
+
* fragment for such a template so the model never receives the state twice. Overridable per agent
|
|
54
|
+
* through `BaseAgent.volatileTemplateMarkers`.
|
|
55
|
+
*/
|
|
56
|
+
export declare const VOLATILE_TEMPLATE_MARKERS: readonly string[];
|
|
57
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,yGAAyG;AACzG,eAAO,MAAM,2BAA2B,qBAAqB,CAAC;AAE9D,+DAA+D;AAC/D,eAAO,MAAM,4BAA4B,sBAAsB,CAAC;AAEhE,mEAAmE;AACnE,eAAO,MAAM,4BAA4B,sBAAsB,CAAC;AAEhE,2FAA2F;AAC3F,eAAO,MAAM,mCAAmC,6BAA6B,CAAC;AAE9E,4EAA4E;AAC5E,eAAO,MAAM,wBAAwB,kBAAkB,CAAC;AAExD,0DAA0D;AAC1D,eAAO,MAAM,+BAA+B,yBAAyB,CAAC;AAEtE,+CAA+C;AAC/C,eAAO,MAAM,wBAAwB,kBAAkB,CAAC;AAExD;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,EAAE,SAAS,MAAM,EAKrD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,EAAE,WAAW,CAAC,MAAM,CAAkC,CAAC;AAIhG,sEAAsE;AACtE,eAAO,MAAM,iBAAiB,qBAAqB,CAAC;AAEpD,6FAA6F;AAC7F,eAAO,MAAM,wBAAwB,4BAA4B,CAAC;AAElE,oGAAoG;AACpG,eAAO,MAAM,8BAA8B,yBAAyB,CAAC;AAErE,uCAAuC;AACvC,eAAO,MAAM,gCAAgC,wBAAwB,CAAC;AAEtE,oCAAoC;AACpC,eAAO,MAAM,6BAA6B,qBAAqB,CAAC;AAEhE;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,EAAE,SAAS,MAAM,EAMtD,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview The one source of truth for the string literals the agent runtime and its prompt
|
|
3
|
+
* templates agree on: template placeholder names, the trailing runtime-state fragment's tag
|
|
4
|
+
* literals and section headings, and the markers that identify a template still rendering volatile
|
|
5
|
+
* state itself.
|
|
6
|
+
*
|
|
7
|
+
* Why a standalone module: `base-agent.ts` imports the modules that need these
|
|
8
|
+
* (`volatile-child-prompt.ts`, `runtime-state-fragment.ts`, the agent types), so hanging them on
|
|
9
|
+
* `BaseAgent` would make every one of those imports circular. This file imports nothing, so anything
|
|
10
|
+
* in the package can depend on it.
|
|
11
|
+
*
|
|
12
|
+
* @module @memberjunction/ai-agents
|
|
13
|
+
*/
|
|
14
|
+
// ── Template placeholders ───────────────────────────────────────────────────────────────────────
|
|
15
|
+
/** Template variable the loop agent fills with the current payload (`{{ _CURRENT_PAYLOAD | dump }}`). */
|
|
16
|
+
export const CURRENT_PAYLOAD_PLACEHOLDER = '_CURRENT_PAYLOAD';
|
|
17
|
+
/** Template variable holding the rendered scratchpad notes. */
|
|
18
|
+
export const SCRATCHPAD_NOTES_PLACEHOLDER = '_SCRATCHPAD_NOTES';
|
|
19
|
+
/** Template variable holding the rendered scratchpad task list. */
|
|
20
|
+
export const SCRATCHPAD_TASKS_PLACEHOLDER = '_SCRATCHPAD_TASKS';
|
|
21
|
+
/** Template variable holding the scratchpad task summary, e.g. "1 of 2 tasks complete". */
|
|
22
|
+
export const SCRATCHPAD_TASK_SUMMARY_PLACEHOLDER = '_SCRATCHPAD_TASK_SUMMARY';
|
|
23
|
+
/** System placeholder (see `SystemPlaceholderManager`) for today's date. */
|
|
24
|
+
export const CURRENT_DATE_PLACEHOLDER = '_CURRENT_DATE';
|
|
25
|
+
/** System placeholder for the current day of the week. */
|
|
26
|
+
export const CURRENT_DAY_OF_WEEK_PLACEHOLDER = '_CURRENT_DAY_OF_WEEK';
|
|
27
|
+
/** System placeholder for the current time. */
|
|
28
|
+
export const CURRENT_TIME_PLACEHOLDER = '_CURRENT_TIME';
|
|
29
|
+
/**
|
|
30
|
+
* Agent-level template variables (not system placeholders) that change every iteration. A child
|
|
31
|
+
* prompt referencing any of these mutates the system prompt per iteration, which is what
|
|
32
|
+
* `IsVolatileChildPrompt` detects.
|
|
33
|
+
*/
|
|
34
|
+
export const VOLATILE_AGENT_VARIABLES = [
|
|
35
|
+
CURRENT_PAYLOAD_PLACEHOLDER,
|
|
36
|
+
SCRATCHPAD_NOTES_PLACEHOLDER,
|
|
37
|
+
SCRATCHPAD_TASKS_PLACEHOLDER,
|
|
38
|
+
SCRATCHPAD_TASK_SUMMARY_PLACEHOLDER,
|
|
39
|
+
];
|
|
40
|
+
/**
|
|
41
|
+
* Temporal system placeholders that are stable for a run and therefore NOT volatile.
|
|
42
|
+
* `_CURRENT_TIMEZONE` is in the "Date & Time" category but does not change between iterations.
|
|
43
|
+
*/
|
|
44
|
+
export const STABLE_TEMPORAL_PLACEHOLDERS = new Set(['_CURRENT_TIMEZONE']);
|
|
45
|
+
// ── Trailing runtime-state fragment ─────────────────────────────────────────────────────────────
|
|
46
|
+
/** Tag wrapping the runtime-state blocks in the trailing fragment. */
|
|
47
|
+
export const RUNTIME_STATE_TAG = 'mj-runtime-state';
|
|
48
|
+
/** Tag wrapping a relocated agent specialization (child prompt) in the trailing fragment. */
|
|
49
|
+
export const AGENT_SPECIALIZATION_TAG = 'mj-agent-specialization';
|
|
50
|
+
/** Heading of the date/time block, in the fragment and in the legacy system-prompt layout alike. */
|
|
51
|
+
export const RUNTIME_STATE_DATETIME_HEADING = '## Current Date/Time';
|
|
52
|
+
/** Heading of the scratchpad block. */
|
|
53
|
+
export const RUNTIME_STATE_SCRATCHPAD_HEADING = '## Scratchpad State';
|
|
54
|
+
/** Heading of the payload block. */
|
|
55
|
+
export const RUNTIME_STATE_PAYLOAD_HEADING = '## Current State';
|
|
56
|
+
/**
|
|
57
|
+
* Strings whose presence in a system prompt's UNRENDERED template text means that template still
|
|
58
|
+
* renders the volatile state itself — the legacy Loop layout on a database whose template has not
|
|
59
|
+
* synced, or any custom template that embeds the payload. `BaseAgent` suppresses the trailing
|
|
60
|
+
* fragment for such a template so the model never receives the state twice. Overridable per agent
|
|
61
|
+
* through `BaseAgent.volatileTemplateMarkers`.
|
|
62
|
+
*/
|
|
63
|
+
export const VOLATILE_TEMPLATE_MARKERS = [
|
|
64
|
+
RUNTIME_STATE_DATETIME_HEADING,
|
|
65
|
+
RUNTIME_STATE_SCRATCHPAD_HEADING,
|
|
66
|
+
RUNTIME_STATE_PAYLOAD_HEADING,
|
|
67
|
+
CURRENT_DATE_PLACEHOLDER,
|
|
68
|
+
CURRENT_PAYLOAD_PLACEHOLDER,
|
|
69
|
+
];
|
|
70
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,mGAAmG;AAEnG,yGAAyG;AACzG,MAAM,CAAC,MAAM,2BAA2B,GAAG,kBAAkB,CAAC;AAE9D,+DAA+D;AAC/D,MAAM,CAAC,MAAM,4BAA4B,GAAG,mBAAmB,CAAC;AAEhE,mEAAmE;AACnE,MAAM,CAAC,MAAM,4BAA4B,GAAG,mBAAmB,CAAC;AAEhE,2FAA2F;AAC3F,MAAM,CAAC,MAAM,mCAAmC,GAAG,0BAA0B,CAAC;AAE9E,4EAA4E;AAC5E,MAAM,CAAC,MAAM,wBAAwB,GAAG,eAAe,CAAC;AAExD,0DAA0D;AAC1D,MAAM,CAAC,MAAM,+BAA+B,GAAG,sBAAsB,CAAC;AAEtE,+CAA+C;AAC/C,MAAM,CAAC,MAAM,wBAAwB,GAAG,eAAe,CAAC;AAExD;;;;GAIG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAsB;IACvD,2BAA2B;IAC3B,4BAA4B;IAC5B,4BAA4B;IAC5B,mCAAmC;CACtC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAwB,IAAI,GAAG,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC;AAEhG,mGAAmG;AAEnG,sEAAsE;AACtE,MAAM,CAAC,MAAM,iBAAiB,GAAG,kBAAkB,CAAC;AAEpD,6FA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