@khorsheed/dsh-context-lens 0.0.0-stage → 0.1.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/CHANGELOG.md +16 -0
- package/README.en.md +53 -0
- package/README.i18n.yaml +6 -0
- package/README.md +52 -2
- package/cordis.patch.yml +13 -0
- package/lib/client.js +26953 -0
- package/lib/index.js +3943 -0
- package/lib/typert.host.d.ts +3 -0
- package/lib/typert.host.js +1569 -0
- package/lib/typert.remote-client.d.ts +40 -0
- package/lib/typert.remote-client.js +1202 -0
- package/lib/types/changes.d.ts +72 -0
- package/lib/types/changes.js +328 -0
- package/lib/types/client/AgentTabs.d.ts +34 -0
- package/lib/types/client/AgentTabs.js +89 -0
- package/lib/types/client/ChangeList.d.ts +28 -0
- package/lib/types/client/ChangeList.js +109 -0
- package/lib/types/client/ConfigFacts.d.ts +21 -0
- package/lib/types/client/ConfigFacts.js +30 -0
- package/lib/types/client/HeaderUtility.d.ts +12 -0
- package/lib/types/client/HeaderUtility.js +8 -0
- package/lib/types/client/InspectorPanel.d.ts +5 -0
- package/lib/types/client/InspectorPanel.js +486 -0
- package/lib/types/client/RawView.d.ts +18 -0
- package/lib/types/client/RawView.js +8 -0
- package/lib/types/client/RequestFacts.d.ts +19 -0
- package/lib/types/client/RequestFacts.js +39 -0
- package/lib/types/client/RoomDecisionsView.d.ts +24 -0
- package/lib/types/client/RoomDecisionsView.js +52 -0
- package/lib/types/client/SchemaFields.d.ts +13 -0
- package/lib/types/client/SchemaFields.js +96 -0
- package/lib/types/client/SegCtl.d.ts +32 -0
- package/lib/types/client/SegCtl.js +12 -0
- package/lib/types/client/SegmentBlocks.d.ts +28 -0
- package/lib/types/client/SegmentBlocks.js +225 -0
- package/lib/types/client/TimingView.d.ts +17 -0
- package/lib/types/client/TimingView.js +98 -0
- package/lib/types/client/TokenView.d.ts +21 -0
- package/lib/types/client/TokenView.js +22 -0
- package/lib/types/client/ToolCatalog.d.ts +9 -0
- package/lib/types/client/ToolCatalog.js +51 -0
- package/lib/types/client/Trend.d.ts +25 -0
- package/lib/types/client/Trend.js +100 -0
- package/lib/types/client/TurnAction.d.ts +14 -0
- package/lib/types/client/TurnAction.js +31 -0
- package/lib/types/client/TurnMenu.d.ts +36 -0
- package/lib/types/client/TurnMenu.js +50 -0
- package/lib/types/client/aggregate.d.ts +141 -0
- package/lib/types/client/aggregate.js +213 -0
- package/lib/types/client/contract.d.ts +58 -0
- package/lib/types/client/contract.js +1 -0
- package/lib/types/client/definition.d.ts +47 -0
- package/lib/types/client/definition.js +25 -0
- package/lib/types/client/icons-local.d.ts +19 -0
- package/lib/types/client/icons-local.js +3 -0
- package/lib/types/client/icons.d.ts +18 -0
- package/lib/types/client/icons.js +2 -0
- package/lib/types/client/index.d.ts +42 -0
- package/lib/types/client/index.js +139 -0
- package/lib/types/client/locales.d.ts +365 -0
- package/lib/types/client/locales.js +705 -0
- package/lib/types/client/preset-visibility.d.ts +99 -0
- package/lib/types/client/preset-visibility.js +108 -0
- package/lib/types/client/scroll-sync.d.ts +54 -0
- package/lib/types/client/scroll-sync.js +118 -0
- package/lib/types/client/timing.d.ts +29 -0
- package/lib/types/client/timing.js +117 -0
- package/lib/types/client/wire.d.ts +13 -0
- package/lib/types/client/wire.js +11 -0
- package/lib/types/index.d.ts +32 -0
- package/lib/types/index.js +25 -0
- package/lib/types/log-lane.d.ts +198 -0
- package/lib/types/log-lane.js +841 -0
- package/lib/types/messages.d.ts +96 -0
- package/lib/types/messages.js +254 -0
- package/lib/types/prefix-diff.d.ts +4 -0
- package/lib/types/prefix-diff.js +20 -0
- package/lib/types/remote.d.ts +45 -0
- package/lib/types/remote.js +99 -0
- package/lib/types/room.d.ts +66 -0
- package/lib/types/room.js +101 -0
- package/lib/types/segmenter.d.ts +100 -0
- package/lib/types/segmenter.js +184 -0
- package/lib/types/service.d.ts +145 -0
- package/lib/types/service.js +493 -0
- package/lib/types/store.d.ts +424 -0
- package/lib/types/store.js +1920 -0
- package/lib/types/tool-summary.d.ts +6 -0
- package/lib/types/tool-summary.js +7 -0
- package/lib/types/types.d.ts +703 -0
- package/lib/types/types.js +18 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +133 -3
|
@@ -0,0 +1,1202 @@
|
|
|
1
|
+
/* Generated by @deepseek-ai/dsh-typert-generator from the Host FaceModel — do not edit. */
|
|
2
|
+
import { z } from 'zod'
|
|
3
|
+
|
|
4
|
+
import { createTypertRemoteInfo } from '@deepseek-ai/dsh-typert-protocol/remote-info'
|
|
5
|
+
|
|
6
|
+
let LensJsonValueRemoteCodec$schema$value
|
|
7
|
+
const LensJsonValueRemoteCodec$schema = () => (LensJsonValueRemoteCodec$schema$value ??= z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => LensJsonValueRemoteCodec$schema())), z.record(z.string(), z.lazy(() => LensJsonValueRemoteCodec$schema()))]))
|
|
8
|
+
let _khorsheed_dsh_context_lens_requestInspector_getRequest_parameter_0$schema$value
|
|
9
|
+
const _khorsheed_dsh_context_lens_requestInspector_getRequest_parameter_0$schema = () => (_khorsheed_dsh_context_lens_requestInspector_getRequest_parameter_0$schema$value ??= z.string())
|
|
10
|
+
let _khorsheed_dsh_context_lens_requestInspector_getRequest_parameter_1$schema$value
|
|
11
|
+
const _khorsheed_dsh_context_lens_requestInspector_getRequest_parameter_1$schema = () => (_khorsheed_dsh_context_lens_requestInspector_getRequest_parameter_1$schema$value ??= z.number())
|
|
12
|
+
let _khorsheed_dsh_context_lens_requestInspector_getRequest_parameter_2$schema$value
|
|
13
|
+
const _khorsheed_dsh_context_lens_requestInspector_getRequest_parameter_2$schema = () => (_khorsheed_dsh_context_lens_requestInspector_getRequest_parameter_2$schema$value ??= z.union([z.undefined(), z.object({
|
|
14
|
+
'scopes': z.array(z.string()).readonly().optional(),
|
|
15
|
+
})]))
|
|
16
|
+
let _khorsheed_dsh_context_lens_requestInspector_getRequest_result$schema$value
|
|
17
|
+
const _khorsheed_dsh_context_lens_requestInspector_getRequest_result$schema = () => (_khorsheed_dsh_context_lens_requestInspector_getRequest_result$schema$value ??= z.union([z.undefined(), z.object({
|
|
18
|
+
'requestNumber': z.number().optional().describe('Stable 1-based request ordinal within this agent’s history; absent when the beginning is unknown.'),
|
|
19
|
+
'seq': z.number().describe('Collector-assigned process-wide query ID, separate from the displayed request number. Process-local and ephemeral — the counter resets on restart, so a seq only selects within the answering instance\'s `generation`.'),
|
|
20
|
+
'scopeId': z.string(),
|
|
21
|
+
'sessionId': z.string(),
|
|
22
|
+
'purpose': z.string().optional(),
|
|
23
|
+
'compaction': z.object({
|
|
24
|
+
'id': z.string(),
|
|
25
|
+
'hostTurn': z.number().optional(),
|
|
26
|
+
'applied': z.boolean().optional().describe('True only after a checkpoint replacement actually committed.'),
|
|
27
|
+
'replacedCount': z.number().optional(),
|
|
28
|
+
'replacedChars': z.number().optional(),
|
|
29
|
+
'inputPartial': z.boolean().optional().describe('Log recovery knows the selected region, but not the complete model input.'),
|
|
30
|
+
'before': z.object({
|
|
31
|
+
'turnSeq': z.number(),
|
|
32
|
+
'scopeId': z.string(),
|
|
33
|
+
'seq': z.number(),
|
|
34
|
+
'requestNumber': z.number().optional(),
|
|
35
|
+
}).optional(),
|
|
36
|
+
}).optional(),
|
|
37
|
+
'startedAt': z.number(),
|
|
38
|
+
'status': z.union([z.literal("failed"), z.literal("ok"), z.literal("streaming")]),
|
|
39
|
+
'error': z.string().optional(),
|
|
40
|
+
'config': z.object({
|
|
41
|
+
'provider': z.string().optional(),
|
|
42
|
+
'model': z.string().optional(),
|
|
43
|
+
'maxTokens': z.number().optional(),
|
|
44
|
+
'reasoningEffort': z.string().optional(),
|
|
45
|
+
'temperature': z.number().optional(),
|
|
46
|
+
}),
|
|
47
|
+
'usage': z.object({
|
|
48
|
+
'inputTokens': z.number(),
|
|
49
|
+
'outputTokens': z.number(),
|
|
50
|
+
'totalTokens': z.number().optional(),
|
|
51
|
+
'cacheReadTokens': z.number().optional().describe('Measured cache hits — the cache column\'s only source of truth.'),
|
|
52
|
+
'cacheWriteTokens': z.number().optional().describe('Cache-write input (Anthropic `cache_creation_input_tokens` et al.). The host usage contract\'s buckets are disjoint, so a request\'s full input is `inputTokens + cacheReadTokens + cacheWriteTokens` — dropping this bucket shows a cache-writing (first) request as almost input-free.'),
|
|
53
|
+
}).optional(),
|
|
54
|
+
'timing': z.object({
|
|
55
|
+
'waitMs': z.number().optional().describe('Request dispatched → first chunk(模型等待).'),
|
|
56
|
+
'reasoningMs': z.number().optional().describe('reasoning blocks, summed(模型思考).'),
|
|
57
|
+
'toolArgsMs': z.number().optional().describe('tool-call argument generation, summed(工具参数).'),
|
|
58
|
+
'textMs': z.number().optional().describe('text blocks, summed(模型输出).'),
|
|
59
|
+
'toolExecMs': z.number().optional().describe('tool/call → tool/result for tools this request started(工具执行).'),
|
|
60
|
+
'totalMs': z.number().optional().describe('Dispatch → stream settled(总耗时).'),
|
|
61
|
+
}),
|
|
62
|
+
'generation': z.string().optional().describe('The answering instance\'s epoch — see {@link ListTurnsResult.generation}.'),
|
|
63
|
+
'responseSummary': z.union([z.object({
|
|
64
|
+
'kind': z.literal("compaction"),
|
|
65
|
+
}), z.object({
|
|
66
|
+
'kind': z.literal("tool"),
|
|
67
|
+
'name': z.string(),
|
|
68
|
+
'hint': z.string().optional(),
|
|
69
|
+
'more': z.number().optional(),
|
|
70
|
+
'toolCounts': z.array(z.object({
|
|
71
|
+
'name': z.string(),
|
|
72
|
+
'count': z.number(),
|
|
73
|
+
})).optional(),
|
|
74
|
+
}), z.object({
|
|
75
|
+
'kind': z.literal("text"),
|
|
76
|
+
}), z.object({
|
|
77
|
+
'kind': z.literal("reasoning"),
|
|
78
|
+
}), z.object({
|
|
79
|
+
'kind': z.literal("none"),
|
|
80
|
+
})]).describe('明细头锚点:本请求的响应干了什么(结构化;面板本地化渲染为 `name:hint` / 「助手回复」 / —)。'),
|
|
81
|
+
'response': z.object({
|
|
82
|
+
'reasoning': z.string().optional().describe('Assembled reasoning text, when the model produced any.'),
|
|
83
|
+
'text': z.string().optional().describe('Assembled visible text, when any.'),
|
|
84
|
+
'toolCalls': z.array(z.object({
|
|
85
|
+
'callId': z.string().optional(),
|
|
86
|
+
'name': z.string(),
|
|
87
|
+
'arguments': z.string(),
|
|
88
|
+
'execution': z.object({
|
|
89
|
+
'status': z.union([z.literal("failed"), z.literal("running"), z.literal("ok")]),
|
|
90
|
+
'result': z.string().optional(),
|
|
91
|
+
}).optional().describe('Execution happens after the model response; never part of input composition.'),
|
|
92
|
+
})).describe('Tool calls issued: name + raw arguments string.'),
|
|
93
|
+
}).optional().describe('本请求自己的响应原文(输出段):streaming 中缺席;在任何 block 之前 就失败的调用也缺席(error 字段承担失败展示)。一个 turn 的最后一次 请求的响应只在这里可见(下一请求的 新增上下文 看不到它)。'),
|
|
94
|
+
'prefix': z.object({
|
|
95
|
+
'previousSeq': z.number(),
|
|
96
|
+
'previousRequestNumber': z.number().optional(),
|
|
97
|
+
'gapMs': z.number(),
|
|
98
|
+
'changed': z.object({
|
|
99
|
+
'index': z.number(),
|
|
100
|
+
'before': z.string(),
|
|
101
|
+
'after': z.string(),
|
|
102
|
+
'beforeCategory': z.union([z.literal("user"), z.literal("compaction"), z.literal("system"), z.literal("tool-definition"), z.literal("assistant"), z.literal("tool-result"), z.literal("skill-injection"), z.literal("reminder-injection"), z.literal("plugin-injection"), z.literal("runtime-snapshot"), z.literal("tool-change")]).optional(),
|
|
103
|
+
'afterCategory': z.union([z.literal("user"), z.literal("compaction"), z.literal("system"), z.literal("tool-definition"), z.literal("assistant"), z.literal("tool-result"), z.literal("skill-injection"), z.literal("reminder-injection"), z.literal("plugin-injection"), z.literal("runtime-snapshot"), z.literal("tool-change")]).optional(),
|
|
104
|
+
'text': z.object({
|
|
105
|
+
'offset': z.number().describe('Unicode character offset, zero based.'),
|
|
106
|
+
'leading': z.string(),
|
|
107
|
+
'trailing': z.string(),
|
|
108
|
+
'leadingOmitted': z.boolean(),
|
|
109
|
+
'trailingOmitted': z.boolean(),
|
|
110
|
+
'removed': z.string(),
|
|
111
|
+
'added': z.string(),
|
|
112
|
+
'removedChars': z.number(),
|
|
113
|
+
'addedChars': z.number(),
|
|
114
|
+
}).optional(),
|
|
115
|
+
}).optional(),
|
|
116
|
+
'toolsChanged': z.boolean(),
|
|
117
|
+
'changes': z.array(z.object({
|
|
118
|
+
'kind': z.union([z.literal("remove"), z.literal("replace"), z.literal("compaction"), z.literal("prune"), z.literal("add")]),
|
|
119
|
+
'system': z.literal(true).optional().describe('All rows are system messages; constituent events are listed in `parts`.'),
|
|
120
|
+
'removed': z.array(z.object({
|
|
121
|
+
'index': z.number().describe('Wire position in its own request (removed rows: the previous request).'),
|
|
122
|
+
'messageId': z.string().optional(),
|
|
123
|
+
'category': z.union([z.literal("user"), z.literal("compaction"), z.literal("system"), z.literal("tool-definition"), z.literal("assistant"), z.literal("tool-result"), z.literal("skill-injection"), z.literal("reminder-injection"), z.literal("plugin-injection"), z.literal("runtime-snapshot"), z.literal("tool-change")]),
|
|
124
|
+
'source': z.string(),
|
|
125
|
+
'preview': z.string().describe('Whitespace-collapsed, at most 120 characters.'),
|
|
126
|
+
'chars': z.number(),
|
|
127
|
+
})),
|
|
128
|
+
'added': z.array(z.object({
|
|
129
|
+
'index': z.number().describe('Wire position in its own request (removed rows: the previous request).'),
|
|
130
|
+
'messageId': z.string().optional(),
|
|
131
|
+
'category': z.union([z.literal("user"), z.literal("compaction"), z.literal("system"), z.literal("tool-definition"), z.literal("assistant"), z.literal("tool-result"), z.literal("skill-injection"), z.literal("reminder-injection"), z.literal("plugin-injection"), z.literal("runtime-snapshot"), z.literal("tool-change")]),
|
|
132
|
+
'source': z.string(),
|
|
133
|
+
'preview': z.string().describe('Whitespace-collapsed, at most 120 characters.'),
|
|
134
|
+
'chars': z.number(),
|
|
135
|
+
})),
|
|
136
|
+
'source': z.object({
|
|
137
|
+
'kind': z.string(),
|
|
138
|
+
'op': z.string().optional(),
|
|
139
|
+
}).optional().describe('The replacing message\'s producer, verbatim (`kind · op`).'),
|
|
140
|
+
'eventSeq': z.number().optional().describe('Host log seq of the replacement event and of what it shadowed.'),
|
|
141
|
+
'replacedSeqs': z.array(z.number()).optional(),
|
|
142
|
+
'compactionId': z.string().optional(),
|
|
143
|
+
'compactionRequest': z.object({
|
|
144
|
+
'turnSeq': z.number(),
|
|
145
|
+
'scopeId': z.string(),
|
|
146
|
+
'seq': z.number(),
|
|
147
|
+
'requestNumber': z.number().optional(),
|
|
148
|
+
}).optional().describe('Retained compaction request, when this change is a compaction.'),
|
|
149
|
+
'pruneBefore': z.object({
|
|
150
|
+
'turnSeq': z.number(),
|
|
151
|
+
'scopeId': z.string(),
|
|
152
|
+
'seq': z.number(),
|
|
153
|
+
'requestNumber': z.number().optional(),
|
|
154
|
+
}).optional().describe('Retained request that still carried the un-pruned text.'),
|
|
155
|
+
'text': z.object({
|
|
156
|
+
'offset': z.number().describe('Unicode character offset, zero based.'),
|
|
157
|
+
'leading': z.string(),
|
|
158
|
+
'trailing': z.string(),
|
|
159
|
+
'leadingOmitted': z.boolean(),
|
|
160
|
+
'trailingOmitted': z.boolean(),
|
|
161
|
+
'removed': z.string(),
|
|
162
|
+
'added': z.string(),
|
|
163
|
+
'removedChars': z.number(),
|
|
164
|
+
'addedChars': z.number(),
|
|
165
|
+
}).optional().describe('Character diff when one text became another (system: head against head).'),
|
|
166
|
+
'section': z.string().optional().describe('Assemble section holding the diff start, when the live lane attributed it.'),
|
|
167
|
+
'sameAs': z.object({
|
|
168
|
+
'index': z.number().describe('Wire position in its own request (removed rows: the previous request).'),
|
|
169
|
+
'messageId': z.string().optional(),
|
|
170
|
+
'category': z.union([z.literal("user"), z.literal("compaction"), z.literal("system"), z.literal("tool-definition"), z.literal("assistant"), z.literal("tool-result"), z.literal("skill-injection"), z.literal("reminder-injection"), z.literal("plugin-injection"), z.literal("runtime-snapshot"), z.literal("tool-change")]),
|
|
171
|
+
'source': z.string(),
|
|
172
|
+
'preview': z.string().describe('Whitespace-collapsed, at most 120 characters.'),
|
|
173
|
+
'chars': z.number(),
|
|
174
|
+
}).optional().describe('A removed row whose full text equals the new head — a checkable equality, not a claim.'),
|
|
175
|
+
'parts': z.array(z.object({
|
|
176
|
+
'kind': z.union([z.literal("remove"), z.literal("replace"), z.literal("compaction"), z.literal("prune"), z.literal("add")]),
|
|
177
|
+
'removed': z.array(z.object({
|
|
178
|
+
'index': z.number().describe('Wire position in its own request (removed rows: the previous request).'),
|
|
179
|
+
'messageId': z.string().optional(),
|
|
180
|
+
'category': z.union([z.literal("user"), z.literal("compaction"), z.literal("system"), z.literal("tool-definition"), z.literal("assistant"), z.literal("tool-result"), z.literal("skill-injection"), z.literal("reminder-injection"), z.literal("plugin-injection"), z.literal("runtime-snapshot"), z.literal("tool-change")]),
|
|
181
|
+
'source': z.string(),
|
|
182
|
+
'preview': z.string().describe('Whitespace-collapsed, at most 120 characters.'),
|
|
183
|
+
'chars': z.number(),
|
|
184
|
+
})),
|
|
185
|
+
'added': z.array(z.object({
|
|
186
|
+
'index': z.number().describe('Wire position in its own request (removed rows: the previous request).'),
|
|
187
|
+
'messageId': z.string().optional(),
|
|
188
|
+
'category': z.union([z.literal("user"), z.literal("compaction"), z.literal("system"), z.literal("tool-definition"), z.literal("assistant"), z.literal("tool-result"), z.literal("skill-injection"), z.literal("reminder-injection"), z.literal("plugin-injection"), z.literal("runtime-snapshot"), z.literal("tool-change")]),
|
|
189
|
+
'source': z.string(),
|
|
190
|
+
'preview': z.string().describe('Whitespace-collapsed, at most 120 characters.'),
|
|
191
|
+
'chars': z.number(),
|
|
192
|
+
})),
|
|
193
|
+
'eventSeq': z.number().optional(),
|
|
194
|
+
'replacedSeqs': z.array(z.number()).optional(),
|
|
195
|
+
})).optional(),
|
|
196
|
+
'isBreak': z.literal(true).optional().describe('The cache prefix first differs inside this change.'),
|
|
197
|
+
})).optional().describe('Every message-level change since the previous request (tail appends excluded).'),
|
|
198
|
+
'toolChanges': z.array(z.object({
|
|
199
|
+
'name': z.string(),
|
|
200
|
+
'change': z.union([z.literal("added"), z.literal("removed"), z.literal("modified")]),
|
|
201
|
+
'description': z.object({
|
|
202
|
+
'offset': z.number().describe('Unicode character offset, zero based.'),
|
|
203
|
+
'leading': z.string(),
|
|
204
|
+
'trailing': z.string(),
|
|
205
|
+
'leadingOmitted': z.boolean(),
|
|
206
|
+
'trailingOmitted': z.boolean(),
|
|
207
|
+
'removed': z.string(),
|
|
208
|
+
'added': z.string(),
|
|
209
|
+
'removedChars': z.number(),
|
|
210
|
+
'addedChars': z.number(),
|
|
211
|
+
}).optional(),
|
|
212
|
+
'parameters': z.object({
|
|
213
|
+
'offset': z.number().describe('Unicode character offset, zero based.'),
|
|
214
|
+
'leading': z.string(),
|
|
215
|
+
'trailing': z.string(),
|
|
216
|
+
'leadingOmitted': z.boolean(),
|
|
217
|
+
'trailingOmitted': z.boolean(),
|
|
218
|
+
'removed': z.string(),
|
|
219
|
+
'added': z.string(),
|
|
220
|
+
'removedChars': z.number(),
|
|
221
|
+
'addedChars': z.number(),
|
|
222
|
+
}).optional(),
|
|
223
|
+
'owner': z.string().optional().describe('Declaring package from the tool\'s host-side origin tag, when tagged.'),
|
|
224
|
+
'isBreak': z.literal(true).optional().describe('The message prefix is unchanged and this is the first differing tool.'),
|
|
225
|
+
})).optional().describe('Tool definitions added, removed, or rewritten, by name.'),
|
|
226
|
+
'tail': z.object({
|
|
227
|
+
'count': z.number(),
|
|
228
|
+
'sources': z.array(z.string()),
|
|
229
|
+
}).optional().describe('The ordinary tail append: how many messages, from which producers.'),
|
|
230
|
+
'configChanged': z.object({
|
|
231
|
+
'from': z.string(),
|
|
232
|
+
'to': z.string(),
|
|
233
|
+
}).optional().describe('Provider or model differs from the previous request (caches never cross models).'),
|
|
234
|
+
}).optional().describe('Exact comparison with the preceding retained request in this scope.'),
|
|
235
|
+
'segments': z.object({
|
|
236
|
+
'system': z.array(z.object({
|
|
237
|
+
'index': z.number().describe('Position in the wire message stream (0-based across the whole request). `-1` marks the one-shot system slot (`GenerateOptions.system`), which sits ahead of the message array rather than inside it.'),
|
|
238
|
+
'messageId': z.string().optional(),
|
|
239
|
+
'compactionId': z.string().optional(),
|
|
240
|
+
'compactionRequest': z.object({
|
|
241
|
+
'turnSeq': z.number(),
|
|
242
|
+
'scopeId': z.string(),
|
|
243
|
+
'seq': z.number(),
|
|
244
|
+
'requestNumber': z.number().optional(),
|
|
245
|
+
}).optional(),
|
|
246
|
+
'pruning': z.object({
|
|
247
|
+
'beforeChars': z.number(),
|
|
248
|
+
'afterChars': z.number(),
|
|
249
|
+
'before': z.object({
|
|
250
|
+
'turnSeq': z.number(),
|
|
251
|
+
'scopeId': z.string(),
|
|
252
|
+
'seq': z.number(),
|
|
253
|
+
'requestNumber': z.number().optional(),
|
|
254
|
+
}).optional(),
|
|
255
|
+
}).optional(),
|
|
256
|
+
'category': z.union([z.literal("user"), z.literal("compaction"), z.literal("system"), z.literal("tool-definition"), z.literal("assistant"), z.literal("tool-result"), z.literal("skill-injection"), z.literal("reminder-injection"), z.literal("plugin-injection"), z.literal("runtime-snapshot"), z.literal("tool-change")]),
|
|
257
|
+
'source': z.string().describe('角色/来源标签:model、runtime-context、skill-catalog、section 名等。'),
|
|
258
|
+
'toolCalls': z.array(z.string()).optional().describe('Tool calls this assistant row issued (the chip on assistant rows).'),
|
|
259
|
+
'toolCallId': z.string().optional().describe('Exact tool-result provenance when the issuing request is retained.'),
|
|
260
|
+
'sourceRequestNumber': z.number().optional(),
|
|
261
|
+
'preview': z.string().describe('Single-line preview (whitespace-collapsed).'),
|
|
262
|
+
'full': z.string().describe('Verbatim full text — the panel\'s expand affordance shows exactly this. Assistant rows carry a JSON string `{reasoning?, text?, calls?}` (calls keep the raw argument JSON); every other role is its plain text.'),
|
|
263
|
+
'chars': z.number().describe('Exact character count of `full`.'),
|
|
264
|
+
'durationMs': z.number().optional().describe('Generation time of this assistant row, when it is one.'),
|
|
265
|
+
'sourceTurn': z.number().optional().describe('Durable source turn, when supplied by the host.'),
|
|
266
|
+
'isError': z.boolean().optional().describe('Explicit tool failure; never inferred from response prose.'),
|
|
267
|
+
'freshness': z.union([z.literal("new"), z.literal("history")]),
|
|
268
|
+
})).describe('systemPrompt 组装原文;source 为 assemble section 名。'),
|
|
269
|
+
'tools': z.array(z.object({
|
|
270
|
+
'name': z.string(),
|
|
271
|
+
'description': z.string(),
|
|
272
|
+
'parameters': z.string().describe('Serialized parameter schema (pretty JSON).'),
|
|
273
|
+
'chars': z.number().describe('Exact character count of the serialized definition.'),
|
|
274
|
+
'added': z.boolean().describe('True when this definition was not present in the previous request.'),
|
|
275
|
+
})),
|
|
276
|
+
'history': z.array(z.object({
|
|
277
|
+
'index': z.number().describe('Position in the wire message stream (0-based across the whole request). `-1` marks the one-shot system slot (`GenerateOptions.system`), which sits ahead of the message array rather than inside it.'),
|
|
278
|
+
'messageId': z.string().optional(),
|
|
279
|
+
'compactionId': z.string().optional(),
|
|
280
|
+
'compactionRequest': z.object({
|
|
281
|
+
'turnSeq': z.number(),
|
|
282
|
+
'scopeId': z.string(),
|
|
283
|
+
'seq': z.number(),
|
|
284
|
+
'requestNumber': z.number().optional(),
|
|
285
|
+
}).optional(),
|
|
286
|
+
'pruning': z.object({
|
|
287
|
+
'beforeChars': z.number(),
|
|
288
|
+
'afterChars': z.number(),
|
|
289
|
+
'before': z.object({
|
|
290
|
+
'turnSeq': z.number(),
|
|
291
|
+
'scopeId': z.string(),
|
|
292
|
+
'seq': z.number(),
|
|
293
|
+
'requestNumber': z.number().optional(),
|
|
294
|
+
}).optional(),
|
|
295
|
+
}).optional(),
|
|
296
|
+
'category': z.union([z.literal("user"), z.literal("compaction"), z.literal("system"), z.literal("tool-definition"), z.literal("assistant"), z.literal("tool-result"), z.literal("skill-injection"), z.literal("reminder-injection"), z.literal("plugin-injection"), z.literal("runtime-snapshot"), z.literal("tool-change")]),
|
|
297
|
+
'source': z.string().describe('角色/来源标签:model、runtime-context、skill-catalog、section 名等。'),
|
|
298
|
+
'toolCalls': z.array(z.string()).optional().describe('Tool calls this assistant row issued (the chip on assistant rows).'),
|
|
299
|
+
'toolCallId': z.string().optional().describe('Exact tool-result provenance when the issuing request is retained.'),
|
|
300
|
+
'sourceRequestNumber': z.number().optional(),
|
|
301
|
+
'preview': z.string().describe('Single-line preview (whitespace-collapsed).'),
|
|
302
|
+
'full': z.string().describe('Verbatim full text — the panel\'s expand affordance shows exactly this. Assistant rows carry a JSON string `{reasoning?, text?, calls?}` (calls keep the raw argument JSON); every other role is its plain text.'),
|
|
303
|
+
'chars': z.number().describe('Exact character count of `full`.'),
|
|
304
|
+
'durationMs': z.number().optional().describe('Generation time of this assistant row, when it is one.'),
|
|
305
|
+
'sourceTurn': z.number().optional().describe('Durable source turn, when supplied by the host.'),
|
|
306
|
+
'isError': z.boolean().optional().describe('Explicit tool failure; never inferred from response prose.'),
|
|
307
|
+
'freshness': z.union([z.literal("new"), z.literal("history")]),
|
|
308
|
+
})).describe('继承自之前请求的消息(默认折叠)。'),
|
|
309
|
+
'added': z.array(z.object({
|
|
310
|
+
'index': z.number().describe('Position in the wire message stream (0-based across the whole request). `-1` marks the one-shot system slot (`GenerateOptions.system`), which sits ahead of the message array rather than inside it.'),
|
|
311
|
+
'messageId': z.string().optional(),
|
|
312
|
+
'compactionId': z.string().optional(),
|
|
313
|
+
'compactionRequest': z.object({
|
|
314
|
+
'turnSeq': z.number(),
|
|
315
|
+
'scopeId': z.string(),
|
|
316
|
+
'seq': z.number(),
|
|
317
|
+
'requestNumber': z.number().optional(),
|
|
318
|
+
}).optional(),
|
|
319
|
+
'pruning': z.object({
|
|
320
|
+
'beforeChars': z.number(),
|
|
321
|
+
'afterChars': z.number(),
|
|
322
|
+
'before': z.object({
|
|
323
|
+
'turnSeq': z.number(),
|
|
324
|
+
'scopeId': z.string(),
|
|
325
|
+
'seq': z.number(),
|
|
326
|
+
'requestNumber': z.number().optional(),
|
|
327
|
+
}).optional(),
|
|
328
|
+
}).optional(),
|
|
329
|
+
'category': z.union([z.literal("user"), z.literal("compaction"), z.literal("system"), z.literal("tool-definition"), z.literal("assistant"), z.literal("tool-result"), z.literal("skill-injection"), z.literal("reminder-injection"), z.literal("plugin-injection"), z.literal("runtime-snapshot"), z.literal("tool-change")]),
|
|
330
|
+
'source': z.string().describe('角色/来源标签:model、runtime-context、skill-catalog、section 名等。'),
|
|
331
|
+
'toolCalls': z.array(z.string()).optional().describe('Tool calls this assistant row issued (the chip on assistant rows).'),
|
|
332
|
+
'toolCallId': z.string().optional().describe('Exact tool-result provenance when the issuing request is retained.'),
|
|
333
|
+
'sourceRequestNumber': z.number().optional(),
|
|
334
|
+
'preview': z.string().describe('Single-line preview (whitespace-collapsed).'),
|
|
335
|
+
'full': z.string().describe('Verbatim full text — the panel\'s expand affordance shows exactly this. Assistant rows carry a JSON string `{reasoning?, text?, calls?}` (calls keep the raw argument JSON); every other role is its plain text.'),
|
|
336
|
+
'chars': z.number().describe('Exact character count of `full`.'),
|
|
337
|
+
'durationMs': z.number().optional().describe('Generation time of this assistant row, when it is one.'),
|
|
338
|
+
'sourceTurn': z.number().optional().describe('Durable source turn, when supplied by the host.'),
|
|
339
|
+
'isError': z.boolean().optional().describe('Explicit tool failure; never inferred from response prose.'),
|
|
340
|
+
'freshness': z.union([z.literal("new"), z.literal("history")]),
|
|
341
|
+
})).describe('相对上一请求新收到的内容(含上一响应及其工具返回;默认展开)。'),
|
|
342
|
+
}),
|
|
343
|
+
}), z.object({
|
|
344
|
+
'refused': z.literal("no-authorized-content").readonly(),
|
|
345
|
+
'generation': z.string().readonly().optional().describe('The answering instance\'s epoch — same restart-invalidation role as on the result envelopes.'),
|
|
346
|
+
})]))
|
|
347
|
+
let _khorsheed_dsh_context_lens_requestInspector_getSessionTrend_parameter_0$schema$value
|
|
348
|
+
const _khorsheed_dsh_context_lens_requestInspector_getSessionTrend_parameter_0$schema = () => (_khorsheed_dsh_context_lens_requestInspector_getSessionTrend_parameter_0$schema$value ??= z.string())
|
|
349
|
+
let _khorsheed_dsh_context_lens_requestInspector_getSessionTrend_parameter_1$schema$value
|
|
350
|
+
const _khorsheed_dsh_context_lens_requestInspector_getSessionTrend_parameter_1$schema = () => (_khorsheed_dsh_context_lens_requestInspector_getSessionTrend_parameter_1$schema$value ??= z.union([z.undefined(), z.object({
|
|
351
|
+
'scopes': z.array(z.string()).readonly().optional(),
|
|
352
|
+
})]))
|
|
353
|
+
let _khorsheed_dsh_context_lens_requestInspector_getSessionTrend_result$schema$value
|
|
354
|
+
const _khorsheed_dsh_context_lens_requestInspector_getSessionTrend_result$schema = () => (_khorsheed_dsh_context_lens_requestInspector_getSessionTrend_result$schema$value ??= z.object({
|
|
355
|
+
'requests': z.array(z.object({
|
|
356
|
+
'requestNumber': z.number().optional(),
|
|
357
|
+
'config': z.object({
|
|
358
|
+
'provider': z.string().optional(),
|
|
359
|
+
'model': z.string().optional(),
|
|
360
|
+
'maxTokens': z.number().optional(),
|
|
361
|
+
'reasoningEffort': z.string().optional(),
|
|
362
|
+
'temperature': z.number().optional(),
|
|
363
|
+
}).optional().describe('Per-request snapshot; never substitute the scope’s latest config.'),
|
|
364
|
+
'seq': z.number(),
|
|
365
|
+
'scopeId': z.string(),
|
|
366
|
+
'status': z.union([z.literal("failed"), z.literal("ok"), z.literal("streaming")]),
|
|
367
|
+
'responseSummary': z.union([z.object({
|
|
368
|
+
'kind': z.literal("compaction"),
|
|
369
|
+
}), z.object({
|
|
370
|
+
'kind': z.literal("tool"),
|
|
371
|
+
'name': z.string(),
|
|
372
|
+
'hint': z.string().optional(),
|
|
373
|
+
'more': z.number().optional(),
|
|
374
|
+
'toolCounts': z.array(z.object({
|
|
375
|
+
'name': z.string(),
|
|
376
|
+
'count': z.number(),
|
|
377
|
+
})).optional(),
|
|
378
|
+
}), z.object({
|
|
379
|
+
'kind': z.literal("text"),
|
|
380
|
+
}), z.object({
|
|
381
|
+
'kind': z.literal("reasoning"),
|
|
382
|
+
}), z.object({
|
|
383
|
+
'kind': z.literal("none"),
|
|
384
|
+
})]),
|
|
385
|
+
'startedAt': z.number(),
|
|
386
|
+
'usage': z.object({
|
|
387
|
+
'inputTokens': z.number(),
|
|
388
|
+
'outputTokens': z.number(),
|
|
389
|
+
'totalTokens': z.number().optional(),
|
|
390
|
+
'cacheReadTokens': z.number().optional().describe('Measured cache hits — the cache column\'s only source of truth.'),
|
|
391
|
+
'cacheWriteTokens': z.number().optional().describe('Cache-write input (Anthropic `cache_creation_input_tokens` et al.). The host usage contract\'s buckets are disjoint, so a request\'s full input is `inputTokens + cacheReadTokens + cacheWriteTokens` — dropping this bucket shows a cache-writing (first) request as almost input-free.'),
|
|
392
|
+
}).optional(),
|
|
393
|
+
'totalMs': z.number().optional(),
|
|
394
|
+
'timingApproximate': z.boolean().optional().describe('Logged compaction bracket, not an exact provider-call duration.'),
|
|
395
|
+
'totalChars': z.number().describe('请求体总字符数(明细头右上)。'),
|
|
396
|
+
'toolErrors': z.number().optional(),
|
|
397
|
+
'turnSeq': z.number(),
|
|
398
|
+
})),
|
|
399
|
+
'turns': z.array(z.object({
|
|
400
|
+
'sessionId': z.string(),
|
|
401
|
+
'roomDecisionIds': z.array(z.string()).optional().describe('Ids of the room decisions this turn holds (a 查看判断 jump resolves its turn by them).'),
|
|
402
|
+
'turnSeq': z.number().describe('The panel-facing address. Real turns key on the host\'s own turn number (stable across live capture and log backfill, and durable across process restarts); purpose pseudo-turns (compaction / session-title buckets) take negative addresses that are NOT durable — they re-derive from the session\'s bucket counter on every mount. Address semantics: `(sessionId, turnSeq)` names a TURN, never a request.'),
|
|
403
|
+
'hostTurn': z.number().optional().describe('The host\'s turn number on real turns; absent marks a purpose pseudo-turn.'),
|
|
404
|
+
'query': z.string().describe('用户 query 预览(单行截断)。'),
|
|
405
|
+
'trigger': z.object({
|
|
406
|
+
'source': z.string(),
|
|
407
|
+
'text': z.string(),
|
|
408
|
+
}).optional().describe('No human message this turn: the producer and text of the first message that started it.'),
|
|
409
|
+
'startSeq': z.number().optional().describe('The `turn/start` event\'s log seq — the target the chat pages history back to before a jump.'),
|
|
410
|
+
'ordinal': z.number().optional().describe('The turn\'s number in one session-wide sequence (main turns and room rounds, by time).'),
|
|
411
|
+
'room': z.object({
|
|
412
|
+
'targets': z.array(z.string()),
|
|
413
|
+
}).optional().describe('A room round: a human message to the room made outside any main turn, and who it went to.'),
|
|
414
|
+
'startedAt': z.number(),
|
|
415
|
+
'endedAt': z.number().optional(),
|
|
416
|
+
'requestCount': z.number(),
|
|
417
|
+
'scopeCount': z.number(),
|
|
418
|
+
'failedScopeCount': z.number(),
|
|
419
|
+
'totalInputTokens': z.number(),
|
|
420
|
+
'totalOutputTokens': z.number(),
|
|
421
|
+
'origin': z.union([z.literal("live"), z.literal("log-reconstructed")]).optional().describe('Fidelity marker: `live` once any in-process capture landed on the turn (the log lane never merges into such a turn), `log-reconstructed` when the whole turn was rebuilt from the session log.'),
|
|
422
|
+
'closingMessageId': z.string().optional().describe('The turn-tail assistant message id — the `conversation.chat.assistant-actions` owner prop, so the message-row icon can map itself back to this turn.'),
|
|
423
|
+
})),
|
|
424
|
+
'backfill': z.object({
|
|
425
|
+
'state': z.union([z.literal("complete"), z.literal("partial"), z.literal("none"), z.literal("broken")]).describe('`none` — never read (no durable log yet, or no persistence backend); `partial` — some turns reconstructed, older ones dropped by budget (the read retries on later queries as room frees); `complete` — every turn in the log is represented; `broken` — the log refused to decode.'),
|
|
426
|
+
'reason': z.string().optional().describe('The decode failure summary when `state` is `broken`.'),
|
|
427
|
+
}),
|
|
428
|
+
'generation': z.string().optional().describe('The answering instance\'s epoch (a mount-time id). Request `seq` values are process-local and reset on restart: a caller holding seqs across calls tags them with the generation of the result that yielded them and treats a changed generation as invalidating every held seq — an old seq must never silently resolve to a different request.'),
|
|
429
|
+
'evictedTurnCount': z.number().optional().describe('Turns this session collected and later evicted under the retention caps — the "collected then dropped" signal next to the backfill watermark, present only when non-zero. Blind spot: a session whose last turn evicts frees its whole slot, so fully-evicted reads exactly like never-seen (the store cannot tell the two apart).'),
|
|
430
|
+
'parent': z.object({
|
|
431
|
+
'sessionId': z.string(),
|
|
432
|
+
'title': z.string().optional(),
|
|
433
|
+
'hostTurn': z.number().optional(),
|
|
434
|
+
'label': z.string().optional(),
|
|
435
|
+
}).optional().describe('This session is another session\'s child (its log header names a `parentSession`): the parent\'s title, the turn that started it, and the label it was catalogued under.'),
|
|
436
|
+
'range': z.object({
|
|
437
|
+
'first': z.number(),
|
|
438
|
+
'last': z.number(),
|
|
439
|
+
}).optional().describe('First and last host turn the session\'s log holds; turns between them that `turns` lacks are not loaded.'),
|
|
440
|
+
'total': z.number().optional().describe('How many turns the session has in the ordinal sequence (main turns and room rounds).'),
|
|
441
|
+
'unloaded': z.array(z.object({
|
|
442
|
+
'from': z.number(),
|
|
443
|
+
'to': z.number(),
|
|
444
|
+
'firstHost': z.number(),
|
|
445
|
+
'lastHost': z.number(),
|
|
446
|
+
})).optional().describe('Runs of main turns not loaded, in ordinals, with the host turns at their ends (what a window move asks for).'),
|
|
447
|
+
'handoffs': z.array(z.object({
|
|
448
|
+
'at': z.number(),
|
|
449
|
+
'name': z.string(),
|
|
450
|
+
})).optional().describe('Room coordinator handoffs, for the session map.'),
|
|
451
|
+
'authorizedScopes': z.array(z.string()).optional().describe('Present exactly when the query carried a {@link ScopeFilter}: the authorized scopes that exist in the session. An empty array is the explicit zero-authorized-content signal — distinct from the field\'s absence (unfiltered) and from unknown-session emptiness.'),
|
|
452
|
+
}))
|
|
453
|
+
let _khorsheed_dsh_context_lens_requestInspector_getTurn_parameter_0$schema$value
|
|
454
|
+
const _khorsheed_dsh_context_lens_requestInspector_getTurn_parameter_0$schema = () => (_khorsheed_dsh_context_lens_requestInspector_getTurn_parameter_0$schema$value ??= z.string())
|
|
455
|
+
let _khorsheed_dsh_context_lens_requestInspector_getTurn_parameter_1$schema$value
|
|
456
|
+
const _khorsheed_dsh_context_lens_requestInspector_getTurn_parameter_1$schema = () => (_khorsheed_dsh_context_lens_requestInspector_getTurn_parameter_1$schema$value ??= z.number())
|
|
457
|
+
let _khorsheed_dsh_context_lens_requestInspector_getTurn_parameter_2$schema$value
|
|
458
|
+
const _khorsheed_dsh_context_lens_requestInspector_getTurn_parameter_2$schema = () => (_khorsheed_dsh_context_lens_requestInspector_getTurn_parameter_2$schema$value ??= z.union([z.undefined(), z.object({
|
|
459
|
+
'scopes': z.array(z.string()).readonly().optional(),
|
|
460
|
+
})]))
|
|
461
|
+
let _khorsheed_dsh_context_lens_requestInspector_getTurn_result$schema$value
|
|
462
|
+
const _khorsheed_dsh_context_lens_requestInspector_getTurn_result$schema = () => (_khorsheed_dsh_context_lens_requestInspector_getTurn_result$schema$value ??= z.union([z.undefined(), z.object({
|
|
463
|
+
'turn': z.object({
|
|
464
|
+
'sessionId': z.string(),
|
|
465
|
+
'roomDecisionIds': z.array(z.string()).optional().describe('Ids of the room decisions this turn holds (a 查看判断 jump resolves its turn by them).'),
|
|
466
|
+
'turnSeq': z.number().describe('The panel-facing address. Real turns key on the host\'s own turn number (stable across live capture and log backfill, and durable across process restarts); purpose pseudo-turns (compaction / session-title buckets) take negative addresses that are NOT durable — they re-derive from the session\'s bucket counter on every mount. Address semantics: `(sessionId, turnSeq)` names a TURN, never a request.'),
|
|
467
|
+
'hostTurn': z.number().optional().describe('The host\'s turn number on real turns; absent marks a purpose pseudo-turn.'),
|
|
468
|
+
'query': z.string().describe('用户 query 预览(单行截断)。'),
|
|
469
|
+
'trigger': z.object({
|
|
470
|
+
'source': z.string(),
|
|
471
|
+
'text': z.string(),
|
|
472
|
+
}).optional().describe('No human message this turn: the producer and text of the first message that started it.'),
|
|
473
|
+
'startSeq': z.number().optional().describe('The `turn/start` event\'s log seq — the target the chat pages history back to before a jump.'),
|
|
474
|
+
'ordinal': z.number().optional().describe('The turn\'s number in one session-wide sequence (main turns and room rounds, by time).'),
|
|
475
|
+
'room': z.object({
|
|
476
|
+
'targets': z.array(z.string()),
|
|
477
|
+
}).optional().describe('A room round: a human message to the room made outside any main turn, and who it went to.'),
|
|
478
|
+
'startedAt': z.number(),
|
|
479
|
+
'endedAt': z.number().optional(),
|
|
480
|
+
'requestCount': z.number(),
|
|
481
|
+
'scopeCount': z.number(),
|
|
482
|
+
'failedScopeCount': z.number(),
|
|
483
|
+
'totalInputTokens': z.number(),
|
|
484
|
+
'totalOutputTokens': z.number(),
|
|
485
|
+
'origin': z.union([z.literal("live"), z.literal("log-reconstructed")]).optional().describe('Fidelity marker: `live` once any in-process capture landed on the turn (the log lane never merges into such a turn), `log-reconstructed` when the whole turn was rebuilt from the session log.'),
|
|
486
|
+
'closingMessageId': z.string().optional().describe('The turn-tail assistant message id — the `conversation.chat.assistant-actions` owner prop, so the message-row icon can map itself back to this turn.'),
|
|
487
|
+
}),
|
|
488
|
+
'scopes': z.array(z.object({
|
|
489
|
+
'scopeId': z.string(),
|
|
490
|
+
'scopeSeq': z.number().describe('Per-session 1-based ordinal in scope-creation order (the chip\'s `#N`).'),
|
|
491
|
+
'kind': z.union([z.literal("subagent"), z.literal("main"), z.literal("compaction")]).describe('`compaction`: a compaction call shown inside the turn it happened in (scopeId `compaction:<pseudo turnSeq>`).'),
|
|
492
|
+
'label': z.string().optional(),
|
|
493
|
+
'provider': z.string().optional().describe('The child\'s `subagent/descriptor` provider; anything not `dsh*` is an external agent.'),
|
|
494
|
+
'delegatedBy': z.object({
|
|
495
|
+
'turnSeq': z.number(),
|
|
496
|
+
'scopeId': z.string(),
|
|
497
|
+
'seq': z.number(),
|
|
498
|
+
'requestNumber': z.number().optional(),
|
|
499
|
+
}).optional().describe('The main request whose tool call started this child, when one did.'),
|
|
500
|
+
'compaction': z.object({
|
|
501
|
+
'replacedCount': z.number().optional(),
|
|
502
|
+
'after': z.object({
|
|
503
|
+
'turnSeq': z.number(),
|
|
504
|
+
'scopeId': z.string(),
|
|
505
|
+
'seq': z.number(),
|
|
506
|
+
'requestNumber': z.number().optional(),
|
|
507
|
+
}).optional(),
|
|
508
|
+
'betweenTurns': z.literal(true).optional(),
|
|
509
|
+
}).optional().describe('Compaction views: how many messages it replaced, and the main request it followed.'),
|
|
510
|
+
'status': z.union([z.literal("failed"), z.literal("running"), z.literal("ok")]),
|
|
511
|
+
'error': z.string().optional(),
|
|
512
|
+
'config': z.object({
|
|
513
|
+
'provider': z.string().optional(),
|
|
514
|
+
'model': z.string().optional(),
|
|
515
|
+
'maxTokens': z.number().optional(),
|
|
516
|
+
'reasoningEffort': z.string().optional(),
|
|
517
|
+
'temperature': z.number().optional(),
|
|
518
|
+
}),
|
|
519
|
+
'startedAt': z.number(),
|
|
520
|
+
'endedAt': z.number().optional(),
|
|
521
|
+
'origin': z.union([z.literal("live"), z.literal("log-reconstructed")]).optional().describe('Fidelity marker: where this scope\'s captured content came from (the two lanes are mutually exclusive per scope — whichever fills first owns it). Absent while the scope holds no captured content yet.'),
|
|
522
|
+
'requests': z.array(z.object({
|
|
523
|
+
'requestNumber': z.number().optional(),
|
|
524
|
+
'config': z.object({
|
|
525
|
+
'provider': z.string().optional(),
|
|
526
|
+
'model': z.string().optional(),
|
|
527
|
+
'maxTokens': z.number().optional(),
|
|
528
|
+
'reasoningEffort': z.string().optional(),
|
|
529
|
+
'temperature': z.number().optional(),
|
|
530
|
+
}).optional().describe('Per-request snapshot; never substitute the scope’s latest config.'),
|
|
531
|
+
'seq': z.number(),
|
|
532
|
+
'scopeId': z.string(),
|
|
533
|
+
'status': z.union([z.literal("failed"), z.literal("ok"), z.literal("streaming")]),
|
|
534
|
+
'responseSummary': z.union([z.object({
|
|
535
|
+
'kind': z.literal("compaction"),
|
|
536
|
+
}), z.object({
|
|
537
|
+
'kind': z.literal("tool"),
|
|
538
|
+
'name': z.string(),
|
|
539
|
+
'hint': z.string().optional(),
|
|
540
|
+
'more': z.number().optional(),
|
|
541
|
+
'toolCounts': z.array(z.object({
|
|
542
|
+
'name': z.string(),
|
|
543
|
+
'count': z.number(),
|
|
544
|
+
})).optional(),
|
|
545
|
+
}), z.object({
|
|
546
|
+
'kind': z.literal("text"),
|
|
547
|
+
}), z.object({
|
|
548
|
+
'kind': z.literal("reasoning"),
|
|
549
|
+
}), z.object({
|
|
550
|
+
'kind': z.literal("none"),
|
|
551
|
+
})]),
|
|
552
|
+
'startedAt': z.number(),
|
|
553
|
+
'usage': z.object({
|
|
554
|
+
'inputTokens': z.number(),
|
|
555
|
+
'outputTokens': z.number(),
|
|
556
|
+
'totalTokens': z.number().optional(),
|
|
557
|
+
'cacheReadTokens': z.number().optional().describe('Measured cache hits — the cache column\'s only source of truth.'),
|
|
558
|
+
'cacheWriteTokens': z.number().optional().describe('Cache-write input (Anthropic `cache_creation_input_tokens` et al.). The host usage contract\'s buckets are disjoint, so a request\'s full input is `inputTokens + cacheReadTokens + cacheWriteTokens` — dropping this bucket shows a cache-writing (first) request as almost input-free.'),
|
|
559
|
+
}).optional(),
|
|
560
|
+
'totalMs': z.number().optional(),
|
|
561
|
+
'timingApproximate': z.boolean().optional().describe('Logged compaction bracket, not an exact provider-call duration.'),
|
|
562
|
+
'totalChars': z.number().describe('请求体总字符数(明细头右上)。'),
|
|
563
|
+
'toolErrors': z.number().optional(),
|
|
564
|
+
})),
|
|
565
|
+
})),
|
|
566
|
+
'roomDecisions': z.array(z.object({
|
|
567
|
+
'id': z.string(),
|
|
568
|
+
'seq': z.number(),
|
|
569
|
+
'at': z.number(),
|
|
570
|
+
'scenario': z.string().describe('`task-filing` / `report-timing` (the room\'s scenario table).'),
|
|
571
|
+
'outcome': z.string(),
|
|
572
|
+
'rule': z.string().optional(),
|
|
573
|
+
'probability': z.number().optional(),
|
|
574
|
+
'model': z.string(),
|
|
575
|
+
'latencyMs': z.number().optional(),
|
|
576
|
+
'cached': z.boolean().optional(),
|
|
577
|
+
'inputTokens': z.number().optional(),
|
|
578
|
+
'outputTokens': z.number().optional(),
|
|
579
|
+
'request': z.object({
|
|
580
|
+
'state': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => LensJsonValueRemoteCodec$schema())), z.record(z.string(), z.lazy(() => LensJsonValueRemoteCodec$schema()))]),
|
|
581
|
+
'questions': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => LensJsonValueRemoteCodec$schema())), z.record(z.string(), z.lazy(() => LensJsonValueRemoteCodec$schema()))]),
|
|
582
|
+
}),
|
|
583
|
+
'response': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => LensJsonValueRemoteCodec$schema())), z.record(z.string(), z.lazy(() => LensJsonValueRemoteCodec$schema()))]).optional(),
|
|
584
|
+
'failure': z.object({
|
|
585
|
+
'reason': z.string(),
|
|
586
|
+
'detail': z.string().optional(),
|
|
587
|
+
}).optional(),
|
|
588
|
+
'about': z.object({
|
|
589
|
+
'message': z.string().optional(),
|
|
590
|
+
'task': z.object({
|
|
591
|
+
'number': z.number(),
|
|
592
|
+
'title': z.string(),
|
|
593
|
+
}).optional(),
|
|
594
|
+
'from': z.string().optional(),
|
|
595
|
+
'to': z.string().optional(),
|
|
596
|
+
}),
|
|
597
|
+
})).optional().describe('The room\'s decision-model calls made during this turn (the 房间 tab); absent when none.'),
|
|
598
|
+
'generation': z.string().optional().describe('The answering instance\'s epoch — see {@link ListTurnsResult.generation}.'),
|
|
599
|
+
'authorizedScopes': z.array(z.string()).optional().describe('Present exactly when the query carried a {@link ScopeFilter}: this turn\'s authorized scopes. An empty array means the turn exists but the filter excluded every scope on it (the turn row\'s own fields are session-level metadata and still answer).'),
|
|
600
|
+
})]))
|
|
601
|
+
let _khorsheed_dsh_context_lens_requestInspector_getTurnTiming_parameter_0$schema$value
|
|
602
|
+
const _khorsheed_dsh_context_lens_requestInspector_getTurnTiming_parameter_0$schema = () => (_khorsheed_dsh_context_lens_requestInspector_getTurnTiming_parameter_0$schema$value ??= z.string())
|
|
603
|
+
let _khorsheed_dsh_context_lens_requestInspector_getTurnTiming_parameter_1$schema$value
|
|
604
|
+
const _khorsheed_dsh_context_lens_requestInspector_getTurnTiming_parameter_1$schema = () => (_khorsheed_dsh_context_lens_requestInspector_getTurnTiming_parameter_1$schema$value ??= z.number())
|
|
605
|
+
let _khorsheed_dsh_context_lens_requestInspector_getTurnTiming_parameter_2$schema$value
|
|
606
|
+
const _khorsheed_dsh_context_lens_requestInspector_getTurnTiming_parameter_2$schema = () => (_khorsheed_dsh_context_lens_requestInspector_getTurnTiming_parameter_2$schema$value ??= z.union([z.undefined(), z.object({
|
|
607
|
+
'scopes': z.array(z.string()).readonly().optional(),
|
|
608
|
+
})]))
|
|
609
|
+
let _khorsheed_dsh_context_lens_requestInspector_getTurnTiming_result$schema$value
|
|
610
|
+
const _khorsheed_dsh_context_lens_requestInspector_getTurnTiming_result$schema = () => (_khorsheed_dsh_context_lens_requestInspector_getTurnTiming_result$schema$value ??= z.union([z.undefined(), z.object({
|
|
611
|
+
'startedAt': z.number().optional(),
|
|
612
|
+
'turnSeq': z.number(),
|
|
613
|
+
'totalMs': z.number(),
|
|
614
|
+
'buckets': z.object({
|
|
615
|
+
'waitMs': z.number(),
|
|
616
|
+
'reasoningMs': z.number(),
|
|
617
|
+
'toolArgsMs': z.number(),
|
|
618
|
+
'textMs': z.number(),
|
|
619
|
+
'toolExecMs': z.number(),
|
|
620
|
+
'otherMs': z.number(),
|
|
621
|
+
}).describe('Six buckets summed across the turn\'s requests, in timeline order.'),
|
|
622
|
+
'lanes': z.array(z.object({
|
|
623
|
+
'kind': z.union([z.literal("text"), z.literal("other"), z.literal("reasoning"), z.literal("wait"), z.literal("tool-args"), z.literal("tool-exec")]),
|
|
624
|
+
'requestSeq': z.number().describe('Request seq this entry belongs to (click → token tab request).'),
|
|
625
|
+
'scopeId': z.string(),
|
|
626
|
+
'startedAt': z.number(),
|
|
627
|
+
'durationMs': z.number(),
|
|
628
|
+
'tool': z.string().optional().describe('tool name for tool-exec lanes.'),
|
|
629
|
+
'callId': z.string().optional(),
|
|
630
|
+
'isError': z.boolean().optional(),
|
|
631
|
+
})).describe('Strictly ordered lane entries for the timeline.'),
|
|
632
|
+
'tools': z.array(z.object({
|
|
633
|
+
'tool': z.string(),
|
|
634
|
+
'calls': z.number(),
|
|
635
|
+
'totalMs': z.number(),
|
|
636
|
+
'argsMs': z.number().describe('Sum of the model\'s argument-generation time for this tool\'s calls.'),
|
|
637
|
+
})).describe('Per-tool aggregation for the 按工具拆分 section.'),
|
|
638
|
+
'generation': z.string().optional().describe('The answering instance\'s epoch — see {@link ListTurnsResult.generation}.'),
|
|
639
|
+
'authorizedScopes': z.array(z.string()).optional().describe('Present exactly when the query carried a {@link ScopeFilter}: this turn\'s authorized scopes. An empty array means the turn exists but the filter excluded every scope on it — buckets, lanes, and tools then aggregate over nothing (the session-level `totalMs` still answers).'),
|
|
640
|
+
})]))
|
|
641
|
+
let _khorsheed_dsh_context_lens_requestInspector_listTurns_parameter_0$schema$value
|
|
642
|
+
const _khorsheed_dsh_context_lens_requestInspector_listTurns_parameter_0$schema = () => (_khorsheed_dsh_context_lens_requestInspector_listTurns_parameter_0$schema$value ??= z.string())
|
|
643
|
+
let _khorsheed_dsh_context_lens_requestInspector_listTurns_parameter_1$schema$value
|
|
644
|
+
const _khorsheed_dsh_context_lens_requestInspector_listTurns_parameter_1$schema = () => (_khorsheed_dsh_context_lens_requestInspector_listTurns_parameter_1$schema$value ??= z.union([z.undefined(), z.object({
|
|
645
|
+
'scopes': z.array(z.string()).readonly().optional(),
|
|
646
|
+
})]))
|
|
647
|
+
let _khorsheed_dsh_context_lens_requestInspector_listTurns_result$schema$value
|
|
648
|
+
const _khorsheed_dsh_context_lens_requestInspector_listTurns_result$schema = () => (_khorsheed_dsh_context_lens_requestInspector_listTurns_result$schema$value ??= z.object({
|
|
649
|
+
'turns': z.array(z.object({
|
|
650
|
+
'sessionId': z.string(),
|
|
651
|
+
'roomDecisionIds': z.array(z.string()).optional().describe('Ids of the room decisions this turn holds (a 查看判断 jump resolves its turn by them).'),
|
|
652
|
+
'turnSeq': z.number().describe('The panel-facing address. Real turns key on the host\'s own turn number (stable across live capture and log backfill, and durable across process restarts); purpose pseudo-turns (compaction / session-title buckets) take negative addresses that are NOT durable — they re-derive from the session\'s bucket counter on every mount. Address semantics: `(sessionId, turnSeq)` names a TURN, never a request.'),
|
|
653
|
+
'hostTurn': z.number().optional().describe('The host\'s turn number on real turns; absent marks a purpose pseudo-turn.'),
|
|
654
|
+
'query': z.string().describe('用户 query 预览(单行截断)。'),
|
|
655
|
+
'trigger': z.object({
|
|
656
|
+
'source': z.string(),
|
|
657
|
+
'text': z.string(),
|
|
658
|
+
}).optional().describe('No human message this turn: the producer and text of the first message that started it.'),
|
|
659
|
+
'startSeq': z.number().optional().describe('The `turn/start` event\'s log seq — the target the chat pages history back to before a jump.'),
|
|
660
|
+
'ordinal': z.number().optional().describe('The turn\'s number in one session-wide sequence (main turns and room rounds, by time).'),
|
|
661
|
+
'room': z.object({
|
|
662
|
+
'targets': z.array(z.string()),
|
|
663
|
+
}).optional().describe('A room round: a human message to the room made outside any main turn, and who it went to.'),
|
|
664
|
+
'startedAt': z.number(),
|
|
665
|
+
'endedAt': z.number().optional(),
|
|
666
|
+
'requestCount': z.number(),
|
|
667
|
+
'scopeCount': z.number(),
|
|
668
|
+
'failedScopeCount': z.number(),
|
|
669
|
+
'totalInputTokens': z.number(),
|
|
670
|
+
'totalOutputTokens': z.number(),
|
|
671
|
+
'origin': z.union([z.literal("live"), z.literal("log-reconstructed")]).optional().describe('Fidelity marker: `live` once any in-process capture landed on the turn (the log lane never merges into such a turn), `log-reconstructed` when the whole turn was rebuilt from the session log.'),
|
|
672
|
+
'closingMessageId': z.string().optional().describe('The turn-tail assistant message id — the `conversation.chat.assistant-actions` owner prop, so the message-row icon can map itself back to this turn.'),
|
|
673
|
+
})),
|
|
674
|
+
'backfill': z.object({
|
|
675
|
+
'state': z.union([z.literal("complete"), z.literal("partial"), z.literal("none"), z.literal("broken")]).describe('`none` — never read (no durable log yet, or no persistence backend); `partial` — some turns reconstructed, older ones dropped by budget (the read retries on later queries as room frees); `complete` — every turn in the log is represented; `broken` — the log refused to decode.'),
|
|
676
|
+
'reason': z.string().optional().describe('The decode failure summary when `state` is `broken`.'),
|
|
677
|
+
}),
|
|
678
|
+
'generation': z.string().optional().describe('The answering instance\'s epoch (a mount-time id). Request `seq` values are process-local and reset on restart: a caller holding seqs across calls tags them with the generation of the result that yielded them and treats a changed generation as invalidating every held seq — an old seq must never silently resolve to a different request.'),
|
|
679
|
+
'evictedTurnCount': z.number().optional().describe('Turns this session collected and later evicted under the retention caps — the "collected then dropped" signal next to the backfill watermark, present only when non-zero. Blind spot: a session whose last turn evicts frees its whole slot, so fully-evicted reads exactly like never-seen (the store cannot tell the two apart).'),
|
|
680
|
+
'parent': z.object({
|
|
681
|
+
'sessionId': z.string(),
|
|
682
|
+
'title': z.string().optional(),
|
|
683
|
+
'hostTurn': z.number().optional(),
|
|
684
|
+
'label': z.string().optional(),
|
|
685
|
+
}).optional().describe('This session is another session\'s child (its log header names a `parentSession`): the parent\'s title, the turn that started it, and the label it was catalogued under.'),
|
|
686
|
+
'range': z.object({
|
|
687
|
+
'first': z.number(),
|
|
688
|
+
'last': z.number(),
|
|
689
|
+
}).optional().describe('First and last host turn the session\'s log holds; turns between them that `turns` lacks are not loaded.'),
|
|
690
|
+
'total': z.number().optional().describe('How many turns the session has in the ordinal sequence (main turns and room rounds).'),
|
|
691
|
+
'unloaded': z.array(z.object({
|
|
692
|
+
'from': z.number(),
|
|
693
|
+
'to': z.number(),
|
|
694
|
+
'firstHost': z.number(),
|
|
695
|
+
'lastHost': z.number(),
|
|
696
|
+
})).optional().describe('Runs of main turns not loaded, in ordinals, with the host turns at their ends (what a window move asks for).'),
|
|
697
|
+
'handoffs': z.array(z.object({
|
|
698
|
+
'at': z.number(),
|
|
699
|
+
'name': z.string(),
|
|
700
|
+
})).optional().describe('Room coordinator handoffs, for the session map.'),
|
|
701
|
+
'authorizedScopes': z.array(z.string()).optional().describe('Present exactly when the query carried a {@link ScopeFilter}: the authorized scopes that exist in the session. An empty array is the explicit zero-authorized-content signal — distinct from the field\'s absence (unfiltered) and from unknown-session emptiness.'),
|
|
702
|
+
}))
|
|
703
|
+
let _khorsheed_dsh_context_lens_requestInspector_loadTurns_parameter_0$schema$value
|
|
704
|
+
const _khorsheed_dsh_context_lens_requestInspector_loadTurns_parameter_0$schema = () => (_khorsheed_dsh_context_lens_requestInspector_loadTurns_parameter_0$schema$value ??= z.string())
|
|
705
|
+
let _khorsheed_dsh_context_lens_requestInspector_loadTurns_parameter_1$schema$value
|
|
706
|
+
const _khorsheed_dsh_context_lens_requestInspector_loadTurns_parameter_1$schema = () => (_khorsheed_dsh_context_lens_requestInspector_loadTurns_parameter_1$schema$value ??= z.union([z.literal(null), z.number()]))
|
|
707
|
+
let _khorsheed_dsh_context_lens_requestInspector_loadTurns_parameter_2$schema$value
|
|
708
|
+
const _khorsheed_dsh_context_lens_requestInspector_loadTurns_parameter_2$schema = () => (_khorsheed_dsh_context_lens_requestInspector_loadTurns_parameter_2$schema$value ??= z.union([z.undefined(), z.object({
|
|
709
|
+
'scopes': z.array(z.string()).readonly().optional(),
|
|
710
|
+
})]))
|
|
711
|
+
let _khorsheed_dsh_context_lens_requestInspector_loadTurns_result$schema$value
|
|
712
|
+
const _khorsheed_dsh_context_lens_requestInspector_loadTurns_result$schema = () => (_khorsheed_dsh_context_lens_requestInspector_loadTurns_result$schema$value ??= z.object({
|
|
713
|
+
'turns': z.array(z.object({
|
|
714
|
+
'sessionId': z.string(),
|
|
715
|
+
'roomDecisionIds': z.array(z.string()).optional().describe('Ids of the room decisions this turn holds (a 查看判断 jump resolves its turn by them).'),
|
|
716
|
+
'turnSeq': z.number().describe('The panel-facing address. Real turns key on the host\'s own turn number (stable across live capture and log backfill, and durable across process restarts); purpose pseudo-turns (compaction / session-title buckets) take negative addresses that are NOT durable — they re-derive from the session\'s bucket counter on every mount. Address semantics: `(sessionId, turnSeq)` names a TURN, never a request.'),
|
|
717
|
+
'hostTurn': z.number().optional().describe('The host\'s turn number on real turns; absent marks a purpose pseudo-turn.'),
|
|
718
|
+
'query': z.string().describe('用户 query 预览(单行截断)。'),
|
|
719
|
+
'trigger': z.object({
|
|
720
|
+
'source': z.string(),
|
|
721
|
+
'text': z.string(),
|
|
722
|
+
}).optional().describe('No human message this turn: the producer and text of the first message that started it.'),
|
|
723
|
+
'startSeq': z.number().optional().describe('The `turn/start` event\'s log seq — the target the chat pages history back to before a jump.'),
|
|
724
|
+
'ordinal': z.number().optional().describe('The turn\'s number in one session-wide sequence (main turns and room rounds, by time).'),
|
|
725
|
+
'room': z.object({
|
|
726
|
+
'targets': z.array(z.string()),
|
|
727
|
+
}).optional().describe('A room round: a human message to the room made outside any main turn, and who it went to.'),
|
|
728
|
+
'startedAt': z.number(),
|
|
729
|
+
'endedAt': z.number().optional(),
|
|
730
|
+
'requestCount': z.number(),
|
|
731
|
+
'scopeCount': z.number(),
|
|
732
|
+
'failedScopeCount': z.number(),
|
|
733
|
+
'totalInputTokens': z.number(),
|
|
734
|
+
'totalOutputTokens': z.number(),
|
|
735
|
+
'origin': z.union([z.literal("live"), z.literal("log-reconstructed")]).optional().describe('Fidelity marker: `live` once any in-process capture landed on the turn (the log lane never merges into such a turn), `log-reconstructed` when the whole turn was rebuilt from the session log.'),
|
|
736
|
+
'closingMessageId': z.string().optional().describe('The turn-tail assistant message id — the `conversation.chat.assistant-actions` owner prop, so the message-row icon can map itself back to this turn.'),
|
|
737
|
+
})),
|
|
738
|
+
'backfill': z.object({
|
|
739
|
+
'state': z.union([z.literal("complete"), z.literal("partial"), z.literal("none"), z.literal("broken")]).describe('`none` — never read (no durable log yet, or no persistence backend); `partial` — some turns reconstructed, older ones dropped by budget (the read retries on later queries as room frees); `complete` — every turn in the log is represented; `broken` — the log refused to decode.'),
|
|
740
|
+
'reason': z.string().optional().describe('The decode failure summary when `state` is `broken`.'),
|
|
741
|
+
}),
|
|
742
|
+
'generation': z.string().optional().describe('The answering instance\'s epoch (a mount-time id). Request `seq` values are process-local and reset on restart: a caller holding seqs across calls tags them with the generation of the result that yielded them and treats a changed generation as invalidating every held seq — an old seq must never silently resolve to a different request.'),
|
|
743
|
+
'evictedTurnCount': z.number().optional().describe('Turns this session collected and later evicted under the retention caps — the "collected then dropped" signal next to the backfill watermark, present only when non-zero. Blind spot: a session whose last turn evicts frees its whole slot, so fully-evicted reads exactly like never-seen (the store cannot tell the two apart).'),
|
|
744
|
+
'parent': z.object({
|
|
745
|
+
'sessionId': z.string(),
|
|
746
|
+
'title': z.string().optional(),
|
|
747
|
+
'hostTurn': z.number().optional(),
|
|
748
|
+
'label': z.string().optional(),
|
|
749
|
+
}).optional().describe('This session is another session\'s child (its log header names a `parentSession`): the parent\'s title, the turn that started it, and the label it was catalogued under.'),
|
|
750
|
+
'range': z.object({
|
|
751
|
+
'first': z.number(),
|
|
752
|
+
'last': z.number(),
|
|
753
|
+
}).optional().describe('First and last host turn the session\'s log holds; turns between them that `turns` lacks are not loaded.'),
|
|
754
|
+
'total': z.number().optional().describe('How many turns the session has in the ordinal sequence (main turns and room rounds).'),
|
|
755
|
+
'unloaded': z.array(z.object({
|
|
756
|
+
'from': z.number(),
|
|
757
|
+
'to': z.number(),
|
|
758
|
+
'firstHost': z.number(),
|
|
759
|
+
'lastHost': z.number(),
|
|
760
|
+
})).optional().describe('Runs of main turns not loaded, in ordinals, with the host turns at their ends (what a window move asks for).'),
|
|
761
|
+
'handoffs': z.array(z.object({
|
|
762
|
+
'at': z.number(),
|
|
763
|
+
'name': z.string(),
|
|
764
|
+
})).optional().describe('Room coordinator handoffs, for the session map.'),
|
|
765
|
+
'authorizedScopes': z.array(z.string()).optional().describe('Present exactly when the query carried a {@link ScopeFilter}: the authorized scopes that exist in the session. An empty array is the explicit zero-authorized-content signal — distinct from the field\'s absence (unfiltered) and from unknown-session emptiness.'),
|
|
766
|
+
}))
|
|
767
|
+
let _khorsheed_dsh_context_lens_requestInspector_getRequest_parameter_0_strict$schema$value
|
|
768
|
+
const _khorsheed_dsh_context_lens_requestInspector_getRequest_parameter_0_strict$schema = () => (_khorsheed_dsh_context_lens_requestInspector_getRequest_parameter_0_strict$schema$value ??= z.string())
|
|
769
|
+
let _khorsheed_dsh_context_lens_requestInspector_getRequest_parameter_1_strict$schema$value
|
|
770
|
+
const _khorsheed_dsh_context_lens_requestInspector_getRequest_parameter_1_strict$schema = () => (_khorsheed_dsh_context_lens_requestInspector_getRequest_parameter_1_strict$schema$value ??= z.number())
|
|
771
|
+
let _khorsheed_dsh_context_lens_requestInspector_getRequest_parameter_2_strict$schema$value
|
|
772
|
+
const _khorsheed_dsh_context_lens_requestInspector_getRequest_parameter_2_strict$schema = () => (_khorsheed_dsh_context_lens_requestInspector_getRequest_parameter_2_strict$schema$value ??= z.union([z.undefined(), z.strictObject({
|
|
773
|
+
'scopes': z.array(z.string()).readonly().optional(),
|
|
774
|
+
})]))
|
|
775
|
+
let _khorsheed_dsh_context_lens_requestInspector_getSessionTrend_parameter_0_strict$schema$value
|
|
776
|
+
const _khorsheed_dsh_context_lens_requestInspector_getSessionTrend_parameter_0_strict$schema = () => (_khorsheed_dsh_context_lens_requestInspector_getSessionTrend_parameter_0_strict$schema$value ??= z.string())
|
|
777
|
+
let _khorsheed_dsh_context_lens_requestInspector_getSessionTrend_parameter_1_strict$schema$value
|
|
778
|
+
const _khorsheed_dsh_context_lens_requestInspector_getSessionTrend_parameter_1_strict$schema = () => (_khorsheed_dsh_context_lens_requestInspector_getSessionTrend_parameter_1_strict$schema$value ??= z.union([z.undefined(), z.strictObject({
|
|
779
|
+
'scopes': z.array(z.string()).readonly().optional(),
|
|
780
|
+
})]))
|
|
781
|
+
let _khorsheed_dsh_context_lens_requestInspector_getTurn_parameter_0_strict$schema$value
|
|
782
|
+
const _khorsheed_dsh_context_lens_requestInspector_getTurn_parameter_0_strict$schema = () => (_khorsheed_dsh_context_lens_requestInspector_getTurn_parameter_0_strict$schema$value ??= z.string())
|
|
783
|
+
let _khorsheed_dsh_context_lens_requestInspector_getTurn_parameter_1_strict$schema$value
|
|
784
|
+
const _khorsheed_dsh_context_lens_requestInspector_getTurn_parameter_1_strict$schema = () => (_khorsheed_dsh_context_lens_requestInspector_getTurn_parameter_1_strict$schema$value ??= z.number())
|
|
785
|
+
let _khorsheed_dsh_context_lens_requestInspector_getTurn_parameter_2_strict$schema$value
|
|
786
|
+
const _khorsheed_dsh_context_lens_requestInspector_getTurn_parameter_2_strict$schema = () => (_khorsheed_dsh_context_lens_requestInspector_getTurn_parameter_2_strict$schema$value ??= z.union([z.undefined(), z.strictObject({
|
|
787
|
+
'scopes': z.array(z.string()).readonly().optional(),
|
|
788
|
+
})]))
|
|
789
|
+
let _khorsheed_dsh_context_lens_requestInspector_getTurnTiming_parameter_0_strict$schema$value
|
|
790
|
+
const _khorsheed_dsh_context_lens_requestInspector_getTurnTiming_parameter_0_strict$schema = () => (_khorsheed_dsh_context_lens_requestInspector_getTurnTiming_parameter_0_strict$schema$value ??= z.string())
|
|
791
|
+
let _khorsheed_dsh_context_lens_requestInspector_getTurnTiming_parameter_1_strict$schema$value
|
|
792
|
+
const _khorsheed_dsh_context_lens_requestInspector_getTurnTiming_parameter_1_strict$schema = () => (_khorsheed_dsh_context_lens_requestInspector_getTurnTiming_parameter_1_strict$schema$value ??= z.number())
|
|
793
|
+
let _khorsheed_dsh_context_lens_requestInspector_getTurnTiming_parameter_2_strict$schema$value
|
|
794
|
+
const _khorsheed_dsh_context_lens_requestInspector_getTurnTiming_parameter_2_strict$schema = () => (_khorsheed_dsh_context_lens_requestInspector_getTurnTiming_parameter_2_strict$schema$value ??= z.union([z.undefined(), z.strictObject({
|
|
795
|
+
'scopes': z.array(z.string()).readonly().optional(),
|
|
796
|
+
})]))
|
|
797
|
+
let _khorsheed_dsh_context_lens_requestInspector_listTurns_parameter_0_strict$schema$value
|
|
798
|
+
const _khorsheed_dsh_context_lens_requestInspector_listTurns_parameter_0_strict$schema = () => (_khorsheed_dsh_context_lens_requestInspector_listTurns_parameter_0_strict$schema$value ??= z.string())
|
|
799
|
+
let _khorsheed_dsh_context_lens_requestInspector_listTurns_parameter_1_strict$schema$value
|
|
800
|
+
const _khorsheed_dsh_context_lens_requestInspector_listTurns_parameter_1_strict$schema = () => (_khorsheed_dsh_context_lens_requestInspector_listTurns_parameter_1_strict$schema$value ??= z.union([z.undefined(), z.strictObject({
|
|
801
|
+
'scopes': z.array(z.string()).readonly().optional(),
|
|
802
|
+
})]))
|
|
803
|
+
let _khorsheed_dsh_context_lens_requestInspector_loadTurns_parameter_0_strict$schema$value
|
|
804
|
+
const _khorsheed_dsh_context_lens_requestInspector_loadTurns_parameter_0_strict$schema = () => (_khorsheed_dsh_context_lens_requestInspector_loadTurns_parameter_0_strict$schema$value ??= z.string())
|
|
805
|
+
let _khorsheed_dsh_context_lens_requestInspector_loadTurns_parameter_1_strict$schema$value
|
|
806
|
+
const _khorsheed_dsh_context_lens_requestInspector_loadTurns_parameter_1_strict$schema = () => (_khorsheed_dsh_context_lens_requestInspector_loadTurns_parameter_1_strict$schema$value ??= z.union([z.literal(null), z.number()]))
|
|
807
|
+
let _khorsheed_dsh_context_lens_requestInspector_loadTurns_parameter_2_strict$schema$value
|
|
808
|
+
const _khorsheed_dsh_context_lens_requestInspector_loadTurns_parameter_2_strict$schema = () => (_khorsheed_dsh_context_lens_requestInspector_loadTurns_parameter_2_strict$schema$value ??= z.union([z.undefined(), z.strictObject({
|
|
809
|
+
'scopes': z.array(z.string()).readonly().optional(),
|
|
810
|
+
})]))
|
|
811
|
+
|
|
812
|
+
export const TYPERT_REMOTE = createTypertRemoteInfo({
|
|
813
|
+
package: '@khorsheed/dsh-context-lens',
|
|
814
|
+
methods: {
|
|
815
|
+
'requestInspector/getRequest': {
|
|
816
|
+
service: 'requestInspectorRemote',
|
|
817
|
+
description: 'One request\'s full four-segment breakdown — the right column.',
|
|
818
|
+
invocation: { kind: 'direct' },
|
|
819
|
+
parameters: [
|
|
820
|
+
{
|
|
821
|
+
name: 'sessionId',
|
|
822
|
+
source: 'json',
|
|
823
|
+
codec: {
|
|
824
|
+
mode: 'strict',
|
|
825
|
+
typeSymbol: '@khorsheed/dsh-context-lens#requestInspector/getRequest:sessionId',
|
|
826
|
+
create: _khorsheed_dsh_context_lens_requestInspector_getRequest_parameter_0$schema,
|
|
827
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_getRequest_parameter_0$schema(),
|
|
828
|
+
jsonSchema: {"type":"string"},
|
|
829
|
+
},
|
|
830
|
+
strictCodec: {
|
|
831
|
+
mode: 'strict',
|
|
832
|
+
typeSymbol: '@khorsheed/dsh-context-lens#requestInspector/getRequest:sessionId',
|
|
833
|
+
create: _khorsheed_dsh_context_lens_requestInspector_getRequest_parameter_0_strict$schema,
|
|
834
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_getRequest_parameter_0_strict$schema(),
|
|
835
|
+
jsonSchema: {"type":"string"},
|
|
836
|
+
},
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
name: 'seq',
|
|
840
|
+
source: 'json',
|
|
841
|
+
codec: {
|
|
842
|
+
mode: 'strict',
|
|
843
|
+
typeSymbol: '@khorsheed/dsh-context-lens#requestInspector/getRequest:seq',
|
|
844
|
+
create: _khorsheed_dsh_context_lens_requestInspector_getRequest_parameter_1$schema,
|
|
845
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_getRequest_parameter_1$schema(),
|
|
846
|
+
jsonSchema: {"type":"number"},
|
|
847
|
+
},
|
|
848
|
+
strictCodec: {
|
|
849
|
+
mode: 'strict',
|
|
850
|
+
typeSymbol: '@khorsheed/dsh-context-lens#requestInspector/getRequest:seq',
|
|
851
|
+
create: _khorsheed_dsh_context_lens_requestInspector_getRequest_parameter_1_strict$schema,
|
|
852
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_getRequest_parameter_1_strict$schema(),
|
|
853
|
+
jsonSchema: {"type":"number"},
|
|
854
|
+
},
|
|
855
|
+
},
|
|
856
|
+
{
|
|
857
|
+
name: 'filter',
|
|
858
|
+
source: 'json',
|
|
859
|
+
acceptsUndefined: true,
|
|
860
|
+
codec: {
|
|
861
|
+
mode: 'strict',
|
|
862
|
+
typeSymbol: '@khorsheed/dsh-context-lens/types#ScopeFilter',
|
|
863
|
+
create: _khorsheed_dsh_context_lens_requestInspector_getRequest_parameter_2$schema,
|
|
864
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_getRequest_parameter_2$schema(),
|
|
865
|
+
jsonSchema: {"type":"object","properties":{"scopes":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":true},
|
|
866
|
+
},
|
|
867
|
+
strictCodec: {
|
|
868
|
+
mode: 'strict',
|
|
869
|
+
typeSymbol: '@khorsheed/dsh-context-lens/types#ScopeFilter',
|
|
870
|
+
create: _khorsheed_dsh_context_lens_requestInspector_getRequest_parameter_2_strict$schema,
|
|
871
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_getRequest_parameter_2_strict$schema(),
|
|
872
|
+
jsonSchema: {"type":"object","properties":{"scopes":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false},
|
|
873
|
+
},
|
|
874
|
+
},
|
|
875
|
+
],
|
|
876
|
+
result: {
|
|
877
|
+
mode: 'strict',
|
|
878
|
+
typeSymbol: '@khorsheed/dsh-context-lens#requestInspector/getRequest:result',
|
|
879
|
+
create: _khorsheed_dsh_context_lens_requestInspector_getRequest_result$schema,
|
|
880
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_getRequest_result$schema(),
|
|
881
|
+
jsonSchemaError: 'typert tool schema: unsupported undefined value',
|
|
882
|
+
},
|
|
883
|
+
sourceLocation: {"file":"packages/context-lens/src/remote.ts","line":61,"column":3},
|
|
884
|
+
},
|
|
885
|
+
'requestInspector/getSessionTrend': {
|
|
886
|
+
service: 'requestInspectorRemote',
|
|
887
|
+
description: 'Lightweight session map, with no message bodies.',
|
|
888
|
+
invocation: { kind: 'direct' },
|
|
889
|
+
parameters: [
|
|
890
|
+
{
|
|
891
|
+
name: 'sessionId',
|
|
892
|
+
source: 'json',
|
|
893
|
+
codec: {
|
|
894
|
+
mode: 'strict',
|
|
895
|
+
typeSymbol: '@khorsheed/dsh-context-lens#requestInspector/getSessionTrend:sessionId',
|
|
896
|
+
create: _khorsheed_dsh_context_lens_requestInspector_getSessionTrend_parameter_0$schema,
|
|
897
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_getSessionTrend_parameter_0$schema(),
|
|
898
|
+
jsonSchema: {"type":"string"},
|
|
899
|
+
},
|
|
900
|
+
strictCodec: {
|
|
901
|
+
mode: 'strict',
|
|
902
|
+
typeSymbol: '@khorsheed/dsh-context-lens#requestInspector/getSessionTrend:sessionId',
|
|
903
|
+
create: _khorsheed_dsh_context_lens_requestInspector_getSessionTrend_parameter_0_strict$schema,
|
|
904
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_getSessionTrend_parameter_0_strict$schema(),
|
|
905
|
+
jsonSchema: {"type":"string"},
|
|
906
|
+
},
|
|
907
|
+
},
|
|
908
|
+
{
|
|
909
|
+
name: 'filter',
|
|
910
|
+
source: 'json',
|
|
911
|
+
acceptsUndefined: true,
|
|
912
|
+
codec: {
|
|
913
|
+
mode: 'strict',
|
|
914
|
+
typeSymbol: '@khorsheed/dsh-context-lens/types#ScopeFilter',
|
|
915
|
+
create: _khorsheed_dsh_context_lens_requestInspector_getSessionTrend_parameter_1$schema,
|
|
916
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_getSessionTrend_parameter_1$schema(),
|
|
917
|
+
jsonSchema: {"type":"object","properties":{"scopes":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":true},
|
|
918
|
+
},
|
|
919
|
+
strictCodec: {
|
|
920
|
+
mode: 'strict',
|
|
921
|
+
typeSymbol: '@khorsheed/dsh-context-lens/types#ScopeFilter',
|
|
922
|
+
create: _khorsheed_dsh_context_lens_requestInspector_getSessionTrend_parameter_1_strict$schema,
|
|
923
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_getSessionTrend_parameter_1_strict$schema(),
|
|
924
|
+
jsonSchema: {"type":"object","properties":{"scopes":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false},
|
|
925
|
+
},
|
|
926
|
+
},
|
|
927
|
+
],
|
|
928
|
+
result: {
|
|
929
|
+
mode: 'strict',
|
|
930
|
+
typeSymbol: '@khorsheed/dsh-context-lens/types#SessionTrend',
|
|
931
|
+
create: _khorsheed_dsh_context_lens_requestInspector_getSessionTrend_result$schema,
|
|
932
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_getSessionTrend_result$schema(),
|
|
933
|
+
jsonSchema: {"type":"object","properties":{"requests":{"type":"array","items":{"type":"object","properties":{"requestNumber":{"type":"number"},"config":{"type":"object","properties":{"provider":{"type":"string"},"model":{"type":"string"},"maxTokens":{"type":"number"},"reasoningEffort":{"type":"string"},"temperature":{"type":"number"}},"required":[],"additionalProperties":true,"description":"Per-request snapshot; never substitute the scope’s latest config."},"seq":{"type":"number"},"scopeId":{"type":"string"},"status":{"type":"string","enum":["failed","ok","streaming"]},"responseSummary":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"compaction"}},"required":["kind"],"additionalProperties":true},{"type":"object","properties":{"kind":{"type":"string","const":"tool"},"name":{"type":"string"},"hint":{"type":"string"},"more":{"type":"number"},"toolCounts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"count":{"type":"number"}},"required":["name","count"],"additionalProperties":true}}},"required":["kind","name"],"additionalProperties":true},{"type":"object","properties":{"kind":{"type":"string","const":"text"}},"required":["kind"],"additionalProperties":true},{"type":"object","properties":{"kind":{"type":"string","const":"reasoning"}},"required":["kind"],"additionalProperties":true},{"type":"object","properties":{"kind":{"type":"string","const":"none"}},"required":["kind"],"additionalProperties":true}]},"startedAt":{"type":"number"},"usage":{"type":"object","properties":{"inputTokens":{"type":"number"},"outputTokens":{"type":"number"},"totalTokens":{"type":"number"},"cacheReadTokens":{"type":"number","description":"Measured cache hits — the cache column's only source of truth."},"cacheWriteTokens":{"type":"number","description":"Cache-write input (Anthropic `cache_creation_input_tokens` et al.). The host usage contract's buckets are disjoint, so a request's full input is `inputTokens + cacheReadTokens + cacheWriteTokens` — dropping this bucket shows a cache-writing (first) request as almost input-free."}},"required":["inputTokens","outputTokens"],"additionalProperties":true},"totalMs":{"type":"number"},"timingApproximate":{"type":"boolean","description":"Logged compaction bracket, not an exact provider-call duration."},"totalChars":{"type":"number","description":"请求体总字符数(明细头右上)。"},"toolErrors":{"type":"number"},"turnSeq":{"type":"number"}},"required":["seq","scopeId","status","responseSummary","startedAt","totalChars","turnSeq"],"additionalProperties":true}},"turns":{"type":"array","items":{"type":"object","properties":{"sessionId":{"type":"string"},"roomDecisionIds":{"type":"array","items":{"type":"string"},"description":"Ids of the room decisions this turn holds (a 查看判断 jump resolves its turn by them)."},"turnSeq":{"type":"number","description":"The panel-facing address. Real turns key on the host's own turn number (stable across live capture and log backfill, and durable across process restarts); purpose pseudo-turns (compaction / session-title buckets) take negative addresses that are NOT durable — they re-derive from the session's bucket counter on every mount. Address semantics: `(sessionId, turnSeq)` names a TURN, never a request."},"hostTurn":{"type":"number","description":"The host's turn number on real turns; absent marks a purpose pseudo-turn."},"query":{"type":"string","description":"用户 query 预览(单行截断)。"},"trigger":{"type":"object","properties":{"source":{"type":"string"},"text":{"type":"string"}},"required":["source","text"],"additionalProperties":true,"description":"No human message this turn: the producer and text of the first message that started it."},"startSeq":{"type":"number","description":"The `turn/start` event's log seq — the target the chat pages history back to before a jump."},"ordinal":{"type":"number","description":"The turn's number in one session-wide sequence (main turns and room rounds, by time)."},"room":{"type":"object","properties":{"targets":{"type":"array","items":{"type":"string"}}},"required":["targets"],"additionalProperties":true,"description":"A room round: a human message to the room made outside any main turn, and who it went to."},"startedAt":{"type":"number"},"endedAt":{"type":"number"},"requestCount":{"type":"number"},"scopeCount":{"type":"number"},"failedScopeCount":{"type":"number"},"totalInputTokens":{"type":"number"},"totalOutputTokens":{"type":"number"},"origin":{"type":"string","enum":["live","log-reconstructed"],"description":"Fidelity marker: `live` once any in-process capture landed on the turn (the log lane never merges into such a turn), `log-reconstructed` when the whole turn was rebuilt from the session log."},"closingMessageId":{"type":"string","description":"The turn-tail assistant message id — the `conversation.chat.assistant-actions` owner prop, so the message-row icon can map itself back to this turn."}},"required":["sessionId","turnSeq","query","startedAt","requestCount","scopeCount","failedScopeCount","totalInputTokens","totalOutputTokens"],"additionalProperties":true}},"backfill":{"type":"object","properties":{"state":{"type":"string","enum":["complete","partial","none","broken"],"description":"`none` — never read (no durable log yet, or no persistence backend); `partial` — some turns reconstructed, older ones dropped by budget (the read retries on later queries as room frees); `complete` — every turn in the log is represented; `broken` — the log refused to decode."},"reason":{"type":"string","description":"The decode failure summary when `state` is `broken`."}},"required":["state"],"additionalProperties":true},"generation":{"type":"string","description":"The answering instance's epoch (a mount-time id). Request `seq` values are process-local and reset on restart: a caller holding seqs across calls tags them with the generation of the result that yielded them and treats a changed generation as invalidating every held seq — an old seq must never silently resolve to a different request."},"evictedTurnCount":{"type":"number","description":"Turns this session collected and later evicted under the retention caps — the \"collected then dropped\" signal next to the backfill watermark, present only when non-zero. Blind spot: a session whose last turn evicts frees its whole slot, so fully-evicted reads exactly like never-seen (the store cannot tell the two apart)."},"parent":{"type":"object","properties":{"sessionId":{"type":"string"},"title":{"type":"string"},"hostTurn":{"type":"number"},"label":{"type":"string"}},"required":["sessionId"],"additionalProperties":true,"description":"This session is another session's child (its log header names a `parentSession`): the parent's title, the turn that started it, and the label it was catalogued under."},"range":{"type":"object","properties":{"first":{"type":"number"},"last":{"type":"number"}},"required":["first","last"],"additionalProperties":true,"description":"First and last host turn the session's log holds; turns between them that `turns` lacks are not loaded."},"total":{"type":"number","description":"How many turns the session has in the ordinal sequence (main turns and room rounds)."},"unloaded":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"firstHost":{"type":"number"},"lastHost":{"type":"number"}},"required":["from","to","firstHost","lastHost"],"additionalProperties":true},"description":"Runs of main turns not loaded, in ordinals, with the host turns at their ends (what a window move asks for)."},"handoffs":{"type":"array","items":{"type":"object","properties":{"at":{"type":"number"},"name":{"type":"string"}},"required":["at","name"],"additionalProperties":true},"description":"Room coordinator handoffs, for the session map."},"authorizedScopes":{"type":"array","items":{"type":"string"},"description":"Present exactly when the query carried a {@link ScopeFilter}: the authorized scopes that exist in the session. An empty array is the explicit zero-authorized-content signal — distinct from the field's absence (unfiltered) and from unknown-session emptiness."}},"required":["requests","turns","backfill"],"additionalProperties":true},
|
|
934
|
+
},
|
|
935
|
+
sourceLocation: {"file":"packages/context-lens/src/remote.ts","line":67,"column":3},
|
|
936
|
+
},
|
|
937
|
+
'requestInspector/getTurn': {
|
|
938
|
+
service: 'requestInspectorRemote',
|
|
939
|
+
description: 'One turn\'s scope/request overview — the left column, no segments.',
|
|
940
|
+
invocation: { kind: 'direct' },
|
|
941
|
+
parameters: [
|
|
942
|
+
{
|
|
943
|
+
name: 'sessionId',
|
|
944
|
+
source: 'json',
|
|
945
|
+
codec: {
|
|
946
|
+
mode: 'strict',
|
|
947
|
+
typeSymbol: '@khorsheed/dsh-context-lens#requestInspector/getTurn:sessionId',
|
|
948
|
+
create: _khorsheed_dsh_context_lens_requestInspector_getTurn_parameter_0$schema,
|
|
949
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_getTurn_parameter_0$schema(),
|
|
950
|
+
jsonSchema: {"type":"string"},
|
|
951
|
+
},
|
|
952
|
+
strictCodec: {
|
|
953
|
+
mode: 'strict',
|
|
954
|
+
typeSymbol: '@khorsheed/dsh-context-lens#requestInspector/getTurn:sessionId',
|
|
955
|
+
create: _khorsheed_dsh_context_lens_requestInspector_getTurn_parameter_0_strict$schema,
|
|
956
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_getTurn_parameter_0_strict$schema(),
|
|
957
|
+
jsonSchema: {"type":"string"},
|
|
958
|
+
},
|
|
959
|
+
},
|
|
960
|
+
{
|
|
961
|
+
name: 'turnSeq',
|
|
962
|
+
source: 'json',
|
|
963
|
+
codec: {
|
|
964
|
+
mode: 'strict',
|
|
965
|
+
typeSymbol: '@khorsheed/dsh-context-lens#requestInspector/getTurn:turnSeq',
|
|
966
|
+
create: _khorsheed_dsh_context_lens_requestInspector_getTurn_parameter_1$schema,
|
|
967
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_getTurn_parameter_1$schema(),
|
|
968
|
+
jsonSchema: {"type":"number"},
|
|
969
|
+
},
|
|
970
|
+
strictCodec: {
|
|
971
|
+
mode: 'strict',
|
|
972
|
+
typeSymbol: '@khorsheed/dsh-context-lens#requestInspector/getTurn:turnSeq',
|
|
973
|
+
create: _khorsheed_dsh_context_lens_requestInspector_getTurn_parameter_1_strict$schema,
|
|
974
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_getTurn_parameter_1_strict$schema(),
|
|
975
|
+
jsonSchema: {"type":"number"},
|
|
976
|
+
},
|
|
977
|
+
},
|
|
978
|
+
{
|
|
979
|
+
name: 'filter',
|
|
980
|
+
source: 'json',
|
|
981
|
+
acceptsUndefined: true,
|
|
982
|
+
codec: {
|
|
983
|
+
mode: 'strict',
|
|
984
|
+
typeSymbol: '@khorsheed/dsh-context-lens/types#ScopeFilter',
|
|
985
|
+
create: _khorsheed_dsh_context_lens_requestInspector_getTurn_parameter_2$schema,
|
|
986
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_getTurn_parameter_2$schema(),
|
|
987
|
+
jsonSchema: {"type":"object","properties":{"scopes":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":true},
|
|
988
|
+
},
|
|
989
|
+
strictCodec: {
|
|
990
|
+
mode: 'strict',
|
|
991
|
+
typeSymbol: '@khorsheed/dsh-context-lens/types#ScopeFilter',
|
|
992
|
+
create: _khorsheed_dsh_context_lens_requestInspector_getTurn_parameter_2_strict$schema,
|
|
993
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_getTurn_parameter_2_strict$schema(),
|
|
994
|
+
jsonSchema: {"type":"object","properties":{"scopes":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false},
|
|
995
|
+
},
|
|
996
|
+
},
|
|
997
|
+
],
|
|
998
|
+
result: {
|
|
999
|
+
mode: 'strict',
|
|
1000
|
+
typeSymbol: '@khorsheed/dsh-context-lens#requestInspector/getTurn:result',
|
|
1001
|
+
create: _khorsheed_dsh_context_lens_requestInspector_getTurn_result$schema,
|
|
1002
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_getTurn_result$schema(),
|
|
1003
|
+
jsonSchemaError: 'typert tool schema: unsupported undefined value',
|
|
1004
|
+
},
|
|
1005
|
+
sourceLocation: {"file":"packages/context-lens/src/remote.ts","line":55,"column":3},
|
|
1006
|
+
},
|
|
1007
|
+
'requestInspector/getTurnTiming': {
|
|
1008
|
+
service: 'requestInspectorRemote',
|
|
1009
|
+
description: 'One turn\'s whole-turn timing aggregation — the 耗时分布 tab.',
|
|
1010
|
+
invocation: { kind: 'direct' },
|
|
1011
|
+
parameters: [
|
|
1012
|
+
{
|
|
1013
|
+
name: 'sessionId',
|
|
1014
|
+
source: 'json',
|
|
1015
|
+
codec: {
|
|
1016
|
+
mode: 'strict',
|
|
1017
|
+
typeSymbol: '@khorsheed/dsh-context-lens#requestInspector/getTurnTiming:sessionId',
|
|
1018
|
+
create: _khorsheed_dsh_context_lens_requestInspector_getTurnTiming_parameter_0$schema,
|
|
1019
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_getTurnTiming_parameter_0$schema(),
|
|
1020
|
+
jsonSchema: {"type":"string"},
|
|
1021
|
+
},
|
|
1022
|
+
strictCodec: {
|
|
1023
|
+
mode: 'strict',
|
|
1024
|
+
typeSymbol: '@khorsheed/dsh-context-lens#requestInspector/getTurnTiming:sessionId',
|
|
1025
|
+
create: _khorsheed_dsh_context_lens_requestInspector_getTurnTiming_parameter_0_strict$schema,
|
|
1026
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_getTurnTiming_parameter_0_strict$schema(),
|
|
1027
|
+
jsonSchema: {"type":"string"},
|
|
1028
|
+
},
|
|
1029
|
+
},
|
|
1030
|
+
{
|
|
1031
|
+
name: 'turnSeq',
|
|
1032
|
+
source: 'json',
|
|
1033
|
+
codec: {
|
|
1034
|
+
mode: 'strict',
|
|
1035
|
+
typeSymbol: '@khorsheed/dsh-context-lens#requestInspector/getTurnTiming:turnSeq',
|
|
1036
|
+
create: _khorsheed_dsh_context_lens_requestInspector_getTurnTiming_parameter_1$schema,
|
|
1037
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_getTurnTiming_parameter_1$schema(),
|
|
1038
|
+
jsonSchema: {"type":"number"},
|
|
1039
|
+
},
|
|
1040
|
+
strictCodec: {
|
|
1041
|
+
mode: 'strict',
|
|
1042
|
+
typeSymbol: '@khorsheed/dsh-context-lens#requestInspector/getTurnTiming:turnSeq',
|
|
1043
|
+
create: _khorsheed_dsh_context_lens_requestInspector_getTurnTiming_parameter_1_strict$schema,
|
|
1044
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_getTurnTiming_parameter_1_strict$schema(),
|
|
1045
|
+
jsonSchema: {"type":"number"},
|
|
1046
|
+
},
|
|
1047
|
+
},
|
|
1048
|
+
{
|
|
1049
|
+
name: 'filter',
|
|
1050
|
+
source: 'json',
|
|
1051
|
+
acceptsUndefined: true,
|
|
1052
|
+
codec: {
|
|
1053
|
+
mode: 'strict',
|
|
1054
|
+
typeSymbol: '@khorsheed/dsh-context-lens/types#ScopeFilter',
|
|
1055
|
+
create: _khorsheed_dsh_context_lens_requestInspector_getTurnTiming_parameter_2$schema,
|
|
1056
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_getTurnTiming_parameter_2$schema(),
|
|
1057
|
+
jsonSchema: {"type":"object","properties":{"scopes":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":true},
|
|
1058
|
+
},
|
|
1059
|
+
strictCodec: {
|
|
1060
|
+
mode: 'strict',
|
|
1061
|
+
typeSymbol: '@khorsheed/dsh-context-lens/types#ScopeFilter',
|
|
1062
|
+
create: _khorsheed_dsh_context_lens_requestInspector_getTurnTiming_parameter_2_strict$schema,
|
|
1063
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_getTurnTiming_parameter_2_strict$schema(),
|
|
1064
|
+
jsonSchema: {"type":"object","properties":{"scopes":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false},
|
|
1065
|
+
},
|
|
1066
|
+
},
|
|
1067
|
+
],
|
|
1068
|
+
result: {
|
|
1069
|
+
mode: 'strict',
|
|
1070
|
+
typeSymbol: '@khorsheed/dsh-context-lens#requestInspector/getTurnTiming:result',
|
|
1071
|
+
create: _khorsheed_dsh_context_lens_requestInspector_getTurnTiming_result$schema,
|
|
1072
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_getTurnTiming_result$schema(),
|
|
1073
|
+
jsonSchemaError: 'typert tool schema: unsupported undefined value',
|
|
1074
|
+
},
|
|
1075
|
+
sourceLocation: {"file":"packages/context-lens/src/remote.ts","line":73,"column":3},
|
|
1076
|
+
},
|
|
1077
|
+
'requestInspector/listTurns': {
|
|
1078
|
+
service: 'requestInspectorRemote',
|
|
1079
|
+
description: 'Light turn list of one session plus its backfill watermark, newest last.',
|
|
1080
|
+
invocation: { kind: 'direct' },
|
|
1081
|
+
parameters: [
|
|
1082
|
+
{
|
|
1083
|
+
name: 'sessionId',
|
|
1084
|
+
source: 'json',
|
|
1085
|
+
codec: {
|
|
1086
|
+
mode: 'strict',
|
|
1087
|
+
typeSymbol: '@khorsheed/dsh-context-lens#requestInspector/listTurns:sessionId',
|
|
1088
|
+
create: _khorsheed_dsh_context_lens_requestInspector_listTurns_parameter_0$schema,
|
|
1089
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_listTurns_parameter_0$schema(),
|
|
1090
|
+
jsonSchema: {"type":"string"},
|
|
1091
|
+
},
|
|
1092
|
+
strictCodec: {
|
|
1093
|
+
mode: 'strict',
|
|
1094
|
+
typeSymbol: '@khorsheed/dsh-context-lens#requestInspector/listTurns:sessionId',
|
|
1095
|
+
create: _khorsheed_dsh_context_lens_requestInspector_listTurns_parameter_0_strict$schema,
|
|
1096
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_listTurns_parameter_0_strict$schema(),
|
|
1097
|
+
jsonSchema: {"type":"string"},
|
|
1098
|
+
},
|
|
1099
|
+
},
|
|
1100
|
+
{
|
|
1101
|
+
name: 'filter',
|
|
1102
|
+
source: 'json',
|
|
1103
|
+
acceptsUndefined: true,
|
|
1104
|
+
codec: {
|
|
1105
|
+
mode: 'strict',
|
|
1106
|
+
typeSymbol: '@khorsheed/dsh-context-lens/types#ScopeFilter',
|
|
1107
|
+
create: _khorsheed_dsh_context_lens_requestInspector_listTurns_parameter_1$schema,
|
|
1108
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_listTurns_parameter_1$schema(),
|
|
1109
|
+
jsonSchema: {"type":"object","properties":{"scopes":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":true},
|
|
1110
|
+
},
|
|
1111
|
+
strictCodec: {
|
|
1112
|
+
mode: 'strict',
|
|
1113
|
+
typeSymbol: '@khorsheed/dsh-context-lens/types#ScopeFilter',
|
|
1114
|
+
create: _khorsheed_dsh_context_lens_requestInspector_listTurns_parameter_1_strict$schema,
|
|
1115
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_listTurns_parameter_1_strict$schema(),
|
|
1116
|
+
jsonSchema: {"type":"object","properties":{"scopes":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false},
|
|
1117
|
+
},
|
|
1118
|
+
},
|
|
1119
|
+
],
|
|
1120
|
+
result: {
|
|
1121
|
+
mode: 'strict',
|
|
1122
|
+
typeSymbol: '@khorsheed/dsh-context-lens/types#ListTurnsResult',
|
|
1123
|
+
create: _khorsheed_dsh_context_lens_requestInspector_listTurns_result$schema,
|
|
1124
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_listTurns_result$schema(),
|
|
1125
|
+
jsonSchema: {"type":"object","properties":{"turns":{"type":"array","items":{"type":"object","properties":{"sessionId":{"type":"string"},"roomDecisionIds":{"type":"array","items":{"type":"string"},"description":"Ids of the room decisions this turn holds (a 查看判断 jump resolves its turn by them)."},"turnSeq":{"type":"number","description":"The panel-facing address. Real turns key on the host's own turn number (stable across live capture and log backfill, and durable across process restarts); purpose pseudo-turns (compaction / session-title buckets) take negative addresses that are NOT durable — they re-derive from the session's bucket counter on every mount. Address semantics: `(sessionId, turnSeq)` names a TURN, never a request."},"hostTurn":{"type":"number","description":"The host's turn number on real turns; absent marks a purpose pseudo-turn."},"query":{"type":"string","description":"用户 query 预览(单行截断)。"},"trigger":{"type":"object","properties":{"source":{"type":"string"},"text":{"type":"string"}},"required":["source","text"],"additionalProperties":true,"description":"No human message this turn: the producer and text of the first message that started it."},"startSeq":{"type":"number","description":"The `turn/start` event's log seq — the target the chat pages history back to before a jump."},"ordinal":{"type":"number","description":"The turn's number in one session-wide sequence (main turns and room rounds, by time)."},"room":{"type":"object","properties":{"targets":{"type":"array","items":{"type":"string"}}},"required":["targets"],"additionalProperties":true,"description":"A room round: a human message to the room made outside any main turn, and who it went to."},"startedAt":{"type":"number"},"endedAt":{"type":"number"},"requestCount":{"type":"number"},"scopeCount":{"type":"number"},"failedScopeCount":{"type":"number"},"totalInputTokens":{"type":"number"},"totalOutputTokens":{"type":"number"},"origin":{"type":"string","enum":["live","log-reconstructed"],"description":"Fidelity marker: `live` once any in-process capture landed on the turn (the log lane never merges into such a turn), `log-reconstructed` when the whole turn was rebuilt from the session log."},"closingMessageId":{"type":"string","description":"The turn-tail assistant message id — the `conversation.chat.assistant-actions` owner prop, so the message-row icon can map itself back to this turn."}},"required":["sessionId","turnSeq","query","startedAt","requestCount","scopeCount","failedScopeCount","totalInputTokens","totalOutputTokens"],"additionalProperties":true}},"backfill":{"type":"object","properties":{"state":{"type":"string","enum":["complete","partial","none","broken"],"description":"`none` — never read (no durable log yet, or no persistence backend); `partial` — some turns reconstructed, older ones dropped by budget (the read retries on later queries as room frees); `complete` — every turn in the log is represented; `broken` — the log refused to decode."},"reason":{"type":"string","description":"The decode failure summary when `state` is `broken`."}},"required":["state"],"additionalProperties":true},"generation":{"type":"string","description":"The answering instance's epoch (a mount-time id). Request `seq` values are process-local and reset on restart: a caller holding seqs across calls tags them with the generation of the result that yielded them and treats a changed generation as invalidating every held seq — an old seq must never silently resolve to a different request."},"evictedTurnCount":{"type":"number","description":"Turns this session collected and later evicted under the retention caps — the \"collected then dropped\" signal next to the backfill watermark, present only when non-zero. Blind spot: a session whose last turn evicts frees its whole slot, so fully-evicted reads exactly like never-seen (the store cannot tell the two apart)."},"parent":{"type":"object","properties":{"sessionId":{"type":"string"},"title":{"type":"string"},"hostTurn":{"type":"number"},"label":{"type":"string"}},"required":["sessionId"],"additionalProperties":true,"description":"This session is another session's child (its log header names a `parentSession`): the parent's title, the turn that started it, and the label it was catalogued under."},"range":{"type":"object","properties":{"first":{"type":"number"},"last":{"type":"number"}},"required":["first","last"],"additionalProperties":true,"description":"First and last host turn the session's log holds; turns between them that `turns` lacks are not loaded."},"total":{"type":"number","description":"How many turns the session has in the ordinal sequence (main turns and room rounds)."},"unloaded":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"firstHost":{"type":"number"},"lastHost":{"type":"number"}},"required":["from","to","firstHost","lastHost"],"additionalProperties":true},"description":"Runs of main turns not loaded, in ordinals, with the host turns at their ends (what a window move asks for)."},"handoffs":{"type":"array","items":{"type":"object","properties":{"at":{"type":"number"},"name":{"type":"string"}},"required":["at","name"],"additionalProperties":true},"description":"Room coordinator handoffs, for the session map."},"authorizedScopes":{"type":"array","items":{"type":"string"},"description":"Present exactly when the query carried a {@link ScopeFilter}: the authorized scopes that exist in the session. An empty array is the explicit zero-authorized-content signal — distinct from the field's absence (unfiltered) and from unknown-session emptiness."}},"required":["turns","backfill"],"additionalProperties":true},
|
|
1126
|
+
},
|
|
1127
|
+
sourceLocation: {"file":"packages/context-lens/src/remote.ts","line":43,"column":3},
|
|
1128
|
+
},
|
|
1129
|
+
'requestInspector/loadTurns': {
|
|
1130
|
+
service: 'requestInspectorRemote',
|
|
1131
|
+
description: 'Move the backfill window to the turns ending at `end` (latest when null); answers the new turn list.',
|
|
1132
|
+
invocation: { kind: 'direct' },
|
|
1133
|
+
parameters: [
|
|
1134
|
+
{
|
|
1135
|
+
name: 'sessionId',
|
|
1136
|
+
source: 'json',
|
|
1137
|
+
codec: {
|
|
1138
|
+
mode: 'strict',
|
|
1139
|
+
typeSymbol: '@khorsheed/dsh-context-lens#requestInspector/loadTurns:sessionId',
|
|
1140
|
+
create: _khorsheed_dsh_context_lens_requestInspector_loadTurns_parameter_0$schema,
|
|
1141
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_loadTurns_parameter_0$schema(),
|
|
1142
|
+
jsonSchema: {"type":"string"},
|
|
1143
|
+
},
|
|
1144
|
+
strictCodec: {
|
|
1145
|
+
mode: 'strict',
|
|
1146
|
+
typeSymbol: '@khorsheed/dsh-context-lens#requestInspector/loadTurns:sessionId',
|
|
1147
|
+
create: _khorsheed_dsh_context_lens_requestInspector_loadTurns_parameter_0_strict$schema,
|
|
1148
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_loadTurns_parameter_0_strict$schema(),
|
|
1149
|
+
jsonSchema: {"type":"string"},
|
|
1150
|
+
},
|
|
1151
|
+
},
|
|
1152
|
+
{
|
|
1153
|
+
name: 'end',
|
|
1154
|
+
source: 'json',
|
|
1155
|
+
codec: {
|
|
1156
|
+
mode: 'strict',
|
|
1157
|
+
typeSymbol: '@khorsheed/dsh-context-lens#requestInspector/loadTurns:end',
|
|
1158
|
+
create: _khorsheed_dsh_context_lens_requestInspector_loadTurns_parameter_1$schema,
|
|
1159
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_loadTurns_parameter_1$schema(),
|
|
1160
|
+
jsonSchema: {"oneOf":[{"type":"null","const":null},{"type":"number"}]},
|
|
1161
|
+
},
|
|
1162
|
+
strictCodec: {
|
|
1163
|
+
mode: 'strict',
|
|
1164
|
+
typeSymbol: '@khorsheed/dsh-context-lens#requestInspector/loadTurns:end',
|
|
1165
|
+
create: _khorsheed_dsh_context_lens_requestInspector_loadTurns_parameter_1_strict$schema,
|
|
1166
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_loadTurns_parameter_1_strict$schema(),
|
|
1167
|
+
jsonSchema: {"oneOf":[{"type":"null","const":null},{"type":"number"}]},
|
|
1168
|
+
},
|
|
1169
|
+
},
|
|
1170
|
+
{
|
|
1171
|
+
name: 'filter',
|
|
1172
|
+
source: 'json',
|
|
1173
|
+
acceptsUndefined: true,
|
|
1174
|
+
codec: {
|
|
1175
|
+
mode: 'strict',
|
|
1176
|
+
typeSymbol: '@khorsheed/dsh-context-lens/types#ScopeFilter',
|
|
1177
|
+
create: _khorsheed_dsh_context_lens_requestInspector_loadTurns_parameter_2$schema,
|
|
1178
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_loadTurns_parameter_2$schema(),
|
|
1179
|
+
jsonSchema: {"type":"object","properties":{"scopes":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":true},
|
|
1180
|
+
},
|
|
1181
|
+
strictCodec: {
|
|
1182
|
+
mode: 'strict',
|
|
1183
|
+
typeSymbol: '@khorsheed/dsh-context-lens/types#ScopeFilter',
|
|
1184
|
+
create: _khorsheed_dsh_context_lens_requestInspector_loadTurns_parameter_2_strict$schema,
|
|
1185
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_loadTurns_parameter_2_strict$schema(),
|
|
1186
|
+
jsonSchema: {"type":"object","properties":{"scopes":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false},
|
|
1187
|
+
},
|
|
1188
|
+
},
|
|
1189
|
+
],
|
|
1190
|
+
result: {
|
|
1191
|
+
mode: 'strict',
|
|
1192
|
+
typeSymbol: '@khorsheed/dsh-context-lens/types#ListTurnsResult',
|
|
1193
|
+
create: _khorsheed_dsh_context_lens_requestInspector_loadTurns_result$schema,
|
|
1194
|
+
schema: _khorsheed_dsh_context_lens_requestInspector_loadTurns_result$schema(),
|
|
1195
|
+
jsonSchema: {"type":"object","properties":{"turns":{"type":"array","items":{"type":"object","properties":{"sessionId":{"type":"string"},"roomDecisionIds":{"type":"array","items":{"type":"string"},"description":"Ids of the room decisions this turn holds (a 查看判断 jump resolves its turn by them)."},"turnSeq":{"type":"number","description":"The panel-facing address. Real turns key on the host's own turn number (stable across live capture and log backfill, and durable across process restarts); purpose pseudo-turns (compaction / session-title buckets) take negative addresses that are NOT durable — they re-derive from the session's bucket counter on every mount. Address semantics: `(sessionId, turnSeq)` names a TURN, never a request."},"hostTurn":{"type":"number","description":"The host's turn number on real turns; absent marks a purpose pseudo-turn."},"query":{"type":"string","description":"用户 query 预览(单行截断)。"},"trigger":{"type":"object","properties":{"source":{"type":"string"},"text":{"type":"string"}},"required":["source","text"],"additionalProperties":true,"description":"No human message this turn: the producer and text of the first message that started it."},"startSeq":{"type":"number","description":"The `turn/start` event's log seq — the target the chat pages history back to before a jump."},"ordinal":{"type":"number","description":"The turn's number in one session-wide sequence (main turns and room rounds, by time)."},"room":{"type":"object","properties":{"targets":{"type":"array","items":{"type":"string"}}},"required":["targets"],"additionalProperties":true,"description":"A room round: a human message to the room made outside any main turn, and who it went to."},"startedAt":{"type":"number"},"endedAt":{"type":"number"},"requestCount":{"type":"number"},"scopeCount":{"type":"number"},"failedScopeCount":{"type":"number"},"totalInputTokens":{"type":"number"},"totalOutputTokens":{"type":"number"},"origin":{"type":"string","enum":["live","log-reconstructed"],"description":"Fidelity marker: `live` once any in-process capture landed on the turn (the log lane never merges into such a turn), `log-reconstructed` when the whole turn was rebuilt from the session log."},"closingMessageId":{"type":"string","description":"The turn-tail assistant message id — the `conversation.chat.assistant-actions` owner prop, so the message-row icon can map itself back to this turn."}},"required":["sessionId","turnSeq","query","startedAt","requestCount","scopeCount","failedScopeCount","totalInputTokens","totalOutputTokens"],"additionalProperties":true}},"backfill":{"type":"object","properties":{"state":{"type":"string","enum":["complete","partial","none","broken"],"description":"`none` — never read (no durable log yet, or no persistence backend); `partial` — some turns reconstructed, older ones dropped by budget (the read retries on later queries as room frees); `complete` — every turn in the log is represented; `broken` — the log refused to decode."},"reason":{"type":"string","description":"The decode failure summary when `state` is `broken`."}},"required":["state"],"additionalProperties":true},"generation":{"type":"string","description":"The answering instance's epoch (a mount-time id). Request `seq` values are process-local and reset on restart: a caller holding seqs across calls tags them with the generation of the result that yielded them and treats a changed generation as invalidating every held seq — an old seq must never silently resolve to a different request."},"evictedTurnCount":{"type":"number","description":"Turns this session collected and later evicted under the retention caps — the \"collected then dropped\" signal next to the backfill watermark, present only when non-zero. Blind spot: a session whose last turn evicts frees its whole slot, so fully-evicted reads exactly like never-seen (the store cannot tell the two apart)."},"parent":{"type":"object","properties":{"sessionId":{"type":"string"},"title":{"type":"string"},"hostTurn":{"type":"number"},"label":{"type":"string"}},"required":["sessionId"],"additionalProperties":true,"description":"This session is another session's child (its log header names a `parentSession`): the parent's title, the turn that started it, and the label it was catalogued under."},"range":{"type":"object","properties":{"first":{"type":"number"},"last":{"type":"number"}},"required":["first","last"],"additionalProperties":true,"description":"First and last host turn the session's log holds; turns between them that `turns` lacks are not loaded."},"total":{"type":"number","description":"How many turns the session has in the ordinal sequence (main turns and room rounds)."},"unloaded":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"firstHost":{"type":"number"},"lastHost":{"type":"number"}},"required":["from","to","firstHost","lastHost"],"additionalProperties":true},"description":"Runs of main turns not loaded, in ordinals, with the host turns at their ends (what a window move asks for)."},"handoffs":{"type":"array","items":{"type":"object","properties":{"at":{"type":"number"},"name":{"type":"string"}},"required":["at","name"],"additionalProperties":true},"description":"Room coordinator handoffs, for the session map."},"authorizedScopes":{"type":"array","items":{"type":"string"},"description":"Present exactly when the query carried a {@link ScopeFilter}: the authorized scopes that exist in the session. An empty array is the explicit zero-authorized-content signal — distinct from the field's absence (unfiltered) and from unknown-session emptiness."}},"required":["turns","backfill"],"additionalProperties":true},
|
|
1196
|
+
},
|
|
1197
|
+
sourceLocation: {"file":"packages/context-lens/src/remote.ts","line":49,"column":3},
|
|
1198
|
+
},
|
|
1199
|
+
},
|
|
1200
|
+
}, z)
|
|
1201
|
+
|
|
1202
|
+
export default TYPERT_REMOTE
|