@lmzhen/dsh-evolution-core 0.56.0 → 0.58.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/authority-plugin.js +1 -1
- package/lib/composition/index.js +2 -2
- package/lib/{composition-CtNbVHq3.js → composition-B_F4TYOD.js} +5 -5
- package/lib/{ensure-BLmEW0Ju.js → ensure-BpVDuDnA.js} +1 -1
- package/lib/http-routes.js +1 -1
- package/lib/index.js +11 -15
- package/lib/{mutation-authority-DQfpXs1O.js → mutation-authority-Du-ON0NY.js} +1 -1
- package/lib/policy.js +1 -1
- package/lib/restrictor.js +1 -2
- package/lib/result.js +2 -33
- package/lib/runtime/plugin.js +1 -55
- package/lib/skills.js +1 -1
- package/lib/subagent/index.js +1 -1
- package/lib/types/authority.d.ts +1 -1
- package/lib/types/authority.js +1 -1
- package/lib/types/composition/ensure.js +1 -1
- package/lib/types/env.d.ts +4 -4
- package/lib/types/env.js +4 -4
- package/lib/types/http-routes.js +1 -1
- package/lib/types/opt-in.d.ts +2 -3
- package/lib/types/opt-in.js +4 -5
- package/lib/types/params.js +1 -1
- package/lib/types/platform-line.generated.d.ts +4 -2
- package/lib/types/platform-line.generated.js +6 -2
- package/lib/types/platform-services.js +0 -1
- package/lib/types/policy.js +1 -1
- package/lib/types/restrictor.js +2 -2
- package/lib/types/result.d.ts +3 -31
- package/lib/types/result.js +6 -24
- package/lib/types/runtime/coherence.js +1 -1
- package/lib/types/runtime/llm.d.ts +1 -1
- package/lib/types/runtime/llm.js +1 -1
- package/lib/types/runtime/platform.d.ts +8 -60
- package/lib/types/runtime/platform.js +7 -63
- package/lib/types/runtime/plugin.js +1 -4
- package/lib/types/runtime/projections.d.ts +1 -1
- package/lib/types/scope.js +1 -1
- package/lib/types/session-projection.d.ts +1 -1
- package/lib/types/signals.d.ts +1 -1
- package/lib/types/subagent/run.d.ts +1 -1
- package/lib/types/subagent/types.d.ts +4 -4
- package/package.json +7 -32
- package/lib/connection-DAJy7Xjm.js +0 -28
- package/lib/platform/index.js +0 -5
- package/lib/platform-BA27gvSG.js +0 -252
- package/lib/presets-C8vuCuNA.js +0 -27
- package/lib/tools-BrUswg8v.js +0 -22
- package/lib/types/platform/agents.d.ts +0 -32
- package/lib/types/platform/agents.js +0 -26
- package/lib/types/platform/commands.d.ts +0 -14
- package/lib/types/platform/commands.js +0 -9
- package/lib/types/platform/connection.d.ts +0 -26
- package/lib/types/platform/connection.js +0 -27
- package/lib/types/platform/index.d.ts +0 -57
- package/lib/types/platform/index.js +0 -30
- package/lib/types/platform/llm.d.ts +0 -47
- package/lib/types/platform/llm.js +0 -76
- package/lib/types/platform/platformView.d.ts +0 -21
- package/lib/types/platform/platformView.js +0 -29
- package/lib/types/platform/presets.d.ts +0 -31
- package/lib/types/platform/presets.js +0 -31
- package/lib/types/platform/profileContext.d.ts +0 -16
- package/lib/types/platform/profileContext.js +0 -14
- package/lib/types/platform/projections.d.ts +0 -35
- package/lib/types/platform/projections.js +0 -34
- package/lib/types/platform/sessionQuery.d.ts +0 -14
- package/lib/types/platform/sessionQuery.js +0 -9
- package/lib/types/platform/settings.d.ts +0 -22
- package/lib/types/platform/settings.js +0 -14
- package/lib/types/platform/skills.d.ts +0 -16
- package/lib/types/platform/skills.js +0 -9
- package/lib/types/platform/storageDomain.d.ts +0 -13
- package/lib/types/platform/storageDomain.js +0 -9
- package/lib/types/platform/subagents.d.ts +0 -25
- package/lib/types/platform/subagents.js +0 -17
- package/lib/types/platform/systemPrompt.d.ts +0 -16
- package/lib/types/platform/systemPrompt.js +0 -13
- package/lib/types/platform/tools.d.ts +0 -27
- package/lib/types/platform/tools.js +0 -23
- package/lib/types/platform/userQuestions.d.ts +0 -33
- package/lib/types/platform/userQuestions.js +0 -9
- package/lib/types/platform/workingDirectory.d.ts +0 -14
- package/lib/types/platform/workingDirectory.js +0 -9
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`, `./restrictor`,
|
|
5
|
+
The root entry is a library, not a user-facing command. The package also exposes `./composition`, `./subagent`, `./http-routes`, `./restrictor`, and `./runtime` subpaths.
|
|
6
|
+
|
|
7
|
+
The former `./platform` compatibility barrel is removed: feature packages import port types from `@lmzhen/dsh-evolution-platform-contract`, port functions from `@lmzhen/dsh-evolution-adapter/ports`, and host runtime helpers from `@lmzhen/dsh-evolution-adapter/values`. `./runtime` no longer mounts `evolutionPlatform`; the bundle's `evolution-adapter` row owns it and mounts before core/runtime.
|
|
6
8
|
|
|
7
9
|
`./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.
|
|
8
10
|
|
package/lib/authority-plugin.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as MutationAuthority } from "./mutation-authority-
|
|
1
|
+
import { t as MutationAuthority } from "./mutation-authority-Du-ON0NY.js";
|
|
2
2
|
import { t as evolutionHome } from "./state-store-Jpa-iYIZ.js";
|
|
3
3
|
//#region lib/types/authority-plugin.js
|
|
4
4
|
const name = "evolution-authority";
|
package/lib/composition/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as entryListSchema, c as GOVERNANCE_PRESET_ID, d as RESTRICTED_TOOLS_ROW_ID, f as RESTRICTOR_MODULE, h as restrictedPresetId, i as composeRestrictedPresetDefinition, l as MAINTAINER_PRESET_ID, 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 GOVERNANCE_PRESET_ID, d as RESTRICTED_TOOLS_ROW_ID, f as RESTRICTOR_MODULE, h as restrictedPresetId, i as composeRestrictedPresetDefinition, l as MAINTAINER_PRESET_ID, 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-BpVDuDnA.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-B_F4TYOD.js";
|
|
3
3
|
export { AGENT_PRESET_PACKAGE, AGENT_PRESET_ROOT_HINT, EMPTY_PATCH_SEED, EVOLUTION_PRESET_IDS, GOVERNANCE_PRESET_ID, MAINTAINER_PRESET_ID, 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-BpVDuDnA.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";
|
|
@@ -9,10 +9,10 @@ import { fileURLToPath } from "node:url";
|
|
|
9
9
|
* Every `DSH_EVOLUTION_*` value the PLUGIN code reads goes through this module
|
|
10
10
|
* so the trim/whitelist patterns (v10 P2-12/13) live in exactly one place and
|
|
11
11
|
* the generated env reference can point at one behavior. Configuration-layer
|
|
12
|
-
* reads inside patch YAML `!!js` expressions
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
12
|
+
* reads inside patch YAML `!!js` expressions stay in the profile config
|
|
13
|
+
* evaluation — they are NOT migrated (they are resolved at cordis config time,
|
|
14
|
+
* not plugin time) but are documented in the README env table. `EVOLUTION_SCOPE`
|
|
15
|
+
* is read by the source installers only
|
|
16
16
|
* (`packages/scripts/install-layered.mjs`, `packages/test-support/row-contract.ts`),
|
|
17
17
|
* never by plugin runtime code.
|
|
18
18
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as errorText } from "./errors-BxzLTVbS.js";
|
|
2
|
-
import { t as presetsPort } from "./presets-C8vuCuNA.js";
|
|
3
2
|
import { dirname, join } from "node:path";
|
|
4
3
|
import { existsSync, readFileSync } from "node:fs";
|
|
5
4
|
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { presetsPort } from "@lmzhen/dsh-evolution-adapter/ports";
|
|
6
6
|
import * as yaml from "js-yaml";
|
|
7
7
|
//#region lib/types/package-identity.js
|
|
8
8
|
/**
|
package/lib/http-routes.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as isRecord } from "./guards-3f02mnf2.js";
|
|
2
|
-
import {
|
|
2
|
+
import { connectionPort } from "@lmzhen/dsh-evolution-adapter/ports";
|
|
3
3
|
//#region lib/types/http-routes.js
|
|
4
4
|
/**
|
|
5
5
|
* The Host data-plane contract + Fetch-shaped helpers every family route surface shares (W1/W6).
|
package/lib/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { S as reportTime, _ as probeMtime, a as isProcessAlive, b as probeText, c as transactIo, d as isAbsent, f as isMissingPath, g as probeList, h as probeAbsent, i as isCommittedWarning, l as writeDurableTmp, m as isUnknown, n as atomicWriteFiles, o as nodeEvolutionIo, p as isPresent, r as evolutionIoAdapter, s as renameWithRetry, t as TransactionNotInvokedError, u as declaredReportStamp, v as probePresent, x as probeUnknown, y as probeReason } from "./io-GxghO3Ip.js";
|
|
2
|
-
import { a as leaseFile, c as AuthorityBusyError, d as HomeAuthority, f as authorityHolder, i as LeaseStore, l as AuthorityOrderError, n as mutationLockFrom, o as HomeFence, p as leaseAsTreeLock, r as DEFAULT_LEASE_TTL_MS, s as HomeFenceError, t as MutationAuthority, u as AuthorityReentryError } from "./mutation-authority-
|
|
2
|
+
import { a as leaseFile, c as AuthorityBusyError, d as HomeAuthority, f as authorityHolder, i as LeaseStore, l as AuthorityOrderError, n as mutationLockFrom, o as HomeFence, p as leaseAsTreeLock, r as DEFAULT_LEASE_TTL_MS, s as HomeFenceError, t as MutationAuthority, u as AuthorityReentryError } from "./mutation-authority-Du-ON0NY.js";
|
|
3
3
|
import { a as isFileShapedPath, i as KEEP_LINE_RE, n as DEFAULT_CITATION_REF_BUDGET, o as resolveCitations, r as HOOK_LINE_RE, s as scanBodyHooks, t as CITATION_SUPPORT_DIRS } from "./citations-CZKTUGQF.js";
|
|
4
4
|
import { $ as SUPPORT_SPRAWL_FILES, A as DEFAULT_SUBSTANTIVE_MIN_AGENT_CHARS, B as MAX_SKILL_CONTENT_CHARS, C as DEFAULT_REVIEW_TIMEOUT_MS, D as DEFAULT_SKILL_VERSION_KEEP, E as DEFAULT_SKILL_REVIEW_TRIGGER, F as DEFAULT_USER_TOKENS, G as MEMORY_GUIDANCE_SECTION_ORDER, H as MAX_SKILL_NAME_LENGTH, I as ENTRY_DELIMITER, J as REVIEW_TEXT_PREVIEW_GRAPHEMES, K as MERGE_BODY_PREVIEW_BYTES, L as EVOLUTION_WRITE_TOOLS, M as DEFAULT_SUBSTANTIVE_MIN_USER_CHARS, N as DEFAULT_THREAT_MAX_SCAN_CHARS, O as DEFAULT_SOFT_BODY_TOKENS, P as DEFAULT_USER_CHAR_LIMIT, Q as SUPPORT_DIRS, R as FORBIDDEN_CONTROL_KEYS, S as DEFAULT_REVIEW_SKILL_INTERVAL, T as DEFAULT_SKILL_REVIEW_COMPLETION_MIN_TOOL_CALLS, U as MAX_TIMER_DELAY_MS, V as MAX_SKILL_FILE_BYTES, W as MEMORY_ENTRY_PREVIEW_GRAPHEMES, X as SKILL_ACTION_REQUIRED_FIELDS, Y as SKILLS_GUIDANCE_SECTION_ORDER, Z as SKILL_NAME_RE, _ as DEFAULT_MEMORY_CHAR_LIMIT, a as DEFAULT_SUPPORT_FILE_CHAR_POLICY, b as DEFAULT_PROBE_TIMEOUT_MS, c as AUTHORING_DESCRIPTION_BAR, d as DEFAULT_ARCHIVE_AFTER_DAYS, et as TEXT_DIFF_MAX_GRAPHEMES, f as DEFAULT_CONSOLIDATION_FAILURES, g as DEFAULT_CURATOR_REVIEW_MAX_TOKENS, h as DEFAULT_CURATOR_MODEL, i as DEFAULT_SKILL_LIMITS, j as DEFAULT_SUBSTANTIVE_MIN_TOOL_CALLS, k as DEFAULT_STALE_AFTER_DAYS, l as AUTHORING_SPLIT_LINE_CHARS, m as DEFAULT_CURATOR_INTERVAL_HOURS, n as DEFAULT_CITATION_POLICY, nt as VERSION_BODY_PREVIEW_GRAPHEMES, o as POLICY_STAGE_DEFAULTS, p as DEFAULT_CURATOR_BOOT_GRACE_SECONDS, q as PROTECTED_BUILTIN_SKILLS, r as DEFAULT_REFERENCE_REWRITE_POLICY, s as policyStageLimits, t as DEFAULT_ARCHIVE_RETENTION_POLICY, tt as UPSTREAM_LIMIT_CHARS_PER_TOKEN, u as CONTENT_SPLIT_HINT, v as DEFAULT_MEMORY_TOKENS, w as DEFAULT_SKILL_CONTENT_CHARS, x as DEFAULT_REVIEW_MEMORY_INTERVAL, y as DEFAULT_MIN_IDLE_HOURS, z as MAX_DESCRIPTION_LENGTH } from "./limits-CO4JGSJL.js";
|
|
5
|
-
import { _ as scopedPackageName, d as RESTRICTED_TOOLS_ROW_ID, f as RESTRICTOR_MODULE, g as scopeOfNearestManifest, l as MAINTAINER_PRESET_ID, p as REVIEWER_PRESET_ID, s as EVOLUTION_PRESET_IDS, u as RESTRICTED_PRESET_DISPLAY } from "./ensure-
|
|
5
|
+
import { _ as scopedPackageName, d as RESTRICTED_TOOLS_ROW_ID, f as RESTRICTOR_MODULE, g as scopeOfNearestManifest, l as MAINTAINER_PRESET_ID, p as REVIEWER_PRESET_ID, s as EVOLUTION_PRESET_IDS, u as RESTRICTED_PRESET_DISPLAY } from "./ensure-BpVDuDnA.js";
|
|
6
6
|
import { A as retainEventArchives, C as appendEvolutionEvent, D as parseEvolutionEvents, E as listEventArchives, G as DEFAULT_WRITE_CONFIRM_MODE, H as isUnreadWrite, I as softBodyTokenBudget, K as DEFAULT_WRITE_CONFIRM_TIMEOUT_SECONDS, L as RULES, O as readEvolutionEvents, P as assessStructureHealth, S as EVENT_LOG_VERSION, T as evolutionEventPayloadIssue, _ as fuzzyPatch, a as isReviewChannelSession, b as EVENT_LOG_RETAIN_ARCHIVES, c as PATTERN_OVERLAP, d as scanContentThreats, f as scanMemoryThreats, g as FUZZY_MAX_WORK, h as FUZZY_MAX_PATTERN_CHARS, i as clearReviewChannel, j as DEFAULT_HEALTH_THRESHOLDS, k as readEvolutionTimeline, l as THREAT_EXEMPTION_HINT, m as makeSerialQueue, n as recordReviewRead, o as markReviewChannel, p as scanThreats, q as authorityFrom, r as withReviewContext, s as sweepReviewChannelSessions, t as currentReviewContext, u as evaluateThreat, v as trimPatternBoundaries, w as eventsFile, x as EVENT_LOG_ROTATE_AT, y as EVENT_ARCHIVE_PREFIX, z as lintSkill } from "./review-context-70XYS11J.js";
|
|
7
7
|
import { i as HOST_LOCALES, n as errorText, r as errorTextIn, t as EVOLUTION_ERRORS } from "./errors-BxzLTVbS.js";
|
|
8
8
|
import { A as dispatchKeyOf, C as PTC_DISPATCH_EVENT, D as assertDispatchPayload, E as ToolDispatchPayloadError, F as isSkillToolName, I as readDispatchSignal, L as skillReadNameOf, M as dispatchStepOf, N as foldToolDispatches, O as collectReadSkillNames, P as isSkillReadToolName, R as supportFileReadFromPath, S as NATIVE_RESULT_EVENT, T as ToolDispatchNormalizer, _ as isBookkeepingFrame, a as evolutionSignalsProjection, b as MODEL_SESSION_EVENT_TYPES, c as sessionLastEventTime, d as advanceReview, f as foldTurnEvent, g as evidenceKindIndex, h as observeEvent, i as evolutionReadsProjection, j as dispatchPathOf, k as collectReadSupportFiles, l as sessionReadNames, m as initialTurnFold, n as evolutionEvidenceProjection, o as isProjectableSession, p as foldTurnEvents, r as evolutionProjectionHistoryProjection, s as sessionEvidenceIndex, t as evolutionActivityProjection, u as sessionTurnSignals, v as DEFAULT_SUPPORT_READ_TOOL_NAMES, w as PTC_DISPATCH_START_EVENT, x as NATIVE_CALL_EVENT, y as DISPATCH_EVENT_TYPES, z as supportFileReadOf } from "./session-projection-CbIKvDfJ.js";
|
|
@@ -14,16 +14,16 @@ import { T as ownerCandidatesFromSummaries, _ as readProposalReport, a as SUMMAR
|
|
|
14
14
|
import { n as evolutionRoot, t as evolutionHome } from "./state-store-Jpa-iYIZ.js";
|
|
15
15
|
import "./skill-history-YX84wO20.js";
|
|
16
16
|
import { HOST_ROUTES, MAX_REQUEST_BODY_BYTES, hostSurface, json, methodNotAllowed, readJsonObject, registerHostRoutes } from "./http-routes.js";
|
|
17
|
-
import { w as allowRowCollisions } from "./composition-
|
|
17
|
+
import { w as allowRowCollisions } from "./composition-B_F4TYOD.js";
|
|
18
18
|
import { t as clampedNumber } from "./numeric-Dc53KQoe.js";
|
|
19
|
-
import { u as scopeOf, y as settingsPort } from "./platform-BA27gvSG.js";
|
|
20
|
-
import { n as toolsPort } from "./tools-BrUswg8v.js";
|
|
21
19
|
import { abortLink, createSubagentChannel as createSubagentKernel, createSubagentRun, probeChannelState, textOfValue, waitForSubagentEnd } from "./subagent/index.js";
|
|
22
20
|
import { basename, join } from "node:path";
|
|
21
|
+
import { scopeOf } from "@lmzhen/dsh-evolution-adapter/values";
|
|
23
22
|
import { readFileSync } from "node:fs";
|
|
24
23
|
import { createHash, randomUUID } from "node:crypto";
|
|
25
24
|
import { fileURLToPath } from "node:url";
|
|
26
25
|
import { parse } from "yaml";
|
|
26
|
+
import { settingsPort, toolsPort } from "@lmzhen/dsh-evolution-adapter/ports";
|
|
27
27
|
//#region lib/types/tree-write.js
|
|
28
28
|
/**
|
|
29
29
|
* G1/1.5 (S7-09): the TYPED critical section around a tree write.
|
|
@@ -3110,11 +3110,6 @@ const PLATFORM_SERVICE_PROBES = Object.freeze([
|
|
|
3110
3110
|
feature: "the family LLM runtime for auxiliary model calls",
|
|
3111
3111
|
side: "host"
|
|
3112
3112
|
},
|
|
3113
|
-
{
|
|
3114
|
-
service: "sessionQuery",
|
|
3115
|
-
feature: "the session corpus behind /evolution sessions",
|
|
3116
|
-
side: "host"
|
|
3117
|
-
},
|
|
3118
3113
|
{
|
|
3119
3114
|
service: "settings",
|
|
3120
3115
|
feature: "the settings user layer and the params view",
|
|
@@ -5420,9 +5415,8 @@ function liveBool(value, fallback = false) {
|
|
|
5420
5415
|
/**
|
|
5421
5416
|
* Tool names only a session that mounted the family's MODEL rows can see.
|
|
5422
5417
|
*
|
|
5423
|
-
* Both are family packages (`tool-skill-manage`, `tool-memory`)
|
|
5424
|
-
*
|
|
5425
|
-
* a family session. Two names, not one: a deployment may disable either row.
|
|
5418
|
+
* Both are family packages (`tool-skill-manage`, `tool-memory`); two names, not
|
|
5419
|
+
* one, because a deployment may disable either row.
|
|
5426
5420
|
*/
|
|
5427
5421
|
const FAMILY_SESSION_TOOL_NAMES = ["skill_manage", "memory"];
|
|
5428
5422
|
/**
|
|
@@ -5539,9 +5533,11 @@ const DIAGNOSTICS_RUNTIME_KEYS = [
|
|
|
5539
5533
|
const PLATFORM_LINE = {
|
|
5540
5534
|
version: "0.2.2-rc.5",
|
|
5541
5535
|
floor: "0.2.2-rc.5",
|
|
5536
|
+
cohort: ["0.2.2-rc.5"],
|
|
5537
|
+
contract: 1,
|
|
5542
5538
|
previousAnchor: "0.2.1-rc.2",
|
|
5543
|
-
peersRange: "
|
|
5544
|
-
enginesRange: "
|
|
5539
|
+
peersRange: "0.2.2-rc.5",
|
|
5540
|
+
enginesRange: "0.2.2-rc.5",
|
|
5545
5541
|
upstreamRef: "dsh-v0.2.2-rc.5"
|
|
5546
5542
|
};
|
|
5547
5543
|
//#endregion
|
|
@@ -2,7 +2,7 @@ import { a as isProcessAlive, c as transactIo } from "./io-GxghO3Ip.js";
|
|
|
2
2
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3
3
|
import { mkdir, readFile, rm } from "node:fs/promises";
|
|
4
4
|
import { dirname, join } from "node:path";
|
|
5
|
-
import { withFileLock } from "@
|
|
5
|
+
import { withFileLock } from "@lmzhen/dsh-evolution-adapter/values";
|
|
6
6
|
import { randomUUID } from "node:crypto";
|
|
7
7
|
//#region lib/types/authority.js
|
|
8
8
|
/**
|
package/lib/policy.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { L as EVOLUTION_WRITE_TOOLS, P as DEFAULT_USER_CHAR_LIMIT, R as FORBIDDEN_CONTROL_KEYS, _ as DEFAULT_MEMORY_CHAR_LIMIT, a as DEFAULT_SUPPORT_FILE_CHAR_POLICY, h as DEFAULT_CURATOR_MODEL, n as DEFAULT_CITATION_POLICY, o as POLICY_STAGE_DEFAULTS, q as PROTECTED_BUILTIN_SKILLS, r as DEFAULT_REFERENCE_REWRITE_POLICY, t as DEFAULT_ARCHIVE_RETENTION_POLICY, w as DEFAULT_SKILL_CONTENT_CHARS } from "./limits-CO4JGSJL.js";
|
|
2
2
|
import { t as asRecord } from "./guards-3f02mnf2.js";
|
|
3
3
|
import { t as clampedNumber } from "./numeric-Dc53KQoe.js";
|
|
4
|
-
import {
|
|
4
|
+
import { toolsPort } from "@lmzhen/dsh-evolution-adapter/ports";
|
|
5
5
|
import { Service } from "@deepseek-ai/cordis";
|
|
6
6
|
import z from "@deepseek-ai/schemastery";
|
|
7
7
|
//#region lib/types/policy.js
|
package/lib/restrictor.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { n as errorText } from "./errors-BxzLTVbS.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as toolsPort } from "./tools-BrUswg8v.js";
|
|
2
|
+
import { presetsPort, toolsPort } from "@lmzhen/dsh-evolution-adapter/ports";
|
|
4
3
|
//#region lib/types/restrictor.js
|
|
5
4
|
const name = "evolution-restrictor";
|
|
6
5
|
const inject = ["agentPresets"];
|
package/lib/result.js
CHANGED
|
@@ -1,33 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return {
|
|
4
|
-
ok: true,
|
|
5
|
-
value
|
|
6
|
-
};
|
|
7
|
-
}
|
|
8
|
-
function err(error) {
|
|
9
|
-
return {
|
|
10
|
-
ok: false,
|
|
11
|
-
error
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
function isOk(result) {
|
|
15
|
-
return result.ok;
|
|
16
|
-
}
|
|
17
|
-
function isErr(result) {
|
|
18
|
-
return !result.ok;
|
|
19
|
-
}
|
|
20
|
-
/** The value, or the supplied fallback when the result is an error. */
|
|
21
|
-
function unwrapOr(result, fallback) {
|
|
22
|
-
return result.ok ? result.value : fallback;
|
|
23
|
-
}
|
|
24
|
-
/** Coerce a caught value into the family error shape. */
|
|
25
|
-
function familyError(code, cause) {
|
|
26
|
-
return {
|
|
27
|
-
code,
|
|
28
|
-
message: cause instanceof Error ? cause.message : String(cause),
|
|
29
|
-
...cause === void 0 ? {} : { cause }
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
//#endregion
|
|
33
|
-
export { err, familyError, isErr, isOk, ok, unwrapOr };
|
|
1
|
+
export * from "@lmzhen/dsh-evolution-platform-contract/result";
|
|
2
|
+
export {};
|
package/lib/runtime/plugin.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { a as evolutionSignalsProjection, i as evolutionReadsProjection, n as evolutionEvidenceProjection, r as evolutionProjectionHistoryProjection, t as evolutionActivityProjection } from "../session-projection-CbIKvDfJ.js";
|
|
2
|
-
import { t as connectionPort } from "../connection-DAJy7Xjm.js";
|
|
3
|
-
import { C as workingDirectoryPort, D as profileContextPort, E as pluginManagerPort, O as commandsPort, S as skillsPort, T as pluginInventoryPort, _ as agentsPort, b as storageDomainPort, d as EvolutionLlmError, f as llmPort, g as subagentsPort, h as userQuestionsPort, m as projectionPort, p as modelRoute, v as systemPromptPort, w as configEditorPort, x as sessionQueryPort, y as settingsPort } from "../platform-BA27gvSG.js";
|
|
4
|
-
import { t as presetsPort } from "../presets-C8vuCuNA.js";
|
|
5
|
-
import { n as toolsPort } from "../tools-BrUswg8v.js";
|
|
6
2
|
import { join } from "node:path";
|
|
7
3
|
import { existsSync, readFileSync } from "node:fs";
|
|
4
|
+
import { EvolutionLlmError, modelRoute, profileContextPort } from "@lmzhen/dsh-evolution-adapter/ports";
|
|
8
5
|
import { Service } from "@deepseek-ai/cordis";
|
|
9
6
|
//#region lib/types/runtime/coherence.js
|
|
10
7
|
/**
|
|
@@ -159,56 +156,6 @@ var EvolutionLlm = class extends Service {
|
|
|
159
156
|
}
|
|
160
157
|
};
|
|
161
158
|
//#endregion
|
|
162
|
-
//#region lib/types/runtime/platform.js
|
|
163
|
-
/**
|
|
164
|
-
* The family's host capability service: one place that resolves the platform
|
|
165
|
-
* ports and reports which halves are available. Feature code reads ports from
|
|
166
|
-
* this service; the port modules remain the only @deepseek-ai/dsh-* importers.
|
|
167
|
-
*
|
|
168
|
-
* The table is resolved on every read. A missing optional service is not a
|
|
169
|
-
* permanent capability loss: it may mount after this service initializes, and
|
|
170
|
-
* the next read must see it.
|
|
171
|
-
*/
|
|
172
|
-
/** Domain service owning the host port table. */
|
|
173
|
-
var EvolutionPlatform = class extends Service {
|
|
174
|
-
static inject = [];
|
|
175
|
-
constructor(ctx) {
|
|
176
|
-
super(ctx, "evolutionPlatform");
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* Resolve the host ports now. Consumers read this one table; they never fall
|
|
180
|
-
* back to a direct platform import (the second resolution D7 removed).
|
|
181
|
-
* Deliberately uncached: `ctx.get` is the capability lifecycle.
|
|
182
|
-
*/
|
|
183
|
-
get ports() {
|
|
184
|
-
return {
|
|
185
|
-
agents: agentsPort(this.ctx),
|
|
186
|
-
connection: connectionPort(this.ctx),
|
|
187
|
-
settings: settingsPort(this.ctx),
|
|
188
|
-
storageDomain: storageDomainPort(this.ctx),
|
|
189
|
-
workingDirectory: workingDirectoryPort(this.ctx),
|
|
190
|
-
pluginManager: pluginManagerPort(this.ctx),
|
|
191
|
-
pluginInventory: pluginInventoryPort(this.ctx),
|
|
192
|
-
configEditor: configEditorPort(this.ctx),
|
|
193
|
-
profileContext: profileContextPort(this.ctx),
|
|
194
|
-
skills: skillsPort(this.ctx),
|
|
195
|
-
sessionQuery: sessionQueryPort(this.ctx),
|
|
196
|
-
commands: commandsPort(this.ctx),
|
|
197
|
-
systemPrompt: systemPromptPort(this.ctx),
|
|
198
|
-
subagents: subagentsPort(this.ctx),
|
|
199
|
-
userQuestions: userQuestionsPort(this.ctx),
|
|
200
|
-
projections: projectionPort(this.ctx),
|
|
201
|
-
llm: llmPort(this.ctx),
|
|
202
|
-
tools: toolsPort(this.ctx),
|
|
203
|
-
presets: presetsPort(this.ctx)
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
/** Whether an exact live root agent is available for this id. */
|
|
207
|
-
isRootAgent(agent) {
|
|
208
|
-
return this.ports.agents?.isRoot(agent) === true;
|
|
209
|
-
}
|
|
210
|
-
};
|
|
211
|
-
//#endregion
|
|
212
159
|
//#region lib/types/runtime/projections.js
|
|
213
160
|
/**
|
|
214
161
|
* The family's projection runtime: register the five host-only units and expose
|
|
@@ -318,7 +265,6 @@ var EvolutionProjections = class extends Service {
|
|
|
318
265
|
const name = "evolution-core-runtime";
|
|
319
266
|
/** @param ctx - the composition context that owns the runtime services. */
|
|
320
267
|
async function apply(ctx) {
|
|
321
|
-
await ctx.plugin(EvolutionPlatform);
|
|
322
268
|
await ctx.plugin(EvolutionProjections);
|
|
323
269
|
await ctx.plugin(EvolutionLlm);
|
|
324
270
|
warnIfFamilyMixed(ctx);
|
package/lib/skills.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as probeMtime, b as probeText, c as transactIo, d as isAbsent, g as probeList, h as probeAbsent, i as isCommittedWarning, m as isUnknown, o as nodeEvolutionIo, p as isPresent, t as TransactionNotInvokedError, v as probePresent, x as probeUnknown, y as probeReason } from "./io-GxghO3Ip.js";
|
|
2
|
-
import { n as mutationLockFrom } from "./mutation-authority-
|
|
2
|
+
import { n as mutationLockFrom } from "./mutation-authority-Du-ON0NY.js";
|
|
3
3
|
import { o as resolveCitations } from "./citations-CZKTUGQF.js";
|
|
4
4
|
import { Q as SUPPORT_DIRS, Z as SKILL_NAME_RE, a as DEFAULT_SUPPORT_FILE_CHAR_POLICY, i as DEFAULT_SKILL_LIMITS, n as DEFAULT_CITATION_POLICY, o as POLICY_STAGE_DEFAULTS, q as PROTECTED_BUILTIN_SKILLS, r as DEFAULT_REFERENCE_REWRITE_POLICY, s as policyStageLimits, t as DEFAULT_ARCHIVE_RETENTION_POLICY, u as CONTENT_SPLIT_HINT } from "./limits-CO4JGSJL.js";
|
|
5
5
|
import { B as READ_REQUIRED_ACTIONS, C as appendEvolutionEvent, F as lintBody, H as isUnreadWrite, I as softBodyTokenBudget, L as RULES, M as HEALTH_STAMP_RE, N as MIN_STAMP_BODY_CHARS, P as assessStructureHealth, R as diffFindings, U as sessionReadSkillNames, V as filterUnreadSkillOps, W as sessionReadSupportFiles, _ as fuzzyPatch, a as isReviewChannelSession, d as scanContentThreats, j as DEFAULT_HEALTH_THRESHOLDS, m as makeSerialQueue, q as authorityFrom, t as currentReviewContext, v as trimPatternBoundaries, w as eventsFile, z as lintSkill } from "./review-context-70XYS11J.js";
|
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-BpVDuDnA.js";
|
|
2
2
|
//#region lib/types/subagent/readiness.js
|
|
3
3
|
/** Pure derivation (no side effects): the doctor reads this, the channel re-probes on every run. */
|
|
4
4
|
function probeChannelState(ctx, kind) {
|
package/lib/types/authority.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { withFileLock as platformFileLock } from '@
|
|
1
|
+
import { withFileLock as platformFileLock } from '@lmzhen/dsh-evolution-adapter/values';
|
|
2
2
|
/** The lock handle a serialized body receives; `release` is a no-op when a scope owns it. */
|
|
3
3
|
export interface TreeLock {
|
|
4
4
|
readonly token: string;
|
package/lib/types/authority.js
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
20
20
|
import { mkdir, readFile, rm } from 'node:fs/promises';
|
|
21
21
|
import { dirname, join } from 'node:path';
|
|
22
|
-
import { withFileLock as platformFileLock } from '@
|
|
22
|
+
import { withFileLock as platformFileLock } from '@lmzhen/dsh-evolution-adapter/values';
|
|
23
23
|
import { isProcessAlive } from "./io.js";
|
|
24
24
|
/** Who holds the home lock right now, for doctor rows; `undefined` means free or unreadable. */
|
|
25
25
|
export async function authorityHolder(home) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { presetsPort } from
|
|
1
|
+
import { presetsPort } from '@lmzhen/dsh-evolution-adapter/ports';
|
|
2
2
|
import { normalizeAllow } from "./preset-ids.js";
|
|
3
3
|
import { composeRestrictedPresetDefinition, } from "./restricted-preset.js";
|
|
4
4
|
const SLOTS = new WeakMap();
|
package/lib/types/env.d.ts
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* Every `DSH_EVOLUTION_*` value the PLUGIN code reads goes through this module
|
|
5
5
|
* so the trim/whitelist patterns (v10 P2-12/13) live in exactly one place and
|
|
6
6
|
* the generated env reference can point at one behavior. Configuration-layer
|
|
7
|
-
* reads inside patch YAML `!!js` expressions
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* reads inside patch YAML `!!js` expressions stay in the profile config
|
|
8
|
+
* evaluation — they are NOT migrated (they are resolved at cordis config time,
|
|
9
|
+
* not plugin time) but are documented in the README env table. `EVOLUTION_SCOPE`
|
|
10
|
+
* is read by the source installers only
|
|
11
11
|
* (`packages/scripts/install-layered.mjs`, `packages/test-support/row-contract.ts`),
|
|
12
12
|
* never by plugin runtime code.
|
|
13
13
|
*
|
package/lib/types/env.js
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* Every `DSH_EVOLUTION_*` value the PLUGIN code reads goes through this module
|
|
5
5
|
* so the trim/whitelist patterns (v10 P2-12/13) live in exactly one place and
|
|
6
6
|
* the generated env reference can point at one behavior. Configuration-layer
|
|
7
|
-
* reads inside patch YAML `!!js` expressions
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* reads inside patch YAML `!!js` expressions stay in the profile config
|
|
8
|
+
* evaluation — they are NOT migrated (they are resolved at cordis config time,
|
|
9
|
+
* not plugin time) but are documented in the README env table. `EVOLUTION_SCOPE`
|
|
10
|
+
* is read by the source installers only
|
|
11
11
|
* (`packages/scripts/install-layered.mjs`, `packages/test-support/row-contract.ts`),
|
|
12
12
|
* never by plugin runtime code.
|
|
13
13
|
*
|
package/lib/types/http-routes.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* @module @lmzhen/dsh-evolution-core/http-routes
|
|
12
12
|
*/
|
|
13
13
|
import { isRecord } from "./guards.js";
|
|
14
|
-
import { connectionPort } from
|
|
14
|
+
import { connectionPort } from '@lmzhen/dsh-evolution-adapter/ports';
|
|
15
15
|
/** Largest request body a family route accepts; a bigger one reads as "no body" (400 from the handler). */
|
|
16
16
|
export const MAX_REQUEST_BODY_BYTES = 64 * 1024;
|
|
17
17
|
/**
|
package/lib/types/opt-in.d.ts
CHANGED
|
@@ -41,9 +41,8 @@ import type { Context } from '@deepseek-ai/cordis';
|
|
|
41
41
|
/**
|
|
42
42
|
* Tool names only a session that mounted the family's MODEL rows can see.
|
|
43
43
|
*
|
|
44
|
-
* Both are family packages (`tool-skill-manage`, `tool-memory`)
|
|
45
|
-
*
|
|
46
|
-
* a family session. Two names, not one: a deployment may disable either row.
|
|
44
|
+
* Both are family packages (`tool-skill-manage`, `tool-memory`); two names, not
|
|
45
|
+
* one, because a deployment may disable either row.
|
|
47
46
|
*/
|
|
48
47
|
export declare const FAMILY_SESSION_TOOL_NAMES: readonly string[];
|
|
49
48
|
/** What the session-scoped gate has seen in this process. */
|
package/lib/types/opt-in.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { toolsPort } from
|
|
2
|
-
import { scopeOf } from
|
|
1
|
+
import { toolsPort } from '@lmzhen/dsh-evolution-adapter/ports';
|
|
2
|
+
import { scopeOf } from '@lmzhen/dsh-evolution-adapter/values';
|
|
3
3
|
/**
|
|
4
4
|
* Tool names only a session that mounted the family's MODEL rows can see.
|
|
5
5
|
*
|
|
6
|
-
* Both are family packages (`tool-skill-manage`, `tool-memory`)
|
|
7
|
-
*
|
|
8
|
-
* a family session. Two names, not one: a deployment may disable either row.
|
|
6
|
+
* Both are family packages (`tool-skill-manage`, `tool-memory`); two names, not
|
|
7
|
+
* one, because a deployment may disable either row.
|
|
9
8
|
*/
|
|
10
9
|
export const FAMILY_SESSION_TOOL_NAMES = ['skill_manage', 'memory'];
|
|
11
10
|
/**
|
package/lib/types/params.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Writing is canonical-only (a deprecated name is not a live row field in 0.48).
|
|
13
13
|
* @module
|
|
14
14
|
*/
|
|
15
|
-
import { settingsPort } from
|
|
15
|
+
import { settingsPort } from '@lmzhen/dsh-evolution-adapter/ports';
|
|
16
16
|
/** Deprecated alias (plugin-row name) -> canonical id (policy/snapshot name).
|
|
17
17
|
* Retained for the one-time legacy-document migration and the doctor's old-key report;
|
|
18
18
|
* live readers use the canonical id only. */
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
export declare const PLATFORM_LINE: {
|
|
3
3
|
readonly version: "0.2.2-rc.5";
|
|
4
4
|
readonly floor: "0.2.2-rc.5";
|
|
5
|
+
readonly cohort: readonly ["0.2.2-rc.5"];
|
|
6
|
+
readonly contract: 1;
|
|
5
7
|
readonly previousAnchor: "0.2.1-rc.2";
|
|
6
|
-
readonly peersRange: "
|
|
7
|
-
readonly enginesRange: "
|
|
8
|
+
readonly peersRange: "0.2.2-rc.5";
|
|
9
|
+
readonly enginesRange: "0.2.2-rc.5";
|
|
8
10
|
readonly upstreamRef: "dsh-v0.2.2-rc.5";
|
|
9
11
|
};
|
|
10
12
|
//# sourceMappingURL=platform-line.generated.d.ts.map
|
|
@@ -4,9 +4,13 @@
|
|
|
4
4
|
export const PLATFORM_LINE = {
|
|
5
5
|
version: '0.2.2-rc.5',
|
|
6
6
|
floor: '0.2.2-rc.5',
|
|
7
|
+
cohort: [
|
|
8
|
+
'0.2.2-rc.5',
|
|
9
|
+
],
|
|
10
|
+
contract: 1,
|
|
7
11
|
previousAnchor: '0.2.1-rc.2',
|
|
8
|
-
peersRange: '
|
|
9
|
-
enginesRange: '
|
|
12
|
+
peersRange: '0.2.2-rc.5',
|
|
13
|
+
enginesRange: '0.2.2-rc.5',
|
|
10
14
|
upstreamRef: 'dsh-v0.2.2-rc.5',
|
|
11
15
|
};
|
|
12
16
|
//# sourceMappingURL=platform-line.generated.js.map
|
|
@@ -40,7 +40,6 @@ export const PLATFORM_SERVICE_PROBES = Object.freeze([
|
|
|
40
40
|
{ service: 'sessionProjections', feature: 'the domain-owned session units', side: 'host' },
|
|
41
41
|
{ service: 'evolutionProjections', feature: 'the family-owned projection runtime behind the pure readers', side: 'host' },
|
|
42
42
|
{ service: 'evolutionLlm', feature: 'the family LLM runtime for auxiliary model calls', side: 'host' },
|
|
43
|
-
{ service: 'sessionQuery', feature: 'the session corpus behind /evolution sessions', side: 'host' },
|
|
44
43
|
{ service: 'settings', feature: 'the settings user layer and the params view', side: 'host' },
|
|
45
44
|
{ service: 'skillUsage', feature: 'usage counters feeding the curator and the review planner', side: 'host' },
|
|
46
45
|
{ service: 'skills', feature: 'the platform skill catalog the skill tool writes through', side: 'host' },
|
package/lib/types/policy.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { asRecord } from "./guards.js";
|
|
7
7
|
import { Service } from '@deepseek-ai/cordis';
|
|
8
|
-
import { toolsPort } from
|
|
8
|
+
import { toolsPort } from '@lmzhen/dsh-evolution-adapter/ports';
|
|
9
9
|
import z from '@deepseek-ai/schemastery';
|
|
10
10
|
import { DEFAULT_REVIEW_MEMORY_INTERVAL, DEFAULT_REVIEW_SKILL_INTERVAL, DEFAULT_SUBSTANTIVE_MIN_TOOL_CALLS, DEFAULT_SUBSTANTIVE_MIN_USER_CHARS, FORBIDDEN_CONTROL_KEYS, PROTECTED_BUILTIN_SKILLS, DEFAULT_SUBSTANTIVE_MIN_AGENT_CHARS, DEFAULT_CURATOR_INTERVAL_HOURS, DEFAULT_STALE_AFTER_DAYS, EVOLUTION_WRITE_TOOLS, DEFAULT_ARCHIVE_AFTER_DAYS, DEFAULT_MEMORY_CHAR_LIMIT, DEFAULT_USER_CHAR_LIMIT, DEFAULT_SKILL_CONTENT_CHARS, DEFAULT_CURATOR_MODEL, } from "./constants.js";
|
|
11
11
|
import { DEFAULT_CITATION_POLICY, DEFAULT_REFERENCE_REWRITE_POLICY, DEFAULT_ARCHIVE_RETENTION_POLICY, DEFAULT_SUPPORT_FILE_CHAR_POLICY, POLICY_STAGE_DEFAULTS, } from "./limits.js";
|
package/lib/types/restrictor.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { presetsPort } from
|
|
2
|
-
import { toolsPort } from
|
|
1
|
+
import { presetsPort } from '@lmzhen/dsh-evolution-adapter/ports';
|
|
2
|
+
import { toolsPort } from '@lmzhen/dsh-evolution-adapter/ports';
|
|
3
3
|
import { errorText } from "./errors.js";
|
|
4
4
|
export const name = 'evolution-restrictor';
|
|
5
5
|
export const inject = ['agentPresets'];
|
package/lib/types/result.d.ts
CHANGED
|
@@ -1,35 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Compatibility re-export of the family Result vocabulary.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* is the typed seam for code that wants an explicit success/failure value
|
|
6
|
-
* without throwing through a domain boundary.
|
|
4
|
+
* @module @lmzhen/dsh-evolution-core/result
|
|
7
5
|
*/
|
|
8
|
-
export
|
|
9
|
-
export interface FamilyError {
|
|
10
|
-
readonly code: FamilyErrorCode;
|
|
11
|
-
readonly message: string;
|
|
12
|
-
readonly cause?: unknown;
|
|
13
|
-
}
|
|
14
|
-
export type Result<T, E = FamilyError> = {
|
|
15
|
-
readonly ok: true;
|
|
16
|
-
readonly value: T;
|
|
17
|
-
} | {
|
|
18
|
-
readonly ok: false;
|
|
19
|
-
readonly error: E;
|
|
20
|
-
};
|
|
21
|
-
export declare function ok<T>(value: T): Result<T, never>;
|
|
22
|
-
export declare function err<E>(error: E): Result<never, E>;
|
|
23
|
-
export declare function isOk<T, E>(result: Result<T, E>): result is {
|
|
24
|
-
readonly ok: true;
|
|
25
|
-
readonly value: T;
|
|
26
|
-
};
|
|
27
|
-
export declare function isErr<T, E>(result: Result<T, E>): result is {
|
|
28
|
-
readonly ok: false;
|
|
29
|
-
readonly error: E;
|
|
30
|
-
};
|
|
31
|
-
/** The value, or the supplied fallback when the result is an error. */
|
|
32
|
-
export declare function unwrapOr<T, E>(result: Result<T, E>, fallback: T): T;
|
|
33
|
-
/** Coerce a caught value into the family error shape. */
|
|
34
|
-
export declare function familyError(code: FamilyErrorCode, cause: unknown): FamilyError;
|
|
6
|
+
export * from '@lmzhen/dsh-evolution-platform-contract/result';
|
|
35
7
|
//# sourceMappingURL=result.d.ts.map
|
package/lib/types/result.js
CHANGED
|
@@ -1,25 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export function isOk(result) {
|
|
8
|
-
return result.ok;
|
|
9
|
-
}
|
|
10
|
-
export function isErr(result) {
|
|
11
|
-
return !result.ok;
|
|
12
|
-
}
|
|
13
|
-
/** The value, or the supplied fallback when the result is an error. */
|
|
14
|
-
export function unwrapOr(result, fallback) {
|
|
15
|
-
return result.ok ? result.value : fallback;
|
|
16
|
-
}
|
|
17
|
-
/** Coerce a caught value into the family error shape. */
|
|
18
|
-
export function familyError(code, cause) {
|
|
19
|
-
return {
|
|
20
|
-
code,
|
|
21
|
-
message: cause instanceof Error ? cause.message : String(cause),
|
|
22
|
-
...(cause === undefined ? {} : { cause }),
|
|
23
|
-
};
|
|
24
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Compatibility re-export of the family Result vocabulary.
|
|
3
|
+
*
|
|
4
|
+
* @module @lmzhen/dsh-evolution-core/result
|
|
5
|
+
*/
|
|
6
|
+
export * from '@lmzhen/dsh-evolution-platform-contract/result';
|
|
25
7
|
//# sourceMappingURL=result.js.map
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import { existsSync, readFileSync } from 'node:fs';
|
|
15
15
|
import { join } from 'node:path';
|
|
16
|
-
import { profileContextPort } from
|
|
16
|
+
import { profileContextPort } from '@lmzhen/dsh-evolution-adapter/ports';
|
|
17
17
|
function packageTail(name) {
|
|
18
18
|
return name.slice(name.lastIndexOf('/') + 1);
|
|
19
19
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { Service } from '@deepseek-ai/cordis';
|
|
6
6
|
import type { Context } from '@deepseek-ai/cordis';
|
|
7
|
-
import {
|
|
7
|
+
import type { EvolutionLlmRequest, ModelRoute, StreamChunk } from '@lmzhen/dsh-evolution-platform-contract';
|
|
8
8
|
export interface EvolutionLlmInput {
|
|
9
9
|
readonly purpose: EvolutionLlmRequest['purpose'];
|
|
10
10
|
readonly messages: EvolutionLlmRequest['messages'];
|
package/lib/types/runtime/llm.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* model calls. Feature-specific retries and parsing stay in their features.
|
|
4
4
|
*/
|
|
5
5
|
import { Service } from '@deepseek-ai/cordis';
|
|
6
|
-
import { EvolutionLlmError, modelRoute } from
|
|
6
|
+
import { EvolutionLlmError, modelRoute } from '@lmzhen/dsh-evolution-adapter/ports';
|
|
7
7
|
/** Domain service for every auxiliary LLM request in the family. */
|
|
8
8
|
export class EvolutionLlm extends Service {
|
|
9
9
|
static inject = [];
|