@lmzhen/dsh-evolution-core 0.59.5 → 0.60.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.
Files changed (111) hide show
  1. package/README.md +3 -1
  2. package/lib/authority-plugin.js +3 -2
  3. package/lib/composition/index.js +2 -2
  4. package/lib/{composition-B_F4TYOD.js → composition-BSqh70z_.js} +1 -1
  5. package/lib/{ensure-BpVDuDnA.js → ensure-DTCuxAxR.js} +1 -1
  6. package/lib/{extract-plan-D3ALlAmN.js → extract-plan-CP__XlEs.js} +2 -2
  7. package/lib/extract.js +4 -4
  8. package/lib/http-routes.js +3 -2
  9. package/lib/index.js +15 -15
  10. package/lib/{io-Cpa8wuvj.js → io-DT4-MXLr.js} +25 -1
  11. package/lib/io-node.js +1 -1
  12. package/lib/io-platform.js +163 -0
  13. package/lib/io-registry.js +10 -0
  14. package/lib/{mutation-authority-CZpc9F20.js → mutation-authority-C3RYyiaT.js} +66 -41
  15. package/lib/{mutation-storage-adapter-z1_hyrQn.js → mutation-storage-adapter-CSVn34dK.js} +334 -212
  16. package/lib/{mutations-Y-wKod7W.js → mutations-JKFlfhSO.js} +1 -1
  17. package/lib/policy.js +1 -1
  18. package/lib/{quality-NPGr3VzA.js → quality-C0ri2SgY.js} +2 -2
  19. package/lib/restrictor.js +1 -1
  20. package/lib/result.js +1 -1
  21. package/lib/{review-context-yNiZadPw.js → review-context-D2LIOEi-.js} +2 -2
  22. package/lib/runtime/plugin.js +2 -2
  23. package/lib/{session-projection-DM15fsRp.js → session-projection-Dnmm5bzt.js} +1 -1
  24. package/lib/{skill-history-BvLWFoOo.js → skill-history-BOZ4HCDB.js} +2 -2
  25. package/lib/skills.js +739 -129
  26. package/lib/state/domain/index.js +433 -0
  27. package/lib/state/index.js +136 -0
  28. package/lib/state/migrate.js +90 -0
  29. package/lib/state/storage.js +605 -0
  30. package/lib/state/store-plugin.js +23 -0
  31. package/lib/state/store.js +268 -0
  32. package/lib/subagent/index.js +1 -1
  33. package/lib/types/authority-plugin.d.ts +1 -1
  34. package/lib/types/authority-plugin.js +2 -1
  35. package/lib/types/authority.d.ts +1 -1
  36. package/lib/types/authority.js +75 -48
  37. package/lib/types/composition/ensure.js +1 -1
  38. package/lib/types/contract.d.ts +8 -0
  39. package/lib/types/http-routes.d.ts +1 -0
  40. package/lib/types/http-routes.js +2 -1
  41. package/lib/types/io-platform.d.ts +74 -0
  42. package/lib/types/io-platform.js +178 -0
  43. package/lib/types/io-registry.d.ts +4 -0
  44. package/lib/types/io-registry.js +10 -0
  45. package/lib/types/io.d.ts +7 -0
  46. package/lib/types/io.js +25 -1
  47. package/lib/types/mutation-authority.d.ts +1 -1
  48. package/lib/types/mutation-storage-adapter.d.ts +1 -1
  49. package/lib/types/opt-in.js +2 -2
  50. package/lib/types/params.js +2 -2
  51. package/lib/types/policy.js +1 -1
  52. package/lib/types/restrictor.js +2 -2
  53. package/lib/types/result.d.ts +1 -1
  54. package/lib/types/result.js +1 -1
  55. package/lib/types/runtime/coherence.js +1 -1
  56. package/lib/types/runtime/llm.d.ts +1 -1
  57. package/lib/types/runtime/llm.js +1 -1
  58. package/lib/types/runtime/platform.d.ts +3 -3
  59. package/lib/types/runtime/platform.js +2 -2
  60. package/lib/types/runtime/projections.d.ts +1 -1
  61. package/lib/types/scope.js +1 -1
  62. package/lib/types/session-projection.d.ts +1 -1
  63. package/lib/types/signals.d.ts +1 -1
  64. package/lib/types/skill-observation.d.ts +4 -5
  65. package/lib/types/skill-observation.js +18 -2
  66. package/lib/types/skill-store.d.ts +73 -4
  67. package/lib/types/skill-store.js +376 -29
  68. package/lib/types/skill-write-plan.d.ts +80 -0
  69. package/lib/types/skill-write-plan.js +2 -0
  70. package/lib/types/skill-write-service.d.ts +84 -2
  71. package/lib/types/skill-write-service.js +214 -35
  72. package/lib/types/skills.d.ts +2 -0
  73. package/lib/types/skills.js +2 -0
  74. package/lib/types/state/conformance.d.ts +47 -0
  75. package/lib/types/state/conformance.js +246 -0
  76. package/lib/types/state/constants.d.ts +52 -0
  77. package/lib/types/state/constants.js +52 -0
  78. package/lib/types/state/domain/compatibility.d.ts +40 -0
  79. package/lib/types/state/domain/compatibility.js +36 -0
  80. package/lib/types/state/domain/index.d.ts +81 -0
  81. package/lib/types/state/domain/index.js +592 -0
  82. package/lib/types/state/index.d.ts +63 -0
  83. package/lib/types/state/index.js +174 -0
  84. package/lib/types/state/medium-declaration.d.ts +37 -0
  85. package/lib/types/state/medium-declaration.js +53 -0
  86. package/lib/types/state/migrate.d.ts +34 -0
  87. package/lib/types/state/migrate.js +103 -0
  88. package/lib/types/state/record-contract.d.ts +56 -0
  89. package/lib/types/state/record-contract.js +120 -0
  90. package/lib/types/state/storage.d.ts +112 -0
  91. package/lib/types/state/storage.js +178 -0
  92. package/lib/types/state/store-plugin.d.ts +14 -0
  93. package/lib/types/state/store-plugin.js +18 -0
  94. package/lib/types/state/store.d.ts +39 -0
  95. package/lib/types/state/store.js +270 -0
  96. package/lib/types/store-ledger.js +2 -2
  97. package/lib/types/subagent/run.d.ts +1 -1
  98. package/lib/types/subagent/types.d.ts +4 -4
  99. package/lib/types/system-skill-writer.d.ts +21 -0
  100. package/lib/types/system-skill-writer.js +15 -0
  101. package/lib/types/{write-kernel.d.ts → target-writer.d.ts} +32 -15
  102. package/lib/types/{write-kernel.js → target-writer.js} +40 -8
  103. package/lib/types/tool-dispatch.js +6 -3
  104. package/lib/types/{mutation-unit.d.ts → unit-kernel.d.ts} +44 -13
  105. package/lib/types/{mutation-unit.js → unit-kernel.js} +163 -120
  106. package/lib/types/write.d.ts +1 -2
  107. package/lib/types/write.js +1 -2
  108. package/lib/{usage-D7yHG2Cb.js → usage-BO4Zj_zB.js} +2 -2
  109. package/lib/write.js +4 -4
  110. package/package.json +30 -3
  111. package/persisted-write-inventory.json +14 -5
@@ -1,4 +1,4 @@
1
- import { c as transactIo, o as nodeEvolutionIo } from "./io-Cpa8wuvj.js";
1
+ import { c as transactIo, o as nodeEvolutionIo } from "./io-DT4-MXLr.js";
2
2
  import { Z as SKILL_NAME_RE, i as DEFAULT_SKILL_LIMITS, u as CONTENT_SPLIT_HINT } from "./limits-CO4JGSJL.js";
3
3
  import { a as measureUnit, o as truncateGraphemes, r as graphemeCount } from "./text-metrics-CyJhxWBs.js";
4
4
  import { n as isRecord } from "./guards-3f02mnf2.js";
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 { toolsPort } from "@lmzhen/dsh-evolution-adapter/ports";
4
+ import { toolsPort } from "@lmzhen/dsh-evolution-platform/ports";
5
5
  import { Service } from "@deepseek-ai/cordis";
6
6
  import z from "@deepseek-ai/schemastery";
7
7
  //#region lib/types/policy.js
@@ -1,5 +1,5 @@
1
- import { b as probeText, g as probeList, m as isUnknown, p as isPresent } from "./io-Cpa8wuvj.js";
2
- import { A as h2Sections, M as externalRefs, h as latestActivityAt } from "./usage-D7yHG2Cb.js";
1
+ import { b as probeText, g as probeList, m as isUnknown, p as isPresent } from "./io-DT4-MXLr.js";
2
+ import { A as h2Sections, M as externalRefs, h as latestActivityAt } from "./usage-BO4Zj_zB.js";
3
3
  import { t as evolutionHome } from "./state-store-Jpa-iYIZ.js";
4
4
  import { createHash } from "node:crypto";
5
5
  import { readFile, realpath, stat } from "node:fs/promises";
package/lib/restrictor.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { n as errorText } from "./errors-BxzLTVbS.js";
2
- import { presetsPort, toolsPort } from "@lmzhen/dsh-evolution-adapter/ports";
2
+ import { presetsPort, toolsPort } from "@lmzhen/dsh-evolution-platform/ports";
3
3
  //#region lib/types/restrictor.js
4
4
  const name = "evolution-restrictor";
5
5
  const inject = ["agentPresets"];
package/lib/result.js CHANGED
@@ -1,2 +1,2 @@
1
- export * from "@lmzhen/dsh-evolution-platform-contract/result";
1
+ export * from "@lmzhen/dsh-evolution-platform/contract/result";
2
2
  export {};
@@ -1,6 +1,6 @@
1
- import { c as transactIo } from "./io-Cpa8wuvj.js";
1
+ import { c as transactIo } from "./io-DT4-MXLr.js";
2
2
  import { N as DEFAULT_THREAT_MAX_SCAN_CHARS, O as DEFAULT_SOFT_BODY_TOKENS, tt as UPSTREAM_LIMIT_CHARS_PER_TOKEN } from "./limits-CO4JGSJL.js";
3
- import { O as collectReadSkillNames, R as supportFileReadFromPath, k as collectReadSupportFiles, l as sessionReadNames, o as isProjectableSession, v as DEFAULT_SUPPORT_READ_TOOL_NAMES } from "./session-projection-DM15fsRp.js";
3
+ import { O as collectReadSkillNames, R as supportFileReadFromPath, k as collectReadSupportFiles, l as sessionReadNames, o as isProjectableSession, v as DEFAULT_SUPPORT_READ_TOOL_NAMES } from "./session-projection-Dnmm5bzt.js";
4
4
  import { a as measureUnit, i as measureText } from "./text-metrics-CyJhxWBs.js";
5
5
  import { t as clampedNumber } from "./numeric-Dc53KQoe.js";
6
6
  import { AsyncLocalStorage } from "node:async_hooks";
@@ -1,7 +1,7 @@
1
- import { a as evolutionSignalsProjection, i as evolutionReadsProjection, n as evolutionEvidenceProjection, r as evolutionProjectionHistoryProjection, t as evolutionActivityProjection } from "../session-projection-DM15fsRp.js";
1
+ import { a as evolutionSignalsProjection, i as evolutionReadsProjection, n as evolutionEvidenceProjection, r as evolutionProjectionHistoryProjection, t as evolutionActivityProjection } from "../session-projection-Dnmm5bzt.js";
2
2
  import { join } from "node:path";
3
3
  import { existsSync, readFileSync } from "node:fs";
4
- import { EvolutionLlmError, modelRoute, profileContextPort } from "@lmzhen/dsh-evolution-adapter/ports";
4
+ import { EvolutionLlmError, modelRoute, profileContextPort } from "@lmzhen/dsh-evolution-platform/ports";
5
5
  import { Service } from "@deepseek-ai/cordis";
6
6
  //#region lib/types/runtime/coherence.js
7
7
  /**
@@ -112,7 +112,7 @@ function readDispatchRecord(event) {
112
112
  rootCallId: callId,
113
113
  name: "",
114
114
  arguments: void 0,
115
- outcome: { ok: data.isError !== true && data.error === void 0 && block?.isError !== true }
115
+ outcome: { ok: data.isError !== true && data.message?.isError !== true && data.error === void 0 && block?.isError !== true }
116
116
  };
117
117
  }
118
118
  const isPtc = event.type === "tool/ptc-dispatch-start" || event.type === "tool/ptc-dispatch";
@@ -1,7 +1,7 @@
1
- import { b as probeText, c as transactIo, m as isUnknown, p as isPresent } from "./io-Cpa8wuvj.js";
1
+ import { b as probeText, c as transactIo, m as isUnknown, p as isPresent } from "./io-DT4-MXLr.js";
2
2
  import { et as TEXT_DIFF_MAX_GRAPHEMES } from "./limits-CO4JGSJL.js";
3
3
  import { o as truncateGraphemes, r as graphemeCount } from "./text-metrics-CyJhxWBs.js";
4
- import { r as contentHash } from "./mutations-Y-wKod7W.js";
4
+ import { r as contentHash } from "./mutations-JKFlfhSO.js";
5
5
  import { join } from "node:path";
6
6
  //#region lib/types/skill-history.js
7
7
  /**