odai-dsh-agent 0.2.2 → 0.2.3
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 +3 -3
- package/package.json +2 -2
- package/preset/odai/agent.cordis.yml +4 -3
- package/src/installer.mjs +21 -5
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ $DSH_HOME/.agent-presets/odai/
|
|
|
13
13
|
.odai-agent.json
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
The source composition preserves every capability row and setting from the `standard` agent surface in `@deepseek-ai/dsh@0.1.0-rc.
|
|
16
|
+
The source composition preserves every capability row and setting from the `standard` agent surface in `@deepseek-ai/dsh@0.1.0-rc.8`, then adds the scoped Odai runtime in default `auto` mode. For rc.7, the installer restores that release's optional-provider wording; for rc.6, it additionally restores the two disabled-provider fields before hashing and publishing the managed preset. Release verification compares each rendered composition against its 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. Responsibility words are optional signals rather than commands: evidence-grounded task-state gaps route at any step, identical gaps are consumed once, and an identical planner/controller model remains inline without another model call. An original request that already authorizes implementation automatically continues from a frozen planner card to executor; plan-only, new-task, expanded-scope, and unknown authorization cannot do so. Reviewer children require a current hash-addressed evidence packet whose diff and latest successful test are newer than the last write. An incomplete packet keeps the current controller route so it can gather project-available evidence without claiming independent acceptance or terminating the authorized task. Every route is resolved before provider I/O; deterministic invalid persisted mappings are backed up and exact-match removed, while recoverable provider failures preserve them. Frontend route failure becomes an explicit local controller fallback without a routed receipt. `execute` remains an explicit comparison mode and `observe` changes no model or child while retaining fail-closed high-impact protection. Configured compaction streams are buffered so partial failed output cannot contaminate the inherited-route retry or replace original history.
|
|
17
17
|
|
|
18
18
|
The preset includes the same local long-term semantic memory runtime as the Plugin. Default `auto` mode performs no hidden model call: it automatically captures only high-confidence durable statements from the direct-human message authenticated by the latest open-turn session event, keeps ambiguous or conflicting candidates inert, and recalls only bounded active global/project records as untrusted historical context. Matching direct intent, or the compact capability gateway on a later step, exposes the controller-only `odai_memory` tool for inspection, search, confirmation, correction, physical forgetting, exact-phrase clearing, and `auto`/`off` mode changes. Recognized secrets, contact identifiers, health/crisis content, temporary instructions, hypotheses, quotes, and code are rejected; the current user and project authority always override memory. State lives at `$DSH_HOME/odai/memory/store.json`, outside `.agent-presets`, so install, update, and uninstall preserve it. An invalid or symlinked store fails closed. The matcher is not a replacement for protecting the underlying DSH session history from sensitive input.
|
|
19
19
|
|
|
@@ -31,7 +31,7 @@ With DSH already installed, run the single Agent package command below. The pack
|
|
|
31
31
|
npx odai-dsh-agent install
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
The installer checks `dsh -V` and currently accepts exactly `0.1.0-rc.6` or `0.1.0-rc.
|
|
34
|
+
The installer checks `dsh -V` and currently accepts exactly `0.1.0-rc.6`, `0.1.0-rc.7`, or `0.1.0-rc.8`. It records the detected version in the managed manifest and renders that release's exact Standard composition; any other developer-preview version fails closed.
|
|
35
35
|
|
|
36
36
|
`DSH_HOME` is honored. An explicit location can be supplied without changing the environment:
|
|
37
37
|
|
|
@@ -41,7 +41,7 @@ npx odai-dsh-agent install --dsh-home /path/to/dsh-home
|
|
|
41
41
|
|
|
42
42
|
Open a new DSH session and select `Odai` from the Agent preset picker. Existing sessions retain the preset they were composed with.
|
|
43
43
|
|
|
44
|
-
In supported DSH rc.6 and rc.
|
|
44
|
+
In supported DSH rc.6, rc.7, and rc.8 releases, the one-shot `--profile headless` driver creates a global agent directly and neither mounts nor accepts a session Agent preset. Automated Agent runs must create a Web session with `agentPreset: odai`; use the profile-wide Plugin for one-shot headless tasks.
|
|
45
45
|
|
|
46
46
|
The installer copies through a mode-tightened staging directory and atomically publishes the preset. Updates verify every previously managed file first, refuse to overwrite local edits, and always change the composition generation key so new sessions in a running DSH process do not reuse stale runtime code. If install or update finds recognized historical Odai audit records, it refuses to change the preset until every DSH process is stopped and the command is rerun with `--yes`. The confirmed migration adds DSH's official `ignorable: true` envelope marker, covers both plaintext and concatenated-frame Zstandard session artifacts, verifies each replacement, and retains a content-addressed backup without deleting messages or evidence. Confirmation alone is insufficient: migration also refuses when local process inspection fails or finds any active DSH process. Keep DSH stopped until the installer exits because historical runtimes do not participate in a migration lock. An unknown unmarked `odai/*` type blocks the operation instead of being assumed safe to ignore.
|
|
47
47
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "odai-dsh-agent",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "完整继承 DSH 标准模式 全部能力的 Odai Agent preset。主要用于治理、规划、测试、验证 等,可当成默认总控使用。",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"yaml": "^2.8.1"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@deepseek-ai/dsh": "0.1.0-rc.6 || 0.1.0-rc.7"
|
|
52
|
+
"@deepseek-ai/dsh": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8"
|
|
53
53
|
},
|
|
54
54
|
"peerDependenciesMeta": {
|
|
55
55
|
"@deepseek-ai/dsh": {
|
|
@@ -197,9 +197,10 @@
|
|
|
197
197
|
toolName: subagent_fork
|
|
198
198
|
backgroundMode: continuable
|
|
199
199
|
|
|
200
|
-
# Production dsh does not install these optional providers.
|
|
201
|
-
#
|
|
202
|
-
#
|
|
200
|
+
# Production dsh does not install these optional providers. Install the
|
|
201
|
+
# matching Bundle in this Profile and restart the Host, then copy this
|
|
202
|
+
# preset and remove `disabled` from the matching tool row. Host availability
|
|
203
|
+
# alone grants no tool.
|
|
203
204
|
- id: tool-subagent-codex
|
|
204
205
|
name: '@deepseek-ai/dsh-tool-subagent'
|
|
205
206
|
disabled: true
|
package/src/installer.mjs
CHANGED
|
@@ -31,7 +31,20 @@ export const SUPPORTED_DSH_VERSIONS = Object.freeze(
|
|
|
31
31
|
if (SUPPORTED_DSH_VERSIONS.length === 0 || SUPPORTED_DSH_VERSIONS.some((version) => !DSH_VERSION_PATTERN.test(version))) {
|
|
32
32
|
throw new Error("odai-dsh-agent peer dependency must list exact supported DSH versions");
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
const SOURCE_DSH_VERSION = "0.1.0-rc.8";
|
|
35
|
+
const OPTIONAL_PROVIDER_COMMENTS = Object.freeze({
|
|
36
|
+
"0.1.0-rc.6": " # Product providers are host-plane singletons. Copy this preset, then\n # remove `disabled` from either ordinary tool row to expose that product\n # only to agents composed from the copy.",
|
|
37
|
+
"0.1.0-rc.7": " # Production dsh does not install these optional providers. An opting-in\n # Profile mounts each provider once on the host plane; copy this preset,\n # then remove `disabled` from the matching tool row.",
|
|
38
|
+
"0.1.0-rc.8": " # Production dsh does not install these optional providers. Install the\n # matching Bundle in this Profile and restart the Host, then copy this\n # preset and remove `disabled` from the matching tool row. Host availability\n # alone grants no tool.",
|
|
39
|
+
});
|
|
40
|
+
const compositionVersions = Object.keys(OPTIONAL_PROVIDER_COMMENTS);
|
|
41
|
+
if (JSON.stringify(SUPPORTED_DSH_VERSIONS) !== JSON.stringify(compositionVersions)) {
|
|
42
|
+
throw new Error(`Odai Agent peer versions ${SUPPORTED_DSH_VERSIONS.join(", ")} must exactly match composition contracts ${compositionVersions.join(", ")}`);
|
|
43
|
+
}
|
|
44
|
+
if (compositionVersions.at(-1) !== SOURCE_DSH_VERSION) {
|
|
45
|
+
throw new Error(`Odai Agent source composition targets ${SOURCE_DSH_VERSION}, not contract baseline ${compositionVersions.at(-1)}`);
|
|
46
|
+
}
|
|
47
|
+
export const SUPPORTED_DSH_VERSION = SOURCE_DSH_VERSION;
|
|
35
48
|
const requiredFiles = Object.freeze([
|
|
36
49
|
"agent.cordis.yml",
|
|
37
50
|
"preset.yml",
|
|
@@ -50,7 +63,7 @@ const requiredFiles = Object.freeze([
|
|
|
50
63
|
function replaceCompositionContract(composition, before, after, label) {
|
|
51
64
|
const first = composition.indexOf(before);
|
|
52
65
|
if (first < 0 || composition.indexOf(before, first + before.length) >= 0) {
|
|
53
|
-
throw new Error(`Odai Agent composition does not contain exactly one
|
|
66
|
+
throw new Error(`Odai Agent source composition does not contain exactly one ${label} contract`);
|
|
54
67
|
}
|
|
55
68
|
return `${composition.slice(0, first)}${after}${composition.slice(first + before.length)}`;
|
|
56
69
|
}
|
|
@@ -63,13 +76,16 @@ export function renderAgentCompositionForDsh(composition, dshVersion = SUPPORTED
|
|
|
63
76
|
throw new Error(`unsupported DSH version ${dshVersion || "<empty>"}; expected one of ${SUPPORTED_DSH_VERSIONS.join(", ")}`);
|
|
64
77
|
}
|
|
65
78
|
let rendered = composition.replace(/\r\n/gu, "\n");
|
|
66
|
-
if (dshVersion ===
|
|
79
|
+
if (dshVersion === SOURCE_DSH_VERSION) return rendered;
|
|
80
|
+
const targetComment = OPTIONAL_PROVIDER_COMMENTS[dshVersion];
|
|
81
|
+
if (!targetComment) throw new Error(`missing Agent composition contract for DSH ${dshVersion}`);
|
|
67
82
|
rendered = replaceCompositionContract(
|
|
68
83
|
rendered,
|
|
69
|
-
|
|
70
|
-
|
|
84
|
+
OPTIONAL_PROVIDER_COMMENTS[SOURCE_DSH_VERSION],
|
|
85
|
+
targetComment,
|
|
71
86
|
"optional-provider comment",
|
|
72
87
|
);
|
|
88
|
+
if (dshVersion === "0.1.0-rc.7") return rendered;
|
|
73
89
|
rendered = replaceCompositionContract(
|
|
74
90
|
rendered,
|
|
75
91
|
" provider: codex\n toolName: subagent_codex\n backgroundMode: one-shot",
|