@ycodium-ai/agent-dsh 0.2.4351 → 0.2.4368

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 (2) hide show
  1. package/dist/index.js +29 -13
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -7371,7 +7371,7 @@ var require_dist = __commonJS({
7371
7371
  import { definePlugin } from "@ycodium-ai/plugin-api";
7372
7372
 
7373
7373
  // ../../packages/plugin-api/src/version.ts
7374
- var PLUGIN_API_VERSION = 110;
7374
+ var PLUGIN_API_VERSION = 112;
7375
7375
 
7376
7376
  // src/index.ts
7377
7377
  import * as NodeOS6 from "node:os";
@@ -35197,24 +35197,40 @@ function createExecutorUpdates({
35197
35197
  return;
35198
35198
  }
35199
35199
  };
35200
- const emitTaskEvents = (taskEvents) => {
35201
- for (const taskEvent of taskEvents ?? []) {
35200
+ const emitHookEvents = (hookEvents) => {
35201
+ for (const hookEvent of hookEvents ?? []) {
35202
+ if (hookEvent.type === "runtime.warning") {
35203
+ const message = hookEvent.payload.message.trim();
35204
+ if (message.length === 0) continue;
35205
+ emit({
35206
+ type: "runtime.warning",
35207
+ ...stamp(),
35208
+ provider: options.provider,
35209
+ threadId: options.threadId,
35210
+ ...hookEvent.turnId !== void 0 ? { turnId: hookEvent.turnId } : {},
35211
+ payload: {
35212
+ message,
35213
+ ...hookEvent.payload.detail !== void 0 ? { detail: hookEvent.payload.detail } : {}
35214
+ }
35215
+ });
35216
+ continue;
35217
+ }
35202
35218
  emit({
35203
- type: taskEvent.type,
35219
+ type: hookEvent.type,
35204
35220
  ...stamp(),
35205
35221
  provider: options.provider,
35206
35222
  threadId: options.threadId,
35207
- ...taskEvent.turnId !== void 0 ? { turnId: taskEvent.turnId } : {},
35208
- payload: taskEvent.payload
35223
+ ...hookEvent.turnId !== void 0 ? { turnId: hookEvent.turnId } : {},
35224
+ payload: hookEvent.payload
35209
35225
  });
35210
35226
  }
35211
35227
  };
35212
35228
  const toolSubagents = hooks.toolSubagents === void 0 ? void 0 : createToolSubagentTracker(hooks.toolSubagents);
35213
- const settleToolSubagents = (settlement, turnId) => emitTaskEvents(toolSubagents?.settle(settlement, turnId));
35229
+ const settleToolSubagents = (settlement, turnId) => emitHookEvents(toolSubagents?.settle(settlement, turnId));
35214
35230
  const settleSessionEnded = () => {
35215
35231
  settleToolSubagents("session-ended");
35216
- emitTaskEvents(subagentSessions?.settleSessionEnded());
35217
- emitTaskEvents(hooks.onSessionEnded?.());
35232
+ emitHookEvents(subagentSessions?.settleSessionEnded());
35233
+ emitHookEvents(hooks.onSessionEnded?.());
35218
35234
  };
35219
35235
  const observeContext = () => ({
35220
35236
  turnId: shared.activeTurnId,
@@ -35276,7 +35292,7 @@ function createExecutorUpdates({
35276
35292
  };
35277
35293
  const hookResult = call === void 0 ? void 0 : toolSubagents?.onToolCallUpdated(call) ?? hooks.onToolCallUpdated?.(call);
35278
35294
  const handledByHook = hookResult !== void 0 && "events" in hookResult && hookResult.handled === true;
35279
- emitTaskEvents(
35295
+ emitHookEvents(
35280
35296
  hookResult === void 0 ? [] : "events" in hookResult ? hookResult.events : hookResult
35281
35297
  );
35282
35298
  if (nextToolCall.status === "completed" && hookResult && "artifacts" in hookResult)
@@ -35373,7 +35389,7 @@ function createExecutorUpdates({
35373
35389
  };
35374
35390
  const receiveSessionUpdate = (params) => {
35375
35391
  const foreign = !shared.ownSessionIds.has(params.sessionId) && (shared.childSessions.has(params.sessionId) || shared.sessionOpensInFlight === 0 && shared.ownSessionIds.size > 0);
35376
- emitTaskEvents(
35392
+ emitHookEvents(
35377
35393
  subagentSessions?.observe(params, {
35378
35394
  turnId: shared.activeTurnId,
35379
35395
  foreign,
@@ -35383,7 +35399,7 @@ function createExecutorUpdates({
35383
35399
  );
35384
35400
  if (!shared.sessionLoadInFlight) {
35385
35401
  if (hooks.onSessionUpdate) {
35386
- emitTaskEvents(hooks.onSessionUpdate(params, { ...observeContext(), foreign }));
35402
+ emitHookEvents(hooks.onSessionUpdate(params, { ...observeContext(), foreign }));
35387
35403
  }
35388
35404
  }
35389
35405
  if (!foreign) handleSessionUpdate(params);
@@ -35391,7 +35407,7 @@ function createExecutorUpdates({
35391
35407
  const receiveExtensionNotification = (method, params) => {
35392
35408
  if (shared.sessionLoadInFlight || !hooks.onExtensionNotification) return;
35393
35409
  const result = hooks.onExtensionNotification(method, params, observeContext());
35394
- if (Array.isArray(result)) emitTaskEvents(result);
35410
+ if (Array.isArray(result)) emitHookEvents(result);
35395
35411
  };
35396
35412
  return {
35397
35413
  emitCompactionState,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ycodium-ai/agent-dsh",
3
- "version": "0.2.4351",
3
+ "version": "0.2.4368",
4
4
  "description": "DeepSeek Harness executor: dsh CLI over Agent Client Protocol stdio.",
5
5
  "keywords": [
6
6
  "ycodium",
@@ -22,9 +22,9 @@
22
22
  "esbuild": "0.28.1",
23
23
  "vite-plus": "0.2.2",
24
24
  "yaml": "^2.9.0",
25
- "@ycodium-ai/plugin-api": "0.2.4351",
26
- "ycodium-acp-executor": "0.2.4351",
27
- "ycodium-executor-testing": "0.0.0"
25
+ "@ycodium-ai/plugin-api": "0.2.4368",
26
+ "ycodium-executor-testing": "0.0.0",
27
+ "ycodium-acp-executor": "0.2.4368"
28
28
  },
29
29
  "ycodium": {
30
30
  "plugin": "./dist/index.js",