@lmzhen/dsh-evolution-core 0.26.26 → 0.27.1
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 +16 -1
- package/lib/composition/index.js +3 -0
- package/lib/composition-D8Y3-ROd.js +604 -0
- package/lib/ensure-MEYMj9jn.js +222 -0
- package/lib/errors-Br2-uUSK.js +57 -0
- package/lib/http-routes-BP-S3KV-.js +149 -0
- package/lib/http-routes.js +2 -0
- package/lib/index.js +66 -850
- package/lib/restrictor.js +37 -0
- package/lib/subagent/index.js +186 -0
- package/lib/types/citations.js +192 -0
- package/lib/types/{preset-composition.d.ts → composition/composer.d.ts} +1 -1
- package/lib/types/composition/composer.js +681 -0
- package/lib/types/composition/ensure.d.ts +10 -0
- package/lib/types/composition/ensure.js +95 -0
- package/lib/types/composition/index.d.ts +5 -0
- package/lib/types/composition/index.js +7 -0
- package/lib/types/composition/preset-ids.d.ts +17 -0
- package/lib/types/composition/preset-ids.js +21 -0
- package/lib/types/composition/restricted-preset.d.ts +36 -0
- package/lib/types/composition/restricted-preset.js +42 -0
- package/lib/types/constants.js +223 -0
- package/lib/types/cost.js +67 -0
- package/lib/types/curator.js +346 -0
- package/lib/types/diagnostics.d.ts +26 -0
- package/lib/types/diagnostics.js +23 -0
- package/lib/types/document-body.js +91 -0
- package/lib/types/drift-signals.js +319 -0
- package/lib/types/env.js +25 -0
- package/lib/types/errors.d.ts +4 -1
- package/lib/types/errors.js +59 -0
- package/lib/types/events.js +16 -0
- package/lib/types/evidence.js +65 -0
- package/lib/types/evolution-events.js +479 -0
- package/lib/types/fold-untrusted.js +44 -0
- package/lib/types/frontmatter.js +623 -0
- package/lib/types/fuzzy-match.js +135 -0
- package/lib/types/gates.js +51 -0
- package/lib/types/guards.js +27 -0
- package/lib/types/health-baseline.js +63 -0
- package/lib/types/http-routes.d.ts +67 -35
- package/lib/types/http-routes.js +135 -0
- package/lib/types/index.d.ts +7 -2
- package/lib/types/index.js +101 -0
- package/lib/types/instance-scope.js +69 -0
- package/lib/types/io.js +675 -0
- package/lib/types/learn-prompt.js +42 -0
- package/lib/types/limits.js +63 -0
- package/lib/types/live.js +107 -0
- package/lib/types/long-runs.js +96 -0
- package/lib/types/memory-store.d.ts +0 -16
- package/lib/types/memory-store.js +606 -0
- package/lib/types/mutations.js +95 -0
- package/lib/types/namespace-migration.js +156 -0
- package/lib/types/numeric.js +47 -0
- package/lib/types/opt-in.js +101 -0
- package/lib/types/package-identity.js +47 -0
- package/lib/types/params.js +328 -0
- package/lib/types/payload.js +36 -0
- package/lib/types/platform-line.generated.d.ts +10 -0
- package/lib/types/platform-line.generated.js +12 -0
- package/lib/types/platform-services.d.ts +2 -2
- package/lib/types/platform-services.js +52 -0
- package/lib/types/probe.js +122 -0
- package/lib/types/prompts.js +409 -0
- package/lib/types/quality.js +308 -0
- package/lib/types/reachability.js +122 -0
- package/lib/types/redact.js +257 -0
- package/lib/types/reference-rewrite.js +144 -0
- package/lib/types/reports.js +110 -0
- package/lib/types/restrictor.d.ts +11 -0
- package/lib/types/restrictor.js +48 -0
- package/lib/types/review-channel.js +59 -0
- package/lib/types/run-registry.js +345 -0
- package/lib/types/scope.js +7 -0
- package/lib/types/serial.js +17 -0
- package/lib/types/session-fold.d.ts +15 -0
- package/lib/types/session-fold.js +28 -0
- package/lib/types/session-projection.js +295 -0
- package/lib/types/signals.js +209 -0
- package/lib/types/skill-discovery.js +66 -0
- package/lib/types/skill-health.js +134 -0
- package/lib/types/skill-history.js +745 -0
- package/lib/types/skill-lint.js +112 -0
- package/lib/types/skill-reads.js +67 -0
- package/lib/types/skill-row-cells.js +123 -0
- package/lib/types/skill-store.js +3528 -0
- package/lib/types/state-store.js +60 -0
- package/lib/types/store-ledger.js +117 -0
- package/lib/types/subagent/channel.d.ts +4 -0
- package/lib/types/subagent/channel.js +131 -0
- package/lib/types/subagent/index.d.ts +4 -0
- package/lib/types/subagent/index.js +5 -0
- package/lib/types/subagent/readiness.d.ts +6 -0
- package/lib/types/subagent/readiness.js +35 -0
- package/lib/types/subagent/types.d.ts +58 -0
- package/lib/types/subagent/types.js +2 -0
- package/lib/types/threats.js +338 -0
- package/lib/types/tool-dispatch.d.ts +5 -0
- package/lib/types/tool-dispatch.js +535 -0
- package/lib/types/tree-write.js +40 -0
- package/lib/types/unit-members.js +121 -0
- package/lib/types/usage.js +474 -0
- package/lib/types/write-authority.js +23 -0
- package/lib/types/write-gates.js +344 -0
- package/lib/types/write-inventory.js +158 -0
- package/package.json +39 -11
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Open-ended `/evolution learn` prompt builder.
|
|
3
|
+
*
|
|
4
|
+
* `learn` is open-ended: the user can name anything they can describe — a
|
|
5
|
+
* directory of code, an API doc URL, a workflow they just walked the agent
|
|
6
|
+
* through, or pasted notes. The prompt instructs the live agent to gather the
|
|
7
|
+
* named sources with its existing tools, then author a single SKILL.md via
|
|
8
|
+
* `skill_manage` following `DSH_AUTHORING_STANDARDS`. There is no separate
|
|
9
|
+
* distillation engine and no model-tool footprint.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Build the agent prompt for an open-ended `/evolution learn` request.
|
|
13
|
+
*
|
|
14
|
+
* @param userRequest free-text the user gave after `/evolution learn`; an
|
|
15
|
+
* empty string falls back to "the workflow we just went through".
|
|
16
|
+
* @returns a complete instruction the agent runs as a normal turn.
|
|
17
|
+
*/
|
|
18
|
+
export function buildLearnPrompt(userRequest) {
|
|
19
|
+
const request = userRequest.trim();
|
|
20
|
+
const resolved = request || 'the workflow we just went through in this conversation — review the steps taken and distill them into a reusable skill';
|
|
21
|
+
return [
|
|
22
|
+
'[/learn] The user wants you to learn a reusable skill from the request below, and save it.',
|
|
23
|
+
'',
|
|
24
|
+
'THE REQUEST:',
|
|
25
|
+
resolved,
|
|
26
|
+
'',
|
|
27
|
+
'The request is open-ended and may mix two kinds of content, in any order: SOURCES to gather (directories, file paths, URLs, "what we just did", pasted notes) AND REQUIREMENTS that shape the skill (what to focus on, what to leave out, scope, naming, the angle to take). Treat EVERY part of the request as load-bearing. In particular, prose that comes after a path or link is NOT incidental — it is the user telling you what they want from that source. A request like `<url> focus on the auth flow, skip the deprecated endpoints` means: gather the URL AND honor "focus on auth, skip deprecated" as authoring requirements. Never fetch the first source and ignore the rest.',
|
|
28
|
+
'',
|
|
29
|
+
'Do this:',
|
|
30
|
+
'1. Gather every source the user named, using the tools you already have — reads and searches for local files or directories, web access for URLs, this conversation history if they referred to something you just did, and the text they pasted as-is. If the request is ambiguous about scope, make a reasonable choice and note it; do not stall.',
|
|
31
|
+
'2. Author ONE SKILL.md, applying every requirement, focus, and constraint in the request — these govern what the SKILL.md covers and emphasizes, not just which sources you read.',
|
|
32
|
+
"3. Save it with the `skill_manage` tool (action=\"create\"). Pick a sensible category. If the procedure needs a non-trivial script, add it under the skill's `scripts/` with `skill_manage` write_file and reference it by relative path.",
|
|
33
|
+
'',
|
|
34
|
+
// P2-25 (v39): the standards live in the `skill_manage` tool description,
|
|
35
|
+
// which is in context on every turn that can call it — embedding them here
|
|
36
|
+
// repeated 1840 chars in this one (measured on the constant).
|
|
37
|
+
'Apply the skill-authoring standards (frontmatter, prose, file layout) carried by the `skill_manage` tool description — that is the single copy; do not restate them here.',
|
|
38
|
+
'',
|
|
39
|
+
'When done, tell the user the skill name, its category, and a one-line summary of what it captured.',
|
|
40
|
+
].join('\n');
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=learn-prompt.js.map
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill content limits: the byte/char budgets every write path validates against.
|
|
3
|
+
*
|
|
4
|
+
* Split out of skill-store.ts (S2-1) so the frontmatter validators and the
|
|
5
|
+
* store share one declaration site. Re-exported by skill-store.ts: the package
|
|
6
|
+
* export surface is unchanged.
|
|
7
|
+
*/
|
|
8
|
+
import { DEFAULT_SKILL_VERSION_KEEP, MAX_DESCRIPTION_LENGTH, MAX_SKILL_CONTENT_CHARS, MAX_SKILL_FILE_BYTES, MAX_SKILL_NAME_LENGTH } from "./constants.js";
|
|
9
|
+
/** `verify` checks that every cited target exists and otherwise allows the move;
|
|
10
|
+
* `refuse` restores the pre-0.5 behaviour of refusing ANY citation-carrying
|
|
11
|
+
* section. Resolved at the call site, so every existing limits object keeps
|
|
12
|
+
* working (unknown policy never silently changes a write path). */
|
|
13
|
+
export const DEFAULT_CITATION_POLICY = 'verify';
|
|
14
|
+
/** Default: report the plan on refusal, never write (behaviour unchanged). */
|
|
15
|
+
export const DEFAULT_REFERENCE_REWRITE_POLICY = 'plan';
|
|
16
|
+
/** Default: report-only, because upstream's hard invariant is never to delete. */
|
|
17
|
+
export const DEFAULT_ARCHIVE_RETENTION_POLICY = 'report';
|
|
18
|
+
/** Default: report, so the cap cannot brick an existing oversize file on upgrade
|
|
19
|
+
* (the live library carries a 189k-character release log today). */
|
|
20
|
+
export const DEFAULT_SUPPORT_FILE_CHAR_POLICY = 'report';
|
|
21
|
+
/** The four stage defaults in ONE object, so the policy schema's `z.default(...)`
|
|
22
|
+
* calls and the store's fallbacks cannot drift apart. */
|
|
23
|
+
export const POLICY_STAGE_DEFAULTS = Object.freeze({
|
|
24
|
+
citationPolicy: DEFAULT_CITATION_POLICY,
|
|
25
|
+
referenceRewrite: DEFAULT_REFERENCE_REWRITE_POLICY,
|
|
26
|
+
archiveRetention: DEFAULT_ARCHIVE_RETENTION_POLICY,
|
|
27
|
+
supportFileCharPolicy: DEFAULT_SUPPORT_FILE_CHAR_POLICY,
|
|
28
|
+
});
|
|
29
|
+
/**
|
|
30
|
+
* The ONE conversion from the deployment policy snapshot to library limits
|
|
31
|
+
* (design §16.7): every plugin that owns a writable SkillLibrary spreads this into
|
|
32
|
+
* its limits, so a stage selected in cordis.yml reaches every write path. A
|
|
33
|
+
* per-plugin copy would be the third home for the same threshold.
|
|
34
|
+
*
|
|
35
|
+
* Only PRESENT fields are copied: an absent policy field must fall through to the
|
|
36
|
+
* library default rather than pinning `undefined` onto an optional limit (which
|
|
37
|
+
* `exactOptionalPropertyTypes` forbids and which would defeat the `?? DEFAULT`
|
|
38
|
+
* resolution inside the store).
|
|
39
|
+
* @param snapshot - the evolutionPolicy snapshot, or undefined when unmounted.
|
|
40
|
+
* @returns the stage fields the snapshot actually carries.
|
|
41
|
+
*/
|
|
42
|
+
export function policyStageLimits(snapshot) {
|
|
43
|
+
if (snapshot === undefined)
|
|
44
|
+
return {};
|
|
45
|
+
const stages = {};
|
|
46
|
+
if (snapshot.citationPolicy !== undefined)
|
|
47
|
+
stages.citationPolicy = snapshot.citationPolicy;
|
|
48
|
+
if (snapshot.referenceRewrite !== undefined)
|
|
49
|
+
stages.referenceRewrite = snapshot.referenceRewrite;
|
|
50
|
+
if (snapshot.archiveRetention !== undefined)
|
|
51
|
+
stages.archiveRetention = snapshot.archiveRetention;
|
|
52
|
+
if (snapshot.supportFileCharPolicy !== undefined)
|
|
53
|
+
stages.supportFileCharPolicy = snapshot.supportFileCharPolicy;
|
|
54
|
+
return stages;
|
|
55
|
+
}
|
|
56
|
+
export const DEFAULT_SKILL_LIMITS = {
|
|
57
|
+
maxNameLength: MAX_SKILL_NAME_LENGTH,
|
|
58
|
+
maxDescriptionLength: MAX_DESCRIPTION_LENGTH,
|
|
59
|
+
maxSkillContentChars: MAX_SKILL_CONTENT_CHARS,
|
|
60
|
+
maxSkillFileBytes: MAX_SKILL_FILE_BYTES,
|
|
61
|
+
versionKeep: DEFAULT_SKILL_VERSION_KEEP,
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=limits.js.map
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The family's ONE live-config reader.
|
|
3
|
+
*
|
|
4
|
+
* A config field reaches a plugin in two shapes: the platform's schema parser turns a
|
|
5
|
+
* `.volatile()` declaration into a live reference (`{ get() }`, routed through cosmokit's
|
|
6
|
+
* `createVolatile`), while a hand-built or pre-parse config carries the plain value. Reading a
|
|
7
|
+
* live reference as if it were a value is SILENT (a boolean compare is simply never true, a
|
|
8
|
+
* number folds as NaN) — so the two shapes are unwrapped in exactly one place here, and every
|
|
9
|
+
* reader below goes through it.
|
|
10
|
+
*
|
|
11
|
+
* This module owns no policy: clamping semantics stay in `clampedNumber` (numeric.ts), and the
|
|
12
|
+
* once-per-key warning text/rhythm is the one `clampOnce` has always had (it moved here so the
|
|
13
|
+
* read happens in one place; callers import it from the package barrel, so the move is invisible).
|
|
14
|
+
*
|
|
15
|
+
* @module @lmzhen/dsh-evolution-core
|
|
16
|
+
*/
|
|
17
|
+
import { clampedNumber } from "./numeric.js";
|
|
18
|
+
/**
|
|
19
|
+
* Unwrap a live reference; return a plain value unchanged. The ONLY place that decides the shape.
|
|
20
|
+
*
|
|
21
|
+
* The discriminant is `typeof get === 'function'` rather than a bare `typeof value === 'object'`: a
|
|
22
|
+
* config field may legitimately carry an object (a policy record), and calling `.get()` on that
|
|
23
|
+
* used to throw where a plain read was meant.
|
|
24
|
+
*
|
|
25
|
+
* @param value - the field as supplied: live reference, plain value, or absent.
|
|
26
|
+
* @returns the plain value, or `undefined` when the reference/field is absent.
|
|
27
|
+
*/
|
|
28
|
+
export function unwrapLive(value) {
|
|
29
|
+
// Read as unknown: the discriminant is a RUNTIME shape check, so every narrowing below is real
|
|
30
|
+
// (a null test against the declared union would be a tautology the linter rejects).
|
|
31
|
+
const raw = value;
|
|
32
|
+
if (typeof raw !== 'object' || raw === null)
|
|
33
|
+
return raw === undefined ? undefined : raw;
|
|
34
|
+
const candidate = raw;
|
|
35
|
+
return typeof candidate.get === 'function' ? candidate.get.call(raw) : raw;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Read a numeric knob (live or plain) and clamp it, warning ONCE per key.
|
|
39
|
+
*
|
|
40
|
+
* @param value - the field as supplied: live reference, plain value, or absent.
|
|
41
|
+
* @param fallback - the package default an invalid value falls back to.
|
|
42
|
+
* @param opts - bounds plus the optional warning triple.
|
|
43
|
+
* @returns the value the engine may use.
|
|
44
|
+
*/
|
|
45
|
+
export function liveNumber(value, fallback, opts = {}) {
|
|
46
|
+
const current = unwrapLive(value);
|
|
47
|
+
const { min, max } = opts;
|
|
48
|
+
// Built conditionally, not `{ min, max }`: under exactOptionalPropertyTypes a present-but-undefined
|
|
49
|
+
// property is not the same as an absent one, and clampedNumber's bounds are optional.
|
|
50
|
+
const bounds = min === undefined
|
|
51
|
+
? (max === undefined ? undefined : { max })
|
|
52
|
+
: (max === undefined ? { min } : { min, max });
|
|
53
|
+
const result = clampedNumber(current, fallback, bounds);
|
|
54
|
+
const name = opts.name;
|
|
55
|
+
if (current !== undefined && result !== current && name !== undefined && opts.warn !== undefined) {
|
|
56
|
+
const warned = opts.warned ?? new Set();
|
|
57
|
+
if (!warned.has(name)) {
|
|
58
|
+
warned.add(name);
|
|
59
|
+
opts.warn(`${name} provided an invalid value; falling back to the default`);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return result;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Clamp one numeric knob and warn ONCE per key — the pre-0.22 signature, kept as a thin adapter so
|
|
66
|
+
* existing callers migrate one at a time instead of in one commit.
|
|
67
|
+
*
|
|
68
|
+
* @param warned - the keys this caller already warned about.
|
|
69
|
+
* @param warn - the warning sink (each package prefixes its own name).
|
|
70
|
+
* @param name - the config key, for the warning.
|
|
71
|
+
* @param value - the value as supplied, or its live reference.
|
|
72
|
+
* @param fallback - the package default a corrected value falls back to.
|
|
73
|
+
* @param min - the smallest value the engine can act on.
|
|
74
|
+
* @param max - the largest value the carrier can hold, when bounded.
|
|
75
|
+
* @returns the value the engine may use.
|
|
76
|
+
*/
|
|
77
|
+
export function clampOnce(warned, warn, name, value, fallback, min, max) {
|
|
78
|
+
return liveNumber(value, fallback, { min, ...(max === undefined ? {} : { max }), warned, warn, name });
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Read a boolean flag (live or plain). Absent ⇒ `fallback` (default `false`).
|
|
82
|
+
*
|
|
83
|
+
* The boolean counterpart of {@link liveNumber}: `value === true` is never true for a live
|
|
84
|
+
* reference, which is the silent failure this reader exists to prevent.
|
|
85
|
+
*/
|
|
86
|
+
export function liveBool(value, fallback = false) {
|
|
87
|
+
return unwrapLive(value) ?? fallback;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Read a string (live or plain). Blank/whitespace counts as unset — the same rule `evolutionRoot` uses
|
|
91
|
+
* for `DSH_HOME`.
|
|
92
|
+
*/
|
|
93
|
+
export function liveString(value, fallback) {
|
|
94
|
+
const current = unwrapLive(value)?.trim();
|
|
95
|
+
return current === undefined || current.length === 0 ? fallback : current;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Read an enumerated string (live or plain); a value outside `allowed` falls back.
|
|
99
|
+
*
|
|
100
|
+
* Used for the mode-like knobs (review mode, trigger, citation policy, write-confirm mode) where a
|
|
101
|
+
* bare `?? default` would accept a typo the schema never saw.
|
|
102
|
+
*/
|
|
103
|
+
export function liveEnum(value, allowed, fallback) {
|
|
104
|
+
const current = unwrapLive(value);
|
|
105
|
+
return current !== undefined && allowed.includes(current) ? current : fallback;
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=live.js.map
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 0.19.0 (S4): the family's long-run inventory — one table, one owner per entry.
|
|
3
|
+
*
|
|
4
|
+
* A "long run" is work whose duration is NOT bounded by the interaction that asked
|
|
5
|
+
* for it: a maintenance scan, a curator pass, a review pass. The measured fact this
|
|
6
|
+
* table exists to record is that a CLIENT can end a request long before the work is
|
|
7
|
+
* done (measured: the desktop shell ends a request at ~305 s while the same command
|
|
8
|
+
* finishes in 949.7 s on the web plane), so the lifetime of such work must come from
|
|
9
|
+
* its OWNER — never from the request.
|
|
10
|
+
*
|
|
11
|
+
* Two fields carry the judgments, and a spec pins both:
|
|
12
|
+
*
|
|
13
|
+
* - `lifetime`: `'plugin'` entries must name an owner and a result home (the work
|
|
14
|
+
* outlives the request and must be readable afterwards); `'request'` entries
|
|
15
|
+
* must say WHY their cost cannot reach the wall.
|
|
16
|
+
* - `measured`: only measured numbers, with their basis. An unmeasured bound is
|
|
17
|
+
* written as exactly that — this table is not a place to guess.
|
|
18
|
+
*
|
|
19
|
+
* The rendered table is pinned byte-for-byte into `packages/README.md` by
|
|
20
|
+
* `tests/long-runs.spec.ts` (the T-WD2 pattern the command registry already uses),
|
|
21
|
+
* so the published table cannot drift from this list.
|
|
22
|
+
* @module
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* The inventory. Order is the rendered order; a spec pins it into the README.
|
|
26
|
+
*/
|
|
27
|
+
export const LONG_RUNS = [
|
|
28
|
+
{
|
|
29
|
+
id: '/evolution maintain',
|
|
30
|
+
kind: 'command',
|
|
31
|
+
owner: 'evolution-commands',
|
|
32
|
+
lifetime: 'plugin',
|
|
33
|
+
measured: 'the same scan measured 949.7 s end to end on the web plane (no Electron); the desktop shell ends the REQUEST at ~305 s (four runs: 305.6/307.0/306.0/305.7 s)',
|
|
34
|
+
budget: 'maintainTimeoutMs (row config, default 600000) or --timeout <ms> for one run',
|
|
35
|
+
resultHome: '<evolutionHome>/reports/maintain-<runId>.{json,md}, indexed in <evolutionHome>/runs.json',
|
|
36
|
+
note: 'The ~305 s wall is a CLIENT lifetime, not a budget: the run keeps working and the result is read back with maintain status/report. Its cancellation is the run registry handle (maintain cancel <id>) or plugin dispose.',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: 'maintenance_probe',
|
|
40
|
+
kind: 'tool',
|
|
41
|
+
owner: 'evolution-maintenance',
|
|
42
|
+
lifetime: 'request',
|
|
43
|
+
measured: '188/220/225 ms on the deployed library (28 skills / 418 KB); ~5.5 ms per skill and linear (100 skills 0.4-0.6 s, 400 skills 1.9-2.5 s)',
|
|
44
|
+
budget: 'none, deliberately: reaching the ~305 s wall would take roughly 5e4 skills',
|
|
45
|
+
resultHome: 'the tool result (JSON detail), answered in-turn',
|
|
46
|
+
note: 'O(2N) tree reads (enrichment + snapshot), uncached by design. Reopen the budget question when the library nears ~1e4 skills, when the io provider stops being local, or when a model leg enters a tool execute.',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
id: 'skill_manage',
|
|
50
|
+
kind: 'tool',
|
|
51
|
+
owner: 'tool-skill-manage',
|
|
52
|
+
lifetime: 'request',
|
|
53
|
+
measured: 'not measured as a duration: single-file IO plus a library listing the cross-source gate already reads; the only unbounded wait is a HUMAN answer',
|
|
54
|
+
budget: 'its own gate deadline (skillWriteConfirm + pendingTtlMs) — a second budget here would compete with it',
|
|
55
|
+
resultHome: 'the tool result, plus the mutation audit records',
|
|
56
|
+
note: 'The human wait is the reason this entry exists: it is bounded by the write gate, which the tool owns.',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
id: 'memory',
|
|
60
|
+
kind: 'tool',
|
|
61
|
+
owner: 'tool-memory',
|
|
62
|
+
lifetime: 'request',
|
|
63
|
+
measured: 'single-file IO on the memory store',
|
|
64
|
+
budget: 'none needed',
|
|
65
|
+
resultHome: 'the tool result',
|
|
66
|
+
note: 'No tree walk, no model leg, no human wait.',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
id: 'curator pass',
|
|
70
|
+
kind: 'pass',
|
|
71
|
+
owner: 'evolution-curator',
|
|
72
|
+
lifetime: 'plugin',
|
|
73
|
+
measured: 'not measured end to end; the LLM nomination leg is bounded separately',
|
|
74
|
+
budget: 'curatorReviewTimeoutMs (E3 parameter) for the LLM leg',
|
|
75
|
+
resultHome: '<evolutionHome>/reports/curator-<runId>.{json,md}',
|
|
76
|
+
note: 'Runs from the plugin interval timer, and a failed or timed-out LLM leg is a distinguishable state in the run report (nominationsWarnings).',
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: 'review pass',
|
|
80
|
+
kind: 'pass',
|
|
81
|
+
owner: 'evolution-review',
|
|
82
|
+
lifetime: 'plugin',
|
|
83
|
+
measured: 'not measured end to end; the subagent leg carries its own deadline',
|
|
84
|
+
budget: 'reviewTimeoutMs (E2 parameter)',
|
|
85
|
+
resultHome: 'the review inbox plus evolution/plan-applied',
|
|
86
|
+
note: 'The write leg replays a staged plan through the registered runner; cancellation follows the plugin fiber.',
|
|
87
|
+
},
|
|
88
|
+
];
|
|
89
|
+
/**
|
|
90
|
+
* Render the inventory as the README table rows (no header).
|
|
91
|
+
* @returns one markdown row per entry, in inventory order.
|
|
92
|
+
*/
|
|
93
|
+
export function renderLongRunTable() {
|
|
94
|
+
return LONG_RUNS.map(entry => `| \`${entry.id}\` | ${entry.kind} | ${entry.owner} | ${entry.lifetime} | ${entry.measured} | ${entry.resultHome} |`).join('\n');
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=long-runs.js.map
|
|
@@ -23,22 +23,6 @@ export interface MemoryApplyResult {
|
|
|
23
23
|
limit: number;
|
|
24
24
|
}
|
|
25
25
|
export declare function memoryRoot(env?: NodeJS.ProcessEnv): string;
|
|
26
|
-
/**
|
|
27
|
-
* Neutralize the platform's `{{name}}` prompt-variable syntax in text that is
|
|
28
|
-
* about to be registered as a `systemPrompt.context` contribution.
|
|
29
|
-
*
|
|
30
|
-
* The platform interpolates every context/section text once per model step and
|
|
31
|
-
* THROWS on an unknown or malformed reference — so one stored memory entry
|
|
32
|
-
* containing `{{...}}` (a CI expression, a Jinja/Helm/Vue template, a doc
|
|
33
|
-
* placeholder) used to fail `assemble()` on EVERY later pre-step of every
|
|
34
|
-
* session under this DSH_HOME, while a registered name such as `{{cwd}}` was
|
|
35
|
-
* silently substituted into the "memory" the model reads. Only the INJECTED
|
|
36
|
-
* text is neutralized: stored entries keep their original bytes.
|
|
37
|
-
*
|
|
38
|
-
* @param text - rendered context text about to leave for the prompt surface.
|
|
39
|
-
* @returns the same text with every `{{` split so it cannot start a reference.
|
|
40
|
-
*/
|
|
41
|
-
export declare function neutralizePromptVariables(text: string): string;
|
|
42
26
|
export interface MemoryStoreOptions {
|
|
43
27
|
memoryCharLimit?: number;
|
|
44
28
|
userCharLimit?: number;
|