@modesto_ma/dsh-channels 0.5.0 → 0.6.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.
@@ -145,7 +145,6 @@ const OPTIONAL_TEXT_KEYS = new Set<EditableKey>([
145
145
  'agentPreset',
146
146
  'maxTokens',
147
147
  'adminUserId',
148
- 'analyzeListen',
149
148
  ])
150
149
 
151
150
  const BOOLEAN_KEYS = new Set<EditableKey>([
@@ -161,6 +160,7 @@ const BOOLEAN_KEYS = new Set<EditableKey>([
161
160
  'feishuTools.sendFile',
162
161
  'feishuTools.wikiRead',
163
162
  'feishuTools.wikiWrite',
163
+ 'analyzeEnabled',
164
164
  ])
165
165
 
166
166
  /** Bounds and entry format of one `string-list` field. */
@@ -438,12 +438,11 @@ const FIELD_META: Record<EditableKey, FieldMeta> = {
438
438
  placeholder: 'https://<租户>.feishu.cn/wiki/space/<space_id>',
439
439
  wide: true,
440
440
  },
441
- analyzeListen: {
442
- label: '监听地址',
441
+ analyzeEnabled: {
442
+ label: '日志分析接口',
443
443
  group: 'analyze',
444
- summary: '日志平台调用分析接口的 host:port,留空关闭',
445
- help: '接口路径 POST /dsh-channels/analyze,请求需带 Authorization: Bearer <访问令牌>。',
446
- placeholder: '例如 0.0.0.0:3090',
444
+ summary: '关闭时接口返回 404',
445
+ help: '接口挂在 DSH Web 端口上:POST /api/dsh-channels.logalyze,请求需带 Authorization: Bearer <访问令牌>。只有带 Web 的 profile 才有这个接口。改后立即生效,不需要重连。',
447
446
  },
448
447
  loggerLevel: { label: 'SDK 日志级别', group: 'logging' },
449
448
  }
package/src/streamer.ts CHANGED
@@ -614,8 +614,9 @@ export class TurnStreamer {
614
614
 
615
615
  // Subagent children live in their OWN sessions (header.parentSession →
616
616
  // caller). Their events never touch the parent's log, so fold their
617
- // status into the parent turn's activity line here.
618
- const parentId = session.header.parentSession
617
+ // status into the parent turn's activity line here. Historical ordinary
618
+ // forks may also carry parentSession; only `origin` marks a subagent.
619
+ const parentId = session.header.origin === 'subagent' ? session.header.parentSession : undefined
619
620
  if (parentId !== undefined) {
620
621
  const parentState = this.front(parentId)
621
622
  if (parentState !== undefined) {