@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/lib/subagent/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as restrictedPresetId, n as ensureRestrictedPreset, r as restrictedPresetState } from "../ensure-
|
|
1
|
+
import { h as restrictedPresetId, n as ensureRestrictedPreset, r as restrictedPresetState } from "../ensure-B4fjEI0w.js";
|
|
2
2
|
//#region lib/types/subagent/readiness.js
|
|
3
3
|
function serviceOf$1(ctx, name) {
|
|
4
4
|
return ctx.get(name);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region lib/types/platform/tools.js
|
|
2
|
+
/**
|
|
3
|
+
* Resolve the tools port from a context; undefined means the host has no tools service.
|
|
4
|
+
* platform-declaration anchor: tools is declared in core PLATFORM_SERVICE_PROBES.
|
|
5
|
+
*/
|
|
6
|
+
function toolsPort(ctx) {
|
|
7
|
+
const tools = ctx.get("tools");
|
|
8
|
+
if (tools === void 0) return void 0;
|
|
9
|
+
return {
|
|
10
|
+
register: (definition) => tools.register(definition),
|
|
11
|
+
guard: (guard) => tools.guard(guard),
|
|
12
|
+
restrict: (filter) => tools.restrict(filter)
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
/** Register one family tool through the port; a missing service yields a no-op disposer. */
|
|
16
|
+
function registerEvolutionTool(ctx, definition) {
|
|
17
|
+
return toolsPort(ctx)?.register(definition) ?? (() => {});
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { toolsPort as n, registerEvolutionTool as t };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { presetsPort } from "../platform/presets.js";
|
|
1
2
|
import { normalizeAllow } from "./preset-ids.js";
|
|
2
3
|
import { composeRestrictedPresetDefinition, } from "./restricted-preset.js";
|
|
3
4
|
const SLOTS = new WeakMap();
|
|
@@ -14,22 +15,11 @@ function slotFor(ctx, kind) {
|
|
|
14
15
|
}
|
|
15
16
|
return slot;
|
|
16
17
|
}
|
|
17
|
-
function registryOf(ctx) {
|
|
18
|
-
const candidate = ctx.get('agentPresets');
|
|
19
|
-
if (candidate === undefined)
|
|
20
|
-
return undefined;
|
|
21
|
-
if (typeof candidate.readDocument !== 'function' || typeof candidate.register !== 'function')
|
|
22
|
-
return undefined;
|
|
23
|
-
return candidate;
|
|
24
|
-
}
|
|
25
18
|
function installReleaseEffect(ctx, slot) {
|
|
26
19
|
if (slot.effectInstalled === true)
|
|
27
20
|
return;
|
|
28
|
-
const effect = ctx.effect;
|
|
29
|
-
if (effect === undefined)
|
|
30
|
-
return;
|
|
31
21
|
slot.effectInstalled = true;
|
|
32
|
-
effect
|
|
22
|
+
ctx.effect(() => () => { void releaseRestrictedPreset(ctx, undefined, slot); }, 'evolution-restricted-preset');
|
|
33
23
|
}
|
|
34
24
|
async function releaseRestrictedPreset(ctx, kind, explicitSlot) {
|
|
35
25
|
const slot = explicitSlot ?? (kind === undefined ? undefined : slotFor(ctx, kind));
|
|
@@ -56,7 +46,7 @@ export async function ensureRestrictedPreset(ctx, req) {
|
|
|
56
46
|
slot.state = { kind: 'failed', code: 'E-324', reason: 'allow set is empty' };
|
|
57
47
|
return slot.state;
|
|
58
48
|
}
|
|
59
|
-
const registry =
|
|
49
|
+
const registry = presetsPort(ctx);
|
|
60
50
|
if (registry === undefined) {
|
|
61
51
|
slot.state = { kind: 'failed', code: 'E-324', reason: 'agentPresets service unavailable or incomplete' };
|
|
62
52
|
return slot.state;
|
package/lib/types/errors.d.ts
CHANGED
|
@@ -38,11 +38,11 @@ export declare const EVOLUTION_ERRORS: Readonly<{
|
|
|
38
38
|
readonly 'e-326-support-write-without-a-read': "E-326: 本会话没有读取技能 \"%a1%\" 的支撑文件 \"%a2%\",因此拒绝这次写入。只读技能正文不算读过支撑文件;请先读取该文件(失败的读取不算),然后重复该写入。";
|
|
39
39
|
readonly 'e-320-the-profile-home-is-not': "E-320: 本宿主没有报告 profile home,因此无法定位旧设置文档。/evolution migrate 读取 `<profile home>/settings.yaml.imported`;请在由 profile 启动的会话里运行。";
|
|
40
40
|
readonly 'e-322-a-parameter-would-break-a': "E-322: %a1% 至少应为 %a2%,但这次写入把它设成 %a3%。未写入任何内容。";
|
|
41
|
-
readonly 'e-321-no-io-provider-is': "E-321:
|
|
41
|
+
readonly 'e-321-no-io-provider-is': "E-321: 缺少数据读写组件 evolution-io,暂时读不到旧设置。请安装或启用 evolution-io 后重试。";
|
|
42
42
|
readonly 'e-319-skill-write-confirm-timed-out': "E-319: 技能 \"%a1%\" 未被%a2% —— 确认提示在 %a3% 秒内无人应答,因此该写入被取消。没有人在场决定:把 `skillWriteConfirm` 设为 `auto` 可免提示直接写入,保留 `ask` 则一直等到有人应答,或提高 `skillWriteConfirmTimeoutSeconds`。";
|
|
43
|
-
readonly 'e-323-subagent-channel-unavailable': "E-323:
|
|
44
|
-
readonly 'e-324-restricted-preset-unavailable': "E-324:
|
|
45
|
-
readonly 'e-325-host-data-plane-unavailable': "E-325:
|
|
43
|
+
readonly 'e-323-subagent-channel-unavailable': "E-323: 审阅/维护代理不可用:程序缺少 subagents/agentPresets 服务,或当前运行方式不支持只读代理。审阅/维护会明确标为不可用,不会静默改在当前会话里跑。运行 /evolution doctor 查看原因。";
|
|
44
|
+
readonly 'e-324-restricted-preset-unavailable': "E-324: 只读模式创建失败:%a1%。审阅/维护暂时不可用;运行 /evolution doctor 查看原因。";
|
|
45
|
+
readonly 'e-325-host-data-plane-unavailable': "E-325: 页面拿不到平台连接(缺少 connection 服务),面板与审批不会注册。可改用 /evolution pending、approve、reject 命令完成同样的事;详情见 /evolution doctor。";
|
|
46
46
|
}>;
|
|
47
47
|
/** One table key. */
|
|
48
48
|
export type EvolutionErrorId = keyof typeof EVOLUTION_ERRORS;
|
package/lib/types/errors.js
CHANGED
|
@@ -42,11 +42,11 @@ export const EVOLUTION_ERRORS = Object.freeze({
|
|
|
42
42
|
// G5.12/U-4: the cross-field constraint the registry declares (params.ts) has one enforcement
|
|
43
43
|
// point, and this is its message. The card shows the same relation before a save is attempted.
|
|
44
44
|
'e-322-a-parameter-would-break-a': 'E-322: %a1% 至少应为 %a2%,但这次写入把它设成 %a3%。未写入任何内容。',
|
|
45
|
-
'e-321-no-io-provider-is': 'E-321:
|
|
45
|
+
'e-321-no-io-provider-is': 'E-321: 缺少数据读写组件 evolution-io,暂时读不到旧设置。请安装或启用 evolution-io 后重试。',
|
|
46
46
|
'e-319-skill-write-confirm-timed-out': 'E-319: 技能 "%a1%" 未被%a2% —— 确认提示在 %a3% 秒内无人应答,因此该写入被取消。没有人在场决定:把 `skillWriteConfirm` 设为 `auto` 可免提示直接写入,保留 `ask` 则一直等到有人应答,或提高 `skillWriteConfirmTimeoutSeconds`。',
|
|
47
|
-
'e-323-subagent-channel-unavailable': 'E-323:
|
|
48
|
-
'e-324-restricted-preset-unavailable': 'E-324:
|
|
49
|
-
'e-325-host-data-plane-unavailable': 'E-325:
|
|
47
|
+
'e-323-subagent-channel-unavailable': 'E-323: 审阅/维护代理不可用:程序缺少 subagents/agentPresets 服务,或当前运行方式不支持只读代理。审阅/维护会明确标为不可用,不会静默改在当前会话里跑。运行 /evolution doctor 查看原因。',
|
|
48
|
+
'e-324-restricted-preset-unavailable': 'E-324: 只读模式创建失败:%a1%。审阅/维护暂时不可用;运行 /evolution doctor 查看原因。',
|
|
49
|
+
'e-325-host-data-plane-unavailable': 'E-325: 页面拿不到平台连接(缺少 connection 服务),面板与审批不会注册。可改用 /evolution pending、approve、reject 命令完成同样的事;详情见 /evolution doctor。',
|
|
50
50
|
});
|
|
51
51
|
/**
|
|
52
52
|
* Render one table entry, substituting its interpolation slots.
|
package/lib/types/opt-in.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ export declare function scopedProbeReport(): ScopedProbeReport;
|
|
|
69
69
|
* Does this session's scope see the family's model tools?
|
|
70
70
|
*
|
|
71
71
|
* The scope is the live agent's — the platform's own addressing for "what does
|
|
72
|
-
* this session see" (`tools.get(name, scope)`, packages/core/tools/src/index.ts:
|
|
72
|
+
* this session see" (`tools.get(name, scope)`, packages/core/tools/src/index.ts:239).
|
|
73
73
|
* A session with no live agent (a finished or cold session) has no scope to ask
|
|
74
74
|
* in, so it resolves to false; the consumers this gate serves only run for live
|
|
75
75
|
* agents.
|
package/lib/types/opt-in.js
CHANGED
|
@@ -37,7 +37,7 @@ export function scopedProbeReport() {
|
|
|
37
37
|
* Does this session's scope see the family's model tools?
|
|
38
38
|
*
|
|
39
39
|
* The scope is the live agent's — the platform's own addressing for "what does
|
|
40
|
-
* this session see" (`tools.get(name, scope)`, packages/core/tools/src/index.ts:
|
|
40
|
+
* this session see" (`tools.get(name, scope)`, packages/core/tools/src/index.ts:239).
|
|
41
41
|
* A session with no live agent (a finished or cold session) has no scope to ask
|
|
42
42
|
* in, so it resolves to false; the consumers this gate serves only run for live
|
|
43
43
|
* agents.
|
package/lib/types/params.js
CHANGED
|
@@ -114,8 +114,8 @@ export const PARAM_EXPOSURE = Object.freeze([
|
|
|
114
114
|
{ id: 'reviewMessageChars', group: 'review', tier: 'E2', authority: 'cordis', owner: 'evolution-review', applies: 'none', docAnchor: 'PARAMETERS.md#review', summary: 'Per-message character budget of the review context.', why: 'internal' },
|
|
115
115
|
{ id: 'reviewMaxDepth', group: 'review', tier: 'E2', authority: 'cordis', owner: 'evolution-review', applies: 'none', docAnchor: 'PARAMETERS.md#review', summary: 'Absolute delegation-depth cap of the review subagent.', why: 'internal' },
|
|
116
116
|
{ id: 'reviewToolAllow', group: 'review', tier: 'E2', authority: 'cordis', owner: 'evolution-review', applies: 'none', docAnchor: 'PARAMETERS.md#review', summary: 'Tools the review subagent may use (safety surface).', why: 'security' },
|
|
117
|
-
{ id: 'skillContentChars', group: 'write-caps', tier: 'E3', authority: 'cordis', owner: 'tool-skill-manage', applies: 'live', docAnchor: 'PARAMETERS.md#write-caps', summary: 'Character cap on a SKILL.md body (tighten-only).', label: '技能文件正文上限', hint: '技能 Markdown
|
|
118
|
-
{ id: 'maxSkillFileBytes', group: 'write-caps', tier: 'E3', authority: 'cordis', owner: 'tool-skill-manage', applies: 'live', docAnchor: 'PARAMETERS.md#write-caps', summary: 'Byte cap on one support file (tighten-only).', label: '附带文件大小上限', hint: '
|
|
117
|
+
{ id: 'skillContentChars', group: 'write-caps', tier: 'E3', authority: 'cordis', owner: 'tool-skill-manage', applies: 'live', docAnchor: 'PARAMETERS.md#write-caps', summary: 'Character cap on a SKILL.md body (tighten-only).', label: '技能文件正文上限', hint: '技能 Markdown 正文最多多少字符(只能调小,不能超过出厂上限)。', control: 'number', unit: '字符', values: '', card: 'tool-skill-manage' },
|
|
118
|
+
{ id: 'maxSkillFileBytes', group: 'write-caps', tier: 'E3', authority: 'cordis', owner: 'tool-skill-manage', applies: 'live', docAnchor: 'PARAMETERS.md#write-caps', summary: 'Byte cap on one support file (tighten-only).', label: '附带文件大小上限', hint: '技能附带文件单个最大多少字节(只能调小,不能超过出厂上限)。', control: 'number', unit: '字节', values: '', card: 'tool-skill-manage' },
|
|
119
119
|
{ id: 'maxSkillNameLength', group: 'write-caps', tier: 'E3', authority: 'cordis', owner: 'tool-skill-manage', applies: 'live', docAnchor: 'PARAMETERS.md#write-caps', summary: 'Character cap on a skill name (tighten-only).', label: '技能名长度上限', hint: '技能名最多多少字符(只能调小)。', control: 'number', unit: '字符', values: '', card: 'tool-skill-manage' },
|
|
120
120
|
{ id: 'maxDescriptionLength', group: 'write-caps', tier: 'E3', authority: 'cordis', owner: 'tool-skill-manage', applies: 'live', docAnchor: 'PARAMETERS.md#write-caps', summary: 'Character cap on a skill description (tighten-only).', label: '技能描述长度上限', hint: '技能描述最多多少字符(只能调小)。', control: 'number', unit: '字符', values: '', card: 'tool-skill-manage' },
|
|
121
121
|
{ id: 'descriptionStrict', group: 'write-caps', tier: 'E3', authority: 'cordis', owner: 'tool-skill-manage', applies: 'live', docAnchor: 'PARAMETERS.md#write-caps', summary: 'Refuse a description over the authoring bar instead of advising.', label: '描述不合规即拒绝', hint: '描述不符合要求时直接拒绝写入(默认只提醒)。', control: 'switch', unit: '', values: '', card: 'tool-skill-manage' },
|
|
@@ -140,10 +140,10 @@ export const PARAM_EXPOSURE = Object.freeze([
|
|
|
140
140
|
{ id: 'minIdleHours', group: 'curator', tier: 'E3', authority: 'cordis', owner: 'evolution-curator', applies: 'live', docAnchor: 'PARAMETERS.md#curator', summary: 'Idle hours required before an automatic curation pass runs.', label: '最少空闲时长', hint: '你至少多少小时没用,才运行自动整理。', control: 'number', unit: '小时', values: '', card: 'evolution-curator' },
|
|
141
141
|
{ id: 'minIdleFailOpen', group: 'curator', tier: 'E3', authority: 'cordis', owner: 'evolution-curator', applies: 'live', docAnchor: 'PARAMETERS.md#curator', summary: 'Let the idle gate open when the activity probe is unavailable.', label: '检测不到活动也运行', hint: '无法判断你是否空闲时,仍然运行自动整理。', control: 'switch', unit: '', values: '', card: 'evolution-curator' },
|
|
142
142
|
{ id: 'llmReview', group: 'curator', tier: 'E3', authority: 'cordis', owner: 'evolution-curator', applies: 'live', docAnchor: 'PARAMETERS.md#curator', summary: 'Enable the LLM nomination pass on top of the deterministic lifecycle.', label: '用模型挑选', hint: '在固定规则之外,再用模型挑一遍候选项。', control: 'switch', unit: '', values: '', card: 'evolution-curator' },
|
|
143
|
-
{ id: 'curatorReviewMaxTokens', group: 'curator', tier: 'E3', authority: 'cordis', owner: 'evolution-curator', applies: 'live', docAnchor: 'PARAMETERS.md#curator', summary: 'Token budget of the curator LLM review.', label: '
|
|
143
|
+
{ id: 'curatorReviewMaxTokens', group: 'curator', tier: 'E3', authority: 'cordis', owner: 'evolution-curator', applies: 'live', docAnchor: 'PARAMETERS.md#curator', summary: 'Token budget of the curator LLM review.', label: '模型挑选的字数上限', hint: '每次用模型挑选时最多消耗多少 token(模型计费单位)。', control: 'number', unit: 'token', values: '', card: 'evolution-curator' },
|
|
144
144
|
{ id: 'curatorReviewTimeoutMs', group: 'curator', tier: 'E3', authority: 'cordis', owner: 'evolution-curator', applies: 'live', docAnchor: 'PARAMETERS.md#curator', summary: 'Wall-clock bound of the curator LLM review.', label: '模型处理超时', hint: '一次模型挑选最长允许运行多久。', control: 'number', unit: '毫秒', values: '', card: 'evolution-curator' },
|
|
145
145
|
{ id: 'healthSoftBodyChars', group: 'curator', tier: 'E3', authority: 'cordis', owner: 'evolution-curator', applies: 'live', docAnchor: 'PARAMETERS.md#curator', summary: 'Body character line the health view judges against.', label: '正文长度参考值', hint: '技能正文超过多少字符算偏长(只用于健康提示)。', control: 'number', unit: '字符', values: '', card: 'evolution-curator' },
|
|
146
|
-
{ id: 'healthStampDensityPerKb', group: 'curator', tier: 'E3', authority: 'cordis', owner: 'evolution-curator', applies: 'live', docAnchor: 'PARAMETERS.md#curator', summary: 'Stamp density per KB that flags log-like content in a body.', label: '
|
|
146
|
+
{ id: 'healthStampDensityPerKb', group: 'curator', tier: 'E3', authority: 'cordis', owner: 'evolution-curator', applies: 'live', docAnchor: 'PARAMETERS.md#curator', summary: 'Stamp density per KB that flags log-like content in a body.', label: '正文像日志的判定线', hint: '每 KB 出现多少个时间标记,就判为「像日志」。', control: 'number', unit: '处/KB', values: '', card: 'evolution-curator' },
|
|
147
147
|
{ id: 'healthChurnMinPatches', group: 'curator', tier: 'E3', authority: 'cordis', owner: 'evolution-curator', applies: 'live', docAnchor: 'PARAMETERS.md#curator', summary: 'Patches without a read that flag a write-ghost skill.', label: '只写不读判定次数', hint: '连续多少次改动都没有被读取,就判为「只写不读」。', control: 'number', unit: '处', values: '', card: 'evolution-curator' },
|
|
148
148
|
{ id: 'evolution-curator.enabled', group: 'curator', tier: 'E2', authority: 'cordis', owner: 'evolution-curator', applies: 'none', docAnchor: 'PARAMETERS.md#curator', summary: 'Mount the curator plugin at all.', why: 'deployment' },
|
|
149
149
|
{ id: 'autoStart', group: 'curator', tier: 'E2', authority: 'cordis', owner: 'evolution-curator', applies: 'none', docAnchor: 'PARAMETERS.md#curator', summary: 'Arm the hourly due-ness tick with the plugin — the STARTUP default only; at runtime /evolution curator pause or resume overrides it (the override is persisted in curation state and wins until cleared). Off keeps curation manual.', why: 'deployment' },
|
|
@@ -184,15 +184,15 @@ export const PARAM_EXPOSURE = Object.freeze([
|
|
|
184
184
|
{ id: 'threatExemptLabels', group: 'deployment', tier: 'E1', authority: 'cordis', owner: 'evolution-threat', applies: 'none', docAnchor: 'PARAMETERS.md#deployment', summary: 'Threat labels the deployment declares benign (safety surface, never user-writable).', why: 'security' },
|
|
185
185
|
{ id: 'evolution-threat.enabled', group: 'deployment', tier: 'E2', authority: 'cordis', owner: 'evolution-threat', applies: 'none', docAnchor: 'PARAMETERS.md#deployment', summary: 'Mount the write-time threat guard at all.', why: 'security' },
|
|
186
186
|
{ id: 'evolution-threat.maxScanChars', group: 'deployment', tier: 'E2', authority: 'cordis', owner: 'evolution-threat', applies: 'none', docAnchor: 'PARAMETERS.md#deployment', summary: 'Scan window size of the threat guard.', why: 'security' },
|
|
187
|
-
{ id: 'evolution-approval.enabled', group: 'deployment', tier: 'E3', authority: 'cordis', owner: 'evolution-approval', applies: 'live', docAnchor: 'PARAMETERS.md#deployment', summary: 'Master approval switch: run the approval pipeline for foreground writes.', label: '
|
|
187
|
+
{ id: 'evolution-approval.enabled', group: 'deployment', tier: 'E3', authority: 'cordis', owner: 'evolution-approval', applies: 'live', docAnchor: 'PARAMETERS.md#deployment', summary: 'Master approval switch: run the approval pipeline for foreground writes.', label: '启用写入审批', hint: '关闭后前台写入不再经批准。', control: 'switch', unit: '', values: '', card: 'evolution-approval' },
|
|
188
188
|
{ id: 'evolution-approval.stageForeground', group: 'deployment', tier: 'E2', authority: 'cordis', owner: 'evolution-approval', applies: 'none', docAnchor: 'PARAMETERS.md#deployment', summary: 'Stage foreground agent writes for approval too.', why: 'security' },
|
|
189
|
-
{ id: 'evolution-approval.pendingTtlMs', group: 'deployment', tier: 'E3', authority: 'cordis', owner: 'evolution-approval', applies: 'live', docAnchor: 'PARAMETERS.md#deployment', summary: 'How long a staged write may wait before it expires: expired writes are closed as rejected and are NEVER executed; 0 (the default) means the window never expires.', label: '待批过期时间', hint: '
|
|
189
|
+
{ id: 'evolution-approval.pendingTtlMs', group: 'deployment', tier: 'E3', authority: 'cordis', owner: 'evolution-approval', applies: 'live', docAnchor: 'PARAMETERS.md#deployment', summary: 'How long a staged write may wait before it expires: expired writes are closed as rejected and are NEVER executed; 0 (the default) means the window never expires.', label: '待批过期时间', hint: '一条待批写入最多等多久:超时后按「拒绝」处理,不会执行,也不会改动任何内容;0 表示一直保留(默认)。', control: 'number', unit: '毫秒', values: '', card: 'evolution-approval' },
|
|
190
190
|
{ id: 'approvalConfirm', group: 'write-caps', tier: 'E3', authority: 'cordis', owner: 'evolution-approval', applies: 'live', docAnchor: 'PARAMETERS.md#write-caps', summary: 'What the confirmation before an APPROVE does: execute immediately, or ask first.', label: '批准前先确认', hint: '点「批准」时要不要再确认一次:直接执行 / 先确认。默认直接执行(不打断批量批准)。', control: 'select', unit: '', values: 'auto|ask', valueLabels: '直接执行|先确认', card: 'evolution-approval' },
|
|
191
191
|
{ id: 'qualityWarnThreshold', group: 'deployment', tier: 'E2', authority: 'cordis', owner: 'evolution-feedback', applies: 'none', docAnchor: 'PARAMETERS.md#deployment', summary: 'Feedback score below which a skill carries a warning.', why: 'internal' },
|
|
192
192
|
{ id: 'replay.maxPlans', group: 'deployment', tier: 'E2', authority: 'cordis', owner: 'evolution-replay', applies: 'none', docAnchor: 'PARAMETERS.md#deployment', summary: 'Plans compared in one replay report.', why: 'internal' },
|
|
193
193
|
{ id: 'replay.weights', group: 'deployment', tier: 'E2', authority: 'cordis', owner: 'evolution-replay', applies: 'none', docAnchor: 'PARAMETERS.md#deployment', summary: 'Scoring weights of the replay comparison.', why: 'internal' },
|
|
194
194
|
{ id: 'evolution-commands.maintainCooldownMs', group: 'deployment', tier: 'E2', authority: 'cordis', owner: 'evolution-commands', applies: 'none', docAnchor: 'PARAMETERS.md#deployment', summary: 'Cooldown between maintenance runs from the command surface.', why: 'internal' },
|
|
195
|
-
{ id: 'evolution-commands.maintainHandoffOnSettle', group: 'deployment', tier: 'E3', authority: 'cordis', owner: 'evolution-commands', applies: 'live', docAnchor: 'PARAMETERS.md#deployment', summary: 'Hand the maintenance report to the model automatically once a scan settles successfully (the same injection as maintain handoff); off by default — enabling it costs one extra model call per successful run.', label: '扫描完成后自动交接', hint: '
|
|
195
|
+
{ id: 'evolution-commands.maintainHandoffOnSettle', group: 'deployment', tier: 'E3', authority: 'cordis', owner: 'evolution-commands', applies: 'live', docAnchor: 'PARAMETERS.md#deployment', summary: 'Hand the maintenance report to the model automatically once a scan settles successfully (the same injection as maintain handoff); off by default — enabling it costs one extra model call per successful run.', label: '扫描完成后自动交接', hint: '维护扫描成功结束后,自动把报告交给模型;默认关闭,每次成功扫描会多花一次模型调用。', control: 'switch', unit: '', values: '', card: 'evolution-commands' },
|
|
196
196
|
{ id: 'evolution-commands.maintainTimeoutMs', group: 'deployment', tier: 'E2', authority: 'cordis', owner: 'evolution-commands', applies: 'none', docAnchor: 'PARAMETERS.md#deployment', summary: 'Timeout of one maintenance run started from the command surface.', why: 'internal' },
|
|
197
197
|
{ id: 'evolution-maintenance.probeTimeoutMs', group: 'deployment', tier: 'E2', authority: 'cordis', owner: 'evolution-maintenance', applies: 'none', docAnchor: 'PARAMETERS.md#deployment', summary: 'Model-facing budget of one maintenance_probe call — a hang guard, not a latency budget.', why: 'internal' },
|
|
198
198
|
{ id: 'skill-usage.supportReadToolNames', group: 'deployment', tier: 'E2', authority: 'cordis', owner: 'skill-usage', applies: 'none', docAnchor: 'PARAMETERS.md#deployment', summary: 'Tool names whose file reads are attributed to support files.', why: 'internal' },
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host platform boundary for the evolution family (G1a).
|
|
3
|
+
*
|
|
4
|
+
* Feature packages import platform tool values/types from this subpath only;
|
|
5
|
+
* the platform-boundary gate keeps @deepseek-ai/dsh-* imports inside core/platform.
|
|
6
|
+
*/
|
|
7
|
+
export { defineTool } from '@deepseek-ai/dsh-tools';
|
|
8
|
+
export type { ObjectJsonSchema, ToolDefinition, ToolGuard, ToolRestriction, } from '@deepseek-ai/dsh-tools';
|
|
9
|
+
export type { CommandInvocation, CommandResult } from '@deepseek-ai/dsh-commands';
|
|
10
|
+
export type { StreamChunk } from '@deepseek-ai/dsh-llm';
|
|
11
|
+
export type { Session, SessionEvent } from '@deepseek-ai/dsh-session';
|
|
12
|
+
export type { PromptContext, PromptSection } from '@deepseek-ai/dsh-system-prompt';
|
|
13
|
+
export { presetsPort } from './presets.ts';
|
|
14
|
+
export type { PresetDefinitionLike, PresetDocument, PresetsPort } from './presets.ts';
|
|
15
|
+
export { projectionPort } from './projections.ts';
|
|
16
|
+
export type { EvolutionProjectionDefinition, ProjectionHandleLike, ProjectionPort } from './projections.ts';
|
|
17
|
+
export { EvolutionLlmError, llmPort, modelRoute } from './llm.ts';
|
|
18
|
+
export type { EvolutionLlmFailureKind, EvolutionLlmPurpose, EvolutionLlmRequest, LlmPort, ModelRoute } from './llm.ts';
|
|
19
|
+
export { registerEvolutionTool, toolsPort } from './tools.ts';
|
|
20
|
+
export type { ToolsPort } from './tools.ts';
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host platform boundary for the evolution family (G1a).
|
|
3
|
+
*
|
|
4
|
+
* Feature packages import platform tool values/types from this subpath only;
|
|
5
|
+
* the platform-boundary gate keeps @deepseek-ai/dsh-* imports inside core/platform.
|
|
6
|
+
*/
|
|
7
|
+
export { defineTool } from '@deepseek-ai/dsh-tools';
|
|
8
|
+
export { presetsPort } from "./presets.js";
|
|
9
|
+
export { projectionPort } from "./projections.js";
|
|
10
|
+
export { EvolutionLlmError, llmPort, modelRoute } from "./llm.js";
|
|
11
|
+
export { registerEvolutionTool, toolsPort } from "./tools.js";
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The LLM half of the family's host platform boundary.
|
|
3
|
+
*
|
|
4
|
+
* Features pass a family request (route, messages, purpose); this module owns
|
|
5
|
+
* the platform GenerateOptions cast, prepareCall fallback, and text assembly.
|
|
6
|
+
* The purpose cast is the only compatibility point between the 0.2.1 fixed
|
|
7
|
+
* union and 0.2.2's declaration-merge map.
|
|
8
|
+
*/
|
|
9
|
+
import type { StreamChunk, UserMessage } from '@deepseek-ai/dsh-llm';
|
|
10
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
11
|
+
export type EvolutionLlmFailureKind = 'model-unavailable' | 'no-route' | 'timeout' | 'cancelled' | 'transport';
|
|
12
|
+
/** Typed auxiliary-LLM failure; callers may map these without parsing messages. */
|
|
13
|
+
export declare class EvolutionLlmError extends Error {
|
|
14
|
+
readonly kind: EvolutionLlmFailureKind;
|
|
15
|
+
constructor(kind: EvolutionLlmFailureKind, message: string, cause?: unknown);
|
|
16
|
+
}
|
|
17
|
+
export type EvolutionLlmPurpose = 'evolution-curator' | 'evolution-merge-engine' | 'evolution-skill-discovery';
|
|
18
|
+
declare module '@deepseek-ai/dsh-llm/types' {
|
|
19
|
+
interface LlmRequestPurposeMap {
|
|
20
|
+
'evolution-curator': true;
|
|
21
|
+
'evolution-merge-engine': true;
|
|
22
|
+
'evolution-skill-discovery': true;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export interface ModelRoute {
|
|
26
|
+
readonly provider: string;
|
|
27
|
+
readonly model: string;
|
|
28
|
+
}
|
|
29
|
+
export interface EvolutionLlmRequest {
|
|
30
|
+
readonly provider: string;
|
|
31
|
+
readonly model: string;
|
|
32
|
+
readonly purpose: EvolutionLlmPurpose;
|
|
33
|
+
readonly messages: readonly UserMessage[];
|
|
34
|
+
readonly maxTokens?: number;
|
|
35
|
+
readonly temperature?: number;
|
|
36
|
+
readonly signal?: AbortSignal;
|
|
37
|
+
}
|
|
38
|
+
export interface LlmPort {
|
|
39
|
+
stream(request: EvolutionLlmRequest): AsyncIterable<StreamChunk>;
|
|
40
|
+
completeText(request: EvolutionLlmRequest): Promise<string>;
|
|
41
|
+
}
|
|
42
|
+
/** Resolve the LLM port; undefined means the host has no llm service. */
|
|
43
|
+
export declare function llmPort(ctx: Context): LlmPort | undefined;
|
|
44
|
+
/** Resolve the model route: agent-owned selection first, deployment default second. */
|
|
45
|
+
export declare function modelRoute(ctx: Context, agent?: unknown, session?: unknown): ModelRoute | undefined;
|
|
46
|
+
//# sourceMappingURL=llm.d.ts.map
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/** Typed auxiliary-LLM failure; callers may map these without parsing messages. */
|
|
2
|
+
export class EvolutionLlmError extends Error {
|
|
3
|
+
kind;
|
|
4
|
+
constructor(kind, message, cause) {
|
|
5
|
+
super(message);
|
|
6
|
+
this.name = 'EvolutionLlmError';
|
|
7
|
+
this.kind = kind;
|
|
8
|
+
if (cause !== undefined)
|
|
9
|
+
this.cause = cause;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
function toOptions(request) {
|
|
13
|
+
return {
|
|
14
|
+
provider: request.provider,
|
|
15
|
+
model: request.model,
|
|
16
|
+
messages: request.messages,
|
|
17
|
+
...(request.maxTokens === undefined ? {} : { maxTokens: request.maxTokens }),
|
|
18
|
+
...(request.temperature === undefined ? {} : { temperature: request.temperature }),
|
|
19
|
+
...(request.signal === undefined ? {} : { signal: request.signal }),
|
|
20
|
+
purpose: request.purpose,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
/** Resolve the LLM port; undefined means the host has no llm service. */
|
|
24
|
+
export function llmPort(ctx) {
|
|
25
|
+
// platform-declaration anchor: llm is declared in core PLATFORM_SERVICE_PROBES.
|
|
26
|
+
const llm = ctx.get('llm');
|
|
27
|
+
if (llm === undefined)
|
|
28
|
+
return undefined;
|
|
29
|
+
const port = {
|
|
30
|
+
async *stream(request) {
|
|
31
|
+
const options = toOptions(request);
|
|
32
|
+
if (llm.stream !== undefined) {
|
|
33
|
+
yield* llm.stream(options);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (llm.prepareCall !== undefined) {
|
|
37
|
+
const call = await llm.prepareCall(options, request.signal);
|
|
38
|
+
yield* call.stream({ ...call.config, messages: request.messages, ...(request.signal === undefined ? {} : { signal: request.signal }) });
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
throw new EvolutionLlmError('transport', 'llm service has neither stream nor prepareCall');
|
|
42
|
+
},
|
|
43
|
+
async completeText(request) {
|
|
44
|
+
let text = '';
|
|
45
|
+
for await (const chunk of port.stream(request)) {
|
|
46
|
+
const frame = chunk;
|
|
47
|
+
if (frame.type === 'text-delta' || frame.type === 'text')
|
|
48
|
+
text += typeof frame.text === 'string' ? frame.text : '';
|
|
49
|
+
if (frame.type === 'finish' && frame.reason?.kind === 'error') {
|
|
50
|
+
const message = frame.reason.failure?.message;
|
|
51
|
+
throw new EvolutionLlmError('transport', 'model call failed: ' + (typeof message === 'string' ? message : 'unknown'));
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return text;
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
return port;
|
|
58
|
+
}
|
|
59
|
+
/** Resolve the model route: agent-owned selection first, deployment default second. */
|
|
60
|
+
export function modelRoute(ctx, agent, session) {
|
|
61
|
+
const owned = agent?.model?.current?.();
|
|
62
|
+
if (owned !== undefined)
|
|
63
|
+
return { provider: owned.provider, model: owned.model };
|
|
64
|
+
// 0.2.2 modelSelection is client-visible: snapshot() returns lastUsed/next.
|
|
65
|
+
if (session !== undefined) {
|
|
66
|
+
const registry = ctx.get('sessionProjections');
|
|
67
|
+
const value = registry?.snapshot?.(session, ['modelSelection'])?.values?.modelSelection;
|
|
68
|
+
const chosen = value?.next ?? value?.lastUsed;
|
|
69
|
+
if (chosen !== undefined && chosen !== null)
|
|
70
|
+
return { provider: chosen.provider, model: chosen.model };
|
|
71
|
+
}
|
|
72
|
+
const fallback = ctx.get('agentDefaultModel')?.currentSelection?.();
|
|
73
|
+
return fallback === undefined ? undefined : { provider: fallback.provider, model: fallback.model };
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=llm.js.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The agent-preset half of the family's host platform boundary.
|
|
3
|
+
*
|
|
4
|
+
* Restricted presets need the registry's document/register face; the review
|
|
5
|
+
* branch needs resolve/mount; the restrictor needs composedPreset. The
|
|
6
|
+
* platform service is optional, so every method is reached through one facade.
|
|
7
|
+
*/
|
|
8
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
9
|
+
export interface PresetDocument {
|
|
10
|
+
readonly agentPreset: string;
|
|
11
|
+
readonly content: string;
|
|
12
|
+
}
|
|
13
|
+
export interface PresetDefinitionLike {
|
|
14
|
+
readonly id: string;
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly description: string;
|
|
17
|
+
readonly order: number;
|
|
18
|
+
readonly plugins: readonly unknown[];
|
|
19
|
+
}
|
|
20
|
+
export interface PresetsPort {
|
|
21
|
+
readDocument(agentPreset: string): Promise<PresetDocument>;
|
|
22
|
+
register(definition: PresetDefinitionLike): Promise<() => Promise<void>>;
|
|
23
|
+
resolve(id?: string): Promise<{
|
|
24
|
+
readonly id: string;
|
|
25
|
+
}>;
|
|
26
|
+
mount(target: Context, id?: string): Promise<unknown>;
|
|
27
|
+
composedPreset(target: Context): string | undefined;
|
|
28
|
+
}
|
|
29
|
+
/** Resolve the preset registry facade; undefined when the host has no agentPresets service. */
|
|
30
|
+
export declare function presetsPort(ctx: Context): PresetsPort | undefined;
|
|
31
|
+
//# sourceMappingURL=presets.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** Resolve the preset registry facade; undefined when the host has no agentPresets service. */
|
|
2
|
+
export function presetsPort(ctx) {
|
|
3
|
+
// platform-declaration anchor: agentPresets is declared in core PLATFORM_SERVICE_PROBES.
|
|
4
|
+
const registry = ctx.get('agentPresets');
|
|
5
|
+
if (registry === undefined)
|
|
6
|
+
return undefined;
|
|
7
|
+
return {
|
|
8
|
+
readDocument: (id) => {
|
|
9
|
+
if (registry.readDocument === undefined)
|
|
10
|
+
throw new Error('agentPresets service has no readDocument()');
|
|
11
|
+
return registry.readDocument(id);
|
|
12
|
+
},
|
|
13
|
+
register: (definition) => {
|
|
14
|
+
if (registry.register === undefined)
|
|
15
|
+
throw new Error('agentPresets service has no register()');
|
|
16
|
+
return registry.register(definition);
|
|
17
|
+
},
|
|
18
|
+
resolve: (id) => {
|
|
19
|
+
if (registry.resolve === undefined)
|
|
20
|
+
throw new Error('agentPresets service has no resolve()');
|
|
21
|
+
return registry.resolve(id);
|
|
22
|
+
},
|
|
23
|
+
mount: (target, id) => {
|
|
24
|
+
if (registry.mount === undefined)
|
|
25
|
+
throw new Error('agentPresets service has no mount()');
|
|
26
|
+
return registry.mount(target, id);
|
|
27
|
+
},
|
|
28
|
+
composedPreset: (target) => registry.composedPreset?.(target),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=presets.js.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The session-projection half of the family's host platform boundary.
|
|
3
|
+
*
|
|
4
|
+
* The target 0.2.2 registry returns an awaitable callable-thenable handle;
|
|
5
|
+
* the 0.2.1 registry returns a disposer function and reads through
|
|
6
|
+
* registry.stateOf. Both forms are adapted here; the legacy branch is deleted
|
|
7
|
+
* when platform-line moves to 0.2.2.
|
|
8
|
+
*/
|
|
9
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
10
|
+
import type { ZodType } from 'zod';
|
|
11
|
+
import type { Session, SessionEvent } from '@deepseek-ai/dsh-session';
|
|
12
|
+
/** The family-owned shape of one projection unit; platform types stay behind the port. */
|
|
13
|
+
export interface EvolutionProjectionDefinition<K extends string, S> {
|
|
14
|
+
readonly key: K;
|
|
15
|
+
readonly stateVersion: number;
|
|
16
|
+
readonly stateSchema: ZodType<S>;
|
|
17
|
+
readonly init: (header: unknown, inheritedEventCount: number) => S;
|
|
18
|
+
readonly apply: (state: S, event: SessionEvent) => S;
|
|
19
|
+
}
|
|
20
|
+
/** One registered unit's read face, independent of the platform's handle class. */
|
|
21
|
+
export interface ProjectionHandleLike<S> {
|
|
22
|
+
stateOf(session: Session): S | undefined;
|
|
23
|
+
dispose(): Promise<void>;
|
|
24
|
+
}
|
|
25
|
+
export interface ProjectionPort {
|
|
26
|
+
register<K extends string, S>(definition: EvolutionProjectionDefinition<K, S>): Promise<ProjectionHandleLike<S>>;
|
|
27
|
+
}
|
|
28
|
+
/** Resolve the projection port; undefined means the host has no projection registry. */
|
|
29
|
+
export declare function projectionPort(ctx: Context): ProjectionPort | undefined;
|
|
30
|
+
//# sourceMappingURL=projections.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
function isCallableThenable(value) {
|
|
2
|
+
return typeof value === 'function' && typeof value.then === 'function';
|
|
3
|
+
}
|
|
4
|
+
/** Resolve the projection port; undefined means the host has no projection registry. */
|
|
5
|
+
export function projectionPort(ctx) {
|
|
6
|
+
// platform-declaration anchor: sessionProjections is declared in core PLATFORM_SERVICE_PROBES.
|
|
7
|
+
const registry = ctx.get('sessionProjections');
|
|
8
|
+
if (registry === undefined)
|
|
9
|
+
return undefined;
|
|
10
|
+
return {
|
|
11
|
+
async register(definition) {
|
|
12
|
+
const raw = registry.register(definition);
|
|
13
|
+
if (isCallableThenable(raw)) {
|
|
14
|
+
const resolved = await raw;
|
|
15
|
+
if (resolved !== null && typeof resolved === 'object' && typeof resolved.stateOf === 'function') {
|
|
16
|
+
const handle = resolved;
|
|
17
|
+
return {
|
|
18
|
+
stateOf: (session) => handle.stateOf(session),
|
|
19
|
+
dispose: () => handle.dispose(),
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
const dispose = raw;
|
|
24
|
+
return {
|
|
25
|
+
stateOf: (session) => registry.stateOf?.(session, definition.key),
|
|
26
|
+
dispose: async () => { dispose(); },
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=projections.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The tools half of the family's host platform boundary.
|
|
3
|
+
*
|
|
4
|
+
* Only this module imports @deepseek-ai/dsh-tools; consumers receive a typed
|
|
5
|
+
* port and never reshape ctx.get('tools') themselves. Missing service is a
|
|
6
|
+
* capability downgrade, not a crash.
|
|
7
|
+
*/
|
|
8
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
9
|
+
import type { ToolDefinition, ToolGuard, ToolRestriction } from '@deepseek-ai/dsh-tools';
|
|
10
|
+
/** The subset of the platform tools registry the family consumes. */
|
|
11
|
+
export interface ToolsPort {
|
|
12
|
+
register(definition: ToolDefinition): () => void;
|
|
13
|
+
guard(guard: ToolGuard): () => void;
|
|
14
|
+
restrict(filter: ToolRestriction): () => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Resolve the tools port from a context; undefined means the host has no tools service.
|
|
18
|
+
* platform-declaration anchor: tools is declared in core PLATFORM_SERVICE_PROBES.
|
|
19
|
+
*/
|
|
20
|
+
export declare function toolsPort(ctx: Context): ToolsPort | undefined;
|
|
21
|
+
/** Register one family tool through the port; a missing service yields a no-op disposer. */
|
|
22
|
+
export declare function registerEvolutionTool(ctx: Context, definition: ToolDefinition): () => void;
|
|
23
|
+
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve the tools port from a context; undefined means the host has no tools service.
|
|
3
|
+
* platform-declaration anchor: tools is declared in core PLATFORM_SERVICE_PROBES.
|
|
4
|
+
*/
|
|
5
|
+
export function toolsPort(ctx) {
|
|
6
|
+
// The cast is confined to the boundary: the platform service class is the
|
|
7
|
+
// contract, while the port keeps feature code independent of its full face.
|
|
8
|
+
const tools = ctx.get('tools');
|
|
9
|
+
if (tools === undefined)
|
|
10
|
+
return undefined;
|
|
11
|
+
return {
|
|
12
|
+
register: (definition) => tools.register(definition),
|
|
13
|
+
guard: (guard) => tools.guard(guard),
|
|
14
|
+
restrict: (filter) => tools.restrict(filter),
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/** Register one family tool through the port; a missing service yields a no-op disposer. */
|
|
18
|
+
export function registerEvolutionTool(ctx, definition) {
|
|
19
|
+
return toolsPort(ctx)?.register(definition) ?? (() => { });
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/** The frozen platform line this release targets (peers/engines/anchors derived from version+floor). */
|
|
2
2
|
export declare const PLATFORM_LINE: {
|
|
3
|
-
readonly version: "0.2.
|
|
4
|
-
readonly floor: "0.2.
|
|
5
|
-
readonly previousAnchor: "0.2.
|
|
6
|
-
readonly peersRange: "^0.2.
|
|
7
|
-
readonly enginesRange: ">=0.2.
|
|
8
|
-
readonly upstreamRef: "dsh-v0.2.
|
|
3
|
+
readonly version: "0.2.2-rc.1";
|
|
4
|
+
readonly floor: "0.2.2-rc.0";
|
|
5
|
+
readonly previousAnchor: "0.2.1-rc.2";
|
|
6
|
+
readonly peersRange: "^0.2.2-rc.0";
|
|
7
|
+
readonly enginesRange: ">=0.2.2-rc.0 <0.2.3-0";
|
|
8
|
+
readonly upstreamRef: "dsh-v0.2.2-rc.1";
|
|
9
9
|
};
|
|
10
10
|
//# sourceMappingURL=platform-line.generated.d.ts.map
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
// Regenerate with: node packages/scripts/gen-platform-line.mjs
|
|
3
3
|
/** The frozen platform line this release targets (peers/engines/anchors derived from version+floor). */
|
|
4
4
|
export const PLATFORM_LINE = {
|
|
5
|
-
version: '0.2.
|
|
6
|
-
floor: '0.2.
|
|
7
|
-
previousAnchor: '0.2.
|
|
8
|
-
peersRange: '^0.2.
|
|
9
|
-
enginesRange: '>=0.2.
|
|
10
|
-
upstreamRef: 'dsh-v0.2.
|
|
5
|
+
version: '0.2.2-rc.1',
|
|
6
|
+
floor: '0.2.2-rc.0',
|
|
7
|
+
previousAnchor: '0.2.1-rc.2',
|
|
8
|
+
peersRange: '^0.2.2-rc.0',
|
|
9
|
+
enginesRange: '>=0.2.2-rc.0 <0.2.3-0',
|
|
10
|
+
upstreamRef: 'dsh-v0.2.2-rc.1',
|
|
11
11
|
};
|
|
12
12
|
//# sourceMappingURL=platform-line.generated.js.map
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import type { PlatformServiceProbe } from '@lmzhen/dsh-evolution-contract';
|
|
15
15
|
export type { PlatformServiceProbe } from '@lmzhen/dsh-evolution-contract';
|
|
16
|
-
/** The
|
|
16
|
+
/** The probes, in service-name order (the guard checks this list against the tree). */
|
|
17
17
|
export declare const PLATFORM_SERVICE_PROBES: readonly PlatformServiceProbe[];
|
|
18
18
|
/**
|
|
19
19
|
* The HOST-side probes that do not resolve in this runtime — what `/evolution doctor` prints as
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* `client` probes run in the browser half, where the host has no view of the seats.
|
|
12
12
|
* @module @lmzhen/dsh-evolution-core
|
|
13
13
|
*/
|
|
14
|
-
/** The
|
|
14
|
+
/** The probes, in service-name order (the guard checks this list against the tree). */
|
|
15
15
|
export const PLATFORM_SERVICE_PROBES = Object.freeze([
|
|
16
16
|
{ service: 'agentDefaultModel', feature: 'the model route inherited by a plugin review branch', side: 'host' },
|
|
17
17
|
{ service: 'agentPresets', feature: 'the preset mount that gives a plugin review branch its tools/system', side: 'host' },
|
|
@@ -25,6 +25,7 @@ export const PLATFORM_SERVICE_PROBES = Object.freeze([
|
|
|
25
25
|
{ service: 'evolutionMerge', feature: 'merge command delegation and the merge doctor fact', side: 'host' },
|
|
26
26
|
{ service: 'hmr', feature: 'the preset install read-merge-write commit (the platform HMR lock serializes it)', side: 'host' },
|
|
27
27
|
{ service: 'evolutionMemoryBudget', feature: 'the memory-budget divergence section of this report', side: 'host' },
|
|
28
|
+
{ service: 'evolutionPlatform', feature: 'the single host edge object behind every family platform port', side: 'host' },
|
|
28
29
|
{ service: 'evolutionPolicy', feature: 'the policy snapshot that shadows row knobs', side: 'host' },
|
|
29
30
|
{ service: 'evolutionReplay', feature: '/evolution replay', side: 'host' },
|
|
30
31
|
{ service: 'evolutionState', feature: 'the state facade behind activity and replay', side: 'host' },
|
|
@@ -34,6 +35,8 @@ export const PLATFORM_SERVICE_PROBES = Object.freeze([
|
|
|
34
35
|
{ service: 'pluginManager', feature: 'the platform plugin and preset surfaces this report reads', side: 'host' },
|
|
35
36
|
{ service: 'profileContext', feature: 'writing the agent-preset row into a profile patch', side: 'host' },
|
|
36
37
|
{ service: 'sessionProjections', feature: 'the domain-owned session units', side: 'host' },
|
|
38
|
+
{ service: 'evolutionProjections', feature: 'the family-owned projection runtime behind the pure readers', side: 'host' },
|
|
39
|
+
{ service: 'evolutionLlm', feature: 'the family LLM runtime for auxiliary model calls', side: 'host' },
|
|
37
40
|
{ service: 'sessionQuery', feature: 'the session corpus behind /evolution sessions', side: 'host' },
|
|
38
41
|
{ service: 'settings', feature: 'the settings user layer and the params view', side: 'host' },
|
|
39
42
|
{ service: 'skillUsage', feature: 'usage counters feeding the curator and the review planner', side: 'host' },
|