@warlock.js/ai 4.15.0 → 5.0.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.
- package/CHANGELOG.md +183 -158
- package/cjs/index.cjs +637 -104
- package/cjs/index.cjs.map +1 -1
- package/esm/contracts/index.d.mts +2 -2
- package/esm/contracts/memory/index.d.mts +1 -1
- package/esm/contracts/memory/memory-config.type.d.mts +29 -3
- package/esm/contracts/memory/memory-config.type.d.mts.map +1 -1
- package/esm/contracts/memory/memory-item.type.d.mts +15 -1
- package/esm/contracts/memory/memory-item.type.d.mts.map +1 -1
- package/esm/contracts/memory/memory.contract.d.mts +15 -2
- package/esm/contracts/memory/memory.contract.d.mts.map +1 -1
- package/esm/contracts/memory/recall-options.type.d.mts +12 -0
- package/esm/contracts/memory/recall-options.type.d.mts.map +1 -1
- package/esm/contracts/orchestrator/index.d.mts +1 -1
- package/esm/contracts/orchestrator/orchestrator-config.type.d.mts +38 -1
- package/esm/contracts/orchestrator/orchestrator-config.type.d.mts.map +1 -1
- package/esm/contracts/orchestrator/orchestrator.contract.d.mts +67 -3
- package/esm/contracts/orchestrator/orchestrator.contract.d.mts.map +1 -1
- package/esm/contracts/supervisor/supervisor-config.type.d.mts +23 -0
- package/esm/contracts/supervisor/supervisor-config.type.d.mts.map +1 -1
- package/esm/index.d.mts +6 -5
- package/esm/index.mjs +3 -2
- package/esm/memory/episodic-memory.mjs +14 -6
- package/esm/memory/episodic-memory.mjs.map +1 -1
- package/esm/memory/index.d.mts +1 -1
- package/esm/memory/memory.d.mts +13 -1
- package/esm/memory/memory.d.mts.map +1 -1
- package/esm/memory/memory.mjs +41 -7
- package/esm/memory/memory.mjs.map +1 -1
- package/esm/memory/procedural-memory.mjs +20 -7
- package/esm/memory/procedural-memory.mjs.map +1 -1
- package/esm/memory/semantic-memory.mjs +27 -10
- package/esm/memory/semantic-memory.mjs.map +1 -1
- package/esm/memory/working-memory.mjs +70 -13
- package/esm/memory/working-memory.mjs.map +1 -1
- package/esm/middleware/builtins/semantic-cache.d.mts +46 -1
- package/esm/middleware/builtins/semantic-cache.d.mts.map +1 -1
- package/esm/middleware/builtins/semantic-cache.mjs +60 -15
- package/esm/middleware/builtins/semantic-cache.mjs.map +1 -1
- package/esm/middleware/index.d.mts +1 -1
- package/esm/orchestrator/as-tool.d.mts +35 -9
- package/esm/orchestrator/as-tool.d.mts.map +1 -1
- package/esm/orchestrator/as-tool.mjs +67 -19
- package/esm/orchestrator/as-tool.mjs.map +1 -1
- package/esm/orchestrator/execution.d.mts.map +1 -1
- package/esm/orchestrator/execution.mjs +2 -2
- package/esm/orchestrator/execution.mjs.map +1 -1
- package/esm/orchestrator/index.d.mts +1 -1
- package/esm/orchestrator/index.mjs +1 -1
- package/esm/orchestrator/memory.d.mts +41 -5
- package/esm/orchestrator/memory.d.mts.map +1 -1
- package/esm/orchestrator/memory.mjs +53 -5
- package/esm/orchestrator/memory.mjs.map +1 -1
- package/esm/planner/plan-schema.d.mts +3 -3
- package/esm/planner/plan-schema.d.mts.map +1 -1
- package/esm/planner/plan-schema.mjs +30 -0
- package/esm/planner/plan-schema.mjs.map +1 -1
- package/esm/security/index.mjs +1 -0
- package/esm/security/outbound-policy.d.mts +9 -0
- package/esm/security/outbound-policy.d.mts.map +1 -1
- package/esm/security/outbound-policy.mjs +79 -5
- package/esm/security/outbound-policy.mjs.map +1 -1
- package/esm/security/outbound-policy.type.d.mts +8 -0
- package/esm/security/outbound-policy.type.d.mts.map +1 -1
- package/esm/security/safe-merge.d.mts +52 -0
- package/esm/security/safe-merge.d.mts.map +1 -0
- package/esm/security/safe-merge.mjs +68 -0
- package/esm/security/safe-merge.mjs.map +1 -0
- package/esm/supervisor/decide.mjs +52 -5
- package/esm/supervisor/decide.mjs.map +1 -1
- package/esm/supervisor/execution.d.mts +22 -0
- package/esm/supervisor/execution.d.mts.map +1 -1
- package/esm/supervisor/execution.mjs +46 -9
- package/esm/supervisor/execution.mjs.map +1 -1
- package/esm/supervisor/supervisor.mjs +4 -0
- package/esm/supervisor/supervisor.mjs.map +1 -1
- package/llms-full.txt +174 -10
- package/llms.txt +4 -3
- package/package.json +4 -4
- package/skills/README.md +5 -1
- package/skills/attach-ai-middleware/SKILL.md +17 -1
- package/skills/rag-loaders-and-stores/SKILL.md +3 -0
- package/skills/run-ai-agent/SKILL.md +3 -0
- package/skills/run-orchestrator/SKILL.md +6 -1
- package/skills/run-planner/SKILL.md +7 -3
- package/skills/run-supervisor/SKILL.md +11 -1
- package/skills/secure-outbound-requests/SKILL.md +85 -0
- package/skills/use-ai-memory/SKILL.md +36 -3
- package/skills/use-runtime-skills/SKILL.md +2 -1
|
@@ -67,14 +67,14 @@ import { GeneratedImage, ImageGenerationOptions, ImageGenerationResponse, ImageM
|
|
|
67
67
|
import { MemoryItem, MemoryTier, RecalledMemory } from "./memory/memory-item.type.mjs";
|
|
68
68
|
import { RecallOptions } from "./memory/recall-options.type.mjs";
|
|
69
69
|
import { MemoryContract } from "./memory/memory.contract.mjs";
|
|
70
|
-
import { MemoryConfig, SemanticMemoryConfig } from "./memory/memory-config.type.mjs";
|
|
70
|
+
import { MemoryConfig, SemanticMemoryConfig, WorkingMemoryConfig } from "./memory/memory-config.type.mjs";
|
|
71
71
|
import { CheckpointRecord, CheckpointStore } from "./orchestrator/checkpoint-store.contract.mjs";
|
|
72
72
|
import { SessionLock } from "./orchestrator/session-lock.contract.mjs";
|
|
73
73
|
import { OrchestratorCommands } from "./orchestrator/orchestrator-commands.type.mjs";
|
|
74
74
|
import { OrchestratorEvent, OrchestratorEventHandler, OrchestratorEventHandlers, OrchestratorEventMap, OrchestratorEventName } from "./orchestrator/orchestrator-event.type.mjs";
|
|
75
75
|
import { OrchestratorExecuteOptions, OrchestratorResumeOptions } from "./orchestrator/orchestrator-execute-options.type.mjs";
|
|
76
76
|
import { OrchestratorAsToolOptions, OrchestratorContract, OrchestratorSessionScope, SessionContextOverrides } from "./orchestrator/orchestrator.contract.mjs";
|
|
77
|
-
import { OrchestratorConfig, OrchestratorMemoryConfig, SummarizeCallback, SummarizeConfig } from "./orchestrator/orchestrator-config.type.mjs";
|
|
77
|
+
import { OrchestratorConfig, OrchestratorMemoryConfig, OrchestratorMemoryScope, SummarizeCallback, SummarizeConfig } from "./orchestrator/orchestrator-config.type.mjs";
|
|
78
78
|
import { SessionContract } from "./orchestrator/session.contract.mjs";
|
|
79
79
|
import { PlannerCapability } from "./planner/planner-capability.type.mjs";
|
|
80
80
|
import { PlannerPlan, PlannerStep } from "./planner/planner-plan.type.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { MemoryItem, MemoryTier, RecalledMemory } from "./memory-item.type.mjs";
|
|
2
2
|
import { RecallOptions } from "./recall-options.type.mjs";
|
|
3
3
|
import { MemoryContract } from "./memory.contract.mjs";
|
|
4
|
-
import { MemoryConfig, SemanticMemoryConfig } from "./memory-config.type.mjs";
|
|
4
|
+
import { MemoryConfig, SemanticMemoryConfig, WorkingMemoryConfig } from "./memory-config.type.mjs";
|
|
@@ -3,6 +3,31 @@ import { MemoryTier } from "./memory-item.type.mjs";
|
|
|
3
3
|
import { CacheDriver } from "@warlock.js/cache";
|
|
4
4
|
|
|
5
5
|
//#region ../ai/src/contracts/memory/memory-config.type.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Working-tier wiring for `memory(config)`.
|
|
8
|
+
*
|
|
9
|
+
* The working tier is a plain in-process buffer with no durability and
|
|
10
|
+
* no vector index — it lives for the lifetime of the `memory()` instance,
|
|
11
|
+
* which composite primitives (`ai.orchestrator({ memory })`) resolve once
|
|
12
|
+
* and reuse across every session. Its only knob is the size bound that
|
|
13
|
+
* keeps that lifetime from turning into unbounded process-memory growth.
|
|
14
|
+
*/
|
|
15
|
+
type WorkingMemoryConfig = {
|
|
16
|
+
/**
|
|
17
|
+
* Maximum number of entries the working buffer holds, across every
|
|
18
|
+
* `scope`. On overflow the oldest-written entry is evicted (FIFO —
|
|
19
|
+
* recall returns newest-first, so the evicted end is the one a bounded
|
|
20
|
+
* recall would never reach). Default `1000`.
|
|
21
|
+
*
|
|
22
|
+
* Must be an integer `>= 1`; there is no unbounded setting. Raise it
|
|
23
|
+
* deliberately for a long-running single-tenant process that recalls
|
|
24
|
+
* deep history from the working tier, and remember every entry is
|
|
25
|
+
* retained in process memory until evicted or `clear()`ed. Durable
|
|
26
|
+
* recall belongs in the semantic / episodic tiers, which delegate
|
|
27
|
+
* storage to a `CacheDriver`.
|
|
28
|
+
*/
|
|
29
|
+
maxItems?: number;
|
|
30
|
+
};
|
|
6
31
|
/**
|
|
7
32
|
* Semantic-tier wiring for `memory(config)`.
|
|
8
33
|
*
|
|
@@ -111,9 +136,10 @@ type MemoryConfig = {
|
|
|
111
136
|
/** Stable identifier — used in logs and as the working-tier scope key. */name?: string;
|
|
112
137
|
/**
|
|
113
138
|
* Enable the in-run working tier. Default `true`. Set `false` to build
|
|
114
|
-
* a semantic-only memory
|
|
139
|
+
* a semantic-only memory, or pass a {@link WorkingMemoryConfig} to tune
|
|
140
|
+
* its size bound (`{ maxItems }`, default `1000`).
|
|
115
141
|
*/
|
|
116
|
-
working?: boolean;
|
|
142
|
+
working?: boolean | WorkingMemoryConfig;
|
|
117
143
|
/**
|
|
118
144
|
* Enable + wire the semantic recall tier. Omit for a working-only
|
|
119
145
|
* memory.
|
|
@@ -146,5 +172,5 @@ type MemoryConfig = {
|
|
|
146
172
|
threshold?: number;
|
|
147
173
|
};
|
|
148
174
|
//#endregion
|
|
149
|
-
export { EpisodicMemoryConfig, MemoryConfig, ProceduralMemoryConfig, SemanticMemoryConfig };
|
|
175
|
+
export { EpisodicMemoryConfig, MemoryConfig, ProceduralMemoryConfig, SemanticMemoryConfig, WorkingMemoryConfig };
|
|
150
176
|
//# sourceMappingURL=memory-config.type.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-config.type.d.mts","names":[],"sources":["../../../../../../../../ai/src/contracts/memory/memory-config.type.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"memory-config.type.d.mts","names":[],"sources":["../../../../../../../../ai/src/contracts/memory/memory-config.type.ts"],"mappings":";;;;;;;AAaA;;;;AAcU;AAkBV;;KAhCY,mBAAA;EAwCS;;;;;;;AAMV;AAWX;;;;;EA3CE,QAAQ;AAAA;;;;;;;AAwEL;AAUL;;;;;;;;KAhEY,oBAAA;EAmFV,qEAjFA,QAAA,EAAU,gBAAA;EAiFS;AAYrB;;;;EAvFE,KAAA,GAAQ,WAAW;EAyGR;;;;;EAnGX,SAAA;AAAA;;;;;;;;;KAWU,oBAAA;EAuGV,yEArGA,QAAA,EAAU,gBAAA;EA0GD;AAAA;;;EArGT,KAAA,GAAQ,WAAW;;;;;;EAMnB,SAAA;;;;;;EAMA,aAAA;;;;;EAKA,UAAA;;;;;EAKA,GAAA;AAAA;;;;;;;;KAUU,sBAAA;6EAEV,QAAA,EAAU,gBAAA;;;;;EAKV,KAAA,GAAQ,WAAW;;;;;;EAMnB,SAAA;;;;;;EAMA,mBAAA;AAAA;;;;;;;;;;KAYU,YAAA;4EAEV,IAAA;;;;;;EAMA,OAAA,aAAoB,mBAAA;;;;;EAKpB,QAAA,GAAW,oBAAA;;;;;EAKX,QAAA,GAAW,oBAAA;;;;;EAKX,UAAA,GAAa,sBAAA;;;;;EAKb,WAAA,GAAc,UAAA;;;;;EAKd,CAAA;;;;;EAKA,SAAA;AAAA"}
|
|
@@ -35,11 +35,25 @@ type MemoryTier = "working" | "semantic" | "episodic" | "procedural";
|
|
|
35
35
|
* `metadata` is an opaque bag round-tripped verbatim onto the recalled
|
|
36
36
|
* memory — use it for source ids, timestamps, tags, or anything the
|
|
37
37
|
* consumer wants back alongside the text.
|
|
38
|
+
*
|
|
39
|
+
* `scope` is the ISOLATION key (4.15.0). It is not metadata: every tier
|
|
40
|
+
* enforces an exact-equality match between an item's `scope` and the
|
|
41
|
+
* `scope` on the `recall()` call BEFORE hits are scored and merged, so
|
|
42
|
+
* an item written under one scope can never surface in another scope's
|
|
43
|
+
* recall. Omit it for the shared/global pool.
|
|
38
44
|
*/
|
|
39
45
|
type MemoryItem = {
|
|
40
46
|
/** Natural-language content. Embedded for semantic recall; surfaced verbatim on retrieval. */text: string; /** Destination tier. Defaults to the factory's `defaultTier` when omitted. */
|
|
41
47
|
tier?: MemoryTier; /** Caller-owned identifier for overwrite / dedup. Derived from `text` when omitted. */
|
|
42
|
-
id?: string;
|
|
48
|
+
id?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Isolation key — an opaque tenant / session / user boundary. Enforced
|
|
51
|
+
* by every tier as an exact-equality filter at recall time, and folded
|
|
52
|
+
* into the stored key so two scopes writing identical text never
|
|
53
|
+
* overwrite each other. Omit for the shared/global pool (which only an
|
|
54
|
+
* equally unscoped `recall()` can read).
|
|
55
|
+
*/
|
|
56
|
+
scope?: string; /** Opaque metadata round-tripped onto the recalled memory unchanged. */
|
|
43
57
|
metadata?: Record<string, unknown>;
|
|
44
58
|
};
|
|
45
59
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-item.type.d.mts","names":[],"sources":["../../../../../../../../ai/src/contracts/memory/memory-item.type.ts"],"mappings":";;AAqBA;;;;AAAsB;
|
|
1
|
+
{"version":3,"file":"memory-item.type.d.mts","names":[],"sources":["../../../../../../../../ai/src/contracts/memory/memory-item.type.ts"],"mappings":";;AAqBA;;;;AAAsB;AAuBtB;;;;;;;;;;;;AAgBmB;AAanB;;KApDY,UAAA;;;;;;;;;;AA8DO;;;;;;;;;;;;KAvCP,UAAA;gGAEV,IAAA;EAEA,IAAA,GAAO,UAAA;EAEP,EAAA;;;;;;;;EAQA,KAAA;EAEA,QAAA,GAAW,MAAM;AAAA;;;;;;;;;;;KAaP,cAAA;wCAEV,EAAA;EAEA,IAAA;EAEA,IAAA,EAAM,UAAA;EAEN,KAAA;EAEA,QAAA,GAAW,MAAM;AAAA"}
|
|
@@ -27,6 +27,15 @@ import { RecallOptions } from "./recall-options.type.mjs";
|
|
|
27
27
|
* itself; surfacing the recalled text is the consumer's call so the
|
|
28
28
|
* injection point stays explicit.
|
|
29
29
|
*
|
|
30
|
+
* **Isolation (4.15.0).** Every item may carry a `scope` — an opaque
|
|
31
|
+
* tenant / session / user key — and every `recall()` may name one. The
|
|
32
|
+
* match is exact equality, enforced *inside* each tier before hits are
|
|
33
|
+
* scored and merged, so one scope's memories can never surface in
|
|
34
|
+
* another's recall. Unscoped items form a shared pool readable only by an
|
|
35
|
+
* equally unscoped `recall()`; there is no "read every scope" query.
|
|
36
|
+
* `ai.orchestrator({ memory })` sets this automatically from the turn's
|
|
37
|
+
* `sessionId` (see `OrchestratorMemoryConfig.scope`).
|
|
38
|
+
*
|
|
30
39
|
* **Still deferred.** Decay / forgetting (TTL-based relevance falloff,
|
|
31
40
|
* eviction policies) is not yet implemented; the four tiers above are the
|
|
32
41
|
* full 4.3.0 surface. The `episodic` and `procedural` tiers were added in
|
|
@@ -62,14 +71,18 @@ interface MemoryContract {
|
|
|
62
71
|
* appended to the in-run buffer.
|
|
63
72
|
*
|
|
64
73
|
* Re-remembering an item whose id (explicit or text-derived) already
|
|
65
|
-
* exists overwrites it in place rather than duplicating
|
|
74
|
+
* exists overwrites it in place rather than duplicating — within the
|
|
75
|
+
* item's `scope`. Identical text under two different scopes stays two
|
|
76
|
+
* independent entries.
|
|
66
77
|
*/
|
|
67
78
|
remember(items: MemoryItem | MemoryItem[]): Promise<void>;
|
|
68
79
|
/**
|
|
69
80
|
* Retrieve the memories most relevant to `query`, scored and ordered
|
|
70
81
|
* by descending relevance. Queries every enabled tier by default;
|
|
71
82
|
* `options.tier` narrows to one. `options.k` caps the result count,
|
|
72
|
-
* `options.threshold` raises the semantic-similarity floor
|
|
83
|
+
* `options.threshold` raises the semantic-similarity floor, and
|
|
84
|
+
* `options.scope` restricts the eligible set to the memories written
|
|
85
|
+
* under that exact scope (omit it to read the unscoped pool only).
|
|
73
86
|
*
|
|
74
87
|
* Returns an empty array when nothing clears the threshold — never
|
|
75
88
|
* throws on "no hits".
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory.contract.d.mts","names":[],"sources":["../../../../../../../../ai/src/contracts/memory/memory.contract.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"memory.contract.d.mts","names":[],"sources":["../../../../../../../../ai/src/contracts/memory/memory.contract.ts"],"mappings":";;;;;;AA8DA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCmC;;;;;;;;;;;;;;;;;;;;;;;;;;;UAnClB,cAAA;;WAEN,IAAA;;;;;;;;;;;;EAaT,QAAA,CAAS,KAAA,EAAO,UAAA,GAAa,UAAA,KAAe,OAAA;;;;;;;;;;;;EAa5C,MAAA,CAAO,KAAA,UAAe,OAAA,GAAU,aAAA,GAAgB,OAAA,CAAQ,cAAA;;;;;;EAOxD,KAAA,CAAM,IAAA,GAAO,UAAA,GAAa,OAAA;AAAA"}
|
|
@@ -27,6 +27,18 @@ type RecallOptions = {
|
|
|
27
27
|
* which has no vector index.
|
|
28
28
|
*/
|
|
29
29
|
threshold?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Isolation key (4.15.0) — only memories remembered under the SAME
|
|
32
|
+
* `scope` are eligible. The match is exact equality, enforced inside
|
|
33
|
+
* every tier before hits are scored and merged, never bolted on by the
|
|
34
|
+
* caller afterward.
|
|
35
|
+
*
|
|
36
|
+
* Omitting `scope` does NOT mean "every scope": an unscoped recall
|
|
37
|
+
* reads only the unscoped (shared/global) pool. That is the fail-closed
|
|
38
|
+
* default — reading another tenant's memories always requires naming
|
|
39
|
+
* their scope explicitly.
|
|
40
|
+
*/
|
|
41
|
+
scope?: string;
|
|
30
42
|
};
|
|
31
43
|
//#endregion
|
|
32
44
|
export { RecallOptions };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recall-options.type.d.mts","names":[],"sources":["../../../../../../../../ai/src/contracts/memory/recall-options.type.ts"],"mappings":";;;;;AASA;;;;;KAAY,aAAA;EAYH
|
|
1
|
+
{"version":3,"file":"recall-options.type.d.mts","names":[],"sources":["../../../../../../../../ai/src/contracts/memory/recall-options.type.ts"],"mappings":";;;;;AASA;;;;;KAAY,aAAA;EAYH;;;;AAkBF;EAxBL,CAAA;;;;;;EAMA,IAAA,GAAO,UAAU;;;;;;EAMjB,SAAA;;;;;;;;;;;;EAYA,KAAA;AAAA"}
|
|
@@ -5,5 +5,5 @@ import { OrchestratorCommands } from "./orchestrator-commands.type.mjs";
|
|
|
5
5
|
import { OrchestratorEvent, OrchestratorEventHandler, OrchestratorEventHandlers, OrchestratorEventMap, OrchestratorEventName } from "./orchestrator-event.type.mjs";
|
|
6
6
|
import { OrchestratorExecuteOptions, OrchestratorResumeOptions } from "./orchestrator-execute-options.type.mjs";
|
|
7
7
|
import { OrchestratorAsToolOptions, OrchestratorContract, OrchestratorSessionScope, SessionContextOverrides } from "./orchestrator.contract.mjs";
|
|
8
|
-
import { OrchestratorConfig, OrchestratorMemoryConfig, SummarizeCallback, SummarizeConfig } from "./orchestrator-config.type.mjs";
|
|
8
|
+
import { OrchestratorConfig, OrchestratorMemoryConfig, OrchestratorMemoryScope, SummarizeCallback, SummarizeConfig } from "./orchestrator-config.type.mjs";
|
|
9
9
|
import { SessionContract } from "./session.contract.mjs";
|
|
@@ -49,6 +49,14 @@ type SummarizeConfig = {
|
|
|
49
49
|
* coarse.
|
|
50
50
|
*/
|
|
51
51
|
type SummarizeCallback = (history: Message[]) => Promise<CompactionResult> | CompactionResult;
|
|
52
|
+
/**
|
|
53
|
+
* Isolation boundary for the orchestrator's memory recall / write-back
|
|
54
|
+
* (4.15.0). `"session"` (the default) confines a turn to the memories
|
|
55
|
+
* remembered under the same `sessionId`; `"shared"` opts every session of
|
|
56
|
+
* this orchestrator into one common pool; a function derives a custom key
|
|
57
|
+
* (a tenant id, a user id) from the executing session.
|
|
58
|
+
*/
|
|
59
|
+
type OrchestratorMemoryScope = "session" | "shared" | ((sessionId: string) => string);
|
|
52
60
|
/**
|
|
53
61
|
* Per-turn memory wiring for `OrchestratorConfig.memory` (memory core
|
|
54
62
|
* M2). The `store` is the {@link MemoryContract} the orchestrator
|
|
@@ -65,9 +73,33 @@ type SummarizeCallback = (history: Message[]) => Promise<CompactionResult> | Com
|
|
|
65
73
|
* `ctx.context[injectKey]` — memory never mutates the prompt itself, the
|
|
66
74
|
* surfacing point stays explicit (the same contract `MemoryContract`
|
|
67
75
|
* documents).
|
|
76
|
+
*
|
|
77
|
+
* **Isolation (4.15.0).** The store is resolved ONCE per orchestrator
|
|
78
|
+
* instance and reused by every session, so `scope` decides what a turn
|
|
79
|
+
* may read: it defaults to `"session"`, which confines both recall and
|
|
80
|
+
* write-back to the executing `sessionId`. Cross-session pooling is
|
|
81
|
+
* available but must be asked for (`scope: "shared"`).
|
|
68
82
|
*/
|
|
69
83
|
type OrchestratorMemoryConfig = {
|
|
70
84
|
/** The memory store recalled-from before dispatch and remembered-into after. */store: MemoryContract;
|
|
85
|
+
/**
|
|
86
|
+
* Isolation boundary applied to every recall and write-back
|
|
87
|
+
* (4.15.0 — security fix).
|
|
88
|
+
*
|
|
89
|
+
* - `"session"` (DEFAULT) — memories are keyed to the turn's
|
|
90
|
+
* `sessionId`. One session can never recall another's remembered
|
|
91
|
+
* turns, even though the store instance is shared by the whole
|
|
92
|
+
* orchestrator.
|
|
93
|
+
* - `"shared"` — every session reads and writes ONE pool. This is the
|
|
94
|
+
* pre-4.15.0 behavior and is only safe when every session of this
|
|
95
|
+
* orchestrator is trusted to see every other session's memories
|
|
96
|
+
* (e.g. a single-tenant assistant, or a curated knowledge base).
|
|
97
|
+
* - `(sessionId) => string` — derive the key yourself, e.g. map a
|
|
98
|
+
* session to its tenant (`(id) => tenantOf(id)`) so a tenant's users
|
|
99
|
+
* share memory but tenants stay isolated. The returned string is
|
|
100
|
+
* opaque; equal strings share memories.
|
|
101
|
+
*/
|
|
102
|
+
scope?: OrchestratorMemoryScope;
|
|
71
103
|
/**
|
|
72
104
|
* Pre-dispatch recall tuning. `k` caps the injected count (0 disables
|
|
73
105
|
* recall — write-only memory); `threshold` raises the semantic
|
|
@@ -190,10 +222,15 @@ type OrchestratorConfig<TOutput, TState = TOutput, TIntents extends Record<strin
|
|
|
190
222
|
* the existing behavior — orchestrators without memory are unchanged.
|
|
191
223
|
* Accepts a bare {@link MemoryContract} (recall + remember with
|
|
192
224
|
* defaults) or an {@link OrchestratorMemoryConfig} for finer control.
|
|
225
|
+
*
|
|
226
|
+
* Either form is SESSION-SCOPED by default (4.15.0): the store is
|
|
227
|
+
* shared by the whole orchestrator instance, but each turn only recalls
|
|
228
|
+
* what its own `sessionId` remembered. Opt into cross-session pooling
|
|
229
|
+
* explicitly with `{ store, scope: "shared" }`.
|
|
193
230
|
*/
|
|
194
231
|
memory?: MemoryContract | OrchestratorMemoryConfig; /** Definition-level event handlers — tier 1 of the 3-tier model. */
|
|
195
232
|
on?: OrchestratorEventHandlers;
|
|
196
233
|
};
|
|
197
234
|
//#endregion
|
|
198
|
-
export { OrchestratorConfig, OrchestratorMemoryConfig, SummarizeCallback, SummarizeConfig };
|
|
235
|
+
export { OrchestratorConfig, OrchestratorMemoryConfig, OrchestratorMemoryScope, SummarizeCallback, SummarizeConfig };
|
|
199
236
|
//# sourceMappingURL=orchestrator-config.type.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrator-config.type.d.mts","names":[],"sources":["../../../../../../../../ai/src/contracts/orchestrator/orchestrator-config.type.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA2BA;;;;;;KAAY,eAAA;EAeE,qEAbZ,UAAA,WAEA;EAAA,IAAA,WAEa;EAAb,UAAA,GAAa,aAAA;EAOC;;;;;EADd,SAAA,IACE,UAAA,EAAY,gBAAA,EACZ,GAAA;IAAO,SAAA;EAAA,MACJ,OAAA,eAEW;EAAhB,IAAA;IAAS,OAAA;EAAA;AAAA;;;;;;;KASC,iBAAA,IACV,OAAA,EAAS,OAAA,OACN,OAAA,CAAQ,gBAAA,IAAoB,gBAAA;;;;;AAAgB;
|
|
1
|
+
{"version":3,"file":"orchestrator-config.type.d.mts","names":[],"sources":["../../../../../../../../ai/src/contracts/orchestrator/orchestrator-config.type.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA2BA;;;;;;KAAY,eAAA;EAeE,qEAbZ,UAAA,WAEA;EAAA,IAAA,WAEa;EAAb,UAAA,GAAa,aAAA;EAOC;;;;;EADd,SAAA,IACE,UAAA,EAAY,gBAAA,EACZ,GAAA;IAAO,SAAA;EAAA,MACJ,OAAA,eAEW;EAAhB,IAAA;IAAS,OAAA;EAAA;AAAA;;;;;;;KASC,iBAAA,IACV,OAAA,EAAS,OAAA,OACN,OAAA,CAAQ,gBAAA,IAAoB,gBAAA;;;;;AAAgB;AASjD;;KAAY,uBAAA,4BAGN,SAAiB;;AAAA;AAyBvB;;;;;;;;;;;;;;;;;;;;;KAAY,wBAAA;EAkDD,gFAhDT,KAAA,EAAO,cAAA;EA4EG;;;;;;;;;;;;;;;;;EA1DV,KAAA,GAAQ,uBAAA;EAsF0B;;;;;;EA/ElC,MAAA;IACE,CAAA;IACA,SAAA;IACA,IAAA,GAAO,UAAA;EAAA;EAuGuB;;;;;;EA/FhC,QAAA;EA2IS;;;;;EArIT,YAAA,GAAe,UAAA;EAoCf;;;;;EA9BA,SAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;KA4BU,kBAAA,mBAED,OAAA,mBACQ,MAAA,SAAe,qBAAA,IAAyB,MAAA,SAEvD,qBAAA;EA6BF,wEAzBA,IAAA,UA2BA;EAzBA,OAAA;EAyB0B;;;;;;;EAjB1B,OAAA,GAAU,iBAAA,EAmCoC;EAjC9C,YAAA,GAAe,oBAAA,WAkCiB;EA/BhC,OAAA,EAAS,QAAA,EA+BqC;EA7B9C,KAAA,IAAS,GAAA,EAAK,YAAA,CAAa,MAAA,MAAY,IAAA,GAAO,OAAA,CAAQ,IAAA,GAgC1C;EA9BZ,MAAA,GAAS,aAAA,YAAyB,WAAA,CAAY,MAAA,GAgC9C;EA9BA,QAAA,IACE,GAAA,EAAK,eAAA,CAAgB,MAAA,MAClB,cAAA,GAAiB,OAAA,CAAQ,cAAA,GA+BZ;EA7BlB,KAAA,GAAQ,MAAA,EAgDM;EA9Cd,MAAA,GAAS,gBAAA,CAAiB,OAAA,GAgDV;EA9ChB,YAAA,WA6DS;EA3DT,aAAA;EA8DA;;;AAA8B;;EAvD9B,OAAA;;;;;;EAMA,aAAA;IACE,MAAA,cAAoB,QAAA,EAAU,OAAA,OAAc,OAAA;IAC5C,MAAA,cAAoB,QAAA,EAAU,OAAA,OAAc,OAAA;EAAA;EAG9C,SAAA,GAAY,eAAA,GAAkB,iBAAA;EAE9B,aAAA;EAGA,eAAA,GAAkB,eAAA;;;;;;;;;;;;;;;;;;;EAmBlB,WAAA,GAAc,WAAA;EAEd,aAAA,GAAgB,aAAA;;;;;;;;;;;;;;;EAehB,MAAA,GAAS,cAAA,GAAiB,wBAAA;EAG1B,EAAA,GAAK,yBAAA;AAAA"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { Message } from "../conversation-message.type.mjs";
|
|
1
2
|
import { StreamContract } from "../stream/stream.contract.mjs";
|
|
3
|
+
import { ToolContext } from "../tool.contract.mjs";
|
|
2
4
|
import { ToolContract } from "../../tool/tool.mjs";
|
|
3
5
|
import { SupervisorInput } from "../supervisor/supervisor-input.type.mjs";
|
|
4
6
|
import { OrchestratorResult } from "../result/orchestrator-result.type.mjs";
|
|
@@ -14,11 +16,42 @@ import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
|
14
16
|
*
|
|
15
17
|
* - `"fresh"` (default) — every tool invocation gets a brand-new
|
|
16
18
|
* `sessionId`; no continuity across calls. Safe default.
|
|
17
|
-
* - `"shared"` — the wrapped orchestrator participates in
|
|
18
|
-
* session
|
|
19
|
-
*
|
|
19
|
+
* - `"shared"` — the wrapped orchestrator participates in an existing
|
|
20
|
+
* session. The target `sessionId` comes from the DEVELOPER, via
|
|
21
|
+
* `OrchestratorAsToolOptions.session` (a fixed id bound at
|
|
22
|
+
* construction, or a resolver reading the out-of-band
|
|
23
|
+
* {@link ToolContext}) — never from the model's tool-call arguments.
|
|
24
|
+
* Expert escape hatch for nested-conversation use cases.
|
|
20
25
|
*/
|
|
21
26
|
type OrchestratorSessionScope = "fresh" | "shared";
|
|
27
|
+
/**
|
|
28
|
+
* Where a `sessionScope: "shared"` tool call gets its session from
|
|
29
|
+
* (4.15.0 — security fix).
|
|
30
|
+
*
|
|
31
|
+
* A `sessionId` is bearer-equivalent: whoever names one gets read/write
|
|
32
|
+
* access to that session's persisted state and history. It must
|
|
33
|
+
* therefore be bound OUTSIDE the model-visible `inputSchema` — either as
|
|
34
|
+
* a literal string fixed at `asTool()` construction, or as a resolver
|
|
35
|
+
* that reads the invocation's {@link ToolContext} (the same out-of-band
|
|
36
|
+
* channel `signal` and `artifacts` travel on, which an LLM cannot write
|
|
37
|
+
* to). Returning `history` lets the developer thread prior turns the
|
|
38
|
+
* same way.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* // Bound per request: the app puts the authenticated user's session on
|
|
42
|
+
* // the tool-call artifacts bag; the model never sees or picks it.
|
|
43
|
+
* const tool = support.asTool({
|
|
44
|
+
* inputSchema: v.object({ message: v.string() }),
|
|
45
|
+
* sessionScope: "shared",
|
|
46
|
+
* session: (ctx) => String(ctx?.artifacts?.supportSessionId ?? ""),
|
|
47
|
+
* });
|
|
48
|
+
*/
|
|
49
|
+
type OrchestratorToolSession = string | ((ctx: ToolContext | undefined) => string | OrchestratorToolSessionBinding | undefined | Promise<string | OrchestratorToolSessionBinding | undefined>);
|
|
50
|
+
/** Resolved session binding for a shared-scope tool call. */
|
|
51
|
+
type OrchestratorToolSessionBinding = {
|
|
52
|
+
/** Session the nested orchestrator joins. Must be non-empty. */sessionId: string; /** Prior turns to seed the nested run with. Defaults to `[]`. */
|
|
53
|
+
history?: Message[];
|
|
54
|
+
};
|
|
22
55
|
/**
|
|
23
56
|
* Context overrides for a specific session.
|
|
24
57
|
*
|
|
@@ -46,6 +79,37 @@ type OrchestratorAsToolOptions<TToolInput = string> = {
|
|
|
46
79
|
description?: string;
|
|
47
80
|
inputSchema: StandardSchemaV1<TToolInput>; /** Session continuity for tool calls. Default `"fresh"`. */
|
|
48
81
|
sessionScope?: OrchestratorSessionScope;
|
|
82
|
+
/**
|
|
83
|
+
* Which session a `sessionScope: "shared"` call joins — REQUIRED for
|
|
84
|
+
* that scope (4.15.0), and ignored for `"fresh"`.
|
|
85
|
+
*
|
|
86
|
+
* Bind it at construction (a literal id) or per call from the
|
|
87
|
+
* {@link ToolContext} (a resolver). Both channels are invisible to the
|
|
88
|
+
* model, which is the point: the previous release read `sessionId`
|
|
89
|
+
* straight off the validated tool payload, so a prompt-injected outer
|
|
90
|
+
* agent could name a VICTIM's session and have the nested orchestrator
|
|
91
|
+
* load, mutate, and echo back their conversation.
|
|
92
|
+
*
|
|
93
|
+
* Constructing a `"shared"` tool with neither this nor
|
|
94
|
+
* {@link unsafeAllowModelSessionId} throws.
|
|
95
|
+
*/
|
|
96
|
+
session?: OrchestratorToolSession;
|
|
97
|
+
/**
|
|
98
|
+
* DANGEROUS opt-in: restore the pre-4.15.0 behavior of reading
|
|
99
|
+
* `sessionId` / `history` out of the model-generated tool payload.
|
|
100
|
+
*
|
|
101
|
+
* The value is a **bearer token for that session** — anything that can
|
|
102
|
+
* influence the calling model's output (an injected document, a web
|
|
103
|
+
* page it summarized, a poisoned tool result) can name any session id
|
|
104
|
+
* it can guess or has seen, and the nested orchestrator will load that
|
|
105
|
+
* session's state, run a turn against it, and return its content to
|
|
106
|
+
* the outer transcript.
|
|
107
|
+
*
|
|
108
|
+
* Only set this when the outer agent's context is fully trusted AND
|
|
109
|
+
* your `execute` path independently verifies the model-chosen
|
|
110
|
+
* `sessionId` belongs to the current caller. Prefer {@link session}.
|
|
111
|
+
*/
|
|
112
|
+
unsafeAllowModelSessionId?: boolean;
|
|
49
113
|
};
|
|
50
114
|
/**
|
|
51
115
|
* Runtime handle returned by `ai.orchestrator(config)` (design §15.3) —
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrator.contract.d.mts","names":[],"sources":["../../../../../../../../ai/src/contracts/orchestrator/orchestrator.contract.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"orchestrator.contract.d.mts","names":[],"sources":["../../../../../../../../ai/src/contracts/orchestrator/orchestrator.contract.ts"],"mappings":";;;;;;;;;;;;;;AA+BA;;;;AAAoC;AAwBpC;;;;;;KAxBY,wBAAA;;;;;;;;;AA8B2C;AAGvD;;;;;;;;AAImB;AAcnB;;;;KA3BY,uBAAA,cAEN,GAAA,EAAK,WAAA,0BAEH,8BAAA,eAEA,OAAA,UAAiB,8BAAA;AAiCzB;AAAA,KA9BY,8BAAA;EA8ByB,gEA5BnC,SAAA,UA+Ba;EA7Bb,OAAA,GAAU,OAAO;AAAA;;;;;;;;;;;;KAcP,uBAAA;EAAA,CACT,GAAW;AAAA;AA+Ca;AAgC3B;;;;;;;AAhC2B,KApCf,yBAAA;EACV,IAAA;EACA,WAAA;EACA,WAAA,EAAa,gBAAA,CAAiB,UAAA,GA0FQ;EAxFtC,YAAA,GAAe,wBAAA;EAyFsB;;;;;;;;;;;;;;EA1ErC,OAAA,GAAU,uBAAA;EAsG2B;;;;;;;;;;;;;;;EAtFrC,yBAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAgCe,oBAAA,6BAAiD,OAAA;EA2ChE;EAAA,SAzCS,IAAA;EAyCe;EAAA,SAvCf,SAAA;EAwCP;EAAA,SAtCO,OAAA;EAuCoB;;;;;EAhC7B,OAAA,CACE,KAAA,EAAO,eAAA,EACP,OAAA,EAAS,0BAAA,CAA2B,MAAA,IACnC,OAAA,CAAQ,kBAAA,CAAmB,OAAA;EAqCvB;;;;;EA9BP,MAAA,CACE,KAAA,EAAO,eAAA,EACP,OAAA,EAAS,0BAAA,CAA2B,MAAA,IACnC,cAAA,CAAe,kBAAA,CAAmB,OAAA,GAAU,iBAAA;EA6BnB;;;;;EAtB5B,MAAA,CACE,SAAA,UACA,OAAA,GAAU,yBAAA,GACT,OAAA,CAAQ,kBAAA,CAAmB,OAAA;EA2BnB;;;;;EApBX,OAAA,iBAAwB,oBAAA,EACtB,IAAA,EAAM,CAAA,EACN,IAAA,EAAM,oBAAA,CAAqB,CAAA,YAC1B,OAAA,CAAQ,oBAAA,CAAqB,CAAA;EAyBvB;;;;;EAlBT,MAAA,sBACE,OAAA,EAAS,yBAAA,CAA0B,UAAA,IAClC,YAAA,CAAa,UAAA,EAAY,OAAA;EAiBU;;;;EAXtC,EAAA,WAAa,qBAAA,EACX,KAAA,EAAO,CAAA,EACP,OAAA,EAAS,wBAAA,CAAyB,CAAA;;;;;EAOpC,GAAA,WAAc,qBAAA,EACZ,KAAA,EAAO,CAAA,EACP,OAAA,EAAS,wBAAA,CAAyB,CAAA;AAAA"}
|
|
@@ -212,6 +212,29 @@ type SupervisorConfig<TOutput = unknown, TState = TOutput, TIntents extends Reco
|
|
|
212
212
|
* with `MaxIterationsError` on `result.error`. Default: `10`.
|
|
213
213
|
*/
|
|
214
214
|
maxIterations?: number;
|
|
215
|
+
/**
|
|
216
|
+
* Hard cap on fan-out WIDTH — how many intents a single dispatch
|
|
217
|
+
* decision may run in parallel. Default: `10`.
|
|
218
|
+
*
|
|
219
|
+
* Routing decisions arrive as `string[]` from an LLM `router`, a
|
|
220
|
+
* `route` callback, `evaluate.reassignTo`, or per-intent `next`
|
|
221
|
+
* directives. Duplicate names in that array are collapsed before
|
|
222
|
+
* dispatch (they were pure wasted spend — `indexByIntent` already
|
|
223
|
+
* kept only one result per intent); if the DEDUPED list is still
|
|
224
|
+
* longer than this cap, the decision is rejected with
|
|
225
|
+
* `SupervisorRoutingError` (`SUPERVISOR_INVALID_ROUTE`), the same
|
|
226
|
+
* way an unknown intent key is.
|
|
227
|
+
*
|
|
228
|
+
* Security note: the router's per-turn prompt embeds supervisor
|
|
229
|
+
* `state` and prior branch outputs, so a prompt injection carried
|
|
230
|
+
* in tool output can coax the router into emitting a very wide
|
|
231
|
+
* `next` array — one iteration then launches that many real
|
|
232
|
+
* agent/workflow runs (cost + compute amplification). This cap is
|
|
233
|
+
* the width bound that `maxIterations` (a depth bound) doesn't
|
|
234
|
+
* provide. Raise it deliberately when a supervisor legitimately
|
|
235
|
+
* fans out wide (e.g. `ai.fanOut(writer, 20)`).
|
|
236
|
+
*/
|
|
237
|
+
maxFanOut?: number;
|
|
215
238
|
/**
|
|
216
239
|
* When set, turn 0 dispatches this intent directly and skips the
|
|
217
240
|
* first router/route call. Must be a key in `intents`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supervisor-config.type.d.mts","names":[],"sources":["../../../../../../../../ai/src/contracts/supervisor/supervisor-config.type.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;AAqBA;;KAAY,sBAAA,iBAAuC,kBAAA,KACjD,OAAA,EAAS,kBAAA,CAAmB,CAAA;AAAA,KAGlB,uBAAA,GAA0B,OAAA,eACxB,kBAAA,GAAqB,sBAAA,CAAuB,CAAA;;;;;;;;;AAJ1B;AAGhC;;;;;;;;;;;;;;;AAC2D;AAyC3D;;;;;;;;;;;;;KAAY,gBAAA,6BAED,OAAA,mBACQ,MAAA,SAAe,qBAAA,IAAyB,MAAA,SAAe,qBAAA,gBAC3D,MAAA;EAiHJ,sEA9GT,IAAA;EA8GkC;;;;;;;;EApGlC,OAAA;EAiI6C;;;;;;;;EAvH7C,UAAA;
|
|
1
|
+
{"version":3,"file":"supervisor-config.type.d.mts","names":[],"sources":["../../../../../../../../ai/src/contracts/supervisor/supervisor-config.type.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;AAqBA;;KAAY,sBAAA,iBAAuC,kBAAA,KACjD,OAAA,EAAS,kBAAA,CAAmB,CAAA;AAAA,KAGlB,uBAAA,GAA0B,OAAA,eACxB,kBAAA,GAAqB,sBAAA,CAAuB,CAAA;;;;;;;;;AAJ1B;AAGhC;;;;;;;;;;;;;;;AAC2D;AAyC3D;;;;;;;;;;;;;KAAY,gBAAA,6BAED,OAAA,mBACQ,MAAA,SAAe,qBAAA,IAAyB,MAAA,SAAe,qBAAA,gBAC3D,MAAA;EAiHJ,sEA9GT,IAAA;EA8GkC;;;;;;;;EApGlC,OAAA;EAiI6C;;;;;;;;EAvH7C,UAAA;EA+NM;;;;;;;;;;;EAlNN,WAAA,GAAc,gBAAA,CAAiB,eAAA;EAvC/B;;;;;EA8CA,YAAA,GAAe,oBAAA;EA5C0C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmFzD,IAAA,YAAgB,oBAAA;EAmFhB;;;;;;;;;;;;;;;;;;;EA9DA,OAAA,GAAU,OAAA;EAyOV;;;;;;;;EA/NA,MAAA,GAAS,aAAA,YAAyB,WAAA,CAAY,MAAA;EAmRV;;;;EA7QpC,KAAA,IAAS,GAAA,EAAK,YAAA,CAAa,MAAA,MAAY,IAAA,GAAO,OAAA,CAAQ,IAAA;EAiS3B;;;;;;;;;;EArR3B,OAAA,EAAS,QAAA;;;;;;;;;;EAWT,QAAA,IAAY,GAAA,EAAK,eAAA,CAAgB,MAAA,MAAY,cAAA,GAAiB,OAAA,CAAQ,cAAA;;;;;;;;;;;;;;;;EAiBtE,KAAA,GAAQ,MAAA;;;;;EAMR,aAAA;;;;;;;;;;;;;;;;;;;;;;;EAwBA,SAAA;;;;;EAMA,YAAA;;;;;;;;;;;EAYA,MAAA,GAAS,gBAAA,CAAiB,OAAA;;;;;;;;;;;;;EAc1B,aAAA,GAAgB,aAAA;;;;;;EAOhB,EAAA,GAAK,uBAAA;;;;;;;;;;;;;;;;;EAkBL,GAAA,GAAM,SAAA,CAAU,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwChB,UAAA,GAAa,gBAAA,CAAiB,MAAA;;;;;;;;;;;;;;;;;;;;;;EAsB9B,aAAA;IACE,MAAA;IACA,MAAA;IACA,GAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;EAyBF,eAAA,GAAkB,gBAAA,CAAiB,UAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BnC,UAAA,GAAa,eAAA;;;;;;;;;;;;;;;;;;;;;;;EAwBb,iBAAA,IAAqB,KAAA,EAAO,MAAA,EAAQ,SAAA,EAAW,UAAA,KAAe,MAAA;;;;;;;;;;;;;;;;;;;EAoB9D,OAAA,GAAU,iBAAA;AAAA"}
|
package/esm/index.d.mts
CHANGED
|
@@ -114,14 +114,14 @@ import { GeneratedImage, ImageGenerationOptions, ImageGenerationResponse, ImageM
|
|
|
114
114
|
import { MemoryItem, MemoryTier, RecalledMemory } from "./contracts/memory/memory-item.type.mjs";
|
|
115
115
|
import { RecallOptions } from "./contracts/memory/recall-options.type.mjs";
|
|
116
116
|
import { MemoryContract } from "./contracts/memory/memory.contract.mjs";
|
|
117
|
-
import { EpisodicMemoryConfig, MemoryConfig, ProceduralMemoryConfig, SemanticMemoryConfig } from "./contracts/memory/memory-config.type.mjs";
|
|
117
|
+
import { EpisodicMemoryConfig, MemoryConfig, ProceduralMemoryConfig, SemanticMemoryConfig, WorkingMemoryConfig } from "./contracts/memory/memory-config.type.mjs";
|
|
118
118
|
import { CheckpointRecord, CheckpointStore } from "./contracts/orchestrator/checkpoint-store.contract.mjs";
|
|
119
119
|
import { SessionLock } from "./contracts/orchestrator/session-lock.contract.mjs";
|
|
120
120
|
import { OrchestratorCommands } from "./contracts/orchestrator/orchestrator-commands.type.mjs";
|
|
121
121
|
import { OrchestratorEvent, OrchestratorEventHandler, OrchestratorEventHandlers, OrchestratorEventMap, OrchestratorEventName } from "./contracts/orchestrator/orchestrator-event.type.mjs";
|
|
122
122
|
import { OrchestratorExecuteOptions, OrchestratorResumeOptions } from "./contracts/orchestrator/orchestrator-execute-options.type.mjs";
|
|
123
123
|
import { OrchestratorAsToolOptions, OrchestratorContract, OrchestratorSessionScope, SessionContextOverrides } from "./contracts/orchestrator/orchestrator.contract.mjs";
|
|
124
|
-
import { OrchestratorConfig, OrchestratorMemoryConfig, SummarizeCallback, SummarizeConfig } from "./contracts/orchestrator/orchestrator-config.type.mjs";
|
|
124
|
+
import { OrchestratorConfig, OrchestratorMemoryConfig, OrchestratorMemoryScope, SummarizeCallback, SummarizeConfig } from "./contracts/orchestrator/orchestrator-config.type.mjs";
|
|
125
125
|
import { SessionContract } from "./contracts/orchestrator/session.contract.mjs";
|
|
126
126
|
import { PlannerCapability } from "./contracts/planner/planner-capability.type.mjs";
|
|
127
127
|
import { PlannerPlan, PlannerStep } from "./contracts/planner/planner-plan.type.mjs";
|
|
@@ -186,7 +186,7 @@ import { GuardOptions, GuardrailBlockEvent, GuardrailEscalation, InjectionDetect
|
|
|
186
186
|
import { GuardrailFactory, guardrail } from "./guard/guardrail.mjs";
|
|
187
187
|
import { memory as memory$2 } from "./memory/memory.mjs";
|
|
188
188
|
import { GuardrailCheck, GuardrailCheckResult, GuardrailOptions } from "./middleware/builtins/guardrail.mjs";
|
|
189
|
-
import { SemanticCacheOptions, semanticCache } from "./middleware/builtins/semantic-cache.mjs";
|
|
189
|
+
import { SemanticCacheOptions, SemanticCacheScope, semanticCache } from "./middleware/builtins/semantic-cache.mjs";
|
|
190
190
|
import { composeMiddleware } from "./middleware/helpers/compose.mjs";
|
|
191
191
|
import { forTool } from "./middleware/helpers/for-tool.mjs";
|
|
192
192
|
import { MockImageCall, MockImageModel, MockImageResponse } from "./mock/mock-image-model.mjs";
|
|
@@ -202,7 +202,7 @@ import { fallbackModel } from "./model/fallback-model.mjs";
|
|
|
202
202
|
import { asTool } from "./orchestrator/as-tool.mjs";
|
|
203
203
|
import { OrchestratorCommandHandlers, createCommandDispatcher } from "./orchestrator/commands.mjs";
|
|
204
204
|
import { OrchestratorEmitter } from "./orchestrator/emitter.mjs";
|
|
205
|
-
import { ResolvedOrchestratorMemory, injectMemories, memoryQueryFromInput, outcomeTextFromTurn, recallForTurn, rememberTurnOutcome, resolveOrchestratorMemory } from "./orchestrator/memory.mjs";
|
|
205
|
+
import { ResolvedOrchestratorMemory, injectMemories, memoryQueryFromInput, memoryScopeFor, outcomeTextFromTurn, recallForTurn, rememberTurnOutcome, resolveOrchestratorMemory, sessionMemoryScope } from "./orchestrator/memory.mjs";
|
|
206
206
|
import { ResolvedIntentEntry, resolveIntentEntries } from "./supervisor/entries.mjs";
|
|
207
207
|
import { OrchestratorStreamController, createOrchestratorStream } from "./orchestrator/orchestrator-stream.mjs";
|
|
208
208
|
import { OrchestratorExecution, OrchestratorExecutionParams, runResume, runTurn, streamTurn } from "./orchestrator/execution.mjs";
|
|
@@ -294,6 +294,7 @@ import { getObservers, isObserveAll, registerObserver, setObserveAll } from "./o
|
|
|
294
294
|
import { JudgeOutcome, formatCriteria, judgePromptBody } from "./prompts/prompts-validate.mjs";
|
|
295
295
|
import { assertUrlAllowed, fetchTextWithPolicy, guardedFetch, readTextCapped, resolveOutboundPolicy } from "./security/outbound-policy.mjs";
|
|
296
296
|
import { isPrivateOrReservedIp } from "./security/private-ip.mjs";
|
|
297
|
+
import { UNSAFE_MERGE_KEYS, assignSafeKey, isUnsafeMergeKey, mergeSafely } from "./security/safe-merge.mjs";
|
|
297
298
|
import { DEFAULT_SENSITIVE_KEYS, RedactOptions, RedactedError, SENSITIVE_HEADERS, redact, redactError, redactHeaders, scrubSecrets } from "./security/redact.mjs";
|
|
298
299
|
import { RefinedSystemPrompt } from "./system-prompt/refined-system-prompt.mjs";
|
|
299
300
|
import { renderPlaceholders } from "./system-prompt/render-placeholders.mjs";
|
|
@@ -312,7 +313,7 @@ import { computeSignature as computeSignature$1 } from "./workflow/signature.mjs
|
|
|
312
313
|
import { MatcherVerdict, matchConverge, matchOutputShape, matchPassStep, matchRouteTo } from "./testing/matcher-logic.mjs";
|
|
313
314
|
import { AiMatchers } from "./testing/matchers.mjs";
|
|
314
315
|
import { registerAiMatchers } from "./testing/register-lazy.mjs";
|
|
315
|
-
export { AIConfig, AIError, type AIErrorCode, type AIErrorOptions, type AckCallback, type AckConfig, type AckEntry, type AckRunEntry, type AckSnapshot, type AgentBranchSnapshot, AgentCancelledError, type AgentCancelledErrorOptions, type AgentCompletedPayload, type AgentConfig, type AgentContract, AgentDriftError, type AgentDriftErrorOptions, type AgentErrorPayload, type AgentEventHandler, type AgentEventMap, type AgentExecuteOptions, AgentExecutionError, AgentMaxTripsError, type AgentMaxTripsErrorOptions, type AgentMiddleware, type AgentMiddlewareExecuteHooks, type AgentMiddlewareSupervisorHooks, type AgentMiddlewareToolHooks, type AgentMiddlewareTripHooks, type AgentReport, type AgentResult, type AgentResumeOptions, type AgentSnapshot, type AgentSnapshotStatus, type AgentStartingPayload, type AgentStreamingPayload, type AgentToolCalledPayload, type AgentToolCallingFailedPayload, type AgentToolCallingPayload, type AgentToolEntry, type AgentTripCompletedPayload, type AgentTripStartedPayload, type Ai, type AiMatchers, type ApprovalDecision, type ApprovalDecisionType, type ApprovalHandler, ApprovalRejectedError, type ApprovalRejectedErrorOptions, type ApprovalRequest, type ApprovalRequestContext, Attachment, AttachmentPolicy, AttachmentSource, type AttemptEntry, AudioInput, type BaseReport, type BaseResult, type BatchItemHandler, type BatchItemResult, type BatchItemStatus, type BatchOptions, type BatchReport, type BatchResult, BinarySource, type BudgetContract, type BudgetContractDimension, type BudgetContractFallback, type BudgetContractViolation, type BudgetContractViolationMode, BudgetExceededError, type BudgetExceededErrorOptions, type BudgetFallbackSignal, type BudgetOptions, type BudgetPricing, type BudgetUnit, type CapturedMessage, type Cassette, type CassetteEntry, type CheckpointRecord, type CheckpointStore, type Chunk, type ChunkOptions, type ChunkType, type Citation, type ClassifierAgentEntry, type ClassifierCallback, type ClassifierConfig, type ClassifierContext, type ClassifierOutput, type ClassifierRefineContext, type ClassifierRefineResult, type ClassifierRunEntry, type ClassifierSnapshot, type CompactionResult, type CompleteEvent, ContentFilterError, type ContentFilterErrorOptions, ContentPart, ContextLengthExceededError, type ContextLengthExceededErrorOptions, DEFAULT_HASH_OPTIONS, DEFAULT_SENSITIVE_KEYS, type DatasetContract, type DatasetEntry, type DatasetOptions, type DecisionSource, type DispatchContext, type DispatchRawResult, END, EmbedderConfig, EmbedderContract, EmbeddingBatchResult, EmbeddingResult, EmbeddingUsage, EndSentinel, type EpisodicMemoryConfig, type ErrorCategory, type EvalCase, type EvalCaseResult, type EvalJudge, type EvalOptions, type EvalPredicate, type EvalReport, type EvalScore, type EvalScorer, type EvalScorerContext, type EvaluateBranchResult, type EvaluateContext, type EvaluateResult, type EventIdentity, ExecutableContract, type ExecutableTool, type ExecuteResult, type ExecutionReport, type ExecutionStatus, type ExportedPrompt, type ExportedPromptVersion, type ExportedRegistry, type ExtractJsonSchemaOptions, type FallbackAttempt, type FallbackModelContract, type FallbackModelOptions, type FallbackRetryPredicate, type FanOutOptions, type FanOutUnit, FinishReason, type FlagRecord, type FlowObserveOption, GeneratedAudio, GeneratedImage, type GuardOptions, type GuardrailAction, type GuardrailBlockEvent, type GuardrailCheck, type GuardrailCheckResult, type GuardrailDetector, type GuardrailDetectorContext, type GuardrailEscalation, type GuardrailFactory, type GuardrailMatch, type GuardrailOptions, type GuardrailPhase, type GuardrailVerdict, GuardrailViolationError, type GuardrailViolationErrorOptions, type HumanApprovalOptions, type HumanErrorCode, type ImageData, ImageGenerationOptions, ImageGenerationResponse, ImageModelConfig, ImageModelContract, ImageModelPricing, type ImageParams, type ImageReport, type ImageResult, ImageSource, type InjectionDetectorOptions, Instruction, InstructionContract, type IntentCallback, type IntentEntry, type IntentRunEntry, type IntentRunner, type IntentRunnerMap, type InterruptPolicy, type InterruptStore, InterruptSuspendedError, type InterruptSuspendedErrorOptions, InvalidRequestError, type IterationDecision, type IterationSnapshot, JUDGE_DEFAULT_REPAIR_ATTEMPTS, type JsonSchemaTarget, type JudgeAgentConfig, type JudgeConfig, type JudgeOutcome, type KeywordRerankerOptions, type LLMTrip, type LexicalDoc, type LineageStamp, type LlmRerankerOptions, type LoadHtmlOptions, type LoadPdfOptions, type LoadSkillInput, type LoadSkillResult, type LoadSkillToolDeps, type LoadTextOptions, type LoadWebOptions, type MatcherVerdict, MaxIterationsError, type MaxIterationsErrorOptions, MaxStepsExceededError, type MaxStepsExceededErrorOptions, type MemoryConfig, type MemoryContract, type MemoryItem, type MemoryTier, Message, type MiddlewareAgentRef, type MiddlewareContextByLevel, type MiddlewareExecuteContext, type MiddlewareLevel, type MiddlewareModelRef, type MiddlewareState, type MiddlewareSupervisorContext, type MiddlewareSupervisorRef, type MiddlewareToolContext, type MiddlewareTripContext, type MockImageCall, MockImageModel, type MockImageResponse, MockModel, type MockModelResponse, type MockRouterDecision, type MockRouterExhaustion, type MockRouterOptions, MockSDK, type MockSDKConfig, MockSkillsStore, type MockSpeechCall, MockSpeechModel, type MockSpeechResponse, type MockTranscriptionCall, MockTranscriptionModel, type MockTranscriptionResponse, type MockUsage, ModelCallOptions, ModelCapabilities, ModelConfig, ModelContract, type ModelPricing, ModelResponse, ModelStreamChunk, ModelToolCallRequest, type MultiQueryOptions, type NamespacedStateAccessor, type Next, type NextStepResult, OPENAI_INSTALL_INSTRUCTIONS, type ObjectStreamEvent, type Observer, type OpenAiClientLike, type OpenAiModerationCreateBody, type OpenAiModerationOptions, type OpenAiModerationResponse, type OpenAiModerationResult, type OrchestratorAsToolOptions, type OrchestratorAwaitingStatus, OrchestratorCancelledError, type OrchestratorCancelledErrorOptions, type OrchestratorCommandHandlers, type OrchestratorCommands, type OrchestratorConfig, OrchestratorConfigError, type OrchestratorContract, OrchestratorDriftError, type OrchestratorDriftErrorOptions, OrchestratorEmitter, type OrchestratorEvent, type OrchestratorEventHandler, type OrchestratorEventHandlers, type OrchestratorEventMap, type OrchestratorEventName, type OrchestratorExecuteOptions, OrchestratorExecution, type OrchestratorExecutionParams, OrchestratorFailedError, type OrchestratorMemoryConfig, type OrchestratorReport, type OrchestratorReportStatus, type OrchestratorReportType, type OrchestratorResult, type OrchestratorResumeOptions, type OrchestratorSessionScope, type OrchestratorStreamController, type OutboundPolicy, OutboundPolicyError, PDF_PARSE_INSTALL_INSTRUCTIONS, type ParsedFrontmatter, type PendingInterrupt, type PendingInterruptStatus, Persona, PersonaContract, type PgCheckpointOptions, type PgClientLike, type PgInterruptOptions, type PgSnapshotStoreOptions, type PgVectorStoreInstance, type PgVectorStoreOptions, type PiiCategory, type PiiDetectorOptions, Placeholders, PlannerCancelledError, type PlannerCancelledErrorOptions, type PlannerCapability, type PlannerConfig, type PlannerContract, PlannerDriftError, type PlannerDriftErrorOptions, type PlannerExecuteOptions, PlannerFailedError, type PlannerPlan, PlannerPlanInvalidError, type PlannerReport, type PlannerReportType, type PlannerResult, type PlannerResumeOptions, type PlannerRunArgs, type PlannerSnapshot, type PlannerSnapshotStatus, type PlannerStep, type PlannerStepDirective, type PlannerStepSnapshot, type PolicyContext, type PolicyVerdict, type ProceduralMemoryConfig, type PromptDiff, type PromptDiffBlock, type PromptEntry, type PromptJudgeCacheLike, type PromptLangfuseSyncOptions, PromptNotFoundError, PromptRefineOptions, PromptRefinementError, type PromptRefinementErrorOptions, type PromptRefinementFailureReason, type PromptRegistryContract, type PromptRegistryOptions, type PromptResolveOptions, type PromptTemplateVersion, type PromptValidateOptions, type PromptValidateTarget, PromptValidationError, type PromptValidationNote, type PromptValidationReport, type PromptValidationResult, type PromptValidationSeverity, type PromptVersion, type PromptsManagerContract, type PromptsManagerEntry, type PromptsManagerOptions, type PromptsManagerRegisterOptions, type PromptsValidateOptions, ProviderAuthError, ProviderError, ProviderRateLimitError, type ProviderRateLimitErrorOptions, ProviderTimeoutError, QuotaExceededError, REPORT_SCHEMA_VERSION, type Rag, type RagAsToolOptions, type RagConfig, type RagDocument, type RagLoaderMetadata, type RagLoaderOptions, type RagLoaderResult, type RagLoaderType, type RagReranker, type RankedItem, ReasoningEffort, type RecallOptions, type RecalledMemory, type RedactOptions, type RedactedError, type RedisCheckpointOptions, type RedisClientLike, type RedisInterruptOptions, type RedisSnapshotStoreOptions, RefinedPromptStoreLike, RefinedSystemPrompt, RefinedSystemPromptContract, RefinedSystemPromptOptions, type ReportStatus, type ReportType, ResolvedAttachment, type ResolvedIntentEntry, type ResolvedOrchestratorMemory, type ResolvedOutboundPolicy, type ResolvedPrompt, type ResumeOptions, type ResumeResult, type RetrieveOptions, type RetrieveResult, type RetrievedChunk, type RetryBackoff, type RetryConfig, type ReviewOutcome, type RouteContext, type RouterConfig, type RouterEntry, type RouterIntents, type RouterOutput, RoutingError, type RoutingErrorOptions, type RunFrame, SDKAdapterContract, SENSITIVE_HEADERS, SSE_DONE, type SaveSkillInput, type SaveSkillResult, type SaveSkillToolDeps, SchemaValidationError, type SchemaValidationErrorOptions, type SemanticCacheOptions, type SemanticMemoryConfig, type ServableExecutable, type ServeOptions, type SessionContextOverrides, type SessionContract, type SessionLock, type SessionSendResult, type SkillAnalyticsEvent, type SkillCatalogEntry, type SkillInjectMode, type SkillRecord, type SkillReviewGate, type SkillSource, type SkillsConfig, type SkillsContract, type SkillsStoreContract, type SnapshotStore, type SpawnSubAgentSpec, type SpeechData, SpeechGenerationResponse, SpeechModelConfig, SpeechModelContract, SpeechModelPricing, SpeechOptions, type SpeechParams, type SpeechReport, type SpeechResult, type StepAgentInput, type StepDefinition, StepFailedError, type StepFailedErrorOptions, type StepLocalEvents, type StepOutputSpec, type StepSnapshot, StorageFileShape, type StreamContract, type StreamController, type StreamEvent, type StreamEventBody, type StreamLike, type StreamObjectParams, StreamingToolGuardConfig, type SummarizeCallback, type SummarizeConfig, type SupervisorAgentCompletedPayload, type SupervisorAgentFailedPayload, type SupervisorAgentStartingPayload, type SupervisorAgentStreamingPayload, type SupervisorAsToolOptions, SupervisorCancelledError, type SupervisorCancelledErrorOptions, type SupervisorCancelledPayload, type SupervisorCompletedPayload, type SupervisorConfig, type SupervisorContract, SupervisorDriftError, type SupervisorDriftErrorOptions, SupervisorEmitter, type SupervisorErrorPayload, type SupervisorEvaluateVerdictPayload, type SupervisorEventHandler, type SupervisorEventHandlers, type SupervisorEventMap, type SupervisorExecuteOptions, SupervisorExecution, SupervisorFailedError, type SupervisorInput, type SupervisorIntentValue, type SupervisorIterationCompletedPayload, type SupervisorIterationStartingPayload, type SupervisorReport, type SupervisorResult, type SupervisorResumeOptions, type SupervisorRouterDecidedPayload, type SupervisorRouterDecidingPayload, SupervisorRoutingError, type SupervisorRoutingErrorOptions, type SupervisorSnapshot, type SupervisorSnapshotStatus, type SupervisorStartingPayload, type SupervisorStreamController, type SupervisorStreamEvent, type SupervisorTerminatedBy, type SyncGuardrailDetector, SystemPrompt, SystemPromptBlockContract, SystemPromptContract, SystemPromptMergeOptions, SystemPromptMergeSource, SystemPromptMeta, type TeamConfig, type TeamGate, type TeamGateFn, type TeamMemberValue, type TextInput, ToolActionResolver, type ToolCall, ToolConfig, ToolContext, type ToolContract, type ToolEventMeta, ToolExecutionError, type ToolExecutionErrorOptions, type ToolInvokeResult, ToolMeta, ToolMode, type TopicFilterOptions, TranscribeOptions, type TranscribeParams, type TranscriptionData, TranscriptionModelConfig, TranscriptionModelContract, TranscriptionModelPricing, type TranscriptionReport, TranscriptionResponse, type TranscriptionResult, TranscriptionSegment, type TurnSnapshot, type Usage, type UsageEvent, VcrCassetteMissError, type VcrCassetteMissErrorOptions, type VcrMode, type VcrModel, type VcrOptions, type VectorStore, type WithoutIdentity, WorkflowCancelledError, type WorkflowCancelledErrorOptions, type WorkflowCancelledPayload, type WorkflowCompletedPayload, type WorkflowContext, type WorkflowDefinition, WorkflowDriftError, type WorkflowDriftErrorOptions, WorkflowError, type WorkflowErrorPayload, type WorkflowEventHandler, type WorkflowEventHandlers, type WorkflowEventMap, type WorkflowExecuteOptions, type WorkflowInstance, type WorkflowLoopWarningPayload, type WorkflowReport, type WorkflowResult, type WorkflowResumeOptions, type WorkflowRunOptions, type WorkflowSnapshot, type WorkflowStartingPayload, type WorkflowStepCompletedPayload, type WorkflowStepFailedPayload, type WorkflowStepRetryingPayload, type WorkflowStepSkippedPayload, type WorkflowStepStartingPayload, type WorkflowStepStreamingPayload, accumulateCost, agent, ai, approximateTokenCount, assertUrlAllowed, audioFromBuffer, audioFromFile, audioMediaTypeForFilename, batch, bm25Rank, budget, buildCatalog, buildPlanSystemPrompt, buildRouterContextMessage, cacheVectorStore, captureChildReport, memory as checkpointMemory, pg as checkpointPg, redis as checkpointRedis, chunk, collectStreamObject, composeMiddleware, computeCost, computeImageCost, computeOrchestratorSignature, computeSignature as computePlannerSignature, computeSignature$1 as computeSignature, computeSignature$2 as computeSupervisorSignature, contains, createAgentStream, createCommandDispatcher as createOrchestratorCommandDispatcher, createOrchestratorStream, createCancelledError as createSupervisorCancelledError, createSupervisorStream, currentRunFrame, dataset, defaultPromptsManager, diff, directorySource, encodeSSE, evalScorers, evaluatePolicy, exact, executableToTool, extractJsonLenient, extractJsonPayload, extractJsonSchema, extractUserText, fallbackModel, fanOut, fetchTextWithPolicy, forTool, formatCriteria, fromJSON, generateRunId, getAIConfig, getObservers, guard, guardedFetch, guardrail, hashRequest, humanApproval, hybridRank, image, inProcessSessionLock, injectMemories as injectOrchestratorMemories, injection, instruction, memory$1 as interruptMemory, pg$1 as interruptPg, redis$1 as interruptRedis, isExecutableTool, isObserveAll, isPrivateOrReservedIp, judge, judgePromptBody, keywordReranker, llmReranker, loadHtml, loadPdf, loadRecord, loadSkillTool, loadSnapshotForResume as loadSupervisorSnapshotForResume, loadText, loadWeb, matchConverge, matchOutputShape, matchPassStep, matchRouteTo, memory$2 as memory, mergeUsage, mockAgent, mockRouter, moderation, multiQuery, namespacedState, noopSessionLock, normalizeAgentTools, onConfigApplied, orchestrator, asTool as orchestratorAsTool, memoryQueryFromInput as orchestratorMemoryQueryFromInput, outcomeTextFromTurn as orchestratorOutcomeTextFromTurn, parseFrontmatter, parsePartialJson, parseTags, persistSupervisorSnapshot, persona, pgVectorStore, pii, planSchema, planner, predicate, prepareAttachmentPart, proceduralSkillStore, prompt, promptKey, prompts, rag, readBudgetFallbackSignal, readTextCapped, recallForTurn as recallOrchestratorMemory, reciprocalRankFusion, redact, redactError, redactHeaders, registerAiMatchers, registerObserver, rememberTurnOutcome as rememberOrchestratorTurnOutcome, renderCatalogPrompt, renderPlaceholders, resolveAttachment, resolveDefaultCheckpointStore, resolveDefaultSnapshotStore, resolveDefaultStore, resolveIntentEntries, resolveObservers, resolveOrchestratorMemory, resolveOutboundPolicy, resolveSource, resume, router, runEval, runResume as runOrchestratorResume, runTurn as runOrchestratorTurn, runPipeline, runReviewGate, safeJsonParse, saveSkillTool, scrubSecrets, semanticCache, semanticPreselect, serve, setAIConfig, setObserveAll, skills, memory$3 as snapshotMemory, pg$2 as snapshotPg, redis$2 as snapshotRedis, spawnSubAgent, speech, stampReportLineage, step, storeSource, streamObject, streamTurn as streamOrchestratorTurn, streamToSSE, supervisor, asTool$1 as supervisorAsTool, systemPrompt, team, toJSON, toJUnit, tool, topic, transcribe, urlSource, vcr, vectorLiteral, withRunFrame, withoutRunFrame, workflow };
|
|
316
|
+
export { AIConfig, AIError, type AIErrorCode, type AIErrorOptions, type AckCallback, type AckConfig, type AckEntry, type AckRunEntry, type AckSnapshot, type AgentBranchSnapshot, AgentCancelledError, type AgentCancelledErrorOptions, type AgentCompletedPayload, type AgentConfig, type AgentContract, AgentDriftError, type AgentDriftErrorOptions, type AgentErrorPayload, type AgentEventHandler, type AgentEventMap, type AgentExecuteOptions, AgentExecutionError, AgentMaxTripsError, type AgentMaxTripsErrorOptions, type AgentMiddleware, type AgentMiddlewareExecuteHooks, type AgentMiddlewareSupervisorHooks, type AgentMiddlewareToolHooks, type AgentMiddlewareTripHooks, type AgentReport, type AgentResult, type AgentResumeOptions, type AgentSnapshot, type AgentSnapshotStatus, type AgentStartingPayload, type AgentStreamingPayload, type AgentToolCalledPayload, type AgentToolCallingFailedPayload, type AgentToolCallingPayload, type AgentToolEntry, type AgentTripCompletedPayload, type AgentTripStartedPayload, type Ai, type AiMatchers, type ApprovalDecision, type ApprovalDecisionType, type ApprovalHandler, ApprovalRejectedError, type ApprovalRejectedErrorOptions, type ApprovalRequest, type ApprovalRequestContext, Attachment, AttachmentPolicy, AttachmentSource, type AttemptEntry, AudioInput, type BaseReport, type BaseResult, type BatchItemHandler, type BatchItemResult, type BatchItemStatus, type BatchOptions, type BatchReport, type BatchResult, BinarySource, type BudgetContract, type BudgetContractDimension, type BudgetContractFallback, type BudgetContractViolation, type BudgetContractViolationMode, BudgetExceededError, type BudgetExceededErrorOptions, type BudgetFallbackSignal, type BudgetOptions, type BudgetPricing, type BudgetUnit, type CapturedMessage, type Cassette, type CassetteEntry, type CheckpointRecord, type CheckpointStore, type Chunk, type ChunkOptions, type ChunkType, type Citation, type ClassifierAgentEntry, type ClassifierCallback, type ClassifierConfig, type ClassifierContext, type ClassifierOutput, type ClassifierRefineContext, type ClassifierRefineResult, type ClassifierRunEntry, type ClassifierSnapshot, type CompactionResult, type CompleteEvent, ContentFilterError, type ContentFilterErrorOptions, ContentPart, ContextLengthExceededError, type ContextLengthExceededErrorOptions, DEFAULT_HASH_OPTIONS, DEFAULT_SENSITIVE_KEYS, type DatasetContract, type DatasetEntry, type DatasetOptions, type DecisionSource, type DispatchContext, type DispatchRawResult, END, EmbedderConfig, EmbedderContract, EmbeddingBatchResult, EmbeddingResult, EmbeddingUsage, EndSentinel, type EpisodicMemoryConfig, type ErrorCategory, type EvalCase, type EvalCaseResult, type EvalJudge, type EvalOptions, type EvalPredicate, type EvalReport, type EvalScore, type EvalScorer, type EvalScorerContext, type EvaluateBranchResult, type EvaluateContext, type EvaluateResult, type EventIdentity, ExecutableContract, type ExecutableTool, type ExecuteResult, type ExecutionReport, type ExecutionStatus, type ExportedPrompt, type ExportedPromptVersion, type ExportedRegistry, type ExtractJsonSchemaOptions, type FallbackAttempt, type FallbackModelContract, type FallbackModelOptions, type FallbackRetryPredicate, type FanOutOptions, type FanOutUnit, FinishReason, type FlagRecord, type FlowObserveOption, GeneratedAudio, GeneratedImage, type GuardOptions, type GuardrailAction, type GuardrailBlockEvent, type GuardrailCheck, type GuardrailCheckResult, type GuardrailDetector, type GuardrailDetectorContext, type GuardrailEscalation, type GuardrailFactory, type GuardrailMatch, type GuardrailOptions, type GuardrailPhase, type GuardrailVerdict, GuardrailViolationError, type GuardrailViolationErrorOptions, type HumanApprovalOptions, type HumanErrorCode, type ImageData, ImageGenerationOptions, ImageGenerationResponse, ImageModelConfig, ImageModelContract, ImageModelPricing, type ImageParams, type ImageReport, type ImageResult, ImageSource, type InjectionDetectorOptions, Instruction, InstructionContract, type IntentCallback, type IntentEntry, type IntentRunEntry, type IntentRunner, type IntentRunnerMap, type InterruptPolicy, type InterruptStore, InterruptSuspendedError, type InterruptSuspendedErrorOptions, InvalidRequestError, type IterationDecision, type IterationSnapshot, JUDGE_DEFAULT_REPAIR_ATTEMPTS, type JsonSchemaTarget, type JudgeAgentConfig, type JudgeConfig, type JudgeOutcome, type KeywordRerankerOptions, type LLMTrip, type LexicalDoc, type LineageStamp, type LlmRerankerOptions, type LoadHtmlOptions, type LoadPdfOptions, type LoadSkillInput, type LoadSkillResult, type LoadSkillToolDeps, type LoadTextOptions, type LoadWebOptions, type MatcherVerdict, MaxIterationsError, type MaxIterationsErrorOptions, MaxStepsExceededError, type MaxStepsExceededErrorOptions, type MemoryConfig, type MemoryContract, type MemoryItem, type MemoryTier, Message, type MiddlewareAgentRef, type MiddlewareContextByLevel, type MiddlewareExecuteContext, type MiddlewareLevel, type MiddlewareModelRef, type MiddlewareState, type MiddlewareSupervisorContext, type MiddlewareSupervisorRef, type MiddlewareToolContext, type MiddlewareTripContext, type MockImageCall, MockImageModel, type MockImageResponse, MockModel, type MockModelResponse, type MockRouterDecision, type MockRouterExhaustion, type MockRouterOptions, MockSDK, type MockSDKConfig, MockSkillsStore, type MockSpeechCall, MockSpeechModel, type MockSpeechResponse, type MockTranscriptionCall, MockTranscriptionModel, type MockTranscriptionResponse, type MockUsage, ModelCallOptions, ModelCapabilities, ModelConfig, ModelContract, type ModelPricing, ModelResponse, ModelStreamChunk, ModelToolCallRequest, type MultiQueryOptions, type NamespacedStateAccessor, type Next, type NextStepResult, OPENAI_INSTALL_INSTRUCTIONS, type ObjectStreamEvent, type Observer, type OpenAiClientLike, type OpenAiModerationCreateBody, type OpenAiModerationOptions, type OpenAiModerationResponse, type OpenAiModerationResult, type OrchestratorAsToolOptions, type OrchestratorAwaitingStatus, OrchestratorCancelledError, type OrchestratorCancelledErrorOptions, type OrchestratorCommandHandlers, type OrchestratorCommands, type OrchestratorConfig, OrchestratorConfigError, type OrchestratorContract, OrchestratorDriftError, type OrchestratorDriftErrorOptions, OrchestratorEmitter, type OrchestratorEvent, type OrchestratorEventHandler, type OrchestratorEventHandlers, type OrchestratorEventMap, type OrchestratorEventName, type OrchestratorExecuteOptions, OrchestratorExecution, type OrchestratorExecutionParams, OrchestratorFailedError, type OrchestratorMemoryConfig, type OrchestratorMemoryScope, type OrchestratorReport, type OrchestratorReportStatus, type OrchestratorReportType, type OrchestratorResult, type OrchestratorResumeOptions, type OrchestratorSessionScope, type OrchestratorStreamController, type OutboundPolicy, OutboundPolicyError, PDF_PARSE_INSTALL_INSTRUCTIONS, type ParsedFrontmatter, type PendingInterrupt, type PendingInterruptStatus, Persona, PersonaContract, type PgCheckpointOptions, type PgClientLike, type PgInterruptOptions, type PgSnapshotStoreOptions, type PgVectorStoreInstance, type PgVectorStoreOptions, type PiiCategory, type PiiDetectorOptions, Placeholders, PlannerCancelledError, type PlannerCancelledErrorOptions, type PlannerCapability, type PlannerConfig, type PlannerContract, PlannerDriftError, type PlannerDriftErrorOptions, type PlannerExecuteOptions, PlannerFailedError, type PlannerPlan, PlannerPlanInvalidError, type PlannerReport, type PlannerReportType, type PlannerResult, type PlannerResumeOptions, type PlannerRunArgs, type PlannerSnapshot, type PlannerSnapshotStatus, type PlannerStep, type PlannerStepDirective, type PlannerStepSnapshot, type PolicyContext, type PolicyVerdict, type ProceduralMemoryConfig, type PromptDiff, type PromptDiffBlock, type PromptEntry, type PromptJudgeCacheLike, type PromptLangfuseSyncOptions, PromptNotFoundError, PromptRefineOptions, PromptRefinementError, type PromptRefinementErrorOptions, type PromptRefinementFailureReason, type PromptRegistryContract, type PromptRegistryOptions, type PromptResolveOptions, type PromptTemplateVersion, type PromptValidateOptions, type PromptValidateTarget, PromptValidationError, type PromptValidationNote, type PromptValidationReport, type PromptValidationResult, type PromptValidationSeverity, type PromptVersion, type PromptsManagerContract, type PromptsManagerEntry, type PromptsManagerOptions, type PromptsManagerRegisterOptions, type PromptsValidateOptions, ProviderAuthError, ProviderError, ProviderRateLimitError, type ProviderRateLimitErrorOptions, ProviderTimeoutError, QuotaExceededError, REPORT_SCHEMA_VERSION, type Rag, type RagAsToolOptions, type RagConfig, type RagDocument, type RagLoaderMetadata, type RagLoaderOptions, type RagLoaderResult, type RagLoaderType, type RagReranker, type RankedItem, ReasoningEffort, type RecallOptions, type RecalledMemory, type RedactOptions, type RedactedError, type RedisCheckpointOptions, type RedisClientLike, type RedisInterruptOptions, type RedisSnapshotStoreOptions, RefinedPromptStoreLike, RefinedSystemPrompt, RefinedSystemPromptContract, RefinedSystemPromptOptions, type ReportStatus, type ReportType, ResolvedAttachment, type ResolvedIntentEntry, type ResolvedOrchestratorMemory, type ResolvedOutboundPolicy, type ResolvedPrompt, type ResumeOptions, type ResumeResult, type RetrieveOptions, type RetrieveResult, type RetrievedChunk, type RetryBackoff, type RetryConfig, type ReviewOutcome, type RouteContext, type RouterConfig, type RouterEntry, type RouterIntents, type RouterOutput, RoutingError, type RoutingErrorOptions, type RunFrame, SDKAdapterContract, SENSITIVE_HEADERS, SSE_DONE, type SaveSkillInput, type SaveSkillResult, type SaveSkillToolDeps, SchemaValidationError, type SchemaValidationErrorOptions, type SemanticCacheOptions, type SemanticCacheScope, type SemanticMemoryConfig, type ServableExecutable, type ServeOptions, type SessionContextOverrides, type SessionContract, type SessionLock, type SessionSendResult, type SkillAnalyticsEvent, type SkillCatalogEntry, type SkillInjectMode, type SkillRecord, type SkillReviewGate, type SkillSource, type SkillsConfig, type SkillsContract, type SkillsStoreContract, type SnapshotStore, type SpawnSubAgentSpec, type SpeechData, SpeechGenerationResponse, SpeechModelConfig, SpeechModelContract, SpeechModelPricing, SpeechOptions, type SpeechParams, type SpeechReport, type SpeechResult, type StepAgentInput, type StepDefinition, StepFailedError, type StepFailedErrorOptions, type StepLocalEvents, type StepOutputSpec, type StepSnapshot, StorageFileShape, type StreamContract, type StreamController, type StreamEvent, type StreamEventBody, type StreamLike, type StreamObjectParams, StreamingToolGuardConfig, type SummarizeCallback, type SummarizeConfig, type SupervisorAgentCompletedPayload, type SupervisorAgentFailedPayload, type SupervisorAgentStartingPayload, type SupervisorAgentStreamingPayload, type SupervisorAsToolOptions, SupervisorCancelledError, type SupervisorCancelledErrorOptions, type SupervisorCancelledPayload, type SupervisorCompletedPayload, type SupervisorConfig, type SupervisorContract, SupervisorDriftError, type SupervisorDriftErrorOptions, SupervisorEmitter, type SupervisorErrorPayload, type SupervisorEvaluateVerdictPayload, type SupervisorEventHandler, type SupervisorEventHandlers, type SupervisorEventMap, type SupervisorExecuteOptions, SupervisorExecution, SupervisorFailedError, type SupervisorInput, type SupervisorIntentValue, type SupervisorIterationCompletedPayload, type SupervisorIterationStartingPayload, type SupervisorReport, type SupervisorResult, type SupervisorResumeOptions, type SupervisorRouterDecidedPayload, type SupervisorRouterDecidingPayload, SupervisorRoutingError, type SupervisorRoutingErrorOptions, type SupervisorSnapshot, type SupervisorSnapshotStatus, type SupervisorStartingPayload, type SupervisorStreamController, type SupervisorStreamEvent, type SupervisorTerminatedBy, type SyncGuardrailDetector, SystemPrompt, SystemPromptBlockContract, SystemPromptContract, SystemPromptMergeOptions, SystemPromptMergeSource, SystemPromptMeta, type TeamConfig, type TeamGate, type TeamGateFn, type TeamMemberValue, type TextInput, ToolActionResolver, type ToolCall, ToolConfig, ToolContext, type ToolContract, type ToolEventMeta, ToolExecutionError, type ToolExecutionErrorOptions, type ToolInvokeResult, ToolMeta, ToolMode, type TopicFilterOptions, TranscribeOptions, type TranscribeParams, type TranscriptionData, TranscriptionModelConfig, TranscriptionModelContract, TranscriptionModelPricing, type TranscriptionReport, TranscriptionResponse, type TranscriptionResult, TranscriptionSegment, type TurnSnapshot, UNSAFE_MERGE_KEYS, type Usage, type UsageEvent, VcrCassetteMissError, type VcrCassetteMissErrorOptions, type VcrMode, type VcrModel, type VcrOptions, type VectorStore, type WithoutIdentity, WorkflowCancelledError, type WorkflowCancelledErrorOptions, type WorkflowCancelledPayload, type WorkflowCompletedPayload, type WorkflowContext, type WorkflowDefinition, WorkflowDriftError, type WorkflowDriftErrorOptions, WorkflowError, type WorkflowErrorPayload, type WorkflowEventHandler, type WorkflowEventHandlers, type WorkflowEventMap, type WorkflowExecuteOptions, type WorkflowInstance, type WorkflowLoopWarningPayload, type WorkflowReport, type WorkflowResult, type WorkflowResumeOptions, type WorkflowRunOptions, type WorkflowSnapshot, type WorkflowStartingPayload, type WorkflowStepCompletedPayload, type WorkflowStepFailedPayload, type WorkflowStepRetryingPayload, type WorkflowStepSkippedPayload, type WorkflowStepStartingPayload, type WorkflowStepStreamingPayload, type WorkingMemoryConfig, accumulateCost, agent, ai, approximateTokenCount, assertUrlAllowed, assignSafeKey, audioFromBuffer, audioFromFile, audioMediaTypeForFilename, batch, bm25Rank, budget, buildCatalog, buildPlanSystemPrompt, buildRouterContextMessage, cacheVectorStore, captureChildReport, memory as checkpointMemory, pg as checkpointPg, redis as checkpointRedis, chunk, collectStreamObject, composeMiddleware, computeCost, computeImageCost, computeOrchestratorSignature, computeSignature as computePlannerSignature, computeSignature$1 as computeSignature, computeSignature$2 as computeSupervisorSignature, contains, createAgentStream, createCommandDispatcher as createOrchestratorCommandDispatcher, createOrchestratorStream, createCancelledError as createSupervisorCancelledError, createSupervisorStream, currentRunFrame, dataset, defaultPromptsManager, diff, directorySource, encodeSSE, evalScorers, evaluatePolicy, exact, executableToTool, extractJsonLenient, extractJsonPayload, extractJsonSchema, extractUserText, fallbackModel, fanOut, fetchTextWithPolicy, forTool, formatCriteria, fromJSON, generateRunId, getAIConfig, getObservers, guard, guardedFetch, guardrail, hashRequest, humanApproval, hybridRank, image, inProcessSessionLock, injectMemories as injectOrchestratorMemories, injection, instruction, memory$1 as interruptMemory, pg$1 as interruptPg, redis$1 as interruptRedis, isExecutableTool, isObserveAll, isPrivateOrReservedIp, isUnsafeMergeKey, judge, judgePromptBody, keywordReranker, llmReranker, loadHtml, loadPdf, loadRecord, loadSkillTool, loadSnapshotForResume as loadSupervisorSnapshotForResume, loadText, loadWeb, matchConverge, matchOutputShape, matchPassStep, matchRouteTo, memory$2 as memory, mergeSafely, mergeUsage, mockAgent, mockRouter, moderation, multiQuery, namespacedState, noopSessionLock, normalizeAgentTools, onConfigApplied, orchestrator, asTool as orchestratorAsTool, memoryQueryFromInput as orchestratorMemoryQueryFromInput, memoryScopeFor as orchestratorMemoryScopeFor, outcomeTextFromTurn as orchestratorOutcomeTextFromTurn, sessionMemoryScope as orchestratorSessionMemoryScope, parseFrontmatter, parsePartialJson, parseTags, persistSupervisorSnapshot, persona, pgVectorStore, pii, planSchema, planner, predicate, prepareAttachmentPart, proceduralSkillStore, prompt, promptKey, prompts, rag, readBudgetFallbackSignal, readTextCapped, recallForTurn as recallOrchestratorMemory, reciprocalRankFusion, redact, redactError, redactHeaders, registerAiMatchers, registerObserver, rememberTurnOutcome as rememberOrchestratorTurnOutcome, renderCatalogPrompt, renderPlaceholders, resolveAttachment, resolveDefaultCheckpointStore, resolveDefaultSnapshotStore, resolveDefaultStore, resolveIntentEntries, resolveObservers, resolveOrchestratorMemory, resolveOutboundPolicy, resolveSource, resume, router, runEval, runResume as runOrchestratorResume, runTurn as runOrchestratorTurn, runPipeline, runReviewGate, safeJsonParse, saveSkillTool, scrubSecrets, semanticCache, semanticPreselect, serve, setAIConfig, setObserveAll, skills, memory$3 as snapshotMemory, pg$2 as snapshotPg, redis$2 as snapshotRedis, spawnSubAgent, speech, stampReportLineage, step, storeSource, streamObject, streamTurn as streamOrchestratorTurn, streamToSSE, supervisor, asTool$1 as supervisorAsTool, systemPrompt, team, toJSON, toJUnit, tool, topic, transcribe, urlSource, vcr, vectorLiteral, withRunFrame, withoutRunFrame, workflow };
|
|
316
317
|
import "./ai.mjs";
|
|
317
318
|
import "./config.mjs";
|
|
318
319
|
import "./testing/matchers.mjs";
|
package/esm/index.mjs
CHANGED
|
@@ -142,10 +142,11 @@ import "./model/index.mjs";
|
|
|
142
142
|
import { asTool } from "./orchestrator/as-tool.mjs";
|
|
143
143
|
import { createCommandDispatcher } from "./orchestrator/commands.mjs";
|
|
144
144
|
import { OrchestratorEmitter } from "./orchestrator/emitter.mjs";
|
|
145
|
-
import { injectMemories, memoryQueryFromInput, outcomeTextFromTurn, recallForTurn, rememberTurnOutcome, resolveOrchestratorMemory } from "./orchestrator/memory.mjs";
|
|
145
|
+
import { injectMemories, memoryQueryFromInput, memoryScopeFor, outcomeTextFromTurn, recallForTurn, rememberTurnOutcome, resolveOrchestratorMemory, sessionMemoryScope } from "./orchestrator/memory.mjs";
|
|
146
146
|
import { asTool as asTool$1 } from "./supervisor/as-tool.mjs";
|
|
147
147
|
import { SupervisorEmitter } from "./supervisor/emitter.mjs";
|
|
148
148
|
import { resolveIntentEntries } from "./supervisor/entries.mjs";
|
|
149
|
+
import { UNSAFE_MERGE_KEYS, assignSafeKey, isUnsafeMergeKey, mergeSafely } from "./security/safe-merge.mjs";
|
|
149
150
|
import { createCancelledError } from "./supervisor/cancellation.mjs";
|
|
150
151
|
import { buildRouterContextMessage } from "./supervisor/router-prompt.mjs";
|
|
151
152
|
import { loadSnapshotForResume, persistSupervisorSnapshot } from "./supervisor/snapshot.mjs";
|
|
@@ -216,4 +217,4 @@ import "./workflow/index.mjs";
|
|
|
216
217
|
import { matchConverge, matchOutputShape, matchPassStep, matchRouteTo } from "./testing/matcher-logic.mjs";
|
|
217
218
|
import { registerAiMatchers } from "./testing/register-lazy.mjs";
|
|
218
219
|
|
|
219
|
-
export { AIError, AgentCancelledError, AgentDriftError, AgentExecutionError, AgentMaxTripsError, ApprovalRejectedError, BudgetExceededError, ContentFilterError, ContextLengthExceededError, DEFAULT_HASH_OPTIONS, DEFAULT_SENSITIVE_KEYS, END, GuardrailViolationError, Instruction, InterruptSuspendedError, InvalidRequestError, JUDGE_DEFAULT_REPAIR_ATTEMPTS, MaxIterationsError, MaxStepsExceededError, MockImageModel, MockModel, MockSDK, MockSkillsStore, MockSpeechModel, MockTranscriptionModel, OPENAI_INSTALL_INSTRUCTIONS, OrchestratorCancelledError, OrchestratorConfigError, OrchestratorDriftError, OrchestratorEmitter, OrchestratorExecution, OrchestratorFailedError, OutboundPolicyError, PDF_PARSE_INSTALL_INSTRUCTIONS, Persona, PlannerCancelledError, PlannerDriftError, PlannerFailedError, PlannerPlanInvalidError, PromptNotFoundError, PromptRefinementError, PromptValidationError, ProviderAuthError, ProviderError, ProviderRateLimitError, ProviderTimeoutError, QuotaExceededError, REPORT_SCHEMA_VERSION, RefinedSystemPrompt, RoutingError, SENSITIVE_HEADERS, SSE_DONE, SchemaValidationError, StepFailedError, SupervisorCancelledError, SupervisorDriftError, SupervisorEmitter, SupervisorExecution, SupervisorFailedError, SupervisorRoutingError, SystemPrompt, ToolExecutionError, VcrCassetteMissError, WorkflowCancelledError, WorkflowDriftError, WorkflowError, accumulateCost, agent, ai, approximateTokenCount, assertUrlAllowed, audioFromBuffer, audioFromFile, audioMediaTypeForFilename, batch, bm25Rank, budget, buildCatalog, buildPlanSystemPrompt, buildRouterContextMessage, cacheVectorStore, captureChildReport, memory as checkpointMemory, pg as checkpointPg, redis as checkpointRedis, chunk, collectStreamObject, composeMiddleware, computeCost, computeImageCost, computeOrchestratorSignature, computeSignature as computePlannerSignature, computeSignature$1 as computeSignature, computeSignature$2 as computeSupervisorSignature, contains, createAgentStream, createCommandDispatcher as createOrchestratorCommandDispatcher, createOrchestratorStream, createCancelledError as createSupervisorCancelledError, createSupervisorStream, currentRunFrame, dataset, defaultPromptsManager, diff, directorySource, encodeSSE, evalScorers, evaluatePolicy, exact, executableToTool, extractJsonLenient, extractJsonPayload, extractJsonSchema, extractUserText, fallbackModel, fanOut, fetchTextWithPolicy, forTool, formatCriteria, fromJSON, generateRunId, getAIConfig, getObservers, guard, guardedFetch, guardrail, hashRequest, humanApproval, hybridRank, image, inProcessSessionLock, injectMemories as injectOrchestratorMemories, injection, instruction, memory$1 as interruptMemory, pg$1 as interruptPg, redis$1 as interruptRedis, isExecutableTool, isObserveAll, isPrivateOrReservedIp, judge, judgePromptBody, keywordReranker, llmReranker, loadHtml, loadPdf, loadRecord, loadSkillTool, loadSnapshotForResume as loadSupervisorSnapshotForResume, loadText, loadWeb, matchConverge, matchOutputShape, matchPassStep, matchRouteTo, memory$2 as memory, mergeUsage, mockAgent, mockRouter, moderation, multiQuery, namespacedState, noopSessionLock, normalizeAgentTools, onConfigApplied, orchestrator, asTool as orchestratorAsTool, memoryQueryFromInput as orchestratorMemoryQueryFromInput, outcomeTextFromTurn as orchestratorOutcomeTextFromTurn, parseFrontmatter, parsePartialJson, parseTags, persistSupervisorSnapshot, persona, pgVectorStore, pii, planSchema, planner, predicate, prepareAttachmentPart, proceduralSkillStore, prompt, promptKey, prompts, rag, readBudgetFallbackSignal, readTextCapped, recallForTurn as recallOrchestratorMemory, reciprocalRankFusion, redact, redactError, redactHeaders, registerAiMatchers, registerObserver, rememberTurnOutcome as rememberOrchestratorTurnOutcome, renderCatalogPrompt, renderPlaceholders, resolveAttachment, resolveDefaultCheckpointStore, resolveDefaultSnapshotStore, resolveDefaultStore, resolveIntentEntries, resolveObservers, resolveOrchestratorMemory, resolveOutboundPolicy, resolveSource, resume, router, runEval, runResume as runOrchestratorResume, runTurn as runOrchestratorTurn, runPipeline, runReviewGate, safeJsonParse, saveSkillTool, scrubSecrets, semanticCache, semanticPreselect, serve, setAIConfig, setObserveAll, skills, memory$3 as snapshotMemory, pg$2 as snapshotPg, redis$2 as snapshotRedis, spawnSubAgent, speech, stampReportLineage, step, storeSource, streamObject, streamTurn as streamOrchestratorTurn, streamToSSE, supervisor, asTool$1 as supervisorAsTool, systemPrompt, team, toJSON, toJUnit, tool, topic, transcribe, urlSource, vcr, vectorLiteral, withRunFrame, withoutRunFrame, workflow };
|
|
220
|
+
export { AIError, AgentCancelledError, AgentDriftError, AgentExecutionError, AgentMaxTripsError, ApprovalRejectedError, BudgetExceededError, ContentFilterError, ContextLengthExceededError, DEFAULT_HASH_OPTIONS, DEFAULT_SENSITIVE_KEYS, END, GuardrailViolationError, Instruction, InterruptSuspendedError, InvalidRequestError, JUDGE_DEFAULT_REPAIR_ATTEMPTS, MaxIterationsError, MaxStepsExceededError, MockImageModel, MockModel, MockSDK, MockSkillsStore, MockSpeechModel, MockTranscriptionModel, OPENAI_INSTALL_INSTRUCTIONS, OrchestratorCancelledError, OrchestratorConfigError, OrchestratorDriftError, OrchestratorEmitter, OrchestratorExecution, OrchestratorFailedError, OutboundPolicyError, PDF_PARSE_INSTALL_INSTRUCTIONS, Persona, PlannerCancelledError, PlannerDriftError, PlannerFailedError, PlannerPlanInvalidError, PromptNotFoundError, PromptRefinementError, PromptValidationError, ProviderAuthError, ProviderError, ProviderRateLimitError, ProviderTimeoutError, QuotaExceededError, REPORT_SCHEMA_VERSION, RefinedSystemPrompt, RoutingError, SENSITIVE_HEADERS, SSE_DONE, SchemaValidationError, StepFailedError, SupervisorCancelledError, SupervisorDriftError, SupervisorEmitter, SupervisorExecution, SupervisorFailedError, SupervisorRoutingError, SystemPrompt, ToolExecutionError, UNSAFE_MERGE_KEYS, VcrCassetteMissError, WorkflowCancelledError, WorkflowDriftError, WorkflowError, accumulateCost, agent, ai, approximateTokenCount, assertUrlAllowed, assignSafeKey, audioFromBuffer, audioFromFile, audioMediaTypeForFilename, batch, bm25Rank, budget, buildCatalog, buildPlanSystemPrompt, buildRouterContextMessage, cacheVectorStore, captureChildReport, memory as checkpointMemory, pg as checkpointPg, redis as checkpointRedis, chunk, collectStreamObject, composeMiddleware, computeCost, computeImageCost, computeOrchestratorSignature, computeSignature as computePlannerSignature, computeSignature$1 as computeSignature, computeSignature$2 as computeSupervisorSignature, contains, createAgentStream, createCommandDispatcher as createOrchestratorCommandDispatcher, createOrchestratorStream, createCancelledError as createSupervisorCancelledError, createSupervisorStream, currentRunFrame, dataset, defaultPromptsManager, diff, directorySource, encodeSSE, evalScorers, evaluatePolicy, exact, executableToTool, extractJsonLenient, extractJsonPayload, extractJsonSchema, extractUserText, fallbackModel, fanOut, fetchTextWithPolicy, forTool, formatCriteria, fromJSON, generateRunId, getAIConfig, getObservers, guard, guardedFetch, guardrail, hashRequest, humanApproval, hybridRank, image, inProcessSessionLock, injectMemories as injectOrchestratorMemories, injection, instruction, memory$1 as interruptMemory, pg$1 as interruptPg, redis$1 as interruptRedis, isExecutableTool, isObserveAll, isPrivateOrReservedIp, isUnsafeMergeKey, judge, judgePromptBody, keywordReranker, llmReranker, loadHtml, loadPdf, loadRecord, loadSkillTool, loadSnapshotForResume as loadSupervisorSnapshotForResume, loadText, loadWeb, matchConverge, matchOutputShape, matchPassStep, matchRouteTo, memory$2 as memory, mergeSafely, mergeUsage, mockAgent, mockRouter, moderation, multiQuery, namespacedState, noopSessionLock, normalizeAgentTools, onConfigApplied, orchestrator, asTool as orchestratorAsTool, memoryQueryFromInput as orchestratorMemoryQueryFromInput, memoryScopeFor as orchestratorMemoryScopeFor, outcomeTextFromTurn as orchestratorOutcomeTextFromTurn, sessionMemoryScope as orchestratorSessionMemoryScope, parseFrontmatter, parsePartialJson, parseTags, persistSupervisorSnapshot, persona, pgVectorStore, pii, planSchema, planner, predicate, prepareAttachmentPart, proceduralSkillStore, prompt, promptKey, prompts, rag, readBudgetFallbackSignal, readTextCapped, recallForTurn as recallOrchestratorMemory, reciprocalRankFusion, redact, redactError, redactHeaders, registerAiMatchers, registerObserver, rememberTurnOutcome as rememberOrchestratorTurnOutcome, renderCatalogPrompt, renderPlaceholders, resolveAttachment, resolveDefaultCheckpointStore, resolveDefaultSnapshotStore, resolveDefaultStore, resolveIntentEntries, resolveObservers, resolveOrchestratorMemory, resolveOutboundPolicy, resolveSource, resume, router, runEval, runResume as runOrchestratorResume, runTurn as runOrchestratorTurn, runPipeline, runReviewGate, safeJsonParse, saveSkillTool, scrubSecrets, semanticCache, semanticPreselect, serve, setAIConfig, setObserveAll, skills, memory$3 as snapshotMemory, pg$2 as snapshotPg, redis$2 as snapshotRedis, spawnSubAgent, speech, stampReportLineage, step, storeSource, streamObject, streamTurn as streamOrchestratorTurn, streamToSSE, supervisor, asTool$1 as supervisorAsTool, systemPrompt, team, toJSON, toJUnit, tool, topic, transcribe, urlSource, vcr, vectorLiteral, withRunFrame, withoutRunFrame, workflow };
|