@kody-ade/kody-engine 0.4.55 → 0.4.56
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/dist/bin/kody.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// package.json
|
|
4
4
|
var package_default = {
|
|
5
5
|
name: "@kody-ade/kody-engine",
|
|
6
|
-
version: "0.4.
|
|
6
|
+
version: "0.4.56",
|
|
7
7
|
description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
|
|
8
8
|
license: "MIT",
|
|
9
9
|
type: "module",
|
|
@@ -472,7 +472,19 @@ async function runAgent(opts) {
|
|
|
472
472
|
queryOptions.maxThinkingTokens = opts.maxThinkingTokens;
|
|
473
473
|
}
|
|
474
474
|
if (typeof opts.systemPromptAppend === "string" && opts.systemPromptAppend.length > 0) {
|
|
475
|
-
|
|
475
|
+
const systemPrompt = {
|
|
476
|
+
type: "preset",
|
|
477
|
+
preset: "claude_code",
|
|
478
|
+
append: opts.systemPromptAppend
|
|
479
|
+
};
|
|
480
|
+
if (opts.cacheable) systemPrompt.excludeDynamicSections = true;
|
|
481
|
+
queryOptions.systemPrompt = systemPrompt;
|
|
482
|
+
} else if (opts.cacheable) {
|
|
483
|
+
queryOptions.systemPrompt = {
|
|
484
|
+
type: "preset",
|
|
485
|
+
preset: "claude_code",
|
|
486
|
+
excludeDynamicSections: true
|
|
487
|
+
};
|
|
476
488
|
}
|
|
477
489
|
queryOptions.settingSources = opts.settingSources ?? ["project", "local"];
|
|
478
490
|
const result = query({
|
|
@@ -1779,6 +1791,7 @@ function parseClaudeCode(p, raw) {
|
|
|
1779
1791
|
maxThinkingTokens: typeof r.maxThinkingTokens === "number" ? r.maxThinkingTokens : null,
|
|
1780
1792
|
maxTurnTimeoutSec: typeof r.maxTurnTimeoutSec === "number" ? r.maxTurnTimeoutSec : null,
|
|
1781
1793
|
systemPromptAppend: typeof r.systemPromptAppend === "string" ? r.systemPromptAppend : null,
|
|
1794
|
+
cacheable: r.cacheable === true,
|
|
1782
1795
|
tools,
|
|
1783
1796
|
hooks: Array.isArray(r.hooks) ? r.hooks : [],
|
|
1784
1797
|
skills: Array.isArray(r.skills) ? r.skills : [],
|
|
@@ -9273,6 +9286,7 @@ async function runExecutable(profileName, input) {
|
|
|
9273
9286
|
maxThinkingTokens: profile.claudeCode.maxThinkingTokens,
|
|
9274
9287
|
maxTurnTimeoutMs: typeof profile.claudeCode.maxTurnTimeoutSec === "number" ? Math.floor(profile.claudeCode.maxTurnTimeoutSec * 1e3) : void 0,
|
|
9275
9288
|
systemPromptAppend: profile.claudeCode.systemPromptAppend,
|
|
9289
|
+
cacheable: profile.claudeCode.cacheable,
|
|
9276
9290
|
settingSources: profile.claudeCode.settingSources
|
|
9277
9291
|
});
|
|
9278
9292
|
};
|
|
@@ -163,6 +163,20 @@ export interface ClaudeCodeSpec {
|
|
|
163
163
|
maxTurnTimeoutSec?: number | null
|
|
164
164
|
/** Text appended on top of Claude Code's baseline system prompt. */
|
|
165
165
|
systemPromptAppend: string | null
|
|
166
|
+
/**
|
|
167
|
+
* Cross-process prompt caching opt-in. When true, the agent invocation
|
|
168
|
+
* sets `systemPrompt.excludeDynamicSections: true` so per-user dynamic
|
|
169
|
+
* content (cwd, git status, auto-memory) is stripped from the preset
|
|
170
|
+
* and re-injected as the first user message. The remaining preset
|
|
171
|
+
* becomes byte-identical across runs and benefits from Anthropic's
|
|
172
|
+
* 5-min server-side prompt cache. Recommended for hot-path stages
|
|
173
|
+
* (`run`, `fix`, `classify`) where the same workflow fires many
|
|
174
|
+
* times in a short window.
|
|
175
|
+
*
|
|
176
|
+
* Default: false (preserves legacy behaviour). No-op if the SDK does
|
|
177
|
+
* not support `excludeDynamicSections` (forward-compatible).
|
|
178
|
+
*/
|
|
179
|
+
cacheable?: boolean
|
|
166
180
|
/** SDK built-in tools this executable is allowed to use (capability pack). */
|
|
167
181
|
tools: string[]
|
|
168
182
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kody-ade/kody-engine",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.56",
|
|
4
4
|
"description": "kody — autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|