@lmzhen/dsh-evolution-core 0.1.0-rc.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.
@@ -0,0 +1,8 @@
1
+ //#region lib/types/invariant.js
2
+ const PACKAGE_NAME = "@deepseek-ai/dsh-evolution-core";
3
+ const name = "evolution-core-invariant";
4
+ const inject = ["invariants"];
5
+ const install = () => {};
6
+ const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
7
+ //#endregion
8
+ export { apply, inject, name };
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Deterministic skill curator: active → stale → archived transitions.
3
+ * Pure function; file moves are performed by SkillLibrary.
4
+ */
5
+ import type { UsageMap } from './usage.ts';
6
+ export interface CuratorConfig {
7
+ staleAfterDays: number;
8
+ archiveAfterDays: number;
9
+ /** Shorter stale threshold for quality-warned skills; archive threshold never changes. */
10
+ qualityWarnStaleAfterDays?: number;
11
+ /** Explicit skill names never considered for lifecycle transitions. */
12
+ excludeSkillNames?: ReadonlySet<string>;
13
+ /** When true, usage records without created_by='agent' also enter the lifecycle. */
14
+ manageUnmanaged?: boolean;
15
+ }
16
+ export interface CuratorTransition {
17
+ name: string;
18
+ from: 'active' | 'stale' | 'archived';
19
+ to: 'stale' | 'archived' | 'active';
20
+ reason: string;
21
+ }
22
+ export interface CuratorResult {
23
+ transitions: CuratorTransition[];
24
+ archive: string[];
25
+ reactivate: string[];
26
+ markStale: string[];
27
+ }
28
+ export declare const PROTECTED_BUILTIN_SKILLS: ReadonlySet<string>;
29
+ export interface CuratorArchivedSkill {
30
+ name: string;
31
+ path: string;
32
+ reason: string;
33
+ }
34
+ export interface CuratorFailedSkill {
35
+ name: string;
36
+ reason: string;
37
+ }
38
+ export interface CuratorRunReport {
39
+ runId: string;
40
+ startedAt: string;
41
+ finishedAt: string;
42
+ staleCandidates: string[];
43
+ llmNominations: string[];
44
+ archiveCandidates: string[];
45
+ archived: CuratorArchivedSkill[];
46
+ failed: CuratorFailedSkill[];
47
+ snapshotPath?: string;
48
+ }
49
+ export interface CuratorReportInput {
50
+ runId: string;
51
+ startedAt: string;
52
+ finishedAt: string;
53
+ staleCandidates: readonly string[];
54
+ llmNominations: readonly string[];
55
+ archiveCandidates: readonly string[];
56
+ archived: readonly CuratorArchivedSkill[];
57
+ failed: readonly CuratorFailedSkill[];
58
+ snapshotPath?: string;
59
+ }
60
+ export declare function buildCuratorRunReport(input: CuratorReportInput): CuratorRunReport;
61
+ export declare function computeLifecycleTransitions(usage: UsageMap, config: CuratorConfig, now?: Date): CuratorResult;
62
+ //# sourceMappingURL=curator.d.ts.map
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Durable session events emitted by the evolution family.
3
+ * These are non-surface events: they never enter model history, but make
4
+ * self-evolution activity replayable and observable by UI/projections.
5
+ */
6
+ export interface EvolutionReviewScheduledEvent {
7
+ kind: 'memory' | 'skill' | 'combined';
8
+ toolCalls: number;
9
+ userChars: number;
10
+ assistantChars: number;
11
+ }
12
+ export interface EvolutionPlanAppliedEvent {
13
+ planId: string;
14
+ /** Stable fingerprint of the policy snapshot that produced this plan. */
15
+ policyFingerprint?: string | undefined;
16
+ memoryApplied: number;
17
+ skillApplied: number;
18
+ rejectedOps: number;
19
+ evidenceQuotes?: number | undefined;
20
+ estimatedInputChars?: number | undefined;
21
+ }
22
+ export interface EvolutionSkillMutatedEvent {
23
+ action: string;
24
+ name: string;
25
+ filePath?: string;
26
+ archivedPath?: string;
27
+ }
28
+ declare module '@deepseek-ai/dsh-session/types' {
29
+ interface SessionEventMap {
30
+ 'evolution/review-scheduled': EvolutionReviewScheduledEvent;
31
+ 'evolution/plan-applied': EvolutionPlanAppliedEvent;
32
+ 'evolution/skill-mutated': EvolutionSkillMutatedEvent;
33
+ }
34
+ }
35
+ declare module '@deepseek-ai/cordis' {
36
+ interface Events {
37
+ 'evolution/skill-mutated'(event: EvolutionSkillMutatedEvent): void;
38
+ }
39
+ }
40
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Shared library for the dsh-evolution plugin family.
3
+ *
4
+ * Pure stores, prompts, signals, lifecycle logic, threat scanning, IO seam
5
+ * types, and session-event augmentations. This package owns no Cordis plugin
6
+ * entry of its own; consumers import named exports from the package root so
7
+ * published npm bundles never depend on source subpaths.
8
+ * @module @deepseek-ai/dsh-evolution-core
9
+ */
10
+ export * from './curator.ts';
11
+ export * from './events.ts';
12
+ export * from './io.ts';
13
+ export * from './memory-store.ts';
14
+ export * from './prompts.ts';
15
+ export * from './signals.ts';
16
+ export * from './skill-store.ts';
17
+ export * from './state-store.ts';
18
+ export * from './threats.ts';
19
+ export * from './usage.ts';
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,5 @@
1
+ import type { Context } from '@deepseek-ai/cordis';
2
+ export declare const name = "evolution-core-invariant";
3
+ export declare const inject: string[];
4
+ export declare const apply: (ctx: Context) => Promise<() => void>;
5
+ //# sourceMappingURL=invariant.d.ts.map
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Structural IO seam for the legacy facade stores.
3
+ *
4
+ * The facade accepts any object exposing this small async file-tree surface.
5
+ * Native DSH packages pass `ctx.evolutionIo.provider()`; standalone consumers
6
+ * (and the facade's own tests) can use `nodeEvolutionIo`.
7
+ */
8
+ export interface EvolutionIoLike {
9
+ readText(path: string): Promise<string | null>;
10
+ writeText(path: string, content: string): Promise<void>;
11
+ remove(path: string): Promise<void>;
12
+ list(path: string): Promise<string[]>;
13
+ exists(path: string): Promise<boolean>;
14
+ rename(path: string, destination: string): Promise<void>;
15
+ copy(path: string, destination: string): Promise<void>;
16
+ }
17
+ /** Lazy adapter over an IO provider registry, shared by every evolution consumer. */
18
+ export declare function evolutionIoAdapter(provider: () => EvolutionIoLike): EvolutionIoLike;
19
+ export declare function nodeEvolutionIo(): EvolutionIoLike;
20
+ /** Absolute path helper kept separate so stores stay platform-correct. */
21
+ export declare function childPath(parent: string, ...parts: string[]): string;
22
+ //# sourceMappingURL=io.d.ts.map
@@ -0,0 +1,60 @@
1
+ /**
2
+ * File-backed durable memory with Hermes-compatible semantics.
3
+ * Stores are MEMORY.md and USER.md under $DSH_HOME/memories (~/.dsh/memories).
4
+ */
5
+ import { type EvolutionIoLike } from './io.ts';
6
+ export declare const ENTRY_DELIMITER = "\n\u00A7\n";
7
+ export type MemoryTarget = 'memory' | 'user';
8
+ export interface MemoryOperation {
9
+ action: 'add' | 'replace' | 'remove';
10
+ facts?: string | undefined;
11
+ old_text?: string | undefined;
12
+ }
13
+ export interface MemoryApplyResult {
14
+ ok: boolean;
15
+ message: string;
16
+ entries: string[];
17
+ chars: number;
18
+ limit: number;
19
+ }
20
+ export declare function memoryRoot(env?: NodeJS.ProcessEnv): string;
21
+ export interface MemoryStoreOptions {
22
+ memoryCharLimit?: number;
23
+ userCharLimit?: number;
24
+ addDatePrefix?: boolean;
25
+ root?: string;
26
+ maxConsolidationFailures?: number;
27
+ io?: EvolutionIoLike;
28
+ }
29
+ export type { EvolutionIoLike };
30
+ export declare class MemoryStore {
31
+ readonly memoryLimit: number;
32
+ readonly userLimit: number;
33
+ readonly addDatePrefix: boolean;
34
+ readonly root: string;
35
+ private readonly maxFailures;
36
+ private readonly io;
37
+ private failureCount;
38
+ constructor(options?: MemoryStoreOptions);
39
+ limitFor(target: MemoryTarget): number;
40
+ read(target: MemoryTarget): Promise<string[]>;
41
+ write(target: MemoryTarget, entries: string[]): Promise<void>;
42
+ resetFailures(): void;
43
+ private failure;
44
+ add(target: MemoryTarget, facts: string): Promise<MemoryApplyResult>;
45
+ replace(target: MemoryTarget, oldText: string, facts: string): Promise<MemoryApplyResult>;
46
+ remove(target: MemoryTarget, oldText: string): Promise<MemoryApplyResult>;
47
+ private mutate;
48
+ applyBatch(target: MemoryTarget, operations: MemoryOperation[]): Promise<MemoryApplyResult>;
49
+ renderContext(): Promise<string>;
50
+ snapshot(): Promise<{
51
+ memory: string[];
52
+ user: string[];
53
+ }>;
54
+ restoreSnapshot(snapshot: {
55
+ memory: string[];
56
+ user: string[];
57
+ }): Promise<void>;
58
+ detectDrift(target: MemoryTarget): Promise<boolean>;
59
+ }
60
+ //# sourceMappingURL=memory-store.d.ts.map
@@ -0,0 +1,16 @@
1
+ export declare const PROMPT_BUNDLE_ID = "dsh-evolution@1";
2
+ export declare const MEMORY_REVIEW_PROMPT = "[Auto-review \u2014 Memory]\nReview the conversation above and consider saving to memory if appropriate.\n\nFocus on:\n1. Has the user revealed things about themselves \u2014 persona, desires, preferences, or personal details worth remembering?\n2. Has the user expressed expectations about how you should behave, their work style, or ways they want you to operate?\n\nIf something stands out, save it using the memory tool.\nIf nothing is worth saving, just say \"Nothing to save.\" and stop.";
3
+ export declare const SKILL_REVIEW_PROMPT = "[Auto-review \u2014 Skills]\nReview the conversation above and update the skill library. Be ACTIVE \u2014 most sessions produce at least one skill update, even if small.\n\nTarget shape: CLASS-LEVEL skills with a rich SKILL.md and a references/ directory for session-specific detail. Not a flat list of narrow one-session skills.\n\nSignals that warrant action:\n- The user corrected your style, tone, format, verbosity, workflow, or approach.\n- A non-trivial technique, fix, workaround, or debugging path emerged.\n- A loaded skill turned out wrong, missing, or outdated \u2014 patch it now.\n\nPreference order:\n1. Patch a skill that was loaded or read this session.\n2. Patch an existing umbrella skill.\n3. Add references/, templates/, or scripts/ support under an existing skill.\n4. Create a new class-level umbrella skill only when nothing fits.\n\nProtected skills (bundled/hub-installed) must not be edited. Pinned skills may be patched but not archived.\n\nDo NOT capture:\n- Environment-dependent failures (missing binaries, unconfigured credentials).\n- Negative claims about tools (\"browser tools do not work\").\n- Transient errors that resolved during the session.\n- One-off task narratives.\n\nIf a tool failed because of setup state, capture the FIX under an existing setup skill \u2014 never \"this tool does not work\" as a standalone constraint.\n\n\"Nothing to save.\" is a real option but should NOT be the default.";
4
+ export declare const COMBINED_REVIEW_PROMPT = "[Auto-review]\nReview the conversation above and update two things.\n\n**Memory**: who the user is. Save durable user preferences, personal details, and expectations with the memory tool.\n\n**Skills**: how to do this class of task. Be ACTIVE. Follow the same class-level umbrella policy, preference order, protected-skill rules, and do-not-capture list as a skill review.\n\nAct on whichever dimension has real signal. If genuinely nothing stands out on either, say \"Nothing to save.\" and stop \u2014 but don't reach for that conclusion as a default.";
5
+ export declare const CURATOR_PROMPT = "You are the skill curator. Maintain a healthy, class-level skill library.\n\nRules:\n1. NEVER hard-delete a skill. Archive is the maximum destructive action.\n2. Do not touch bundled, hub-installed, or pinned skills.\n3. Do not archive recently-created or never-used skills without strong evidence.\n4. Prefer merging narrow skills into class-level umbrellas.\n5. Before archiving a merged skill, ensure its unique content was preserved.\n\nProduce a YAML summary:\nconsolidations:\n - from: <old-skill-name>\n into: <umbrella-skill-name>\n reason: <one short sentence>\nprunings:\n - name: <skill-name>\n reason: <one short sentence>";
6
+ export declare function reviewPrompt(kind: 'memory' | 'skill' | 'combined'): string;
7
+ export interface PromptBundle {
8
+ id: string;
9
+ version: number;
10
+ prompts: Readonly<Record<string, string>>;
11
+ sha256: string;
12
+ }
13
+ export declare const PROMPT_BUNDLE: PromptBundle;
14
+ export declare function verifyPromptBundle(bundle?: PromptBundle): boolean;
15
+ export declare const DSH_AUTHORING_STANDARDS = "Follow the Hermes skill-authoring standards, translated to DSH tools.\n\nFrontmatter:\n- name: lowercase-hyphenated, <=64 chars, no spaces.\n- description: ONE sentence, <=60 characters, ends with a period. State the capability, not the implementation. No marketing words. Do NOT repeat the skill name. Count the characters before saving.\n- version: 0.1.0\n- author: always the literal value \"Hermes\". NEVER fill it from the environment, git config, or any identity you can probe.\n- platforms: declare [macos], [linux], and/or [windows] only when the skill is genuinely OS-bound; omit for portable skills.\n- metadata.hermes.tags: a few Capitalized, Relevant, Tags.\n\nBody section order (omit only when empty):\n1. \"# <Human Title>\" then a 2-3 sentence intro: what it does, what it does NOT do, key dependency stance.\n2. \"## When to Use\" \u2014 concrete trigger phrases.\n3. \"## Prerequisites\" \u2014 exact env vars, install steps, credentials.\n4. \"## How to Run\" \u2014 canonical invocation framed through DSH tools.\n5. \"## Quick Reference\" \u2014 flat command/endpoint list.\n6. \"## Procedure\" \u2014 numbered steps with copy-paste-exact commands.\n7. \"## Pitfalls\" \u2014 known limits and rate limits.\n8. \"## Verification\" \u2014 one check proving the skill worked.\n\nDSH-tool framing:\n- Reference DSH tools by name in backticks: `bash`, `str_replace_editor`, `write`, `skill`, `skill_manage`, `memory`.\n- Do not name wrapped shell utilities when a DSH tool already covers them.\n- Larger scripts belong under `scripts/` (written with `skill_manage write_file`) and are referenced from SKILL.md by relative path.\n\nQuality bar:\n- Prefer verbatim flags, paths, and APIs from the source. Never invent them.\n- Keep it tight: ~100 lines simple, ~200 complex.\n- No router/index/hub skills that only point at other skills.\n- References go in `references/`, templates in `templates/`.";
16
+ //# sourceMappingURL=prompts.d.ts.map
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Deterministic review signal gate.
3
+ *
4
+ * Scans a DSH session event log for durable learning signals before any LLM
5
+ * is spent. `turn/end` calls `observeTurn`; the returned review kind is
6
+ * accumulated until a configured interval fires.
7
+ */
8
+ import type { Session, SessionEvent } from '@deepseek-ai/dsh-session';
9
+ export type ReviewKind = 'memory' | 'skill' | 'combined';
10
+ export interface SignalConfig {
11
+ memoryInterval: number;
12
+ skillInterval: number;
13
+ substantiveMinToolCalls: number;
14
+ substantiveMinUserChars: number;
15
+ substantiveMinAgentChars: number;
16
+ }
17
+ export interface TurnSignals {
18
+ substantive: boolean;
19
+ toolCalls: number;
20
+ userChars: number;
21
+ assistantChars: number;
22
+ memorySignal: boolean;
23
+ skillSignal: boolean;
24
+ }
25
+ export interface ReviewState {
26
+ turnsSinceMemory: number;
27
+ turnsSinceSkill: number;
28
+ lastTurn: number;
29
+ }
30
+ /** Fold one session event into the current turn observation. */
31
+ export declare function observeEvent(signal: TurnSignals, event: SessionEvent): void;
32
+ /** Compute review cadence after `turn/end`. */
33
+ export declare function advanceReview(state: ReviewState, turn: number, signal: TurnSignals, config: SignalConfig): ReviewKind | null;
34
+ /** Fold all events between two sequence boundaries into one TurnSignals. */
35
+ export declare function foldTurn(session: Session, fromSeq: number): TurnSignals;
36
+ //# sourceMappingURL=signals.d.ts.map
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Skill library management for the self-evolution plugin.
3
+ *
4
+ * Skills live under `$DSH_HOME/skills` (`~/.dsh/skills` by default), matching
5
+ * the default dsh skill-filesystem user root. The plugin only manages skills
6
+ * it created unless a `.hermes-managed` marker opts a skill in. Archival is a
7
+ * move to `.archive/` — never a hard delete.
8
+ */
9
+ import { type EvolutionIoLike } from './io.ts';
10
+ export declare const SKILL_NAME_RE: RegExp;
11
+ export declare const MAX_SKILL_NAME_LENGTH = 64;
12
+ export declare const MAX_DESCRIPTION_LENGTH = 1024;
13
+ export declare const MAX_SKILL_CONTENT_CHARS = 100000;
14
+ export declare const MAX_SKILL_FILE_BYTES = 1048576;
15
+ export interface SkillLimits {
16
+ maxNameLength: number;
17
+ maxDescriptionLength: number;
18
+ maxSkillContentChars: number;
19
+ maxSkillFileBytes: number;
20
+ }
21
+ export declare const DEFAULT_SKILL_LIMITS: SkillLimits;
22
+ export declare const SUPPORT_DIRS: readonly ["references", "templates", "scripts", "assets"];
23
+ export interface SkillSummary {
24
+ name: string;
25
+ description: string;
26
+ path: string;
27
+ protectedBy: string | null;
28
+ managed: boolean;
29
+ archived: boolean;
30
+ }
31
+ export interface SkillActionResult {
32
+ ok: boolean;
33
+ message: string;
34
+ path?: string;
35
+ }
36
+ export declare function skillsRoot(env?: NodeJS.ProcessEnv): string;
37
+ export interface Frontmatter {
38
+ name?: string;
39
+ description?: string;
40
+ [key: string]: unknown;
41
+ }
42
+ export declare function parseFrontmatter(content: string): {
43
+ frontmatter: Frontmatter;
44
+ body: string;
45
+ } | null;
46
+ export declare function validateFrontmatter(content: string, expectedName?: string, limits?: SkillLimits): string | null;
47
+ export declare class SkillLibrary {
48
+ readonly root: string;
49
+ readonly limits: SkillLimits;
50
+ private readonly io;
51
+ constructor(root?: string, io?: EvolutionIoLike, limits?: SkillLimits);
52
+ list(): Promise<SkillSummary[]>;
53
+ read(name: string): Promise<string | null>;
54
+ writeProtection(name: string): Promise<string | null>;
55
+ deleteProtection(name: string): Promise<string | null>;
56
+ isManaged(name: string): Promise<boolean>;
57
+ create(name: string, content: string, origin: 'foreground' | 'background_review'): Promise<SkillActionResult>;
58
+ update(name: string, content: string): Promise<SkillActionResult>;
59
+ patch(name: string, oldString: string, newString: string, filePath?: string, replaceAll?: boolean): Promise<SkillActionResult>;
60
+ archive(name: string, absorbedInto?: string): Promise<SkillActionResult>;
61
+ writeSupportFile(name: string, filePath: string, content: string): Promise<SkillActionResult>;
62
+ removeSupportFile(name: string, filePath: string): Promise<SkillActionResult>;
63
+ snapshotAll(reason?: string): Promise<string>;
64
+ listSnapshots(): Promise<Array<{
65
+ path: string;
66
+ createdAt: string;
67
+ reason: string;
68
+ }>>;
69
+ restoreLatestSnapshot(): Promise<SkillActionResult>;
70
+ }
71
+ //# sourceMappingURL=skill-store.d.ts.map
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Small crash-safe JSON state store for plugin-owned sidecar state.
3
+ * Writes are atomic (temp + rename). Reads are synchronous for startup use.
4
+ */
5
+ export declare function evolutionHome(env?: NodeJS.ProcessEnv): string;
6
+ export declare class JsonState<T> {
7
+ private readonly initial;
8
+ readonly path: string;
9
+ private value;
10
+ constructor(name: string, initial: T, env?: NodeJS.ProcessEnv);
11
+ private loadSync;
12
+ get(): T;
13
+ set(value: T): void;
14
+ update(mutator: (value: T) => void): void;
15
+ flush(): Promise<void>;
16
+ /** Merge-on-load helper for persisted maps/records. */
17
+ reload(): Promise<void>;
18
+ }
19
+ //# sourceMappingURL=state-store.d.ts.map
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Threat scanning for agent-authored memory and skill content.
3
+ *
4
+ * Ported as a small, dependency-free subset of Hermes Agent's
5
+ * `tools/threat_patterns.py` + hermes-claw `threats.ts`. The policy is the
6
+ * load-bearing part: ANY in-scope hit blocks. Severity and category are
7
+ * metadata for diagnostics only.
8
+ */
9
+ export type ThreatScope = 'all' | 'context' | 'strict';
10
+ export interface ThreatFinding {
11
+ label: string;
12
+ category: string;
13
+ scope: ThreatScope;
14
+ }
15
+ /**
16
+ * Scan text at `scope`. Patterns are cumulative: `strict` includes all scopes.
17
+ */
18
+ export declare function scanThreats(text: string, scope?: ThreatScope, maxScanChars?: number): ThreatFinding[];
19
+ /** Blocking policy: any hit blocks. `severity` is deliberately not a gate. */
20
+ export declare function evaluateThreat(text: string, scope?: ThreatScope, maxScanChars?: number): {
21
+ blocked: boolean;
22
+ findings: ThreatFinding[];
23
+ };
24
+ /** User-facing block message for memory writes. */
25
+ export declare function scanMemoryThreats(text: string, maxScanChars?: number): string | null;
26
+ /** User-facing block message for skill content writes. */
27
+ export declare function scanContentThreats(text: string, maxScanChars?: number): string | null;
28
+ //# sourceMappingURL=threats.d.ts.map
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Skill usage telemetry sidecar: `$DSH_HOME/skills/.usage.json`.
3
+ * Format-compatible with Hermes Agent / hermes-claw core fields.
4
+ */
5
+ import { type EvolutionIoLike } from './io.ts';
6
+ export type SkillState = 'active' | 'stale' | 'archived';
7
+ export interface UsageRecord {
8
+ created_by: string | null;
9
+ use_count: number;
10
+ view_count: number;
11
+ patch_count: number;
12
+ last_used_at: string | null;
13
+ last_viewed_at: string | null;
14
+ last_patched_at: string | null;
15
+ created_at: string;
16
+ state: SkillState;
17
+ pinned: boolean;
18
+ archived_at: string | null;
19
+ quality_score?: number;
20
+ quality_warn?: boolean;
21
+ }
22
+ export type UsageMap = Map<string, UsageRecord>;
23
+ export declare function usageFile(root: string): string;
24
+ export declare function emptyRecord(): UsageRecord;
25
+ export declare function loadUsage(root: string, io?: EvolutionIoLike): Promise<UsageMap>;
26
+ export declare function saveUsage(root: string, map: UsageMap, io?: EvolutionIoLike): Promise<void>;
27
+ export declare function getRecord(map: UsageMap, name: string): UsageRecord;
28
+ export declare function bumpView(map: UsageMap, name: string, when?: Date): void;
29
+ export declare function bumpUse(map: UsageMap, name: string, when?: Date): void;
30
+ export declare function bumpPatch(map: UsageMap, name: string, when?: Date): void;
31
+ export declare function markAgentCreated(map: UsageMap, name: string): void;
32
+ export declare function latestActivityAt(record: UsageRecord): string | null;
33
+ //# sourceMappingURL=usage.d.ts.map
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@lmzhen/dsh-evolution-core",
3
+ "description": "Shared stores, prompts, signals and lifecycle logic for the dsh-evolution plugin family (community build)",
4
+ "version": "0.1.0-rc.1",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/lmzhen/dsh-evolution.git",
11
+ "directory": "packages/dsh-evolution-core"
12
+ },
13
+ "type": "module",
14
+ "main": "lib/index.js",
15
+ "types": "lib/types/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./lib/types/index.d.ts",
19
+ "default": "./lib/index.js"
20
+ },
21
+ "./invariant": {
22
+ "types": "./lib/types/invariant.d.ts",
23
+ "default": "./lib/invariant.js"
24
+ },
25
+ "./package.json": "./package.json"
26
+ },
27
+ "files": [
28
+ "lib/index.js",
29
+ "lib/invariant.js",
30
+ "lib/types/**/*.d.ts",
31
+ "lib/types/invariant.d.ts"
32
+ ],
33
+ "license": "MIT",
34
+ "peerDependencies": {
35
+ "@deepseek-ai/dsh-invariants": "^0.1.0-rc.6",
36
+ "@deepseek-ai/cordis": "^4.0.1",
37
+ "@deepseek-ai/dsh-session": "^0.1.0-rc.6"
38
+ },
39
+ "devDependencies": {
40
+ "@deepseek-ai/dsh-invariants": "^0.1.0-rc.6",
41
+ "@deepseek-ai/cordis": "^4.0.1",
42
+ "@deepseek-ai/dsh-session": "^0.1.0-rc.6"
43
+ }
44
+ }