dsh-advisor 0.3.2 → 0.4.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.i18n.yaml CHANGED
@@ -3,5 +3,5 @@
3
3
  # editing either side, bring the other along and re-record with:
4
4
  # git hash-object README.md
5
5
  # git hash-object README.zh.md
6
- README.md: 621734ac8f7bb4af6c3341ce241763d2a9d04309
7
- README.zh.md: b84a5c0d97859d2198c32b137ae79c8e3db09ed7
6
+ README.md: 2d4baa3b701e2a22297123fc100f706230d8078a
7
+ README.zh.md: 7efa6d1782fb9a019340d900196e35f4982da79a
package/README.md CHANGED
@@ -73,7 +73,7 @@ In a **dsh-tui** profile, `/advisor config` additionally reads back the composed
73
73
 
74
74
  ## Features
75
75
 
76
- - **Independent reviewer per session**: a separate model call observes the primary transcript and reviews each stepped primary turn; advisor messages are excluded from later deltas, so the advisor never reads its own advice back.
76
+ - **Independent reviewer per session**: a separate model call observes the primary transcript and reviews each stepped primary turn; advisor messages are excluded from later deltas, so the advisor does not read its own advice back. One exception, accepted and bounded: notes persisted before the source-kind migration (legacy custom `kind: 'advisor'`) are no longer matched by the self-review exclusion and re-enter the delta once per full replay (e.g. after compaction) — no data loss, advisor-side self-review pollution only. This cost is accepted by design, not deferred: no legacy read arm is added deliberately, because a compatibility layer is forbidden by the project's no-backward-compatibility invariant.
77
77
  - **Severity-ranked advice with inject/steer semantics**: at most one note per review — **nit** (a minor style, clarity, or quality suggestion; delivered via non-waking `agent.inject`, consumed at the next pre-step boundary), **concern** (a material risk or clearly better direction to weigh before continuing; delivered via waking `agent.steer`, subject to the `immuneTurns` cooldown), **blocker** (continuing clearly wastes work — contradicts an explicit user instruction, going in circles, fundamentally unsound; delivered via `agent.steer`). Delivered messages carry the `[advisor:{severity}]` prefix and are self-described advisory content:
78
78
 
79
79
  ```
@@ -104,6 +104,8 @@ The MVP deliberately drops full omp parity. Accepted gaps (tracked in the harnes
104
104
  - **No `syncBacklog` catch-up wait** — a far-behind advisor does not wait for the primary loop; its backlog is bounded and dropped, so notes may arrive after the next primary turn started (roadmap: context-maintenance batch).
105
105
  - **Bounded advisor context** — long-session full replays are truncated (`maxDeltaMessages`), so the advisor may lose early context after compaction (roadmap: next-next iteration).
106
106
 
107
+ **Sessions written by earlier versions — pre-V3 logs are not repaired here.** Advisor notes in them carry the former custom `source.kind` (`kind: 'advisor'`), which the dsh V2→V3 session-format edge refuses, so those **pre-V3** logs cannot be migrated (the raw file is intact, only unopenable). Logs already at V3 still open — they are affected only by the self-review caveat above. Repairing the pre-V3 logs is upstream work: a unified pass over this defect class is being developed in [`omdsh-dev/dsh-llm-fallbacks`](https://github.com/omdsh-dev/dsh-llm-fallbacks) and is **not yet available**. Logs written from this version onward are unaffected.
108
+
107
109
  ## Documentation
108
110
 
109
111
  | Doc | Content |
package/README.zh.md CHANGED
@@ -73,7 +73,7 @@ dsh --profile web --dump-config # 显示带 advisor 配置行的 "# == dsh-adv
73
73
 
74
74
  ## 能力一览
75
75
 
76
- - **每个会话一个独立评审者**:独立的模型调用观察主 transcript 并评审每个 stepped 主 turn;advisor 消息被排除在此后的 delta 之外,因此 advisor 永远不会读回自己的建议。
76
+ - **每个会话一个独立评审者**:独立的模型调用观察主 transcript 并评审每个 stepped 主 turn;advisor 消息被排除在此后的 delta 之外,因此 advisor 不会读回自己的建议。一个例外,已接受且有界:迁移前写入、带旧自定义 kind(`kind: 'advisor'`)的 note 已不再被自审排除匹配,每次全量重放(如 compaction 之后)都会重新进入 delta 一次——无数据丢失,仅 advisor 侧自审污染。这一代价是有意接受的,而非被推迟:不刻意添加旧格式读取分支,因为兼容层被项目的「不保持向后兼容」不变量禁止。
77
77
  - **按严重度排序的建议 + inject/steer 语义**:每次评审至多发出一条 note——**nit**(轻微的样式、清晰度或质量建议;经非唤醒的 `agent.inject` 送达,在下一个 pre-step 边界消费)、**concern**(继续之前值得权衡的重大风险或明显更优的方向;经唤醒的 `agent.steer` 送达,受 `immuneTurns` 冷却约束)、**blocker**(继续下去明显是在浪费工作——与显式用户指令矛盾、原地打转、根本性不可行;经 `agent.steer` 送达)。送达的消息携带 `[advisor:{severity}]` 前缀且为自我描述的 advisory 内容:
78
78
 
79
79
  ```
@@ -104,6 +104,8 @@ MVP 有意放弃与 omp 的完整对等。已接受的差距(在 harness 迭
104
104
  - **无 `syncBacklog` 追赶等待**——落后很多的 advisor 不会等待主循环;其 backlog 有界且会被丢弃,因此 note 可能在下一次主 turn 开始之后才到达(路线图:context-maintenance batch)。
105
105
  - **advisor 上下文有界**——长会话的完整重放会被截断(`maxDeltaMessages`),因此 compaction 后 advisor 可能丢失早期上下文(路线图:下下迭代)。
106
106
 
107
+ **旧版本写入的会话——pre-V3 日志不在此修复。** 其中的 advisor note 带有旧的自定义 `source.kind`(`kind: 'advisor'`),dsh 的 V2→V3 会话格式边会拒绝它,因此这些 **pre-V3** 日志无法迁移(原始文件完好,只是打不开)。已经是 V3 的日志仍可正常打开——它们只受上文的「自审例外」影响。修复这些 pre-V3 日志属于上游工作:针对这一类缺陷的统一修复正在 [`omdsh-dev/dsh-llm-fallbacks`](https://github.com/omdsh-dev/dsh-llm-fallbacks) 开发中,**尚未可用**。本版本及之后写入的日志不受影响。
108
+
107
109
  ## 文档
108
110
 
109
111
  | 文档 | 内容 |
package/lib/delivery.d.ts CHANGED
@@ -22,10 +22,13 @@
22
22
  * countdown and the KD-5 reset.
23
23
  *
24
24
  * Message shape (spec §6): a user-role message via `createUserMessage` whose
25
- * source carries the distinct `kind === 'advisor'` (the plugin's
26
- * `MessageSourceMap` merge extension, src/kinds.ts) and whose content is
25
+ * source is the classified first-party `plugin` arm
26
+ * (`kind: 'plugin'`, `plugin: 'advisor'`; src/kinds.ts) and whose content is
27
27
  * self-describing `[advisor:{severity}] {note}` — the only cue the primary
28
- * model gets about how to treat it ("weigh, don't blindly obey" spirit).
28
+ * model gets about how to treat it ("weigh, don't blindly obey" spirit). The
29
+ * plugin's identity rides `source.plugin`, never `source.kind`: `kind` is
30
+ * frozen per session-format generation, so a custom value there would make the
31
+ * whole log unreadable to a future format edge.
29
32
  *
30
33
  * Delivery is synchronous and fire-and-forget; the runtime path (T4 F1) is
31
34
  * what contains a throwing `inject`/`steer` — this module lets agent-method
@@ -65,8 +68,8 @@ export interface AdvisorDeliveryOptions {
65
68
  }
66
69
  /**
67
70
  * Build the advisor message for one note (spec §6): a user-role message whose
68
- * source carries the distinct advisor kind and whose content is self-describing
69
- * `[advisor:{severity}] {note}`.
71
+ * source carries this plugin's identity on the `plugin` arm and whose content
72
+ * is self-describing `[advisor:{severity}] {note}`.
70
73
  *
71
74
  * Bounds (qc3 F-2 / qc2 S-1): the note itself is already capped at
72
75
  * `ADVISOR_NOTE_MAX_CHARS` by extraction; the collapsed-row summary is
package/lib/delivery.js CHANGED
@@ -22,10 +22,13 @@
22
22
  * countdown and the KD-5 reset.
23
23
  *
24
24
  * Message shape (spec §6): a user-role message via `createUserMessage` whose
25
- * source carries the distinct `kind === 'advisor'` (the plugin's
26
- * `MessageSourceMap` merge extension, src/kinds.ts) and whose content is
25
+ * source is the classified first-party `plugin` arm
26
+ * (`kind: 'plugin'`, `plugin: 'advisor'`; src/kinds.ts) and whose content is
27
27
  * self-describing `[advisor:{severity}] {note}` — the only cue the primary
28
- * model gets about how to treat it ("weigh, don't blindly obey" spirit).
28
+ * model gets about how to treat it ("weigh, don't blindly obey" spirit). The
29
+ * plugin's identity rides `source.plugin`, never `source.kind`: `kind` is
30
+ * frozen per session-format generation, so a custom value there would make the
31
+ * whole log unreadable to a future format edge.
29
32
  *
30
33
  * Delivery is synchronous and fire-and-forget; the runtime path (T4 F1) is
31
34
  * what contains a throwing `inject`/`steer` — this module lets agent-method
@@ -34,11 +37,11 @@
34
37
  * @module dsh-advisor/delivery
35
38
  */
36
39
  import { boundContextSummary, createUserMessage } from '@deepseek-ai/dsh-llm';
37
- import { ADVISOR_SOURCE_KIND } from './kinds.js';
40
+ import { ADVISOR_PLUGIN_ID } from './kinds.js';
38
41
  /**
39
42
  * Build the advisor message for one note (spec §6): a user-role message whose
40
- * source carries the distinct advisor kind and whose content is self-describing
41
- * `[advisor:{severity}] {note}`.
43
+ * source carries this plugin's identity on the `plugin` arm and whose content
44
+ * is self-describing `[advisor:{severity}] {note}`.
42
45
  *
43
46
  * Bounds (qc3 F-2 / qc2 S-1): the note itself is already capped at
44
47
  * `ADVISOR_NOTE_MAX_CHARS` by extraction; the collapsed-row summary is
@@ -53,17 +56,19 @@ export function buildAdvisorMessage(note) {
53
56
  // between the two — and note text mentioning "advisor:" cannot affect it.
54
57
  const text = `[advisor:${note.severity}] ${note.note}`;
55
58
  const summary = `[${text.slice('[advisor:'.length)}`;
56
- return createUserMessage({
57
- content: [{ type: 'text', text }],
59
+ const source = {
60
+ kind: 'plugin',
61
+ plugin: ADVISOR_PLUGIN_ID,
58
62
  // n4 (user direction): declare the notice form + a collapsed-row summary so
59
63
  // the web shell's ContextInjectionRow shows "… · advisor · [nit] <note>"
60
64
  // instead of a bare producer label. The severity tag is part of the summary
61
65
  // text; per-severity COLOR needs the shell UI (out of plugin reach).
62
- source: {
63
- kind: ADVISOR_SOURCE_KIND,
64
- form: 'notice',
65
- summary: boundContextSummary(summary),
66
- },
66
+ form: 'notice',
67
+ summary: boundContextSummary(summary),
68
+ };
69
+ return createUserMessage({
70
+ content: [{ type: 'text', text }],
71
+ source,
67
72
  });
68
73
  }
69
74
  /** True when a note interrupts the primary (concern/blocker — spec §6). */
@@ -1 +1 @@
1
- {"version":3,"file":"delivery.js","sourceRoot":"","sources":["../src/delivery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAE7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAmChD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAgB;IAClD,yEAAyE;I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YACxE,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;YACpB,OAAO,OAAO,CAAA;QAChB,CAAC;QACD,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;QACrB,OAAO,QAAQ,CAAA;IACjB,CAAC;CACF"}
package/lib/kinds.d.ts CHANGED
@@ -1,38 +1,81 @@
1
1
  /**
2
- * Advisor source kind + the `MessageSourceMap` merge extension (spec §6).
2
+ * Advisor source identity + the predicate every consumer keys off (spec §6).
3
3
  *
4
4
  * Advisor-injected messages enter the session as user-role messages carrying
5
- * `source.kind === 'advisor'` (via the plugin's `MessageSourceMap` merge
6
- * declaration, `declare module '@deepseek-ai/dsh-llm'`). The delta renderer
7
- * (T3) and the delivery router (T6) both key off this kind:
5
+ * the **classified first-party** `plugin` arm:
6
+ * `source = { kind: 'plugin', plugin: ADVISOR_PLUGIN_ID, ... }` (see
7
+ * {@link AdvisorSource}). The delta renderer (T3) and the delivery router (T6)
8
+ * both key off this shape via {@link isAdvisorMessage}:
8
9
  *
9
- * - **Self-review exclusion (spec §6):** every advisor-source message is
10
- * excluded from subsequent advisor deltas, so the advisor never reads its
11
- * own injected advice back.
12
- * - **Delivery tagging (T6):** `createUserMessage({ ..., source: { kind:
13
- * ADVISOR_SOURCE_KIND } })` marks injected advice so it is visible in the
14
- * session stream yet excluded from later deltas.
10
+ * - **Self-review exclusion (spec §6):** every message carrying the advisor's
11
+ * classified `plugin` arm is excluded from subsequent advisor deltas (the
12
+ * renderer filters it via {@link isAdvisorMessage}), so the advisor does not
13
+ * read back advice it injected under this shape. **Corollary of the durable
14
+ * rule below:** moving a plugin-owned identifier out of `source.kind` costs
15
+ * the recognizability of notes already persisted under the old identity — it
16
+ * orphans the exclusion for those notes. A note written before this
17
+ * migration carries the legacy custom kind (`kind: 'advisor'`), is therefore
18
+ * no longer matched by the predicate, and re-enters the advisor delta on any
19
+ * full-surface replay (compaction, a non-append `surfaceOp`, or a
20
+ * delivered-prefix fingerprint mismatch — `src/transcript.ts` `update()`
21
+ * resets and `rebuild()` re-folds the surviving surface from 0, skipping
22
+ * only what the predicate still matches), exactly once per replay. Accepted
23
+ * and bounded: no data loss, advisor-side self-review pollution only — the
24
+ * price of migrating a source identity, not a defect to be papered over.
25
+ * - **Delivery tagging (T6):** `createUserMessage({ ..., source: ... })` marks
26
+ * injected advice so it is visible in the session stream yet excluded from
27
+ * later deltas.
28
+ *
29
+ * The plugin's identity must live in `source.plugin`, **never** in
30
+ * `source.kind`: `kind` is a first-party vocabulary frozen per session-format
31
+ * generation, and the V2→V3 edge refuses a whole log whose `kind` it cannot
32
+ * classify (`cannot safely transform unclassified message source`). A custom
33
+ * `kind` is therefore not a persistence extension point — only the `plugin`
34
+ * arm is cross-generation-safe.
15
35
  *
16
36
  * @module dsh-advisor/kinds
17
37
  */
18
38
  import type { ContextFormed, Message } from '@deepseek-ai/dsh-llm';
19
- declare module '@deepseek-ai/dsh-llm' {
20
- interface MessageSourceMap {
21
- /**
22
- * An advisor-injected message (user-role, self-describing
23
- * `[advisor:{severity}] {note}` content). Never derived into advisor
24
- * deltas (self-review guard, spec §6). Extends {@link ContextFormed} so
25
- * the plugin can declare the `notice` form + one-line `summary` the web
26
- * shell renders on a collapsed context row.
27
- */
28
- advisor: {
29
- readonly kind: 'advisor';
30
- } & ContextFormed;
31
- }
32
- }
33
- /** The `source.kind` value carried by every advisor-injected message. */
34
- export declare const ADVISOR_SOURCE_KIND: "advisor";
35
- /** Type of a message source carrying the advisor kind. */
36
- export type AdvisorSourceKind = typeof ADVISOR_SOURCE_KIND;
39
+ /**
40
+ * The plugin identity carried by every advisor-injected message.
41
+ *
42
+ * **Persisted key, not a free-to-rename internal id.** This literal is written
43
+ * into session logs as `source.plugin` on every injected note, so it is part of
44
+ * the durable on-disk format rather than a name this plugin may revalue:
45
+ * changing it orphans the self-review exclusion (spec §6) for notes already
46
+ * persisted. That is not hypothetical, it is this migration's own record: the
47
+ * shape before it was `{ kind: 'advisor' }` with no `plugin` member at all, so
48
+ * every note persisted then is already orphaned this way, and revaluing the
49
+ * literal again would repeat it. A replay trigger resets the renderer cursor
50
+ * and `rebuild()` re-filters the replayed log through {@link isAdvisorMessage},
51
+ * so a historical note written under the old identity stops matching and the
52
+ * advisor reads its own injected advice back as primary transcript.
53
+ * `tests/delivery.test.ts` pins the literal value for exactly that reason so
54
+ * a rename fails a test instead of the already-written logs.
55
+ *
56
+ * The bare `advisor` id is deliberate (PM decision on QC2-F-001 — the suggested
57
+ * rename to a namespaced `dsh-advisor` was declined): it matches the plugin's
58
+ * identity everywhere else — the bundle row `id: advisor` (`cordis.patch.yml`),
59
+ * the `advisor` settings namespace (`ADVISOR_SETTINGS_NAMESPACE`), the gateway
60
+ * service key, and the `/advisor` command name — so a different id here would
61
+ * split that identity and change the user-visible shell label for no durable
62
+ * gain.
63
+ */
64
+ export declare const ADVISOR_PLUGIN_ID: "advisor";
65
+ /**
66
+ * Source shape of an advisor-injected message: the classified first-party
67
+ * `plugin` arm, owned by this plugin, **pinned** to the one context form the
68
+ * advisor actually declares. `Extract<ContextFormed, { form: 'notice' }>`
69
+ * contributes the form-owned `summary` and refuses the other arms (`snapshot`,
70
+ * `instructions`, `catalog`, `relay`, `recall`, undeclared), so the type states
71
+ * the shape the delivery module writes instead of merely permitting it; no
72
+ * plugin-owned payload is ever added beside these members.
73
+ */
74
+ export type AdvisorSource = {
75
+ readonly kind: 'plugin';
76
+ readonly plugin: typeof ADVISOR_PLUGIN_ID;
77
+ } & Extract<ContextFormed, {
78
+ readonly form: 'notice';
79
+ }>;
37
80
  /** True when a message was injected by the advisor itself. */
38
81
  export declare function isAdvisorMessage(message: Message): boolean;
package/lib/kinds.js CHANGED
@@ -1,24 +1,68 @@
1
1
  /**
2
- * Advisor source kind + the `MessageSourceMap` merge extension (spec §6).
2
+ * Advisor source identity + the predicate every consumer keys off (spec §6).
3
3
  *
4
4
  * Advisor-injected messages enter the session as user-role messages carrying
5
- * `source.kind === 'advisor'` (via the plugin's `MessageSourceMap` merge
6
- * declaration, `declare module '@deepseek-ai/dsh-llm'`). The delta renderer
7
- * (T3) and the delivery router (T6) both key off this kind:
5
+ * the **classified first-party** `plugin` arm:
6
+ * `source = { kind: 'plugin', plugin: ADVISOR_PLUGIN_ID, ... }` (see
7
+ * {@link AdvisorSource}). The delta renderer (T3) and the delivery router (T6)
8
+ * both key off this shape via {@link isAdvisorMessage}:
8
9
  *
9
- * - **Self-review exclusion (spec §6):** every advisor-source message is
10
- * excluded from subsequent advisor deltas, so the advisor never reads its
11
- * own injected advice back.
12
- * - **Delivery tagging (T6):** `createUserMessage({ ..., source: { kind:
13
- * ADVISOR_SOURCE_KIND } })` marks injected advice so it is visible in the
14
- * session stream yet excluded from later deltas.
10
+ * - **Self-review exclusion (spec §6):** every message carrying the advisor's
11
+ * classified `plugin` arm is excluded from subsequent advisor deltas (the
12
+ * renderer filters it via {@link isAdvisorMessage}), so the advisor does not
13
+ * read back advice it injected under this shape. **Corollary of the durable
14
+ * rule below:** moving a plugin-owned identifier out of `source.kind` costs
15
+ * the recognizability of notes already persisted under the old identity — it
16
+ * orphans the exclusion for those notes. A note written before this
17
+ * migration carries the legacy custom kind (`kind: 'advisor'`), is therefore
18
+ * no longer matched by the predicate, and re-enters the advisor delta on any
19
+ * full-surface replay (compaction, a non-append `surfaceOp`, or a
20
+ * delivered-prefix fingerprint mismatch — `src/transcript.ts` `update()`
21
+ * resets and `rebuild()` re-folds the surviving surface from 0, skipping
22
+ * only what the predicate still matches), exactly once per replay. Accepted
23
+ * and bounded: no data loss, advisor-side self-review pollution only — the
24
+ * price of migrating a source identity, not a defect to be papered over.
25
+ * - **Delivery tagging (T6):** `createUserMessage({ ..., source: ... })` marks
26
+ * injected advice so it is visible in the session stream yet excluded from
27
+ * later deltas.
28
+ *
29
+ * The plugin's identity must live in `source.plugin`, **never** in
30
+ * `source.kind`: `kind` is a first-party vocabulary frozen per session-format
31
+ * generation, and the V2→V3 edge refuses a whole log whose `kind` it cannot
32
+ * classify (`cannot safely transform unclassified message source`). A custom
33
+ * `kind` is therefore not a persistence extension point — only the `plugin`
34
+ * arm is cross-generation-safe.
15
35
  *
16
36
  * @module dsh-advisor/kinds
17
37
  */
18
- /** The `source.kind` value carried by every advisor-injected message. */
19
- export const ADVISOR_SOURCE_KIND = 'advisor';
38
+ /**
39
+ * The plugin identity carried by every advisor-injected message.
40
+ *
41
+ * **Persisted key, not a free-to-rename internal id.** This literal is written
42
+ * into session logs as `source.plugin` on every injected note, so it is part of
43
+ * the durable on-disk format rather than a name this plugin may revalue:
44
+ * changing it orphans the self-review exclusion (spec §6) for notes already
45
+ * persisted. That is not hypothetical, it is this migration's own record: the
46
+ * shape before it was `{ kind: 'advisor' }` with no `plugin` member at all, so
47
+ * every note persisted then is already orphaned this way, and revaluing the
48
+ * literal again would repeat it. A replay trigger resets the renderer cursor
49
+ * and `rebuild()` re-filters the replayed log through {@link isAdvisorMessage},
50
+ * so a historical note written under the old identity stops matching and the
51
+ * advisor reads its own injected advice back as primary transcript.
52
+ * `tests/delivery.test.ts` pins the literal value for exactly that reason — so
53
+ * a rename fails a test instead of the already-written logs.
54
+ *
55
+ * The bare `advisor` id is deliberate (PM decision on QC2-F-001 — the suggested
56
+ * rename to a namespaced `dsh-advisor` was declined): it matches the plugin's
57
+ * identity everywhere else — the bundle row `id: advisor` (`cordis.patch.yml`),
58
+ * the `advisor` settings namespace (`ADVISOR_SETTINGS_NAMESPACE`), the gateway
59
+ * service key, and the `/advisor` command name — so a different id here would
60
+ * split that identity and change the user-visible shell label for no durable
61
+ * gain.
62
+ */
63
+ export const ADVISOR_PLUGIN_ID = 'advisor';
20
64
  /** True when a message was injected by the advisor itself. */
21
65
  export function isAdvisorMessage(message) {
22
- return message.source.kind === ADVISOR_SOURCE_KIND;
66
+ return message.source.kind === 'plugin' && message.source.plugin === ADVISOR_PLUGIN_ID;
23
67
  }
24
68
  //# sourceMappingURL=kinds.js.map
package/lib/kinds.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"kinds.js","sourceRoot":"","sources":["../src/kinds.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAiBH,yEAAyE;AACzE,MAAM,CAAC,MAAM,mBAAmB,GAAG,SAAkB,CAAA;AAKrD,8DAA8D;AAC9D,MAAM,UAAU,gBAAgB,CAAC,OAAgB;IAC/C,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,mBAAmB,CAAA;AACpD,CAAC"}
1
+ {"version":3,"file":"kinds.js","sourceRoot":"","sources":["../src/kinds.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAIH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,SAAkB,CAAA;AAgBnD,8DAA8D;AAC9D,MAAM,UAAU,gBAAgB,CAAC,OAAgB;IAC/C,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,KAAK,iBAAiB,CAAA;AACxF,CAAC"}
@@ -194,14 +194,21 @@ export declare function isReviewableTurnEnd(event: SessionEvent): boolean;
194
194
  * (the merged `SessionEventMap` entry comes from the dsh-agent peer, per
195
195
  * the `compact/*` precedent). Payload-discriminated (C-1 fix): the event
196
196
  * only triggers when `inserted` is non-empty and carries at least one
197
- * message whose `source.kind === 'user'`. Every other inbox mutation is
198
- * excluded — the advisor's OWN inject/steer deliveries (source.kind
199
- * `advisor`), workspace-context sync (`workspace-instructions`),
200
- * tool-result splicing (`tool`), and claim/clear splices (empty
201
- * `inserted`) must not self-trigger the review gate.
197
+ * message whose `source.kind === 'user'`.
202
198
  *
203
- * Synthetic/injected user-role messages (tool results, advisor notes,
204
- * workspace context) carry other `source.kind` values and never trigger.
199
+ * `source.kind` is the ONLY discriminator, and every synthetic producer commits
200
+ * a non-`user` kind, so nothing injected can self-trigger the review gate:
201
+ *
202
+ * - the advisor's OWN inject/steer deliveries — the `plugin` arm tagged
203
+ * `plugin: 'advisor'`. That arm is shared with the other plugin-owned
204
+ * context producers (the time-context / tmux-context / agent-loop `snapshot`
205
+ * forms, model-selection notices, tools-ptc, user-approval), which
206
+ * `source.plugin` separates and `source.kind` does not;
207
+ * - workspace-context sync (AGENTS.md / CLAUDE.md), which does NOT ride the
208
+ * `plugin` arm: `@deepseek-ai/dsh-agent-instructions` commits its own
209
+ * first-party `kind: 'agent-instructions'` (`form: 'instructions'`);
210
+ * - tool-result splicing (`kind: 'tool'`);
211
+ * - claim/clear splices (empty `inserted`).
205
212
  */
206
213
  export declare function isHumanInputEvent(event: SessionEvent): boolean;
207
214
  /**
package/lib/transcript.js CHANGED
@@ -373,14 +373,21 @@ export function isReviewableTurnEnd(event) {
373
373
  * (the merged `SessionEventMap` entry comes from the dsh-agent peer, per
374
374
  * the `compact/*` precedent). Payload-discriminated (C-1 fix): the event
375
375
  * only triggers when `inserted` is non-empty and carries at least one
376
- * message whose `source.kind === 'user'`. Every other inbox mutation is
377
- * excluded — the advisor's OWN inject/steer deliveries (source.kind
378
- * `advisor`), workspace-context sync (`workspace-instructions`),
379
- * tool-result splicing (`tool`), and claim/clear splices (empty
380
- * `inserted`) must not self-trigger the review gate.
376
+ * message whose `source.kind === 'user'`.
381
377
  *
382
- * Synthetic/injected user-role messages (tool results, advisor notes,
383
- * workspace context) carry other `source.kind` values and never trigger.
378
+ * `source.kind` is the ONLY discriminator, and every synthetic producer commits
379
+ * a non-`user` kind, so nothing injected can self-trigger the review gate:
380
+ *
381
+ * - the advisor's OWN inject/steer deliveries — the `plugin` arm tagged
382
+ * `plugin: 'advisor'`. That arm is shared with the other plugin-owned
383
+ * context producers (the time-context / tmux-context / agent-loop `snapshot`
384
+ * forms, model-selection notices, tools-ptc, user-approval), which
385
+ * `source.plugin` separates and `source.kind` does not;
386
+ * - workspace-context sync (AGENTS.md / CLAUDE.md), which does NOT ride the
387
+ * `plugin` arm: `@deepseek-ai/dsh-agent-instructions` commits its own
388
+ * first-party `kind: 'agent-instructions'` (`form: 'instructions'`);
389
+ * - tool-result splicing (`kind: 'tool'`);
390
+ * - claim/clear splices (empty `inserted`).
384
391
  */
385
392
  export function isHumanInputEvent(event) {
386
393
  if (event.type === 'user/message')
@@ -1 +1 @@
1
- {"version":3,"file":"transcript.js","sourceRoot":"","sources":["../src/transcript.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAGH,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,cAAc,GACf,MAAM,0BAA0B,CAAA;AAEjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AA6B7C,mCAAmC;AACnC,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,CAAA;AAE5C,iFAAiF;AACjF,MAAM,CAAC,MAAM,iBAAiB,GAAG,8BAA8B,CAAA;AAE/D,MAAM,sBAAsB,GAAG,oBAAoB,CAAA;AAEnD,8EAA8E;AAC9E,eAAe;AACf,8EAA8E;AAE9E,8EAA8E;AAC9E,SAAS,cAAc,CAAC,KAAmB;IACzC,2EAA2E;IAC3E,qEAAqE;IACrE,6DAA6D;IAC7D,4CAA4C;IAC5C,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;QAAE,OAAO,IAAI,CAAA;IAClD,kEAAkE;IAClE,oEAAoE;IACpE,4EAA4E;IAC5E,uEAAuE;IACvE,4EAA4E;IAC5E,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAA;IACxC,OAAO,KAAK,CAAC,SAAS,KAAK,QAAQ,CAAA;AACrC,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,SAAS,aAAa,CAAC,MAA+B,EAAE,MAAc;IACpE,IAAI,IAAI,GAAG,CAAC,CAAA;IACZ,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,MAAM,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,CAAC,CAAA;YACrC,CAAC;YACD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAA;QACzC,CAAC;QACD,OAAO,QAAQ,CAAA;IACjB,CAAC;IAED,iFAAiF;IACjF,cAAc,CAAC,SAAiB;QAC9B,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;QAChC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;QACnC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;IACxC,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,SAAiB,EAAE,MAAc;QACtC,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;QAC9C,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,CAAA;YACxC,OAAM;QACR,CAAC;QACD,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IACzB,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-advisor",
3
- "version": "0.3.2",
3
+ "version": "0.4.0",
4
4
  "type": "module",
5
5
  "description": "dsh plugin bundle porting the omp advisor subsystem: a per-session reviewer model that observes the primary transcript and injects severity-ranked advice (nit/concern/blocker).",
6
6
  "repository": {
@@ -86,7 +86,7 @@
86
86
  "react": "^18.3.1",
87
87
  "react-dom": "^18.3.1",
88
88
  "typescript": "^5.6.0",
89
- "vitest": "^3.0.0"
89
+ "vitest": "^4.1.11"
90
90
  },
91
91
  "engines": {
92
92
  "node": "^22.19 || >=24"