@lmzhen/dsh-evolution-core 0.11.2 → 0.12.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/lib/index.js CHANGED
@@ -2982,7 +2982,7 @@ function allowRowCollisions(env = process.env) {
2982
2982
  //#endregion
2983
2983
  //#region lib/types/errors.js
2984
2984
  /**
2985
- * THE error-code table: E-301…E-318 with the exact text each one emits (E-317 and E-318 are the
2985
+ * THE error-code table: E-301…E-319 with the exact text each one emits (E-317…E-319 are the
2986
2986
  * write-admission gates' own refusals).
2987
2987
  *
2988
2988
  * The codes used to be spelled out at 33 call sites across two packages, so one
@@ -3018,7 +3018,8 @@ const EVOLUTION_ERRORS = Object.freeze({
3018
3018
  "e-310-the-settings-service-refused": "E-310: the settings service refused the write: %a1% — the owning plugin's rule stands (a cross-field pair, or a cap that may only be tightened). /evolution params shows the current value.",
3019
3019
  "e-305-this-invocation-carries-no-2": "E-305: this invocation carries no agent — `%a1%` needs a session-backed call (run it from a session in the GUI or the CLI).",
3020
3020
  "e-317-skill-write-not-confirmed": "E-317: skill \"%a1%\" was not %a2% — the confirmation prompt was declined or dismissed, so nothing was written. The prompt appears on every create and bare delete; repeat the call only if the operator asks for it.",
3021
- "e-318-skill-write-without-a-read": "E-318: skill \"%a1%\" was not read in this session, so this write is refused. Read it with the `skill` tool first (a read that failed does not count), then repeat the write."
3021
+ "e-318-skill-write-without-a-read": "E-318: skill \"%a1%\" was not read in this session, so this write is refused. Read it with the `skill` tool first (a read that failed does not count), then repeat the write.",
3022
+ "e-319-skill-write-confirm-timed-out": "E-319: skill \"%a1%\" was not %a2% — the confirmation prompt went unanswered for %a3% second(s), so the write was cancelled. Nobody was there to decide: set `skillWriteConfirm` to `auto` to write without a prompt, keep `ask` to wait until someone answers, or raise `skillWriteConfirmTimeoutSeconds`."
3022
3023
  });
3023
3024
  /**
3024
3025
  * Render one table entry, substituting its interpolation slots.
@@ -9921,6 +9922,37 @@ const PARAM_EXPOSURE = Object.freeze([
9921
9922
  values: "report|enforce",
9922
9923
  valueLabels: "只提醒|拒绝写入"
9923
9924
  },
9925
+ {
9926
+ id: "skillWriteConfirm",
9927
+ group: "write-caps",
9928
+ tier: "E3",
9929
+ authority: "cordis",
9930
+ owner: "tool-skill-manage",
9931
+ applies: "live",
9932
+ docAnchor: "PARAMETERS.md#write-caps",
9933
+ summary: "What the one confirmation before a create or a bare delete does: write straight through, wait for an answer, or cancel the write when nobody answers within the timeout.",
9934
+ label: "写入前是否确认",
9935
+ hint: "新建或删除技能前要不要问你:直接写入/一直等你回答/超时未答就取消这次写入。",
9936
+ control: "select",
9937
+ unit: "",
9938
+ values: "auto|ask|timeout",
9939
+ valueLabels: "不弹窗直接写入|一直等待回答|超时自动取消"
9940
+ },
9941
+ {
9942
+ id: "skillWriteConfirmTimeoutSeconds",
9943
+ group: "write-caps",
9944
+ tier: "E3",
9945
+ authority: "cordis",
9946
+ owner: "tool-skill-manage",
9947
+ applies: "live",
9948
+ docAnchor: "PARAMETERS.md#write-caps",
9949
+ summary: "Seconds the confirmation waits for an answer in timeout mode before the write is cancelled.",
9950
+ label: "确认等待秒数",
9951
+ hint: "选「超时自动取消」时,等多少秒没人回答就取消这次写入。",
9952
+ control: "number",
9953
+ unit: "秒",
9954
+ values: ""
9955
+ },
9924
9956
  {
9925
9957
  id: "memoryChars",
9926
9958
  group: "memory",
@@ -1,5 +1,5 @@
1
1
  /**
2
- * THE error-code table: E-301…E-318 with the exact text each one emits (E-317 and E-318 are the
2
+ * THE error-code table: E-301…E-319 with the exact text each one emits (E-317…E-319 are the
3
3
  * write-admission gates' own refusals).
4
4
  *
5
5
  * The codes used to be spelled out at 33 call sites across two packages, so one
@@ -36,6 +36,7 @@ export declare const EVOLUTION_ERRORS: Readonly<{
36
36
  readonly 'e-305-this-invocation-carries-no-2': "E-305: this invocation carries no agent — `%a1%` needs a session-backed call (run it from a session in the GUI or the CLI).";
37
37
  readonly 'e-317-skill-write-not-confirmed': "E-317: skill \"%a1%\" was not %a2% — the confirmation prompt was declined or dismissed, so nothing was written. The prompt appears on every create and bare delete; repeat the call only if the operator asks for it.";
38
38
  readonly 'e-318-skill-write-without-a-read': "E-318: skill \"%a1%\" was not read in this session, so this write is refused. Read it with the `skill` tool first (a read that failed does not count), then repeat the write.";
39
+ readonly 'e-319-skill-write-confirm-timed-out': "E-319: skill \"%a1%\" was not %a2% — the confirmation prompt went unanswered for %a3% second(s), so the write was cancelled. Nobody was there to decide: set `skillWriteConfirm` to `auto` to write without a prompt, keep `ask` to wait until someone answers, or raise `skillWriteConfirmTimeoutSeconds`.";
39
40
  }>;
40
41
  /** One table key. */
41
42
  export type EvolutionErrorId = keyof typeof EVOLUTION_ERRORS;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lmzhen/dsh-evolution-core",
3
3
  "description": "Shared stores, prompts, signals and lifecycle logic for the dsh-evolution plugin family (community build)",
4
- "version": "0.11.2",
4
+ "version": "0.12.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },