dsh-plugin-guide 0.3.2 → 0.3.4
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.es.md +5 -1
- package/README.hi.md +5 -1
- package/README.md +5 -1
- package/README.pt.md +5 -1
- package/README.zh.md +5 -1
- package/dist/dsh-plugin-dev.js +3 -3
- package/guide/plugin-dev-guide.md +2 -2
- package/guide/quick-reference.es.md +2 -2
- package/guide/quick-reference.hi.md +1 -1
- package/guide/quick-reference.md +2 -2
- package/guide/quick-reference.pt.md +2 -2
- package/guide/quick-reference.zh-CN.md +2 -2
- package/package.json +3 -3
- package/references/official-docs/AGENTS.md +3 -3
- package/references/official-docs/SNAPSHOT.md +4 -4
- package/references/official-docs/THIRD_PARTY_NOTICES.md +4 -6
- package/references/official-docs/docs/agent-lifecycle.i18n.yaml +2 -2
- package/references/official-docs/docs/agent-lifecycle.md +5 -3
- package/references/official-docs/docs/agent-lifecycle.zh.md +5 -3
- package/references/official-docs/docs/architecture.i18n.yaml +2 -2
- package/references/official-docs/docs/architecture.md +9 -4
- package/references/official-docs/docs/architecture.zh.md +9 -4
- package/references/official-docs/docs/capability-seams.i18n.yaml +2 -2
- package/references/official-docs/docs/capability-seams.md +8 -1
- package/references/official-docs/docs/capability-seams.zh.md +8 -1
- package/references/official-docs/docs/config-catalog.i18n.yaml +2 -2
- package/references/official-docs/docs/config-catalog.md +104 -68
- package/references/official-docs/docs/config-catalog.zh.md +101 -65
- package/references/official-docs/docs/cookbook/adding-a-package.i18n.yaml +2 -2
- package/references/official-docs/docs/cookbook/adding-a-package.md +1 -1
- package/references/official-docs/docs/cookbook/adding-a-package.zh.md +1 -1
- package/references/official-docs/docs/cookbook/extension-cookbook.i18n.yaml +2 -2
- package/references/official-docs/docs/cookbook/extension-cookbook.md +12 -10
- package/references/official-docs/docs/cookbook/extension-cookbook.zh.md +12 -10
- package/references/official-docs/docs/deepseek-llm-api-wire-extensions.i18n.yaml +2 -2
- package/references/official-docs/docs/deepseek-llm-api-wire-extensions.md +16 -12
- package/references/official-docs/docs/deepseek-llm-api-wire-extensions.zh.md +16 -12
- package/references/official-docs/docs/event-producer-consumer.i18n.yaml +2 -2
- package/references/official-docs/docs/event-producer-consumer.md +30 -29
- package/references/official-docs/docs/event-producer-consumer.zh.md +35 -34
- package/references/official-docs/docs/module-graph.i18n.yaml +2 -2
- package/references/official-docs/docs/module-graph.md +214 -360
- package/references/official-docs/docs/module-graph.zh.md +214 -360
- package/references/official-docs/docs/persistence-catalog.i18n.yaml +2 -2
- package/references/official-docs/docs/persistence-catalog.md +74 -64
- package/references/official-docs/docs/persistence-catalog.zh.md +72 -62
- package/references/official-docs/docs/subsystems/agent-team.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/agent-team.md +4 -3
- package/references/official-docs/docs/subsystems/agent-team.zh.md +4 -3
- package/references/official-docs/docs/subsystems/attachment.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/attachment.md +157 -4
- package/references/official-docs/docs/subsystems/attachment.zh.md +157 -4
- package/references/official-docs/docs/subsystems/code-runtime.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/code-runtime.md +7 -3
- package/references/official-docs/docs/subsystems/code-runtime.zh.md +7 -3
- package/references/official-docs/docs/subsystems/commands.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/commands.md +25 -16
- package/references/official-docs/docs/subsystems/commands.zh.md +25 -16
- package/references/official-docs/docs/subsystems/compaction.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/compaction.md +9 -9
- package/references/official-docs/docs/subsystems/compaction.zh.md +9 -9
- package/references/official-docs/docs/subsystems/conversation.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/conversation.md +4 -4
- package/references/official-docs/docs/subsystems/conversation.zh.md +4 -4
- package/references/official-docs/docs/subsystems/core.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/core.md +66 -4
- package/references/official-docs/docs/subsystems/core.zh.md +66 -4
- package/references/official-docs/docs/subsystems/feedback.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/feedback.md +2 -2
- package/references/official-docs/docs/subsystems/feedback.zh.md +2 -2
- package/references/official-docs/docs/subsystems/llm-streaming.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/llm-streaming.md +23 -2
- package/references/official-docs/docs/subsystems/llm-streaming.zh.md +23 -2
- package/references/official-docs/docs/subsystems/persistence.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/persistence.md +183 -191
- package/references/official-docs/docs/subsystems/persistence.zh.md +183 -191
- package/references/official-docs/docs/subsystems/schedule.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/schedule.md +1 -1
- package/references/official-docs/docs/subsystems/schedule.zh.md +1 -1
- package/references/official-docs/docs/subsystems/session-projection.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/session-projection.md +40 -17
- package/references/official-docs/docs/subsystems/session-projection.zh.md +40 -17
- package/references/official-docs/docs/subsystems/session-query.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/session-query.md +19 -13
- package/references/official-docs/docs/subsystems/session-query.zh.md +19 -13
- package/references/official-docs/docs/subsystems/session-reference.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/session-reference.md +25 -1
- package/references/official-docs/docs/subsystems/session-reference.zh.md +25 -1
- package/references/official-docs/docs/subsystems/session-telemetry.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/session-telemetry.md +6 -5
- package/references/official-docs/docs/subsystems/session-telemetry.zh.md +6 -5
- package/references/official-docs/docs/subsystems/session-title.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/session-title.md +5 -5
- package/references/official-docs/docs/subsystems/session-title.zh.md +5 -5
- package/references/official-docs/docs/subsystems/session.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/session.md +143 -71
- package/references/official-docs/docs/subsystems/session.zh.md +143 -71
- package/references/official-docs/docs/subsystems/slots.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/slots.md +1 -0
- package/references/official-docs/docs/subsystems/slots.zh.md +1 -0
- package/references/official-docs/docs/subsystems/storage.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/storage.md +28 -5
- package/references/official-docs/docs/subsystems/storage.zh.md +28 -5
- package/references/official-docs/docs/subsystems/subagent.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/subagent.md +32 -88
- package/references/official-docs/docs/subsystems/subagent.zh.md +31 -87
- package/references/official-docs/docs/subsystems/token-meter.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/token-meter.md +2 -2
- package/references/official-docs/docs/subsystems/token-meter.zh.md +2 -2
- package/references/official-docs/docs/subsystems/web-client.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/web-client.md +1 -1
- package/references/official-docs/docs/subsystems/web-client.zh.md +1 -1
- package/references/official-docs/docs/subsystems/workspace.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/workspace.md +8 -8
- package/references/official-docs/docs/subsystems/workspace.zh.md +8 -8
- package/references/official-docs/docs/testing.i18n.yaml +2 -2
- package/references/official-docs/docs/testing.md +2 -2
- package/references/official-docs/docs/testing.zh.md +2 -2
- package/references/official-docs/docs/tool-catalog.i18n.yaml +2 -2
- package/references/official-docs/docs/tool-catalog.md +9 -63
- package/references/official-docs/docs/tool-catalog.zh.md +8 -62
- package/references/official-docs/docs/user/guide/network-proxy.i18n.yaml +6 -0
- package/references/official-docs/docs/user/guide/network-proxy.md +85 -0
- package/references/official-docs/docs/user/guide/network-proxy.zh.md +85 -0
- package/references/official-docs/docs/user/guide/providers.i18n.yaml +2 -2
- package/references/official-docs/docs/user/guide/providers.md +70 -17
- package/references/official-docs/docs/user/guide/providers.zh.md +70 -17
- package/references/official-docs/docs/web-styling.i18n.yaml +2 -2
- package/references/official-docs/docs/web-styling.md +4 -0
- package/references/official-docs/docs/web-styling.zh.md +4 -0
- package/references/official-docs/packages/AGENTS.md +2 -2
- package/references/official-docs/website-docs.ts +8 -0
- package/templates/js/README.es.md +1 -1
- package/templates/js/README.hi.md +1 -1
- package/templates/js/README.md +1 -1
- package/templates/js/README.pt.md +1 -1
- package/templates/js/README.zh.md +1 -1
- package/templates/ts/README.es.md +1 -1
- package/templates/ts/README.hi.md +1 -1
- package/templates/ts/README.md +1 -1
- package/templates/ts/README.pt.md +1 -1
- package/templates/ts/README.zh.md +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](session-telemetry.md) | 中文
|
|
4
4
|
|
|
5
|
-
对外的会话上报拆分为一项[能力 seam](../capability-seams.zh.md):Service Definition 与捕获协调器([dsh-session-telemetry](../../packages/session/session-telemetry),`ctx.sessionTelemetry
|
|
5
|
+
对外的会话上报拆分为一项[能力 seam](../capability-seams.zh.md):Service Definition 与捕获协调器([dsh-session-telemetry](../../packages/session/session-telemetry),`ctx.sessionTelemetry`)拥有完整的权威事件捕获、`session-telemetry/record` 脱敏 waterfall(瀑布式事件)、handoff 游标与最小后端约定;部署方加载的 Service Provider([dsh-session-telemetry-otel](../../packages/session/session-telemetry-otel))则是原样配置的 OpenTelemetry JS SDK 日志流水线。它是一项可选能力,不属于 agent loop(智能体循环)主干,这里也没有任何内容会进入模型请求。边界公理(harness 的职责止于 `emit()`;批处理、重试、排队与丢失策略都属于上报 SDK)连同被否决的替代方案,均已在[复活 Agent Note](../../.agents/notes/implemented/feature/2026-07-23-session-telemetry-otel-revival.zh.md)中定案;捕获与游标约定见 [Service Definition README](../../packages/session/session-telemetry/README.zh.md)。
|
|
6
6
|
|
|
7
7
|
源码:[`packages/session/session-telemetry/src/index.ts`](../../packages/session/session-telemetry/src/index.ts)
|
|
8
8
|
|
|
@@ -37,8 +37,9 @@ interface SessionTelemetryRecord {
|
|
|
37
37
|
severity: SessionTelemetrySeverity
|
|
38
38
|
/**
|
|
39
39
|
* Identity attributes, deliberately minimal: ledger records carry
|
|
40
|
-
* `session.id`, `event.type`, `event.seq`, plus
|
|
41
|
-
* `session.
|
|
40
|
+
* `session.id`, `session.format_version`, `event.type`, `event.seq`, plus optional
|
|
41
|
+
* `session.cwd` / `session.parent_id`; a seeded Session also carries
|
|
42
|
+
* `session.seed_length` from its exact inherited event count;
|
|
42
43
|
* ops records carry `telemetry.op`, `session.id`, and (for `agent-error`)
|
|
43
44
|
* `agent.id`, `turn`, `step`, `error.name`. Anything recoverable from the
|
|
44
45
|
* body is intentionally NOT duplicated here.
|
|
@@ -54,7 +55,7 @@ interface SessionTelemetryRecord {
|
|
|
54
55
|
}
|
|
55
56
|
```
|
|
56
57
|
|
|
57
|
-
|
|
58
|
+
每条权威[会话事件](session.zh.md)都会完整透传为一条有序 ledger 记录,包括每个携带完整紧凑 stream 的 `assistant/message` 或 `assistant/attempt`,以及该 seam 从未听说过、由插件合并进来的类型。进程本地 `agent/assistant-stream` frame 不进入该持久 feed。新 Session 对象会从 seq 0 回放完整日志,包括构造 seed 历史;重新收养同一对象时会从 handoff 游标之后继续。投递是尽力而为的:游标标记的是「已交接」而非「已送达」,记录可能丢失(崩溃、重载窗口)也可能重复(新对象回放、SDK 重试),因此接收端对 ledger 记录基于 `(session.id, session.format_version, event.seq)` 去重;ops 记录刻意省略这类标识——它们是用于告警的信号,而非用于累加的条目,重复被容忍而非被去重。
|
|
58
59
|
|
|
59
60
|
## 共享披露
|
|
60
61
|
|
|
@@ -122,7 +123,7 @@ interface SessionTelemetrySink {
|
|
|
122
123
|
|
|
123
124
|
## 脱敏 waterfall:`session-telemetry/record`
|
|
124
125
|
|
|
125
|
-
|
|
126
|
+
每条记录在权威事件副本与 `emit()` 之间都要经过 `session-telemetry/record` [waterfall](../cordis-primer.zh.md#cordis-waterfall-semantics)([事件条目](#session-telemetryrecord--waterfall))。seam 自身不带任何规则:未挂载监听器时,记录以捕获时的原样到达后端;导出数据能干净到什么程度,恰恰取决于部署方挂载了什么规则。监听器通过变换 `next()` 的返回值来堆叠;不调用 `next()` 就返回,即替换其下方的全部逻辑;抛出异常的监听器会在协调器的隔离范围内以 fail-closed 方式扣下这一条记录。脱敏只作用于导出副本;权威会话日志永不改写。
|
|
126
127
|
|
|
127
128
|
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
128
129
|
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write docs/subsystems/session-title.md
|
|
5
|
-
session-title.md:
|
|
6
|
-
session-title.zh.md:
|
|
5
|
+
session-title.md: 20ed32b4a08127e7193433673d22f0dea3a90c46
|
|
6
|
+
session-title.zh.md: c01d5d4bf177169069bbe0a39ef533ada0f7c36a
|
|
@@ -46,7 +46,7 @@ interface SessionTitleEventData {
|
|
|
46
46
|
/** Normalized non-empty title text. */
|
|
47
47
|
readonly title: string
|
|
48
48
|
/** Exact human `user/message` seqs used to derive this title; empty for an explicit user rename. */
|
|
49
|
-
readonly messageSeqs:
|
|
49
|
+
readonly messageSeqs: SessionSeq[]
|
|
50
50
|
/** Whether the built-in fallback, a registered provider, or the user supplied the title. */
|
|
51
51
|
readonly source: SessionTitleSource
|
|
52
52
|
}
|
|
@@ -56,7 +56,7 @@ interface SessionTitleEventData {
|
|
|
56
56
|
/** Latest folded title plus the title event's durable envelope facts. */
|
|
57
57
|
interface SessionTitleSnapshot extends SessionTitleEventData {
|
|
58
58
|
/** Seq of the latest `session/title` event. */
|
|
59
|
-
readonly eventSeq:
|
|
59
|
+
readonly eventSeq: SessionSeq
|
|
60
60
|
/** Timestamp of the latest `session/title` event. */
|
|
61
61
|
readonly updatedAt: number
|
|
62
62
|
}
|
|
@@ -72,7 +72,7 @@ interface SessionTitleLlmRequestEventData {
|
|
|
72
72
|
/** Registered title-provider identity responsible for the request. */
|
|
73
73
|
readonly titleProvider: SessionTitleProviderId
|
|
74
74
|
/** Exact human `user/message` seqs represented in `messages`. */
|
|
75
|
-
readonly messageSeqs:
|
|
75
|
+
readonly messageSeqs: SessionSeq[]
|
|
76
76
|
/** Exact auxiliary LLM route. */
|
|
77
77
|
readonly route: SessionTitleModelProvenance
|
|
78
78
|
/** Exact auxiliary system prompt. */
|
|
@@ -92,7 +92,7 @@ The service snapshots eligible messages through one revision. A provider returns
|
|
|
92
92
|
/** One eligible human text message exposed to title providers. */
|
|
93
93
|
interface SessionTitleUserMessage {
|
|
94
94
|
/** Source `user/message` event seq. */
|
|
95
|
-
readonly seq:
|
|
95
|
+
readonly seq: SessionSeq
|
|
96
96
|
/** Exact concatenated text-block content. */
|
|
97
97
|
readonly text: string
|
|
98
98
|
}
|
|
@@ -123,7 +123,7 @@ interface SessionTitleProviderResult {
|
|
|
123
123
|
/** Proposed title text. */
|
|
124
124
|
readonly title: string
|
|
125
125
|
/** Exact seqs from `request.messages` used by this result. */
|
|
126
|
-
readonly messageSeqs: readonly
|
|
126
|
+
readonly messageSeqs: readonly SessionSeq[]
|
|
127
127
|
/** Auxiliary LLM route, when generation used a model. */
|
|
128
128
|
readonly model?: SessionTitleModelProvenance
|
|
129
129
|
}
|
|
@@ -46,7 +46,7 @@ interface SessionTitleEventData {
|
|
|
46
46
|
/** Normalized non-empty title text. */
|
|
47
47
|
readonly title: string
|
|
48
48
|
/** Exact human `user/message` seqs used to derive this title; empty for an explicit user rename. */
|
|
49
|
-
readonly messageSeqs:
|
|
49
|
+
readonly messageSeqs: SessionSeq[]
|
|
50
50
|
/** Whether the built-in fallback, a registered provider, or the user supplied the title. */
|
|
51
51
|
readonly source: SessionTitleSource
|
|
52
52
|
}
|
|
@@ -56,7 +56,7 @@ interface SessionTitleEventData {
|
|
|
56
56
|
/** Latest folded title plus the title event's durable envelope facts. */
|
|
57
57
|
interface SessionTitleSnapshot extends SessionTitleEventData {
|
|
58
58
|
/** Seq of the latest `session/title` event. */
|
|
59
|
-
readonly eventSeq:
|
|
59
|
+
readonly eventSeq: SessionSeq
|
|
60
60
|
/** Timestamp of the latest `session/title` event. */
|
|
61
61
|
readonly updatedAt: number
|
|
62
62
|
}
|
|
@@ -72,7 +72,7 @@ interface SessionTitleLlmRequestEventData {
|
|
|
72
72
|
/** Registered title-provider identity responsible for the request. */
|
|
73
73
|
readonly titleProvider: SessionTitleProviderId
|
|
74
74
|
/** Exact human `user/message` seqs represented in `messages`. */
|
|
75
|
-
readonly messageSeqs:
|
|
75
|
+
readonly messageSeqs: SessionSeq[]
|
|
76
76
|
/** Exact auxiliary LLM route. */
|
|
77
77
|
readonly route: SessionTitleModelProvenance
|
|
78
78
|
/** Exact auxiliary system prompt. */
|
|
@@ -92,7 +92,7 @@ interface SessionTitleLlmRequestEventData {
|
|
|
92
92
|
/** One eligible human text message exposed to title providers. */
|
|
93
93
|
interface SessionTitleUserMessage {
|
|
94
94
|
/** Source `user/message` event seq. */
|
|
95
|
-
readonly seq:
|
|
95
|
+
readonly seq: SessionSeq
|
|
96
96
|
/** Exact concatenated text-block content. */
|
|
97
97
|
readonly text: string
|
|
98
98
|
}
|
|
@@ -123,7 +123,7 @@ interface SessionTitleProviderResult {
|
|
|
123
123
|
/** Proposed title text. */
|
|
124
124
|
readonly title: string
|
|
125
125
|
/** Exact seqs from `request.messages` used by this result. */
|
|
126
|
-
readonly messageSeqs: readonly
|
|
126
|
+
readonly messageSeqs: readonly SessionSeq[]
|
|
127
127
|
/** Auxiliary LLM route, when generation used a model. */
|
|
128
128
|
readonly model?: SessionTitleModelProvenance
|
|
129
129
|
}
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write docs/subsystems/session.md
|
|
5
|
-
session.md:
|
|
6
|
-
session.zh.md:
|
|
5
|
+
session.md: d10c2d9a797eccb4a4cdc7e9ad8d607732dbc877
|
|
6
|
+
session.zh.md: 890d930a6ef979ec1b57eeb2d43ac3eb700a28c4
|