@agent_forge/forge-dsh 1.74.0 → 1.75.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/decisions.js CHANGED
@@ -170,7 +170,7 @@ export function sessionStartOutcome(outcome, agent) {
170
170
  injectContexts(agent, outcome.contexts);
171
171
  }
172
172
 
173
- /** Queue each context string as one plugin-sourced message. */
173
+ /** Queue each context string as one producer-attributed user message. */
174
174
  function injectContexts(agent, contexts) {
175
175
  if (contexts.length === 0) return;
176
176
  const inject = agent?.inject;
package/lib/tools.js CHANGED
@@ -167,14 +167,25 @@ export function promptText(messages) {
167
167
  let messageSeq = 0;
168
168
 
169
169
  /**
170
- * Build one plugin-sourced user message (the shape dsh-llm's
171
- * createUserMessage freezes: role 'user', text content, plugin source).
172
- * Constructed literally to keep this package dependency-free — importing
170
+ * Build one producer-attributed user text message: role 'user', one text block,
171
+ * and a source kind naming this plugin (V4 admits producer-owned kinds only).
172
+ * The literal is hand-built to keep this package dependency-free — importing
173
173
  * @deepseek-ai/dsh-llm would only resolve when the install layout happens to
174
- * nest it above us.
174
+ * nest it above us, and its createUserMessage takes `source` from the caller
175
+ * rather than validating any shape.
176
+ *
177
+ * The kind must be producer-owned, not the retired `{kind: 'plugin', …}`
178
+ * wrapper: session format V4 refuses that wrapper at admission, naming a
179
+ * third-party plugin `plugin:<name>` (session-format-v3-to-v4 README,
180
+ * "Message-source conversion"). The refusal does NOT surface at inject() time —
181
+ * DSH's in-memory append never inspects source kinds — so the wrapper's damage
182
+ * appears as a contained background write failure plus an unrestorable session
183
+ * log, both quoting "format v4 message requires a producer-owned source kind".
184
+ * Those runtime claims were checked against the @deepseek-ai/dsh 0.2.0-rc.2
185
+ * bundle, where session format version is 4.
175
186
  *
176
187
  * @param {string} text
177
- * @returns {{id: string, role: "user", content: Array<{type: "text", text: string}>, source: {kind: "plugin", plugin: string}}}
188
+ * @returns {{id: string, role: "user", content: Array<{type: "text", text: string}>, source: {kind: "plugin:forge-quality"}}}
178
189
  */
179
190
  export function pluginMessage(text) {
180
191
  messageSeq += 1;
@@ -182,6 +193,6 @@ export function pluginMessage(text) {
182
193
  id: `forge-dsh-${Date.now()}-${messageSeq}`,
183
194
  role: "user",
184
195
  content: [{ type: "text", text }],
185
- source: { kind: "plugin", plugin: "forge-quality" },
196
+ source: { kind: "plugin:forge-quality" },
186
197
  };
187
198
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent_forge/forge-dsh",
3
- "version": "1.74.0",
3
+ "version": "1.75.0",
4
4
  "description": "Forge quality gates for DeepSeek Harness (dsh): task gates, read-before-edit, bash hazard interception and quality scoring, driven by the forge CLI through DSH's typed interception points.",
5
5
  "repository": {
6
6
  "type": "git",