@backendkit-labs/agent-core 0.40.0 → 0.42.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/README.md +56 -0
- package/dist/agent-memory/ProceduralMemory.d.ts +3 -0
- package/dist/agent-memory/ProceduralMemory.d.ts.map +1 -1
- package/dist/agent-memory/ProceduralMemory.js +3 -0
- package/dist/agent-memory/ProceduralMemory.js.map +1 -1
- package/dist/engine/AgentEngine.d.ts +22 -2
- package/dist/engine/AgentEngine.d.ts.map +1 -1
- package/dist/engine/AgentEngine.js +92 -48
- package/dist/engine/AgentEngine.js.map +1 -1
- package/dist/engine/createBaseEngine.d.ts +13 -0
- package/dist/engine/createBaseEngine.d.ts.map +1 -1
- package/dist/engine/createBaseEngine.js +41 -7
- package/dist/engine/createBaseEngine.js.map +1 -1
- package/dist/engine/error-code.d.ts +7 -0
- package/dist/engine/error-code.d.ts.map +1 -0
- package/dist/engine/error-code.js +23 -0
- package/dist/engine/error-code.js.map +1 -0
- package/dist/engine/run-recorder.d.ts +13 -0
- package/dist/engine/run-recorder.d.ts.map +1 -0
- package/dist/engine/run-recorder.js +49 -0
- package/dist/engine/run-recorder.js.map +1 -0
- package/dist/governance/approval-store.d.ts +12 -0
- package/dist/governance/approval-store.d.ts.map +1 -1
- package/dist/governance/approval-store.js +37 -1
- package/dist/governance/approval-store.js.map +1 -1
- package/dist/governance/types.d.ts +6 -0
- package/dist/governance/types.d.ts.map +1 -1
- package/dist/index.d.ts +6 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -3
- package/dist/index.js.map +1 -1
- package/dist/learning/index.d.ts +16 -0
- package/dist/learning/index.d.ts.map +1 -0
- package/dist/learning/index.js +560 -0
- package/dist/learning/index.js.map +1 -0
- package/dist/learning/signal.d.ts +51 -0
- package/dist/learning/signal.d.ts.map +1 -0
- package/dist/learning/signal.js +136 -0
- package/dist/learning/signal.js.map +1 -0
- package/dist/learning/stores.d.ts +32 -0
- package/dist/learning/stores.d.ts.map +1 -0
- package/dist/learning/stores.js +91 -0
- package/dist/learning/stores.js.map +1 -0
- package/dist/learning/types.d.ts +345 -0
- package/dist/learning/types.d.ts.map +1 -0
- package/dist/learning/types.js +3 -0
- package/dist/learning/types.js.map +1 -0
- package/dist/learning/units.d.ts +46 -0
- package/dist/learning/units.d.ts.map +1 -0
- package/dist/learning/units.js +137 -0
- package/dist/learning/units.js.map +1 -0
- package/dist/reflection/domain-registry.d.ts +3 -0
- package/dist/reflection/domain-registry.d.ts.map +1 -1
- package/dist/reflection/domain-registry.js +3 -0
- package/dist/reflection/domain-registry.js.map +1 -1
- package/dist/reflection/failure-catalog.d.ts +3 -0
- package/dist/reflection/failure-catalog.d.ts.map +1 -1
- package/dist/reflection/failure-catalog.js +3 -0
- package/dist/reflection/failure-catalog.js.map +1 -1
- package/dist/reflection/pattern-detector.d.ts +3 -0
- package/dist/reflection/pattern-detector.d.ts.map +1 -1
- package/dist/reflection/pattern-detector.js +3 -0
- package/dist/reflection/pattern-detector.js.map +1 -1
- package/dist/reflection/policy-promoter.d.ts +3 -0
- package/dist/reflection/policy-promoter.d.ts.map +1 -1
- package/dist/reflection/policy-promoter.js +3 -0
- package/dist/reflection/policy-promoter.js.map +1 -1
- package/dist/reflection/reflection-engine.d.ts +3 -0
- package/dist/reflection/reflection-engine.d.ts.map +1 -1
- package/dist/reflection/reflection-engine.js +3 -0
- package/dist/reflection/reflection-engine.js.map +1 -1
- package/dist/tools/defineTool.d.ts +4 -1
- package/dist/tools/defineTool.d.ts.map +1 -1
- package/dist/tools/defineTool.js +5 -2
- package/dist/tools/defineTool.js.map +1 -1
- package/dist/tools/services.d.ts +13 -0
- package/dist/tools/services.d.ts.map +1 -1
- package/dist/tools/services.js +12 -0
- package/dist/tools/services.js.map +1 -1
- package/dist/tools/tool-error.d.ts +19 -0
- package/dist/tools/tool-error.d.ts.map +1 -0
- package/dist/tools/tool-error.js +33 -0
- package/dist/tools/tool-error.js.map +1 -0
- package/dist/types/index.d.ts +39 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +89 -89
package/README.md
CHANGED
|
@@ -1114,6 +1114,62 @@ const engine = createBaseEngine({ ...opts, hooks: [review], maxHookContinues: 3
|
|
|
1114
1114
|
|
|
1115
1115
|
---
|
|
1116
1116
|
|
|
1117
|
+
## Learning from experience
|
|
1118
|
+
|
|
1119
|
+
An agent learns from what happens to it. The same failure seen 3 times becomes a **lesson** in its prompt and a **proposed rule** that waits for a person: nothing it learns applies itself.
|
|
1120
|
+
|
|
1121
|
+
```typescript
|
|
1122
|
+
import { createLearning } from '@backendkit-labs/agent-core';
|
|
1123
|
+
|
|
1124
|
+
const learning = createLearning(); // in memory; pass `store`, `approvals` and `rules` to keep them on disk
|
|
1125
|
+
const engine = createBaseEngine({ ...opts, learning });
|
|
1126
|
+
|
|
1127
|
+
await learning.record({ agentId: 'ap', domain: 'qa', kind: 'wrong_total', situation: 'posting an invoice', action: 'post_invoice' });
|
|
1128
|
+
|
|
1129
|
+
for (const p of await learning.proposals()) console.log(p.id, p.reason);
|
|
1130
|
+
await learning.approve(id, { kind: 'human', id: 'ana' }); // only a human by default (`approverKinds`)
|
|
1131
|
+
await learning.retire(id); // withdraw an approved rule
|
|
1132
|
+
```
|
|
1133
|
+
|
|
1134
|
+
- **What the `learning` option wires.** Every failed, timed-out, denied or blocked tool call becomes an experience. The lessons of each agent, sanitized and capped, join its system prompt. The rules a person approved (`{ tool, effect: 'ask' | 'deny' }`) are enforced only when the engine is on the policy path (`policy`, `approver` or `approvals` is set): `learning` alone never changes how the engine asks for approval. `learning.sink`, `learning.hooks` and `learning.policy` remain available to wire by hand.
|
|
1135
|
+
- **What makes a pattern.** The same failure (tool, kind and, when the tool's error has one, its code: `ECONNRESET` and `ERP_PERIOD_CLOSED` are different patterns) seen `threshold` times **inside the window** (`window: { days: 30 }`). Correct calls are counted, not stored, so a tool with many calls also needs the failures to be a share of them (`rate`, default 5% from 20 calls): 3 failures in 1000 calls are noise, 3 in 5 are not. The share is that of the **subject**: to judge a context on its own, put it in the subject (`breakout/trend_flat` and `breakout/trend_up` are judged separately; `breakout` judges both together). The share decides when a pattern **enters**; once in, it stays while its failures stay in the window, so a lesson that works (and fills its subject with correct calls) does not remove itself. `rate: false` counts failures only. `learning.flush()` writes the counters now; they are also written after each turn.
|
|
1136
|
+
- **Lessons come in units.** The lessons of an agent are grouped by tool (`### post_invoice`), with `general` first; inside a unit, what a person taught goes before what was learned, and `lessons.maxPerUnit` caps the learned ones. `lessons.maxPerUnit` and `lessons.maxLessons` keep the learned lessons that happen most. The text is cut by dropping whole entries from the end, learned ones first and what a person taught only when nothing learned is left, so the same lessons always give the same system prompt.
|
|
1137
|
+
- **The advice comes from whoever knows the domain.** A tool declares what to do about each error code: `defineTool({ ..., errorHints: { ERP_PERIOD_CLOSED: 'The period is closed: post it in the next open one.', '*': 'Check the invoice first.' } })`. When that error repeats, the lesson says it. It is only about the errors the tool raises: for the failures the engine sees by itself (a denial, a timeout, a result that was too large) it says one fixed sentence (`ENGINE_HINTS`). Nothing generic is invented for the rest: the lesson states the fact.
|
|
1138
|
+
- **A unit a person can write and review in git.** `await learning.exportUnit('post_invoice')` gives markdown with a front matter, the `## Taught` lessons (the part an import reads) and the `## Learned` ones (generated: ignored on import). `await learning.importUnit(md, by)` teaches the taught ones; the file is imported whole or not at all, importing it twice changes nothing (a lesson that did not change keeps its place and its first author), and `{ replace: true }` forgets the ones that left the file. **The front matter decides which tenant gets the lessons**: a product with tenants passes `{ tenantId }` to say it itself. `learning.units()` lists the units.
|
|
1139
|
+
- **Everything in a directory.** `createLearning({ dir })` keeps the experiences, counters, proposals, rules and taught lessons under one directory (`experiences.json`, `counters.json`, `proposals/`, `rules.json`, `lessons.json`); a store you pass replaces its file. Without `dir` nothing touches the disk.
|
|
1140
|
+
- **Report what happened in one line.** `await learning.trackOutcome({ agentId, domain, subject, ok, context?, kind?, detail? })` counts a success against its subject or records a failure. A success without a subject is refused: it would never be counted.
|
|
1141
|
+
- **Circumstances in the pattern.** `context` ('trend_flat', 'before_close') makes the same subject be judged apart: the share of failures is measured against the calls *in that context*. Without a context nothing changes.
|
|
1142
|
+
- **Simulated time.** `createLearning({ now, stamp: 'clock' })` makes the experiences from the audit sink, `record` and the counters use the clock `now`, so a simulation or a backtest runs in simulated time with the window, the counters and the experiences in agreement. The default is the time of the event, as always.
|
|
1143
|
+
- **Tools enforce the rules a person approved** without owning a store: `const guards = await learnedRules(ctx, isMyGuard)`. `createBaseEngine({ learning })` gives the tools a read-only view of the rules of the engine's tenant under `LEARNED_RULES_SERVICE`, never the `Learning` object (it could approve).
|
|
1144
|
+
- **Teach it something specific.** A lesson a person writes does not wait for three failures: `await learning.teach({ text: 'Totals are rounded to 2 decimals.', tools: ['post_invoice'] }, { kind: 'human', id: 'ana' })`. It joins the prompt as `Taught lessons`, before the learned ones, sanitized and capped, inside its tenant. `agentId` limits it to one agent, `tools` to agents that have one of those tools in the turn, and it is at most 500 characters. `learning.taught()` lists them and `learning.forget(id)` withdraws one. For knowledge that never changes, `AGENT.md` or `instructionSources` do the same without learning.
|
|
1145
|
+
- **A rule by hand.** `learning.addRule({ rule: { tool: 'post_invoice', effect: 'deny' }, reason: 'ERP freeze' }, by)` validates the rule, attributes it to a person and stores it next to the ones that came from proposals.
|
|
1146
|
+
- **Only a person.** Teaching and adding a rule need the same author as approving one (`approverKinds`, default a human): an agent cannot teach itself.
|
|
1147
|
+
- **Tenants never share what they learn.** Experiences take the tenant of the engine's `identity`. Patterns, lessons, proposals and approved rules stay inside it; no tenant is its own separate space.
|
|
1148
|
+
- **The text of a lesson is stable.** It carries no counts or dates, so more failures of the same pattern do not change the system prompt and prompt caching keeps working.
|
|
1149
|
+
- **Domain and kind are free text.** A vertical records its own experiences with `record`, and decides the rule a pattern proposes with `ruleFor`. By default a tool that keeps failing proposes `{ tool, effect: 'ask' }`.
|
|
1150
|
+
- **`thresholdFor`** sets how many repetitions make a pattern per experience, e.g. a critical failure needs one.
|
|
1151
|
+
- **`FileRuleStore`**, `MemoryApprovalStore` and `FileApprovalStore` keep the rules and proposals; `agent-coding` and `agent-enterprise` build on this module.
|
|
1152
|
+
- `ReflectionEngine`, `DomainRegistry` and `ProceduralMemory` are deprecated.
|
|
1153
|
+
|
|
1154
|
+
---
|
|
1155
|
+
|
|
1156
|
+
## What `engine.run` returns
|
|
1157
|
+
|
|
1158
|
+
```typescript
|
|
1159
|
+
const r = await engine.run('Session 7');
|
|
1160
|
+
r.text; // what the agent said after its last tool call
|
|
1161
|
+
r.toolCalls; // [{ name, agentId, success, errorCode?, outcome?, preview? }], delegates included
|
|
1162
|
+
r.errors; // the messages of the error events of the turn
|
|
1163
|
+
r.aborted; // the turn was aborted (engine.abort(), a budget)
|
|
1164
|
+
r.budgetExceeded;
|
|
1165
|
+
r.systemPrompts; // the prompt of each model call: only with `emitSystemPrompt: true` (a system prompt can carry secrets)
|
|
1166
|
+
engine.budgetExceeded; // sticky: the cost budget was reached at some point
|
|
1167
|
+
```
|
|
1168
|
+
|
|
1169
|
+
Every tool that fails with a `ToolError(code, message)` (or `ToolArgumentError`) shows its `code` in `toolCalls`, in the audit event and in the `tool_result` event (`error_code`).
|
|
1170
|
+
|
|
1171
|
+
---
|
|
1172
|
+
|
|
1117
1173
|
## Sources of agents, skills and instructions
|
|
1118
1174
|
|
|
1119
1175
|
The engine reads no file by itself. Where its agents, skills and instruction layers come from is declared with sources, and an engine built without them touches no disk:
|
|
@@ -8,6 +8,9 @@ export declare const DEFAULT_MAX_PATTERNS = 1000;
|
|
|
8
8
|
* relevant task, getRelevantPatterns() retrieves matching heuristics and
|
|
9
9
|
* buildContextBlock() formats them for injection into the system prompt.
|
|
10
10
|
*/
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated Use `createLearning` (SPEC-0017 F6): learned `trigger -> action -> outcome` patterns are experiences of the learning module. It is removed in a later minor.
|
|
13
|
+
*/
|
|
11
14
|
export declare class ProceduralMemory {
|
|
12
15
|
private readonly backend;
|
|
13
16
|
private readonly maxPatterns;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProceduralMemory.d.ts","sourceRoot":"","sources":["../../src/agent-memory/ProceduralMemory.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAsB,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAgB,MAAM,SAAS,CAAC;AAK5G,6DAA6D;AAC7D,eAAO,MAAM,oBAAoB,OAAQ,CAAC;AAU1C;;;;;;GAMG;AACH,qBAAa,gBAAgB;IACzB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqB;IAC7C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;gBAEzB,GAAG,GAAE,gBAAqB,EAAE,SAAS,GAAE,eAAoB;IAOvE;;;OAGG;IACH,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,GAAG,SAAS,GAAG,IAAI;IA4BnF,yGAAyG;IACzG,OAAO,CAAC,KAAK;IAUb,6EAA6E;IAC7E,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,SAAI,GAAG,OAAO,EAAE;IAc1D;;;OAGG;IACH,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAuB1C,KAAK,IAAI,MAAM;CAClB"}
|
|
1
|
+
{"version":3,"file":"ProceduralMemory.d.ts","sourceRoot":"","sources":["../../src/agent-memory/ProceduralMemory.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAsB,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAgB,MAAM,SAAS,CAAC;AAK5G,6DAA6D;AAC7D,eAAO,MAAM,oBAAoB,OAAQ,CAAC;AAU1C;;;;;;GAMG;AACH;;GAEG;AACH,qBAAa,gBAAgB;IACzB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqB;IAC7C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;gBAEzB,GAAG,GAAE,gBAAqB,EAAE,SAAS,GAAE,eAAoB;IAOvE;;;OAGG;IACH,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,GAAG,SAAS,GAAG,IAAI;IA4BnF,yGAAyG;IACzG,OAAO,CAAC,KAAK;IAUb,6EAA6E;IAC7E,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,SAAI,GAAG,OAAO,EAAE;IAc1D;;;OAGG;IACH,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAuB1C,KAAK,IAAI,MAAM;CAClB"}
|
|
@@ -14,6 +14,9 @@ exports.DEFAULT_MAX_PATTERNS = 1_000;
|
|
|
14
14
|
* relevant task, getRelevantPatterns() retrieves matching heuristics and
|
|
15
15
|
* buildContextBlock() formats them for injection into the system prompt.
|
|
16
16
|
*/
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated Use `createLearning` (SPEC-0017 F6): learned `trigger -> action -> outcome` patterns are experiences of the learning module. It is removed in a later minor.
|
|
19
|
+
*/
|
|
17
20
|
class ProceduralMemory {
|
|
18
21
|
backend;
|
|
19
22
|
maxPatterns;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProceduralMemory.js","sourceRoot":"","sources":["../../src/agent-memory/ProceduralMemory.ts"],"names":[],"mappings":";;;AAAA,mCAAoC;AAEpC,0DAAuD;AACvD,0DAAuD;AACvD,uCAAyC;AAEzC,6DAA6D;AAChD,QAAA,oBAAoB,GAAG,KAAK,CAAC;AAU1C;;;;;;GAMG;AACH,MAAa,gBAAgB;IACR,OAAO,CAAqB;IAC5B,WAAW,CAAS;IAErC,YAAY,MAAwB,EAAE,EAAE,YAA6B,EAAE;QACnE,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC,WAAW,IAAI,4BAAoB,CAAC;QACjE,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC,QAAQ,KAAK,MAAM,IAAI,GAAG,CAAC,IAAI;YAC9C,CAA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AC;YACtF,CAAC;QACL,CAAC;QACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IAED,KAAK,KAAa,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;CACnD;AAjGD,4CAiGC;AAED,SAAS,SAAS,CAAC,CAAgB;IAC/B,OAAO;QACH,EAAE,EAAE,CAAC,CAAC,EAAE;QACR,OAAO,EAAE,CAAC,CAAC,OAAO;QAClB,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,OAAO,EAAE,CAAC,CAAC,OAAO;QAClB,WAAW,EAAE,CAAC,CAAC,WAAW;QAC1B,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC;KACjC,CAAC;AACN,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type EngineHooks } from '../governance/hooks';
|
|
2
2
|
import type { ApprovalStore, Approver, AuditSink, Identity, ToolPolicy } from '../governance/types';
|
|
3
|
-
import type { EngineOptions, SessionMemoryData } from '../types';
|
|
3
|
+
import type { EngineOptions, RunResult, SessionMemoryData } from '../types';
|
|
4
|
+
import type { BudgetUsage } from '../observability/types';
|
|
4
5
|
import type { Transport } from '../transport/Transport';
|
|
5
6
|
import type { AgentRegistry } from './AgentRegistry';
|
|
6
7
|
import type { ToolRegistry } from './ToolRegistry';
|
|
@@ -124,6 +125,12 @@ export interface AgentEngineOptions extends EngineOptions {
|
|
|
124
125
|
* next system prompt reflects the switched project without an engine restart.
|
|
125
126
|
*/
|
|
126
127
|
projectContextLoader?: (cwd: string) => Promise<string | undefined>;
|
|
128
|
+
/**
|
|
129
|
+
* Emit a `system_prompt` event with the system prompt of every model call. It is how you check what the agent really saw
|
|
130
|
+
* (the lessons and the memory that reached it). Off by default: a system prompt can carry secrets, and the event goes to
|
|
131
|
+
* every transport.
|
|
132
|
+
*/
|
|
133
|
+
emitSystemPrompt?: boolean;
|
|
127
134
|
}
|
|
128
135
|
import type { ZodType } from 'zod';
|
|
129
136
|
export declare class AgentEngine {
|
|
@@ -169,6 +176,10 @@ export declare class AgentEngine {
|
|
|
169
176
|
private memoryContextBlock;
|
|
170
177
|
/** Serializes concurrent run() calls — shared mutable state is not reentrant-safe. */
|
|
171
178
|
private runMutex;
|
|
179
|
+
/** What the engine emits to: the transport of the caller, with the events of the current run also collected. */
|
|
180
|
+
private readonly transport;
|
|
181
|
+
private recorder?;
|
|
182
|
+
private budgetHit;
|
|
172
183
|
constructor(opts: AgentEngineOptions);
|
|
173
184
|
/**
|
|
174
185
|
* Asks the agent's provider for an object matching `schema` (validated with zod, one corrective
|
|
@@ -225,7 +236,14 @@ export declare class AgentEngine {
|
|
|
225
236
|
*/
|
|
226
237
|
callLLM(prompt: string): Promise<string>;
|
|
227
238
|
private getProviderForProfile;
|
|
228
|
-
run(input: string): Promise<
|
|
239
|
+
run(input: string): Promise<RunResult>;
|
|
240
|
+
/** The cost budget was exceeded at some point (`observability.costTracker.budget`). It stays true. */
|
|
241
|
+
get budgetExceeded(): boolean;
|
|
242
|
+
/**
|
|
243
|
+
* Called by the engine's own budget wiring (`createBaseEngine`): remembers it for `engine.budgetExceeded` and the result of the
|
|
244
|
+
* run. It tells the transport only when `announce` (the `budget_exceeded` event has always been tied to `abortOnBudget`).
|
|
245
|
+
*/
|
|
246
|
+
reportBudgetExceeded(usage: BudgetUsage, announce?: boolean): void;
|
|
229
247
|
private _run;
|
|
230
248
|
/** Sections the `systemPrompt` hooks add for `profile`. */
|
|
231
249
|
private hookPromptSections;
|
|
@@ -284,6 +302,8 @@ export declare class AgentEngine {
|
|
|
284
302
|
switchAgent(agentId: string): void;
|
|
285
303
|
private getCurrentProfile;
|
|
286
304
|
private buildAgentRoster;
|
|
305
|
+
/** Opt-in (`emitSystemPrompt`): a system prompt can carry secrets and reaches every transport. */
|
|
306
|
+
private emitSystemPrompt;
|
|
287
307
|
private buildSystemPrompt;
|
|
288
308
|
private resolvesDelegateTo;
|
|
289
309
|
private getToolsForAgent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentEngine.d.ts","sourceRoot":"","sources":["../../src/engine/AgentEngine.ts"],"names":[],"mappings":"AAaA,OAAO,EAA2D,KAAK,WAAW,EAAmB,MAAM,qBAAqB,CAAC;AACjI,OAAO,KAAK,EAER,aAAa,EACb,QAAQ,EAMR,SAAS,EACT,QAAQ,EAIR,UAAU,EACb,MAAM,qBAAqB,CAAC;AAO7B,OAAO,KAAK,EAER,aAAa,EAIb,iBAAiB,EAGpB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAItD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAEvE,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACzF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAoB,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"AgentEngine.d.ts","sourceRoot":"","sources":["../../src/engine/AgentEngine.ts"],"names":[],"mappings":"AAaA,OAAO,EAA2D,KAAK,WAAW,EAAmB,MAAM,qBAAqB,CAAC;AACjI,OAAO,KAAK,EAER,aAAa,EACb,QAAQ,EAMR,SAAS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