@lmzhen/dsh-evolution-core 0.37.0 → 0.38.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 +3 -1
- package/lib/composition/index.js +2 -2
- package/lib/{composition-3QFfEe56.js → composition-dy0gJWDd.js} +1 -1
- package/lib/{ensure-C2tUoF5U.js → ensure-B4fjEI0w.js} +4 -11
- package/lib/{errors-DRZ9A187.js → errors-DUcEoTLR.js} +4 -4
- package/lib/index.js +37 -1305
- package/lib/platform/index.js +4 -0
- package/lib/platform-Be-_wSVz.js +113 -0
- package/lib/presets-C8vuCuNA.js +27 -0
- package/lib/restrictor.js +8 -8
- package/lib/runtime/plugin.js +197 -0
- package/lib/session-projection-CXUNPkq9.js +1250 -0
- package/lib/subagent/index.js +1 -1
- package/lib/tools-DzcNFex2.js +20 -0
- package/lib/types/composition/ensure.js +3 -13
- package/lib/types/errors.d.ts +4 -4
- package/lib/types/errors.js +4 -4
- package/lib/types/opt-in.d.ts +1 -1
- package/lib/types/opt-in.js +1 -1
- package/lib/types/params.js +7 -7
- package/lib/types/platform/index.d.ts +21 -0
- package/lib/types/platform/index.js +12 -0
- package/lib/types/platform/llm.d.ts +46 -0
- package/lib/types/platform/llm.js +75 -0
- package/lib/types/platform/presets.d.ts +31 -0
- package/lib/types/platform/presets.js +31 -0
- package/lib/types/platform/projections.d.ts +30 -0
- package/lib/types/platform/projections.js +31 -0
- package/lib/types/platform/tools.d.ts +23 -0
- package/lib/types/platform/tools.js +21 -0
- package/lib/types/platform-line.generated.d.ts +6 -6
- package/lib/types/platform-line.generated.js +6 -6
- package/lib/types/platform-services.d.ts +1 -1
- package/lib/types/platform-services.js +4 -1
- package/lib/types/restrictor.js +7 -9
- package/lib/types/runtime/llm.d.ts +34 -0
- package/lib/types/runtime/llm.js +71 -0
- package/lib/types/runtime/platform.d.ts +35 -0
- package/lib/types/runtime/platform.js +38 -0
- package/lib/types/runtime/plugin.d.ts +10 -0
- package/lib/types/runtime/plugin.js +11 -0
- package/lib/types/runtime/projections.d.ts +29 -0
- package/lib/types/runtime/projections.js +62 -0
- package/lib/types/scope.d.ts +1 -1
- package/lib/types/session-projection.d.ts +26 -53
- package/lib/types/session-projection.js +22 -58
- package/lib/types/skill-reads.js +3 -3
- package/lib/types/subagent/types.d.ts +1 -1
- package/lib/types/tool-dispatch.d.ts +2 -2
- package/lib/types/tool-dispatch.js +3 -3
- package/package.json +30 -16
package/README.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Shared library for the evolution family: skill and memory stores, write kernels and mutation units, prompts, projections, event types, composition helpers, HTTP route helpers, history, recovery, and parameter definitions.
|
|
4
4
|
|
|
5
|
-
The root entry is a library, not a user-facing command. The package also exposes `./composition`, `./subagent`, `./http-routes`, and `./
|
|
5
|
+
The root entry is a library, not a user-facing command. The package also exposes `./composition`, `./subagent`, `./http-routes`, `./restrictor`, `./platform`, and `./runtime` subpaths.
|
|
6
|
+
|
|
7
|
+
`./runtime` is a function plugin. It provides `evolutionProjections`, the single owner of the five host-only session units (`evolutionActivity`, `evolutionEvidence`, `evolutionReads`, `evolutionProjectionHistory`, `evolutionSignals`); readers ask that service and degrade to `undefined` when the platform registry is absent. It also provides `evolutionLlm`, the single route/purpose/transport owner for auxiliary model calls (curator, merge judge, domain generation). A granular composition that mounts feature rows without a family bundle must mount this row too.
|
|
6
8
|
|
|
7
9
|
`./restrictor` is a function plugin for restricted presets. It requires a `presetId` and a non-empty `allow` or `deny` set, then applies `tools.restrict()` in matching child-agent scopes. It constrains inherited tools, not the preset mount scope itself.
|
|
8
10
|
|
package/lib/composition/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as entryListSchema, c as MAINTAINER_PRESET_ID, d as RESTRICTED_TOOLS_ROW_ID, f as RESTRICTOR_MODULE, h as restrictedPresetId, i as composeRestrictedPresetDefinition, l as RESTRICTED_PRESET_DELIVERY, m as normalizeAllow, n as ensureRestrictedPreset, o as parsePresetRows, p as REVIEWER_PRESET_ID, r as restrictedPresetState, s as EVOLUTION_PRESET_IDS, t as disposeRestrictedPreset, u as RESTRICTED_PRESET_DISPLAY } from "../ensure-
|
|
2
|
-
import { C as trimTrailingBlankLines, S as rowSiblingEnd, _ as presetRowId, a as composePresetComposition, b as resolveBasePresetPatch, c as composePresetRow, d as listDirectories, f as loadRowOverrides, g as presetRowBody, h as presetRowBlock, i as basePresetPlugins, l as compositionRowIds, m as presetPatchText, n as AGENT_PRESET_ROOT_HINT, o as composePresetEntry, p as mergePresetRow, r as EMPTY_PATCH_SEED, s as composePresetInsert, t as AGENT_PRESET_PACKAGE, u as denseBlockSequence, v as probeDesktopScope, x as rowBlockSpan, y as removePresetRow } from "../composition-
|
|
1
|
+
import { a as entryListSchema, c as MAINTAINER_PRESET_ID, d as RESTRICTED_TOOLS_ROW_ID, f as RESTRICTOR_MODULE, h as restrictedPresetId, i as composeRestrictedPresetDefinition, l as RESTRICTED_PRESET_DELIVERY, m as normalizeAllow, n as ensureRestrictedPreset, o as parsePresetRows, p as REVIEWER_PRESET_ID, r as restrictedPresetState, s as EVOLUTION_PRESET_IDS, t as disposeRestrictedPreset, u as RESTRICTED_PRESET_DISPLAY } from "../ensure-B4fjEI0w.js";
|
|
2
|
+
import { C as trimTrailingBlankLines, S as rowSiblingEnd, _ as presetRowId, a as composePresetComposition, b as resolveBasePresetPatch, c as composePresetRow, d as listDirectories, f as loadRowOverrides, g as presetRowBody, h as presetRowBlock, i as basePresetPlugins, l as compositionRowIds, m as presetPatchText, n as AGENT_PRESET_ROOT_HINT, o as composePresetEntry, p as mergePresetRow, r as EMPTY_PATCH_SEED, s as composePresetInsert, t as AGENT_PRESET_PACKAGE, u as denseBlockSequence, v as probeDesktopScope, x as rowBlockSpan, y as removePresetRow } from "../composition-dy0gJWDd.js";
|
|
3
3
|
export { AGENT_PRESET_PACKAGE, AGENT_PRESET_ROOT_HINT, EMPTY_PATCH_SEED, EVOLUTION_PRESET_IDS, MAINTAINER_PRESET_ID, RESTRICTED_PRESET_DELIVERY, RESTRICTED_PRESET_DISPLAY, RESTRICTED_TOOLS_ROW_ID, RESTRICTOR_MODULE, REVIEWER_PRESET_ID, basePresetPlugins, composePresetComposition, composePresetEntry, composePresetInsert, composePresetRow, composeRestrictedPresetDefinition, compositionRowIds, denseBlockSequence, disposeRestrictedPreset, ensureRestrictedPreset, entryListSchema, listDirectories, loadRowOverrides, mergePresetRow, normalizeAllow, parsePresetRows, presetPatchText, presetRowBlock, presetRowBody, presetRowId, probeDesktopScope, removePresetRow, resolveBasePresetPatch, restrictedPresetId, restrictedPresetState, rowBlockSpan, rowSiblingEnd, trimTrailingBlankLines };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as scopedPackageName } from "./ensure-
|
|
1
|
+
import { _ as scopedPackageName } from "./ensure-B4fjEI0w.js";
|
|
2
2
|
import { dirname, join } from "node:path";
|
|
3
3
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { n as errorText } from "./errors-
|
|
1
|
+
import { n as errorText } from "./errors-DUcEoTLR.js";
|
|
2
|
+
import { t as presetsPort } from "./presets-C8vuCuNA.js";
|
|
2
3
|
import { dirname, join } from "node:path";
|
|
3
4
|
import { existsSync, readFileSync } from "node:fs";
|
|
4
5
|
import { fileURLToPath } from "node:url";
|
|
@@ -129,18 +130,10 @@ function slotFor(ctx, kind) {
|
|
|
129
130
|
}
|
|
130
131
|
return slot;
|
|
131
132
|
}
|
|
132
|
-
function registryOf(ctx) {
|
|
133
|
-
const candidate = ctx.get("agentPresets");
|
|
134
|
-
if (candidate === void 0) return void 0;
|
|
135
|
-
if (typeof candidate.readDocument !== "function" || typeof candidate.register !== "function") return void 0;
|
|
136
|
-
return candidate;
|
|
137
|
-
}
|
|
138
133
|
function installReleaseEffect(ctx, slot) {
|
|
139
134
|
if (slot.effectInstalled === true) return;
|
|
140
|
-
const effect = ctx.effect;
|
|
141
|
-
if (effect === void 0) return;
|
|
142
135
|
slot.effectInstalled = true;
|
|
143
|
-
effect
|
|
136
|
+
ctx.effect(() => () => {
|
|
144
137
|
releaseRestrictedPreset(ctx, void 0, slot);
|
|
145
138
|
}, "evolution-restricted-preset");
|
|
146
139
|
}
|
|
@@ -169,7 +162,7 @@ async function ensureRestrictedPreset(ctx, req) {
|
|
|
169
162
|
};
|
|
170
163
|
return slot.state;
|
|
171
164
|
}
|
|
172
|
-
const registry =
|
|
165
|
+
const registry = presetsPort(ctx);
|
|
173
166
|
if (registry === void 0) {
|
|
174
167
|
slot.state = {
|
|
175
168
|
kind: "failed",
|
|
@@ -39,11 +39,11 @@ const EVOLUTION_ERRORS = Object.freeze({
|
|
|
39
39
|
"e-326-support-write-without-a-read": "E-326: 本会话没有读取技能 \"%a1%\" 的支撑文件 \"%a2%\",因此拒绝这次写入。只读技能正文不算读过支撑文件;请先读取该文件(失败的读取不算),然后重复该写入。",
|
|
40
40
|
"e-320-the-profile-home-is-not": "E-320: 本宿主没有报告 profile home,因此无法定位旧设置文档。/evolution migrate 读取 `<profile home>/settings.yaml.imported`;请在由 profile 启动的会话里运行。",
|
|
41
41
|
"e-322-a-parameter-would-break-a": "E-322: %a1% 至少应为 %a2%,但这次写入把它设成 %a3%。未写入任何内容。",
|
|
42
|
-
"e-321-no-io-provider-is": "E-321:
|
|
42
|
+
"e-321-no-io-provider-is": "E-321: 缺少数据读写组件 evolution-io,暂时读不到旧设置。请安装或启用 evolution-io 后重试。",
|
|
43
43
|
"e-319-skill-write-confirm-timed-out": "E-319: 技能 \"%a1%\" 未被%a2% —— 确认提示在 %a3% 秒内无人应答,因此该写入被取消。没有人在场决定:把 `skillWriteConfirm` 设为 `auto` 可免提示直接写入,保留 `ask` 则一直等到有人应答,或提高 `skillWriteConfirmTimeoutSeconds`。",
|
|
44
|
-
"e-323-subagent-channel-unavailable": "E-323:
|
|
45
|
-
"e-324-restricted-preset-unavailable": "E-324:
|
|
46
|
-
"e-325-host-data-plane-unavailable": "E-325:
|
|
44
|
+
"e-323-subagent-channel-unavailable": "E-323: 审阅/维护代理不可用:程序缺少 subagents/agentPresets 服务,或当前运行方式不支持只读代理。审阅/维护会明确标为不可用,不会静默改在当前会话里跑。运行 /evolution doctor 查看原因。",
|
|
45
|
+
"e-324-restricted-preset-unavailable": "E-324: 只读模式创建失败:%a1%。审阅/维护暂时不可用;运行 /evolution doctor 查看原因。",
|
|
46
|
+
"e-325-host-data-plane-unavailable": "E-325: 页面拿不到平台连接(缺少 connection 服务),面板与审批不会注册。可改用 /evolution pending、approve、reject 命令完成同样的事;详情见 /evolution doctor。"
|
|
47
47
|
});
|
|
48
48
|
/**
|
|
49
49
|
* Render one table entry, substituting its interpolation slots.
|