lemura 1.5.1 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/{agent-BImCcYVg.d.ts → agent-Cq_oRvoc.d.ts} +1 -1
- package/dist/{agent-57E_Tvby.d.mts → agent-DPSUNlK6.d.mts} +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +26 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -20
- package/dist/index.mjs.map +1 -1
- package/dist/skills/index.js +2 -1
- package/dist/skills/index.js.map +1 -1
- package/dist/skills/index.mjs +2 -1
- package/dist/skills/index.mjs.map +1 -1
- package/dist/tools/index.d.mts +1 -1
- package/dist/tools/index.d.ts +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.5.2] - 2026-05-30
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- **Namespaced XML delimiters for all runtime-injected blocks**: All blocks appended to the system prompt or user messages by the lemura runtime now use a consistent `lemura:` XML namespace, preventing collisions with user-supplied prompt content.
|
|
13
|
+
- `GoalInjector`: `[CURRENT GOAL]…[/CURRENT GOAL]` → `<lemura:goal>` with `<lemura:statement>`, `<lemura:criteria>`, `<lemura:subgoals status="pending|done">`
|
|
14
|
+
- `ContinuationPlanner`: `[CONTINUATION PLAN — Step X/Y]` (no closing tag) → `<lemura:plan step="X" total="Y">` with `<lemura:step id="…" tool="…" status="…">` children
|
|
15
|
+
- `SkillInjector`: `[Skill: name (Tier: tier)]` (no closing tag) → `<lemura:skill name="…" tier="…">…</lemura:skill>`
|
|
16
|
+
- `SessionManager` frozen-turn wrapper: `[System Guidance / Agent State]` (no closing tag) → `<lemura:agent-state>…</lemura:agent-state>`
|
|
17
|
+
|
|
8
18
|
## [1.5.1] - 2026-05-29
|
|
9
19
|
|
|
10
20
|
### Added
|
|
@@ -126,7 +126,7 @@ declare class GoalInjector {
|
|
|
126
126
|
private turnsSinceInjection;
|
|
127
127
|
constructor(goal: Goal);
|
|
128
128
|
/**
|
|
129
|
-
* Returns the formatted
|
|
129
|
+
* Returns the formatted `<lemura:goal>` block string — without caring about
|
|
130
130
|
* where it will be placed. Callers decide whether to append to a system prompt
|
|
131
131
|
* or push as a separate message.
|
|
132
132
|
*/
|
|
@@ -126,7 +126,7 @@ declare class GoalInjector {
|
|
|
126
126
|
private turnsSinceInjection;
|
|
127
127
|
constructor(goal: Goal);
|
|
128
128
|
/**
|
|
129
|
-
* Returns the formatted
|
|
129
|
+
* Returns the formatted `<lemura:goal>` block string — without caring about
|
|
130
130
|
* where it will be placed. Callers decide whether to append to a system prompt
|
|
131
131
|
* or push as a separate message.
|
|
132
132
|
*/
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as IProviderAdapter, d as TranscriptionRequest, e as TranscriptionResponse, f as SynthesisRequest, A as AudioChunk, V as VisionRequest, g as VisionResponse, h as ImageGenRequest, i as ImageGenResponse, M as ModelInfo, C as ContextWindow, T as Turn, j as ContentBlock, I as IToolDefinition } from './adapters-DAzmrg4l.mjs';
|
|
2
2
|
export { k as CompletionChunk, l as CompletionRequest, m as CompletionResponse, b as IContextStrategy, c as IScratchpadAdapter, n as IStorageAdapter, N as NormalizedMessage, o as STMItem, p as STMRegistryConfig, S as ShortTermMemoryRegistry, q as TokenUsage, r as ToolCall, s as ToolContext, t as ToolResult } from './adapters-DAzmrg4l.mjs';
|
|
3
|
-
import { S as SessionConfig, G as Goal, I as IToolResponseProcessor, T as ToolResponseEvaluation, M as MCPServerConfig, a as MCPToolDefinition } from './agent-
|
|
4
|
-
export { b as GoalInjector, c as GoalVerifierResult, d as MCPJsonRpcRequest, e as MCPJsonRpcResponse, f as MCPTransportType, g as MediaConfig, h as ToolDecision, i as ToolExecutionBudget, j as ToolFirewallConfig, k as ToolFirewallRule, l as TraceEvent } from './agent-
|
|
3
|
+
import { S as SessionConfig, G as Goal, I as IToolResponseProcessor, T as ToolResponseEvaluation, M as MCPServerConfig, a as MCPToolDefinition } from './agent-DPSUNlK6.mjs';
|
|
4
|
+
export { b as GoalInjector, c as GoalVerifierResult, d as MCPJsonRpcRequest, e as MCPJsonRpcResponse, f as MCPTransportType, g as MediaConfig, h as ToolDecision, i as ToolExecutionBudget, j as ToolFirewallConfig, k as ToolFirewallRule, l as TraceEvent } from './agent-DPSUNlK6.mjs';
|
|
5
5
|
export { LemuraAdapterError, LemuraContextOverflowError, LemuraError, LemuraMCPConnectionError, LemuraMCPError, LemuraMCPTimeoutError, LemuraMaxIterationsError, LemuraSkillInjectionError, LemuraToolNotFoundError, LemuraToolTimeoutError, LemuraToolValidationError } from './types/index.mjs';
|
|
6
6
|
import { I as ILogger } from './logger-DxvKliuk.mjs';
|
|
7
7
|
export { L as LogLevel, a as LogMetadata, S as Severity } from './logger-DxvKliuk.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as IProviderAdapter, d as TranscriptionRequest, e as TranscriptionResponse, f as SynthesisRequest, A as AudioChunk, V as VisionRequest, g as VisionResponse, h as ImageGenRequest, i as ImageGenResponse, M as ModelInfo, C as ContextWindow, T as Turn, j as ContentBlock, I as IToolDefinition } from './adapters-CIRkrCHl.js';
|
|
2
2
|
export { k as CompletionChunk, l as CompletionRequest, m as CompletionResponse, b as IContextStrategy, c as IScratchpadAdapter, n as IStorageAdapter, N as NormalizedMessage, o as STMItem, p as STMRegistryConfig, S as ShortTermMemoryRegistry, q as TokenUsage, r as ToolCall, s as ToolContext, t as ToolResult } from './adapters-CIRkrCHl.js';
|
|
3
|
-
import { S as SessionConfig, G as Goal, I as IToolResponseProcessor, T as ToolResponseEvaluation, M as MCPServerConfig, a as MCPToolDefinition } from './agent-
|
|
4
|
-
export { b as GoalInjector, c as GoalVerifierResult, d as MCPJsonRpcRequest, e as MCPJsonRpcResponse, f as MCPTransportType, g as MediaConfig, h as ToolDecision, i as ToolExecutionBudget, j as ToolFirewallConfig, k as ToolFirewallRule, l as TraceEvent } from './agent-
|
|
3
|
+
import { S as SessionConfig, G as Goal, I as IToolResponseProcessor, T as ToolResponseEvaluation, M as MCPServerConfig, a as MCPToolDefinition } from './agent-Cq_oRvoc.js';
|
|
4
|
+
export { b as GoalInjector, c as GoalVerifierResult, d as MCPJsonRpcRequest, e as MCPJsonRpcResponse, f as MCPTransportType, g as MediaConfig, h as ToolDecision, i as ToolExecutionBudget, j as ToolFirewallConfig, k as ToolFirewallRule, l as TraceEvent } from './agent-Cq_oRvoc.js';
|
|
5
5
|
export { LemuraAdapterError, LemuraContextOverflowError, LemuraError, LemuraMCPConnectionError, LemuraMCPError, LemuraMCPTimeoutError, LemuraMaxIterationsError, LemuraSkillInjectionError, LemuraToolNotFoundError, LemuraToolTimeoutError, LemuraToolValidationError } from './types/index.js';
|
|
6
6
|
import { I as ILogger } from './logger-DxvKliuk.js';
|
|
7
7
|
export { L as LogLevel, a as LogMetadata, S as Severity } from './logger-DxvKliuk.js';
|
package/dist/index.js
CHANGED
|
@@ -1315,8 +1315,9 @@ var SkillInjector = class {
|
|
|
1315
1315
|
if (!content) continue;
|
|
1316
1316
|
const tierLabel = skill.tier ?? "standard";
|
|
1317
1317
|
const skillEntry = `
|
|
1318
|
-
|
|
1318
|
+
<lemura:skill name="${skill.name}" tier="${tierLabel}">
|
|
1319
1319
|
${content}
|
|
1320
|
+
</lemura:skill>
|
|
1320
1321
|
`;
|
|
1321
1322
|
const skillTokens = Math.ceil(skillEntry.length / 4);
|
|
1322
1323
|
if (tokenBudget !== void 0 && usedTokens + skillTokens > tokenBudget) {
|
|
@@ -1853,7 +1854,7 @@ var GoalInjector = class {
|
|
|
1853
1854
|
};
|
|
1854
1855
|
}
|
|
1855
1856
|
/**
|
|
1856
|
-
* Returns the formatted
|
|
1857
|
+
* Returns the formatted `<lemura:goal>` block string — without caring about
|
|
1857
1858
|
* where it will be placed. Callers decide whether to append to a system prompt
|
|
1858
1859
|
* or push as a separate message.
|
|
1859
1860
|
*/
|
|
@@ -1861,27 +1862,28 @@ var GoalInjector = class {
|
|
|
1861
1862
|
const { statement, successCriteria, decomposition, completedSubGoals = [] } = this.goal;
|
|
1862
1863
|
const pending = decomposition.filter((sg) => !completedSubGoals.includes(sg));
|
|
1863
1864
|
const completed = decomposition.filter((sg) => completedSubGoals.includes(sg));
|
|
1864
|
-
let block =
|
|
1865
|
-
|
|
1865
|
+
let block = `<lemura:goal>
|
|
1866
|
+
<lemura:statement>${statement}</lemura:statement>
|
|
1866
1867
|
`;
|
|
1867
1868
|
if (successCriteria.length > 0) {
|
|
1868
|
-
block +=
|
|
1869
|
-
|
|
1870
|
-
|
|
1869
|
+
block += `<lemura:criteria>
|
|
1870
|
+
${successCriteria.map((c) => `- ${c}`).join("\n")}
|
|
1871
|
+
</lemura:criteria>
|
|
1872
|
+
`;
|
|
1871
1873
|
}
|
|
1872
1874
|
if (pending.length > 0) {
|
|
1873
|
-
block +=
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1875
|
+
block += `<lemura:subgoals status="pending">
|
|
1876
|
+
${pending.map((sg) => `- ${sg}`).join("\n")}
|
|
1877
|
+
</lemura:subgoals>
|
|
1878
|
+
`;
|
|
1877
1879
|
}
|
|
1878
1880
|
if (completed.length > 0) {
|
|
1879
|
-
block +=
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1881
|
+
block += `<lemura:subgoals status="done">
|
|
1882
|
+
${completed.map((sg) => `- \u2705 ${sg}`).join("\n")}
|
|
1883
|
+
</lemura:subgoals>
|
|
1884
|
+
`;
|
|
1883
1885
|
}
|
|
1884
|
-
block += "
|
|
1886
|
+
block += "</lemura:goal>";
|
|
1885
1887
|
return block;
|
|
1886
1888
|
}
|
|
1887
1889
|
/**
|
|
@@ -1970,14 +1972,17 @@ var ContinuationPlanner = class {
|
|
|
1970
1972
|
}
|
|
1971
1973
|
/** Returns a human-readable status string with icons (injected before each iteration) */
|
|
1972
1974
|
getPlanStatusString() {
|
|
1973
|
-
|
|
1975
|
+
const current = this.plan.currentStepIndex + 1;
|
|
1976
|
+
const total = this.plan.steps.length;
|
|
1977
|
+
let result = `<lemura:plan step="${current}" total="${total}">
|
|
1974
1978
|
`;
|
|
1975
1979
|
for (const step of this.plan.steps) {
|
|
1976
1980
|
const icon = this._icon(step.status);
|
|
1977
1981
|
const statusText = step.status === "pending" && step.dependsOn.length > 0 ? `Waiting on Step ${step.dependsOn.join(", ")}` : step.status.charAt(0).toUpperCase() + step.status.slice(1);
|
|
1978
|
-
result +=
|
|
1982
|
+
result += `<lemura:step id="${step.stepId}" tool="${step.toolName}" status="${step.status}">${icon} ${statusText}</lemura:step>
|
|
1979
1983
|
`;
|
|
1980
1984
|
}
|
|
1985
|
+
result += "</lemura:plan>";
|
|
1981
1986
|
return result;
|
|
1982
1987
|
}
|
|
1983
1988
|
_icon(status) {
|
|
@@ -3105,8 +3110,9 @@ ${planStatus}`;
|
|
|
3105
3110
|
}
|
|
3106
3111
|
injectionBlock = blocks.length > 0 ? `
|
|
3107
3112
|
|
|
3108
|
-
|
|
3109
|
-
${blocks.join("\n\n")}
|
|
3113
|
+
<lemura:agent-state>
|
|
3114
|
+
${blocks.join("\n\n")}
|
|
3115
|
+
</lemura:agent-state>` : "";
|
|
3110
3116
|
this._turnInjections.set(i, injectionBlock);
|
|
3111
3117
|
if (injectionBlock) {
|
|
3112
3118
|
this.emitTrace("planning", "goal_injected", { position: "frozen_turn", turnIndex: i, iteration });
|