odai-dsh-agent 0.0.5 → 0.0.6
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 +1 -1
- package/bin/odai-dsh-agent.mjs +1 -1
- package/package.json +1 -1
- package/preset/odai/runtime/index.mjs +25 -1
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ $DSH_HOME/.agent-presets/odai/
|
|
|
13
13
|
.odai-agent.json
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
The composition preserves every capability row and setting from the `standard` agent surface in `@deepseek-ai/dsh@0.1.0-rc.6`, then adds the scoped Odai runtime in default `auto` mode. Release verification compares the complete derived composition against that exact DSH Standard source; a missing, added, reordered, or changed Standard row fails the probe. Host-owned persistence, sandbox, approval, registries, and base controller selection remain in the selected DSH profile. Ordinary requests stay on that controller. A complete contextual high-impact decision gap upgrades the same turn only when a planner mapping exists; the controller's durable `request/header` proves the actual route. Explicit independent planning/review requests still start a verified child when their mappings exist. `execute` remains an explicit all-delegation comparison mode. `observe` changes no model and starts no child; it injects a local evidence-and-decision protocol and makes an unresolved high-impact turn read-only.
|
|
16
|
+
The composition preserves every capability row and setting from the `standard` agent surface in `@deepseek-ai/dsh@0.1.0-rc.6`, then adds the scoped Odai runtime in default `auto` mode. Release verification compares the complete derived composition against that exact DSH Standard source; a missing, added, reordered, or changed Standard row fails the probe. Host-owned persistence, sandbox, approval, registries, and base controller selection remain in the selected DSH profile. Ordinary requests stay on that controller. A complete contextual high-impact decision gap upgrades the same turn only when a planner mapping exists; the controller's durable `request/header` proves the actual route. Explicit independent planning/review requests still start a verified child when their mappings exist. `execute` remains an explicit all-delegation comparison mode. `observe` changes no model and starts no child; it injects a local evidence-and-decision protocol and makes an unresolved high-impact turn read-only. For DSH compaction on the same provider/model, an omitted summarizer reasoning setting inherits the session's current user-selected reasoning effort so the auxiliary call remains cache-compatible; explicit and cross-model settings are not changed.
|
|
17
17
|
|
|
18
18
|
## Install
|
|
19
19
|
|
package/bin/odai-dsh-agent.mjs
CHANGED
package/package.json
CHANGED
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
} from "./skill-selection-state.mjs";
|
|
47
47
|
|
|
48
48
|
export const name = "odai-dsh-runtime";
|
|
49
|
-
export const inject = ["systemPrompt", "tools", "subagents"];
|
|
49
|
+
export const inject = ["systemPrompt", "tools", "subagents", "sessions"];
|
|
50
50
|
|
|
51
51
|
const PLUGIN_DIR = resolve(dirname(fileURLToPath(import.meta.url)), "..");
|
|
52
52
|
const ROUTING_MODES = new Set(["off", "observe", "auto", "execute"]);
|
|
@@ -118,6 +118,26 @@ export function resolveConfig(rawConfig = {}) {
|
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
+
export function inheritCompactionReasoning(options, sessions) {
|
|
122
|
+
if (options?.purpose !== "compaction"
|
|
123
|
+
|| options.reasoningEffort !== undefined
|
|
124
|
+
|| options.sessionId === undefined
|
|
125
|
+
|| !Object.isExtensible(options)) {
|
|
126
|
+
return false;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const route = sessions?.get?.(options.sessionId)?.requestHeader?.()?.config;
|
|
130
|
+
if (route?.provider !== options.provider
|
|
131
|
+
|| route?.model !== options.model
|
|
132
|
+
|| typeof route.reasoningEffort !== "string"
|
|
133
|
+
|| route.reasoningEffort.length === 0) {
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
options.reasoningEffort = route.reasoningEffort;
|
|
138
|
+
return true;
|
|
139
|
+
}
|
|
140
|
+
|
|
121
141
|
export function resolveSkillPath(configuredPath, env = process.env) {
|
|
122
142
|
const explicit = configuredPath ?? env.ODAI_SKILL_PATH;
|
|
123
143
|
if (explicit !== undefined) {
|
|
@@ -330,6 +350,10 @@ export function apply(ctx, rawConfig) {
|
|
|
330
350
|
}
|
|
331
351
|
};
|
|
332
352
|
const hasSessionEvent = (agent, type, predicate) => evidence.has(agent, type, predicate);
|
|
353
|
+
ctx.on("llm/stream", (options, next) => {
|
|
354
|
+
inheritCompactionReasoning(options, ctx.sessions);
|
|
355
|
+
return next();
|
|
356
|
+
});
|
|
333
357
|
const skillPath = resolveSkillPath(config.skillPath);
|
|
334
358
|
const explicitSkillPath = config.skillPath !== undefined
|
|
335
359
|
|| (typeof process.env.ODAI_SKILL_PATH === "string" && process.env.ODAI_SKILL_PATH.trim() !== "");
|