@deepseek-ai/dsh-message-feedback 0.2.1-alpha.2 → 0.2.1-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/typert.host.js +114 -67
- package/lib/typert.remote-client.d.ts +7 -2
- package/lib/typert.remote-client.js +108 -66
- package/locale/en.json +5 -0
- package/locale/zh.json +6 -0
- package/package.json +23 -21
package/lib/typert.host.js
CHANGED
|
@@ -1,102 +1,104 @@
|
|
|
1
1
|
/* Generated by @deepseek-ai/dsh-typert-generator from FaceModel — do not edit. */
|
|
2
2
|
import { z } from 'zod'
|
|
3
3
|
|
|
4
|
+
import { createTypertRemoteInfo } from '@deepseek-ai/dsh-typert-protocol/remote-info'
|
|
5
|
+
|
|
4
6
|
let _deepseek_ai_dsh_message_feedback_messageFeedback_delete_parameter_0$schema$value
|
|
5
7
|
const _deepseek_ai_dsh_message_feedback_messageFeedback_delete_parameter_0$schema = () => (_deepseek_ai_dsh_message_feedback_messageFeedback_delete_parameter_0$schema$value ??= z.object({
|
|
6
|
-
'sessionId': z.
|
|
7
|
-
'messageId': z.
|
|
8
|
-
'ifVersion': z.
|
|
8
|
+
'sessionId': z.string().readonly().describe('Session that owns the feedback.'),
|
|
9
|
+
'messageId': z.string().readonly().describe('Message whose feedback should be absent after this operation.'),
|
|
10
|
+
'ifVersion': z.string().readonly().describe('Observed item version; ignored when the item is already absent.'),
|
|
9
11
|
}))
|
|
10
12
|
let _deepseek_ai_dsh_message_feedback_messageFeedback_delete_result$schema$value
|
|
11
13
|
const _deepseek_ai_dsh_message_feedback_messageFeedback_delete_result$schema = () => (_deepseek_ai_dsh_message_feedback_messageFeedback_delete_result$schema$value ??= z.union([z.object({
|
|
12
14
|
'ok': z.literal(true).readonly(),
|
|
13
15
|
'value': z.object({
|
|
14
|
-
'absent': z.literal(true).readonly(),
|
|
16
|
+
'absent': z.literal(true).readonly().describe('Stable postcondition shared by the first deletion and every retry.'),
|
|
15
17
|
}).readonly(),
|
|
16
18
|
}), z.object({
|
|
17
19
|
'ok': z.literal(false).readonly(),
|
|
18
20
|
'error': z.union([z.object({
|
|
19
21
|
'code': z.literal("session-not-found").readonly(),
|
|
20
|
-
'sessionId': z.
|
|
22
|
+
'sessionId': z.string().readonly(),
|
|
21
23
|
}), z.object({
|
|
22
24
|
'code': z.literal("version-conflict").readonly(),
|
|
23
25
|
'current': z.union([z.literal(null), z.object({
|
|
24
|
-
'messageId': z.
|
|
25
|
-
'rating': z.union([z.literal("positive"), z.literal("negative")]).readonly(),
|
|
26
|
-
'note': z.string().readonly().optional(),
|
|
27
|
-
'category': z.union([z.literal("other"), z.literal("task-result"), z.literal("instruction-following"), z.literal("product-interaction"), z.literal("service-stability"), z.literal("resource-cost"), z.literal("security-privacy-permission")]).readonly().optional(),
|
|
28
|
-
'version': z.
|
|
29
|
-
'createdAt': z.number().readonly(),
|
|
30
|
-
'updatedAt': z.number().readonly(),
|
|
31
|
-
})]).readonly(),
|
|
26
|
+
'messageId': z.string().readonly().describe('Stable identity of the assistant message inside the owning Session.'),
|
|
27
|
+
'rating': z.union([z.literal("positive"), z.literal("negative")]).readonly().describe('Overall positive or negative judgment.'),
|
|
28
|
+
'note': z.string().readonly().optional().describe('Optional explanation, preserved verbatim after validation.'),
|
|
29
|
+
'category': z.union([z.literal("other"), z.literal("task-result"), z.literal("instruction-following"), z.literal("product-interaction"), z.literal("service-stability"), z.literal("resource-cost"), z.literal("security-privacy-permission")]).readonly().optional().describe('Category the human filed the judgment under.'),
|
|
30
|
+
'version': z.string().readonly().describe('Equality-only token replaced by every material create or update.'),
|
|
31
|
+
'createdAt': z.number().readonly().describe('Host-assigned creation time in Unix epoch milliseconds.'),
|
|
32
|
+
'updatedAt': z.number().readonly().describe('Host-assigned time of the most recent material update.'),
|
|
33
|
+
})]).readonly().describe('Authoritative current item, or `null` when it does not exist.'),
|
|
32
34
|
})]).readonly(),
|
|
33
35
|
})]))
|
|
34
36
|
let _deepseek_ai_dsh_message_feedback_messageFeedback_list_parameter_0$schema$value
|
|
35
37
|
const _deepseek_ai_dsh_message_feedback_messageFeedback_list_parameter_0$schema = () => (_deepseek_ai_dsh_message_feedback_messageFeedback_list_parameter_0$schema$value ??= z.object({
|
|
36
|
-
'sessionId': z.
|
|
38
|
+
'sessionId': z.string().readonly().describe('Session whose feedback events should be read.'),
|
|
37
39
|
}))
|
|
38
40
|
let _deepseek_ai_dsh_message_feedback_messageFeedback_list_result$schema$value
|
|
39
41
|
const _deepseek_ai_dsh_message_feedback_messageFeedback_list_result$schema = () => (_deepseek_ai_dsh_message_feedback_messageFeedback_list_result$schema$value ??= z.union([z.object({
|
|
40
42
|
'ok': z.literal(true).readonly(),
|
|
41
43
|
'value': z.object({
|
|
42
44
|
'items': z.array(z.object({
|
|
43
|
-
'messageId': z.
|
|
44
|
-
'rating': z.union([z.literal("positive"), z.literal("negative")]).readonly(),
|
|
45
|
-
'note': z.string().readonly().optional(),
|
|
46
|
-
'category': z.union([z.literal("other"), z.literal("task-result"), z.literal("instruction-following"), z.literal("product-interaction"), z.literal("service-stability"), z.literal("resource-cost"), z.literal("security-privacy-permission")]).readonly().optional(),
|
|
47
|
-
'version': z.
|
|
48
|
-
'createdAt': z.number().readonly(),
|
|
49
|
-
'updatedAt': z.number().readonly(),
|
|
50
|
-
})).readonly(),
|
|
45
|
+
'messageId': z.string().readonly().describe('Stable identity of the assistant message inside the owning Session.'),
|
|
46
|
+
'rating': z.union([z.literal("positive"), z.literal("negative")]).readonly().describe('Overall positive or negative judgment.'),
|
|
47
|
+
'note': z.string().readonly().optional().describe('Optional explanation, preserved verbatim after validation.'),
|
|
48
|
+
'category': z.union([z.literal("other"), z.literal("task-result"), z.literal("instruction-following"), z.literal("product-interaction"), z.literal("service-stability"), z.literal("resource-cost"), z.literal("security-privacy-permission")]).readonly().optional().describe('Category the human filed the judgment under.'),
|
|
49
|
+
'version': z.string().readonly().describe('Equality-only token replaced by every material create or update.'),
|
|
50
|
+
'createdAt': z.number().readonly().describe('Host-assigned creation time in Unix epoch milliseconds.'),
|
|
51
|
+
'updatedAt': z.number().readonly().describe('Host-assigned time of the most recent material update.'),
|
|
52
|
+
})).readonly().describe('Fresh immutable item snapshots.'),
|
|
51
53
|
}).readonly(),
|
|
52
54
|
}), z.object({
|
|
53
55
|
'ok': z.literal(false).readonly(),
|
|
54
56
|
'error': z.object({
|
|
55
57
|
'code': z.literal("session-not-found").readonly(),
|
|
56
|
-
'sessionId': z.
|
|
58
|
+
'sessionId': z.string().readonly(),
|
|
57
59
|
}).readonly(),
|
|
58
60
|
})]))
|
|
59
61
|
let _deepseek_ai_dsh_message_feedback_messageFeedback_put_parameter_0$schema$value
|
|
60
62
|
const _deepseek_ai_dsh_message_feedback_messageFeedback_put_parameter_0$schema = () => (_deepseek_ai_dsh_message_feedback_messageFeedback_put_parameter_0$schema$value ??= z.object({
|
|
61
|
-
'sessionId': z.
|
|
62
|
-
'messageId': z.
|
|
63
|
-
'rating': z.union([z.literal("positive"), z.literal("negative")]).readonly(),
|
|
64
|
-
'note': z.string().readonly().optional(),
|
|
65
|
-
'category': z.union([z.literal("other"), z.literal("task-result"), z.literal("instruction-following"), z.literal("product-interaction"), z.literal("service-stability"), z.literal("resource-cost"), z.literal("security-privacy-permission")]).readonly().optional(),
|
|
66
|
-
'ifVersion': z.union([z.literal(null), z.
|
|
63
|
+
'sessionId': z.string().readonly().describe('Persisted Session that owns the target message.'),
|
|
64
|
+
'messageId': z.string().readonly().describe('Target assistant-message identity.'),
|
|
65
|
+
'rating': z.union([z.literal("positive"), z.literal("negative")]).readonly().describe('Desired overall judgment.'),
|
|
66
|
+
'note': z.string().readonly().optional().describe('Optional non-blank explanation.'),
|
|
67
|
+
'category': z.union([z.literal("other"), z.literal("task-result"), z.literal("instruction-following"), z.literal("product-interaction"), z.literal("service-stability"), z.literal("resource-cost"), z.literal("security-privacy-permission")]).readonly().optional().describe('Optional category; absent keeps the item uncategorized.'),
|
|
68
|
+
'ifVersion': z.union([z.literal(null), z.string()]).readonly().describe('Observed item version, or `null` to require that no item exists.'),
|
|
67
69
|
}))
|
|
68
70
|
let _deepseek_ai_dsh_message_feedback_messageFeedback_put_result$schema$value
|
|
69
71
|
const _deepseek_ai_dsh_message_feedback_messageFeedback_put_result$schema = () => (_deepseek_ai_dsh_message_feedback_messageFeedback_put_result$schema$value ??= z.union([z.object({
|
|
70
72
|
'ok': z.literal(true).readonly(),
|
|
71
73
|
'value': z.object({
|
|
72
|
-
'messageId': z.
|
|
73
|
-
'rating': z.union([z.literal("positive"), z.literal("negative")]).readonly(),
|
|
74
|
-
'note': z.string().readonly().optional(),
|
|
75
|
-
'category': z.union([z.literal("other"), z.literal("task-result"), z.literal("instruction-following"), z.literal("product-interaction"), z.literal("service-stability"), z.literal("resource-cost"), z.literal("security-privacy-permission")]).readonly().optional(),
|
|
76
|
-
'version': z.
|
|
77
|
-
'createdAt': z.number().readonly(),
|
|
78
|
-
'updatedAt': z.number().readonly(),
|
|
74
|
+
'messageId': z.string().readonly().describe('Stable identity of the assistant message inside the owning Session.'),
|
|
75
|
+
'rating': z.union([z.literal("positive"), z.literal("negative")]).readonly().describe('Overall positive or negative judgment.'),
|
|
76
|
+
'note': z.string().readonly().optional().describe('Optional explanation, preserved verbatim after validation.'),
|
|
77
|
+
'category': z.union([z.literal("other"), z.literal("task-result"), z.literal("instruction-following"), z.literal("product-interaction"), z.literal("service-stability"), z.literal("resource-cost"), z.literal("security-privacy-permission")]).readonly().optional().describe('Category the human filed the judgment under.'),
|
|
78
|
+
'version': z.string().readonly().describe('Equality-only token replaced by every material create or update.'),
|
|
79
|
+
'createdAt': z.number().readonly().describe('Host-assigned creation time in Unix epoch milliseconds.'),
|
|
80
|
+
'updatedAt': z.number().readonly().describe('Host-assigned time of the most recent material update.'),
|
|
79
81
|
}).readonly(),
|
|
80
82
|
}), z.object({
|
|
81
83
|
'ok': z.literal(false).readonly(),
|
|
82
84
|
'error': z.union([z.object({
|
|
83
85
|
'code': z.literal("session-not-found").readonly(),
|
|
84
|
-
'sessionId': z.
|
|
86
|
+
'sessionId': z.string().readonly(),
|
|
85
87
|
}), z.object({
|
|
86
88
|
'code': z.literal("target-not-found").readonly(),
|
|
87
|
-
'sessionId': z.
|
|
88
|
-
'messageId': z.
|
|
89
|
+
'sessionId': z.string().readonly(),
|
|
90
|
+
'messageId': z.string().readonly(),
|
|
89
91
|
}), z.object({
|
|
90
92
|
'code': z.literal("version-conflict").readonly(),
|
|
91
93
|
'current': z.union([z.literal(null), z.object({
|
|
92
|
-
'messageId': z.
|
|
93
|
-
'rating': z.union([z.literal("positive"), z.literal("negative")]).readonly(),
|
|
94
|
-
'note': z.string().readonly().optional(),
|
|
95
|
-
'category': z.union([z.literal("other"), z.literal("task-result"), z.literal("instruction-following"), z.literal("product-interaction"), z.literal("service-stability"), z.literal("resource-cost"), z.literal("security-privacy-permission")]).readonly().optional(),
|
|
96
|
-
'version': z.
|
|
97
|
-
'createdAt': z.number().readonly(),
|
|
98
|
-
'updatedAt': z.number().readonly(),
|
|
99
|
-
})]).readonly(),
|
|
94
|
+
'messageId': z.string().readonly().describe('Stable identity of the assistant message inside the owning Session.'),
|
|
95
|
+
'rating': z.union([z.literal("positive"), z.literal("negative")]).readonly().describe('Overall positive or negative judgment.'),
|
|
96
|
+
'note': z.string().readonly().optional().describe('Optional explanation, preserved verbatim after validation.'),
|
|
97
|
+
'category': z.union([z.literal("other"), z.literal("task-result"), z.literal("instruction-following"), z.literal("product-interaction"), z.literal("service-stability"), z.literal("resource-cost"), z.literal("security-privacy-permission")]).readonly().optional().describe('Category the human filed the judgment under.'),
|
|
98
|
+
'version': z.string().readonly().describe('Equality-only token replaced by every material create or update.'),
|
|
99
|
+
'createdAt': z.number().readonly().describe('Host-assigned creation time in Unix epoch milliseconds.'),
|
|
100
|
+
'updatedAt': z.number().readonly().describe('Host-assigned time of the most recent material update.'),
|
|
101
|
+
})]).readonly().describe('Authoritative current item, or `null` when it does not exist.'),
|
|
100
102
|
}), z.object({
|
|
101
103
|
'code': z.literal("note-blank").readonly(),
|
|
102
104
|
}), z.object({
|
|
@@ -105,28 +107,49 @@ const _deepseek_ai_dsh_message_feedback_messageFeedback_put_result$schema = () =
|
|
|
105
107
|
'actualBytes': z.number().readonly(),
|
|
106
108
|
})]).readonly(),
|
|
107
109
|
})]))
|
|
110
|
+
let _deepseek_ai_dsh_message_feedback_messageFeedback_delete_parameter_0_strict$schema$value
|
|
111
|
+
const _deepseek_ai_dsh_message_feedback_messageFeedback_delete_parameter_0_strict$schema = () => (_deepseek_ai_dsh_message_feedback_messageFeedback_delete_parameter_0_strict$schema$value ??= z.strictObject({
|
|
112
|
+
'sessionId': z.string().readonly().describe('Session that owns the feedback.'),
|
|
113
|
+
'messageId': z.string().readonly().describe('Message whose feedback should be absent after this operation.'),
|
|
114
|
+
'ifVersion': z.string().readonly().describe('Observed item version; ignored when the item is already absent.'),
|
|
115
|
+
}))
|
|
116
|
+
let _deepseek_ai_dsh_message_feedback_messageFeedback_list_parameter_0_strict$schema$value
|
|
117
|
+
const _deepseek_ai_dsh_message_feedback_messageFeedback_list_parameter_0_strict$schema = () => (_deepseek_ai_dsh_message_feedback_messageFeedback_list_parameter_0_strict$schema$value ??= z.strictObject({
|
|
118
|
+
'sessionId': z.string().readonly().describe('Session whose feedback events should be read.'),
|
|
119
|
+
}))
|
|
120
|
+
let _deepseek_ai_dsh_message_feedback_messageFeedback_put_parameter_0_strict$schema$value
|
|
121
|
+
const _deepseek_ai_dsh_message_feedback_messageFeedback_put_parameter_0_strict$schema = () => (_deepseek_ai_dsh_message_feedback_messageFeedback_put_parameter_0_strict$schema$value ??= z.strictObject({
|
|
122
|
+
'sessionId': z.string().readonly().describe('Persisted Session that owns the target message.'),
|
|
123
|
+
'messageId': z.string().readonly().describe('Target assistant-message identity.'),
|
|
124
|
+
'rating': z.union([z.literal("positive"), z.literal("negative")]).readonly().describe('Desired overall judgment.'),
|
|
125
|
+
'note': z.string().readonly().optional().describe('Optional non-blank explanation.'),
|
|
126
|
+
'category': z.union([z.literal("other"), z.literal("task-result"), z.literal("instruction-following"), z.literal("product-interaction"), z.literal("service-stability"), z.literal("resource-cost"), z.literal("security-privacy-permission")]).readonly().optional().describe('Optional category; absent keeps the item uncategorized.'),
|
|
127
|
+
'ifVersion': z.union([z.literal(null), z.string()]).readonly().describe('Observed item version, or `null` to require that no item exists.'),
|
|
128
|
+
}))
|
|
108
129
|
|
|
109
|
-
|
|
130
|
+
const $remote = createTypertRemoteInfo({
|
|
110
131
|
package: '@deepseek-ai/dsh-message-feedback',
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
],
|
|
114
|
-
invocations: [
|
|
115
|
-
{
|
|
116
|
-
id: '@deepseek-ai/dsh-message-feedback#messageFeedback/delete',
|
|
132
|
+
methods: {
|
|
133
|
+
'messageFeedback/delete': {
|
|
117
134
|
service: 'messageFeedback',
|
|
118
|
-
|
|
119
|
-
method: 'delete',
|
|
135
|
+
description: 'Delete one item after checking its version; absence succeeds without an event.',
|
|
120
136
|
invocation: { kind: 'direct' },
|
|
121
137
|
parameters: [
|
|
122
138
|
{
|
|
123
139
|
name: 'request',
|
|
124
|
-
|
|
140
|
+
description: 'Session, message, and observed item version.',
|
|
125
141
|
source: 'json',
|
|
126
142
|
codec: {
|
|
127
143
|
mode: 'strict',
|
|
128
144
|
typeSymbol: '@deepseek-ai/dsh-message-feedback/types#MessageFeedbackDeleteRequest',
|
|
129
145
|
create: _deepseek_ai_dsh_message_feedback_messageFeedback_delete_parameter_0$schema,
|
|
146
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string","description":"Session that owns the feedback."},"messageId":{"type":"string","description":"Message whose feedback should be absent after this operation."},"ifVersion":{"type":"string","description":"Observed item version; ignored when the item is already absent."}},"required":["sessionId","messageId","ifVersion"],"additionalProperties":true},
|
|
147
|
+
},
|
|
148
|
+
strictCodec: {
|
|
149
|
+
mode: 'strict',
|
|
150
|
+
typeSymbol: '@deepseek-ai/dsh-message-feedback/types#MessageFeedbackDeleteRequest',
|
|
151
|
+
create: _deepseek_ai_dsh_message_feedback_messageFeedback_delete_parameter_0_strict$schema,
|
|
152
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string","description":"Session that owns the feedback."},"messageId":{"type":"string","description":"Message whose feedback should be absent after this operation."},"ifVersion":{"type":"string","description":"Observed item version; ignored when the item is already absent."}},"required":["sessionId","messageId","ifVersion"],"additionalProperties":false},
|
|
130
153
|
},
|
|
131
154
|
},
|
|
132
155
|
],
|
|
@@ -134,24 +157,31 @@ export const TYPERT = {
|
|
|
134
157
|
mode: 'strict',
|
|
135
158
|
typeSymbol: '@deepseek-ai/dsh-message-feedback/types#MessageFeedbackDeleteResult',
|
|
136
159
|
create: _deepseek_ai_dsh_message_feedback_messageFeedback_delete_result$schema,
|
|
160
|
+
description: 'the stable absent postcondition or an explicit failure.',
|
|
161
|
+
jsonSchema: {"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":true},"value":{"type":"object","properties":{"absent":{"type":"boolean","const":true,"description":"Stable postcondition shared by the first deletion and every retry."}},"required":["absent"],"additionalProperties":true}},"required":["ok","value"],"additionalProperties":true},{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"oneOf":[{"type":"object","properties":{"code":{"type":"string","const":"session-not-found"},"sessionId":{"type":"string"}},"required":["code","sessionId"],"additionalProperties":true},{"type":"object","properties":{"code":{"type":"string","const":"version-conflict"},"current":{"oneOf":[{"type":"null","const":null},{"type":"object","properties":{"messageId":{"type":"string","description":"Stable identity of the assistant message inside the owning Session."},"rating":{"type":"string","enum":["positive","negative"],"description":"Overall positive or negative judgment."},"note":{"type":"string","description":"Optional explanation, preserved verbatim after validation."},"category":{"type":"string","enum":["other","task-result","instruction-following","product-interaction","service-stability","resource-cost","security-privacy-permission"],"description":"Category the human filed the judgment under."},"version":{"type":"string","description":"Equality-only token replaced by every material create or update."},"createdAt":{"type":"number","description":"Host-assigned creation time in Unix epoch milliseconds."},"updatedAt":{"type":"number","description":"Host-assigned time of the most recent material update."}},"required":["messageId","rating","version","createdAt","updatedAt"],"additionalProperties":true}],"description":"Authoritative current item, or `null` when it does not exist."}},"required":["code","current"],"additionalProperties":true}]}},"required":["ok","error"],"additionalProperties":true}]},
|
|
137
162
|
},
|
|
138
163
|
sourceLocation: {"file":"packages/feedback/message-feedback/src/index.ts","line":207,"column":3},
|
|
139
164
|
},
|
|
140
|
-
{
|
|
141
|
-
id: '@deepseek-ai/dsh-message-feedback#messageFeedback/list',
|
|
165
|
+
'messageFeedback/list': {
|
|
142
166
|
service: 'messageFeedback',
|
|
143
|
-
|
|
144
|
-
method: 'list',
|
|
167
|
+
description: 'Read current feedback from the canonical log.',
|
|
145
168
|
invocation: { kind: 'direct' },
|
|
146
169
|
parameters: [
|
|
147
170
|
{
|
|
148
171
|
name: 'request',
|
|
149
|
-
|
|
172
|
+
description: 'Session to inspect.',
|
|
150
173
|
source: 'json',
|
|
151
174
|
codec: {
|
|
152
175
|
mode: 'strict',
|
|
153
176
|
typeSymbol: '@deepseek-ai/dsh-message-feedback/types#MessageFeedbackListRequest',
|
|
154
177
|
create: _deepseek_ai_dsh_message_feedback_messageFeedback_list_parameter_0$schema,
|
|
178
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string","description":"Session whose feedback events should be read."}},"required":["sessionId"],"additionalProperties":true},
|
|
179
|
+
},
|
|
180
|
+
strictCodec: {
|
|
181
|
+
mode: 'strict',
|
|
182
|
+
typeSymbol: '@deepseek-ai/dsh-message-feedback/types#MessageFeedbackListRequest',
|
|
183
|
+
create: _deepseek_ai_dsh_message_feedback_messageFeedback_list_parameter_0_strict$schema,
|
|
184
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string","description":"Session whose feedback events should be read."}},"required":["sessionId"],"additionalProperties":false},
|
|
155
185
|
},
|
|
156
186
|
},
|
|
157
187
|
],
|
|
@@ -159,24 +189,31 @@ export const TYPERT = {
|
|
|
159
189
|
mode: 'strict',
|
|
160
190
|
typeSymbol: '@deepseek-ai/dsh-message-feedback/types#MessageFeedbackListResult',
|
|
161
191
|
create: _deepseek_ai_dsh_message_feedback_messageFeedback_list_result$schema,
|
|
192
|
+
description: 'immutable items or a definite persistence miss.',
|
|
193
|
+
jsonSchema: {"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":true},"value":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"messageId":{"type":"string","description":"Stable identity of the assistant message inside the owning Session."},"rating":{"type":"string","enum":["positive","negative"],"description":"Overall positive or negative judgment."},"note":{"type":"string","description":"Optional explanation, preserved verbatim after validation."},"category":{"type":"string","enum":["other","task-result","instruction-following","product-interaction","service-stability","resource-cost","security-privacy-permission"],"description":"Category the human filed the judgment under."},"version":{"type":"string","description":"Equality-only token replaced by every material create or update."},"createdAt":{"type":"number","description":"Host-assigned creation time in Unix epoch milliseconds."},"updatedAt":{"type":"number","description":"Host-assigned time of the most recent material update."}},"required":["messageId","rating","version","createdAt","updatedAt"],"additionalProperties":true},"description":"Fresh immutable item snapshots."}},"required":["items"],"additionalProperties":true}},"required":["ok","value"],"additionalProperties":true},{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","properties":{"code":{"type":"string","const":"session-not-found"},"sessionId":{"type":"string"}},"required":["code","sessionId"],"additionalProperties":true}},"required":["ok","error"],"additionalProperties":true}]},
|
|
162
194
|
},
|
|
163
195
|
sourceLocation: {"file":"packages/feedback/message-feedback/src/index.ts","line":155,"column":3},
|
|
164
196
|
},
|
|
165
|
-
{
|
|
166
|
-
id: '@deepseek-ai/dsh-message-feedback#messageFeedback/put',
|
|
197
|
+
'messageFeedback/put': {
|
|
167
198
|
service: 'messageFeedback',
|
|
168
|
-
|
|
169
|
-
method: 'put',
|
|
199
|
+
description: 'Create or replace feedback after checking its current version. Matching no-ops retain the version and append no event.',
|
|
170
200
|
invocation: { kind: 'direct' },
|
|
171
201
|
parameters: [
|
|
172
202
|
{
|
|
173
203
|
name: 'request',
|
|
174
|
-
|
|
204
|
+
description: 'Target, desired value, and observed item version.',
|
|
175
205
|
source: 'json',
|
|
176
206
|
codec: {
|
|
177
207
|
mode: 'strict',
|
|
178
208
|
typeSymbol: '@deepseek-ai/dsh-message-feedback/types#MessageFeedbackPutRequest',
|
|
179
209
|
create: _deepseek_ai_dsh_message_feedback_messageFeedback_put_parameter_0$schema,
|
|
210
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string","description":"Persisted Session that owns the target message."},"messageId":{"type":"string","description":"Target assistant-message identity."},"rating":{"type":"string","enum":["positive","negative"],"description":"Desired overall judgment."},"note":{"type":"string","description":"Optional non-blank explanation."},"category":{"type":"string","enum":["other","task-result","instruction-following","product-interaction","service-stability","resource-cost","security-privacy-permission"],"description":"Optional category; absent keeps the item uncategorized."},"ifVersion":{"oneOf":[{"type":"null","const":null},{"type":"string"}],"description":"Observed item version, or `null` to require that no item exists."}},"required":["sessionId","messageId","rating","ifVersion"],"additionalProperties":true},
|
|
211
|
+
},
|
|
212
|
+
strictCodec: {
|
|
213
|
+
mode: 'strict',
|
|
214
|
+
typeSymbol: '@deepseek-ai/dsh-message-feedback/types#MessageFeedbackPutRequest',
|
|
215
|
+
create: _deepseek_ai_dsh_message_feedback_messageFeedback_put_parameter_0_strict$schema,
|
|
216
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string","description":"Persisted Session that owns the target message."},"messageId":{"type":"string","description":"Target assistant-message identity."},"rating":{"type":"string","enum":["positive","negative"],"description":"Desired overall judgment."},"note":{"type":"string","description":"Optional non-blank explanation."},"category":{"type":"string","enum":["other","task-result","instruction-following","product-interaction","service-stability","resource-cost","security-privacy-permission"],"description":"Optional category; absent keeps the item uncategorized."},"ifVersion":{"oneOf":[{"type":"null","const":null},{"type":"string"}],"description":"Observed item version, or `null` to require that no item exists."}},"required":["sessionId","messageId","rating","ifVersion"],"additionalProperties":false},
|
|
180
217
|
},
|
|
181
218
|
},
|
|
182
219
|
],
|
|
@@ -184,10 +221,20 @@ export const TYPERT = {
|
|
|
184
221
|
mode: 'strict',
|
|
185
222
|
typeSymbol: '@deepseek-ai/dsh-message-feedback/types#MessageFeedbackPutResult',
|
|
186
223
|
create: _deepseek_ai_dsh_message_feedback_messageFeedback_put_result$schema,
|
|
224
|
+
description: 'the durable item or an explicit business failure.',
|
|
225
|
+
jsonSchema: {"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":true},"value":{"type":"object","properties":{"messageId":{"type":"string","description":"Stable identity of the assistant message inside the owning Session."},"rating":{"type":"string","enum":["positive","negative"],"description":"Overall positive or negative judgment."},"note":{"type":"string","description":"Optional explanation, preserved verbatim after validation."},"category":{"type":"string","enum":["other","task-result","instruction-following","product-interaction","service-stability","resource-cost","security-privacy-permission"],"description":"Category the human filed the judgment under."},"version":{"type":"string","description":"Equality-only token replaced by every material create or update."},"createdAt":{"type":"number","description":"Host-assigned creation time in Unix epoch milliseconds."},"updatedAt":{"type":"number","description":"Host-assigned time of the most recent material update."}},"required":["messageId","rating","version","createdAt","updatedAt"],"additionalProperties":true}},"required":["ok","value"],"additionalProperties":true},{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"oneOf":[{"type":"object","properties":{"code":{"type":"string","const":"session-not-found"},"sessionId":{"type":"string"}},"required":["code","sessionId"],"additionalProperties":true},{"type":"object","properties":{"code":{"type":"string","const":"target-not-found"},"sessionId":{"type":"string"},"messageId":{"type":"string"}},"required":["code","sessionId","messageId"],"additionalProperties":true},{"type":"object","properties":{"code":{"type":"string","const":"version-conflict"},"current":{"oneOf":[{"type":"null","const":null},{"type":"object","properties":{"messageId":{"type":"string","description":"Stable identity of the assistant message inside the owning Session."},"rating":{"type":"string","enum":["positive","negative"],"description":"Overall positive or negative judgment."},"note":{"type":"string","description":"Optional explanation, preserved verbatim after validation."},"category":{"type":"string","enum":["other","task-result","instruction-following","product-interaction","service-stability","resource-cost","security-privacy-permission"],"description":"Category the human filed the judgment under."},"version":{"type":"string","description":"Equality-only token replaced by every material create or update."},"createdAt":{"type":"number","description":"Host-assigned creation time in Unix epoch milliseconds."},"updatedAt":{"type":"number","description":"Host-assigned time of the most recent material update."}},"required":["messageId","rating","version","createdAt","updatedAt"],"additionalProperties":true}],"description":"Authoritative current item, or `null` when it does not exist."}},"required":["code","current"],"additionalProperties":true},{"type":"object","properties":{"code":{"type":"string","const":"note-blank"}},"required":["code"],"additionalProperties":true},{"type":"object","properties":{"code":{"type":"string","const":"note-too-large"},"maxBytes":{"type":"number"},"actualBytes":{"type":"number"}},"required":["code","maxBytes","actualBytes"],"additionalProperties":true}]}},"required":["ok","error"],"additionalProperties":true}]},
|
|
187
226
|
},
|
|
188
227
|
sourceLocation: {"file":"packages/feedback/message-feedback/src/index.ts","line":167,"column":3},
|
|
189
228
|
},
|
|
229
|
+
},
|
|
230
|
+
}, z)
|
|
231
|
+
|
|
232
|
+
export const TYPERT = {
|
|
233
|
+
package: '@deepseek-ai/dsh-message-feedback',
|
|
234
|
+
face: 'host',
|
|
235
|
+
schemas: [
|
|
190
236
|
],
|
|
237
|
+
get invocations() { return $remote.descriptors },
|
|
191
238
|
model: {
|
|
192
239
|
"services": [
|
|
193
240
|
{
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/* Generated by @deepseek-ai/dsh-typert-generator from the Host FaceModel — do not edit. */
|
|
2
2
|
import type {
|
|
3
3
|
RemoteResult,
|
|
4
|
-
|
|
4
|
+
TypertRemoteInfo,
|
|
5
|
+
TypertRemoteMethod,
|
|
5
6
|
} from '@deepseek-ai/dsh-typert-protocol'
|
|
6
7
|
import type { MessageFeedbackDeleteRequest, MessageFeedbackDeleteResult, MessageFeedbackListRequest, MessageFeedbackListResult, MessageFeedbackPutRequest, MessageFeedbackPutResult } from '@deepseek-ai/dsh-message-feedback/types'
|
|
7
8
|
|
|
@@ -21,6 +22,10 @@ declare module '@deepseek-ai/dsh-typert-protocol' {
|
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
export declare const TYPERT_REMOTE:
|
|
25
|
+
export declare const TYPERT_REMOTE: TypertRemoteInfo<{
|
|
26
|
+
readonly 'messageFeedback/delete': TypertRemoteMethod<{ readonly 'request': MessageFeedbackDeleteRequest }, MessageFeedbackDeleteResult>
|
|
27
|
+
readonly 'messageFeedback/list': TypertRemoteMethod<{ readonly 'request': MessageFeedbackListRequest }, MessageFeedbackListResult>
|
|
28
|
+
readonly 'messageFeedback/put': TypertRemoteMethod<{ readonly 'request': MessageFeedbackPutRequest }, MessageFeedbackPutResult>
|
|
29
|
+
}>
|
|
25
30
|
export default TYPERT_REMOTE
|
|
26
31
|
//# sourceMappingURL=typert.remote-client.d.ts.map
|
|
@@ -1,102 +1,104 @@
|
|
|
1
1
|
/* Generated by @deepseek-ai/dsh-typert-generator from the Host FaceModel — do not edit. */
|
|
2
2
|
import { z } from 'zod'
|
|
3
3
|
|
|
4
|
+
import { createTypertRemoteInfo } from '@deepseek-ai/dsh-typert-protocol/remote-info'
|
|
5
|
+
|
|
4
6
|
let _deepseek_ai_dsh_message_feedback_messageFeedback_delete_parameter_0$schema$value
|
|
5
7
|
const _deepseek_ai_dsh_message_feedback_messageFeedback_delete_parameter_0$schema = () => (_deepseek_ai_dsh_message_feedback_messageFeedback_delete_parameter_0$schema$value ??= z.object({
|
|
6
|
-
'sessionId': z.
|
|
7
|
-
'messageId': z.
|
|
8
|
-
'ifVersion': z.
|
|
8
|
+
'sessionId': z.string().readonly().describe('Session that owns the feedback.'),
|
|
9
|
+
'messageId': z.string().readonly().describe('Message whose feedback should be absent after this operation.'),
|
|
10
|
+
'ifVersion': z.string().readonly().describe('Observed item version; ignored when the item is already absent.'),
|
|
9
11
|
}))
|
|
10
12
|
let _deepseek_ai_dsh_message_feedback_messageFeedback_delete_result$schema$value
|
|
11
13
|
const _deepseek_ai_dsh_message_feedback_messageFeedback_delete_result$schema = () => (_deepseek_ai_dsh_message_feedback_messageFeedback_delete_result$schema$value ??= z.union([z.object({
|
|
12
14
|
'ok': z.literal(true).readonly(),
|
|
13
15
|
'value': z.object({
|
|
14
|
-
'absent': z.literal(true).readonly(),
|
|
16
|
+
'absent': z.literal(true).readonly().describe('Stable postcondition shared by the first deletion and every retry.'),
|
|
15
17
|
}).readonly(),
|
|
16
18
|
}), z.object({
|
|
17
19
|
'ok': z.literal(false).readonly(),
|
|
18
20
|
'error': z.union([z.object({
|
|
19
21
|
'code': z.literal("session-not-found").readonly(),
|
|
20
|
-
'sessionId': z.
|
|
22
|
+
'sessionId': z.string().readonly(),
|
|
21
23
|
}), z.object({
|
|
22
24
|
'code': z.literal("version-conflict").readonly(),
|
|
23
25
|
'current': z.union([z.literal(null), z.object({
|
|
24
|
-
'messageId': z.
|
|
25
|
-
'rating': z.union([z.literal("positive"), z.literal("negative")]).readonly(),
|
|
26
|
-
'note': z.string().readonly().optional(),
|
|
27
|
-
'category': z.union([z.literal("other"), z.literal("task-result"), z.literal("instruction-following"), z.literal("product-interaction"), z.literal("service-stability"), z.literal("resource-cost"), z.literal("security-privacy-permission")]).readonly().optional(),
|
|
28
|
-
'version': z.
|
|
29
|
-
'createdAt': z.number().readonly(),
|
|
30
|
-
'updatedAt': z.number().readonly(),
|
|
31
|
-
})]).readonly(),
|
|
26
|
+
'messageId': z.string().readonly().describe('Stable identity of the assistant message inside the owning Session.'),
|
|
27
|
+
'rating': z.union([z.literal("positive"), z.literal("negative")]).readonly().describe('Overall positive or negative judgment.'),
|
|
28
|
+
'note': z.string().readonly().optional().describe('Optional explanation, preserved verbatim after validation.'),
|
|
29
|
+
'category': z.union([z.literal("other"), z.literal("task-result"), z.literal("instruction-following"), z.literal("product-interaction"), z.literal("service-stability"), z.literal("resource-cost"), z.literal("security-privacy-permission")]).readonly().optional().describe('Category the human filed the judgment under.'),
|
|
30
|
+
'version': z.string().readonly().describe('Equality-only token replaced by every material create or update.'),
|
|
31
|
+
'createdAt': z.number().readonly().describe('Host-assigned creation time in Unix epoch milliseconds.'),
|
|
32
|
+
'updatedAt': z.number().readonly().describe('Host-assigned time of the most recent material update.'),
|
|
33
|
+
})]).readonly().describe('Authoritative current item, or `null` when it does not exist.'),
|
|
32
34
|
})]).readonly(),
|
|
33
35
|
})]))
|
|
34
36
|
let _deepseek_ai_dsh_message_feedback_messageFeedback_list_parameter_0$schema$value
|
|
35
37
|
const _deepseek_ai_dsh_message_feedback_messageFeedback_list_parameter_0$schema = () => (_deepseek_ai_dsh_message_feedback_messageFeedback_list_parameter_0$schema$value ??= z.object({
|
|
36
|
-
'sessionId': z.
|
|
38
|
+
'sessionId': z.string().readonly().describe('Session whose feedback events should be read.'),
|
|
37
39
|
}))
|
|
38
40
|
let _deepseek_ai_dsh_message_feedback_messageFeedback_list_result$schema$value
|
|
39
41
|
const _deepseek_ai_dsh_message_feedback_messageFeedback_list_result$schema = () => (_deepseek_ai_dsh_message_feedback_messageFeedback_list_result$schema$value ??= z.union([z.object({
|
|
40
42
|
'ok': z.literal(true).readonly(),
|
|
41
43
|
'value': z.object({
|
|
42
44
|
'items': z.array(z.object({
|
|
43
|
-
'messageId': z.
|
|
44
|
-
'rating': z.union([z.literal("positive"), z.literal("negative")]).readonly(),
|
|
45
|
-
'note': z.string().readonly().optional(),
|
|
46
|
-
'category': z.union([z.literal("other"), z.literal("task-result"), z.literal("instruction-following"), z.literal("product-interaction"), z.literal("service-stability"), z.literal("resource-cost"), z.literal("security-privacy-permission")]).readonly().optional(),
|
|
47
|
-
'version': z.
|
|
48
|
-
'createdAt': z.number().readonly(),
|
|
49
|
-
'updatedAt': z.number().readonly(),
|
|
50
|
-
})).readonly(),
|
|
45
|
+
'messageId': z.string().readonly().describe('Stable identity of the assistant message inside the owning Session.'),
|
|
46
|
+
'rating': z.union([z.literal("positive"), z.literal("negative")]).readonly().describe('Overall positive or negative judgment.'),
|
|
47
|
+
'note': z.string().readonly().optional().describe('Optional explanation, preserved verbatim after validation.'),
|
|
48
|
+
'category': z.union([z.literal("other"), z.literal("task-result"), z.literal("instruction-following"), z.literal("product-interaction"), z.literal("service-stability"), z.literal("resource-cost"), z.literal("security-privacy-permission")]).readonly().optional().describe('Category the human filed the judgment under.'),
|
|
49
|
+
'version': z.string().readonly().describe('Equality-only token replaced by every material create or update.'),
|
|
50
|
+
'createdAt': z.number().readonly().describe('Host-assigned creation time in Unix epoch milliseconds.'),
|
|
51
|
+
'updatedAt': z.number().readonly().describe('Host-assigned time of the most recent material update.'),
|
|
52
|
+
})).readonly().describe('Fresh immutable item snapshots.'),
|
|
51
53
|
}).readonly(),
|
|
52
54
|
}), z.object({
|
|
53
55
|
'ok': z.literal(false).readonly(),
|
|
54
56
|
'error': z.object({
|
|
55
57
|
'code': z.literal("session-not-found").readonly(),
|
|
56
|
-
'sessionId': z.
|
|
58
|
+
'sessionId': z.string().readonly(),
|
|
57
59
|
}).readonly(),
|
|
58
60
|
})]))
|
|
59
61
|
let _deepseek_ai_dsh_message_feedback_messageFeedback_put_parameter_0$schema$value
|
|
60
62
|
const _deepseek_ai_dsh_message_feedback_messageFeedback_put_parameter_0$schema = () => (_deepseek_ai_dsh_message_feedback_messageFeedback_put_parameter_0$schema$value ??= z.object({
|
|
61
|
-
'sessionId': z.
|
|
62
|
-
'messageId': z.
|
|
63
|
-
'rating': z.union([z.literal("positive"), z.literal("negative")]).readonly(),
|
|
64
|
-
'note': z.string().readonly().optional(),
|
|
65
|
-
'category': z.union([z.literal("other"), z.literal("task-result"), z.literal("instruction-following"), z.literal("product-interaction"), z.literal("service-stability"), z.literal("resource-cost"), z.literal("security-privacy-permission")]).readonly().optional(),
|
|
66
|
-
'ifVersion': z.union([z.literal(null), z.
|
|
63
|
+
'sessionId': z.string().readonly().describe('Persisted Session that owns the target message.'),
|
|
64
|
+
'messageId': z.string().readonly().describe('Target assistant-message identity.'),
|
|
65
|
+
'rating': z.union([z.literal("positive"), z.literal("negative")]).readonly().describe('Desired overall judgment.'),
|
|
66
|
+
'note': z.string().readonly().optional().describe('Optional non-blank explanation.'),
|
|
67
|
+
'category': z.union([z.literal("other"), z.literal("task-result"), z.literal("instruction-following"), z.literal("product-interaction"), z.literal("service-stability"), z.literal("resource-cost"), z.literal("security-privacy-permission")]).readonly().optional().describe('Optional category; absent keeps the item uncategorized.'),
|
|
68
|
+
'ifVersion': z.union([z.literal(null), z.string()]).readonly().describe('Observed item version, or `null` to require that no item exists.'),
|
|
67
69
|
}))
|
|
68
70
|
let _deepseek_ai_dsh_message_feedback_messageFeedback_put_result$schema$value
|
|
69
71
|
const _deepseek_ai_dsh_message_feedback_messageFeedback_put_result$schema = () => (_deepseek_ai_dsh_message_feedback_messageFeedback_put_result$schema$value ??= z.union([z.object({
|
|
70
72
|
'ok': z.literal(true).readonly(),
|
|
71
73
|
'value': z.object({
|
|
72
|
-
'messageId': z.
|
|
73
|
-
'rating': z.union([z.literal("positive"), z.literal("negative")]).readonly(),
|
|
74
|
-
'note': z.string().readonly().optional(),
|
|
75
|
-
'category': z.union([z.literal("other"), z.literal("task-result"), z.literal("instruction-following"), z.literal("product-interaction"), z.literal("service-stability"), z.literal("resource-cost"), z.literal("security-privacy-permission")]).readonly().optional(),
|
|
76
|
-
'version': z.
|
|
77
|
-
'createdAt': z.number().readonly(),
|
|
78
|
-
'updatedAt': z.number().readonly(),
|
|
74
|
+
'messageId': z.string().readonly().describe('Stable identity of the assistant message inside the owning Session.'),
|
|
75
|
+
'rating': z.union([z.literal("positive"), z.literal("negative")]).readonly().describe('Overall positive or negative judgment.'),
|
|
76
|
+
'note': z.string().readonly().optional().describe('Optional explanation, preserved verbatim after validation.'),
|
|
77
|
+
'category': z.union([z.literal("other"), z.literal("task-result"), z.literal("instruction-following"), z.literal("product-interaction"), z.literal("service-stability"), z.literal("resource-cost"), z.literal("security-privacy-permission")]).readonly().optional().describe('Category the human filed the judgment under.'),
|
|
78
|
+
'version': z.string().readonly().describe('Equality-only token replaced by every material create or update.'),
|
|
79
|
+
'createdAt': z.number().readonly().describe('Host-assigned creation time in Unix epoch milliseconds.'),
|
|
80
|
+
'updatedAt': z.number().readonly().describe('Host-assigned time of the most recent material update.'),
|
|
79
81
|
}).readonly(),
|
|
80
82
|
}), z.object({
|
|
81
83
|
'ok': z.literal(false).readonly(),
|
|
82
84
|
'error': z.union([z.object({
|
|
83
85
|
'code': z.literal("session-not-found").readonly(),
|
|
84
|
-
'sessionId': z.
|
|
86
|
+
'sessionId': z.string().readonly(),
|
|
85
87
|
}), z.object({
|
|
86
88
|
'code': z.literal("target-not-found").readonly(),
|
|
87
|
-
'sessionId': z.
|
|
88
|
-
'messageId': z.
|
|
89
|
+
'sessionId': z.string().readonly(),
|
|
90
|
+
'messageId': z.string().readonly(),
|
|
89
91
|
}), z.object({
|
|
90
92
|
'code': z.literal("version-conflict").readonly(),
|
|
91
93
|
'current': z.union([z.literal(null), z.object({
|
|
92
|
-
'messageId': z.
|
|
93
|
-
'rating': z.union([z.literal("positive"), z.literal("negative")]).readonly(),
|
|
94
|
-
'note': z.string().readonly().optional(),
|
|
95
|
-
'category': z.union([z.literal("other"), z.literal("task-result"), z.literal("instruction-following"), z.literal("product-interaction"), z.literal("service-stability"), z.literal("resource-cost"), z.literal("security-privacy-permission")]).readonly().optional(),
|
|
96
|
-
'version': z.
|
|
97
|
-
'createdAt': z.number().readonly(),
|
|
98
|
-
'updatedAt': z.number().readonly(),
|
|
99
|
-
})]).readonly(),
|
|
94
|
+
'messageId': z.string().readonly().describe('Stable identity of the assistant message inside the owning Session.'),
|
|
95
|
+
'rating': z.union([z.literal("positive"), z.literal("negative")]).readonly().describe('Overall positive or negative judgment.'),
|
|
96
|
+
'note': z.string().readonly().optional().describe('Optional explanation, preserved verbatim after validation.'),
|
|
97
|
+
'category': z.union([z.literal("other"), z.literal("task-result"), z.literal("instruction-following"), z.literal("product-interaction"), z.literal("service-stability"), z.literal("resource-cost"), z.literal("security-privacy-permission")]).readonly().optional().describe('Category the human filed the judgment under.'),
|
|
98
|
+
'version': z.string().readonly().describe('Equality-only token replaced by every material create or update.'),
|
|
99
|
+
'createdAt': z.number().readonly().describe('Host-assigned creation time in Unix epoch milliseconds.'),
|
|
100
|
+
'updatedAt': z.number().readonly().describe('Host-assigned time of the most recent material update.'),
|
|
101
|
+
})]).readonly().describe('Authoritative current item, or `null` when it does not exist.'),
|
|
100
102
|
}), z.object({
|
|
101
103
|
'code': z.literal("note-blank").readonly(),
|
|
102
104
|
}), z.object({
|
|
@@ -105,25 +107,49 @@ const _deepseek_ai_dsh_message_feedback_messageFeedback_put_result$schema = () =
|
|
|
105
107
|
'actualBytes': z.number().readonly(),
|
|
106
108
|
})]).readonly(),
|
|
107
109
|
})]))
|
|
110
|
+
let _deepseek_ai_dsh_message_feedback_messageFeedback_delete_parameter_0_strict$schema$value
|
|
111
|
+
const _deepseek_ai_dsh_message_feedback_messageFeedback_delete_parameter_0_strict$schema = () => (_deepseek_ai_dsh_message_feedback_messageFeedback_delete_parameter_0_strict$schema$value ??= z.strictObject({
|
|
112
|
+
'sessionId': z.string().readonly().describe('Session that owns the feedback.'),
|
|
113
|
+
'messageId': z.string().readonly().describe('Message whose feedback should be absent after this operation.'),
|
|
114
|
+
'ifVersion': z.string().readonly().describe('Observed item version; ignored when the item is already absent.'),
|
|
115
|
+
}))
|
|
116
|
+
let _deepseek_ai_dsh_message_feedback_messageFeedback_list_parameter_0_strict$schema$value
|
|
117
|
+
const _deepseek_ai_dsh_message_feedback_messageFeedback_list_parameter_0_strict$schema = () => (_deepseek_ai_dsh_message_feedback_messageFeedback_list_parameter_0_strict$schema$value ??= z.strictObject({
|
|
118
|
+
'sessionId': z.string().readonly().describe('Session whose feedback events should be read.'),
|
|
119
|
+
}))
|
|
120
|
+
let _deepseek_ai_dsh_message_feedback_messageFeedback_put_parameter_0_strict$schema$value
|
|
121
|
+
const _deepseek_ai_dsh_message_feedback_messageFeedback_put_parameter_0_strict$schema = () => (_deepseek_ai_dsh_message_feedback_messageFeedback_put_parameter_0_strict$schema$value ??= z.strictObject({
|
|
122
|
+
'sessionId': z.string().readonly().describe('Persisted Session that owns the target message.'),
|
|
123
|
+
'messageId': z.string().readonly().describe('Target assistant-message identity.'),
|
|
124
|
+
'rating': z.union([z.literal("positive"), z.literal("negative")]).readonly().describe('Desired overall judgment.'),
|
|
125
|
+
'note': z.string().readonly().optional().describe('Optional non-blank explanation.'),
|
|
126
|
+
'category': z.union([z.literal("other"), z.literal("task-result"), z.literal("instruction-following"), z.literal("product-interaction"), z.literal("service-stability"), z.literal("resource-cost"), z.literal("security-privacy-permission")]).readonly().optional().describe('Optional category; absent keeps the item uncategorized.'),
|
|
127
|
+
'ifVersion': z.union([z.literal(null), z.string()]).readonly().describe('Observed item version, or `null` to require that no item exists.'),
|
|
128
|
+
}))
|
|
108
129
|
|
|
109
|
-
export const TYPERT_REMOTE = {
|
|
130
|
+
export const TYPERT_REMOTE = createTypertRemoteInfo({
|
|
110
131
|
package: '@deepseek-ai/dsh-message-feedback',
|
|
111
|
-
|
|
112
|
-
{
|
|
113
|
-
id: '@deepseek-ai/dsh-message-feedback#messageFeedback/delete',
|
|
132
|
+
methods: {
|
|
133
|
+
'messageFeedback/delete': {
|
|
114
134
|
service: 'messageFeedback',
|
|
115
|
-
|
|
116
|
-
method: 'delete',
|
|
135
|
+
description: 'Delete one item after checking its version; absence succeeds without an event.',
|
|
117
136
|
invocation: { kind: 'direct' },
|
|
118
137
|
parameters: [
|
|
119
138
|
{
|
|
120
139
|
name: 'request',
|
|
121
|
-
|
|
140
|
+
description: 'Session, message, and observed item version.',
|
|
122
141
|
source: 'json',
|
|
123
142
|
codec: {
|
|
124
143
|
mode: 'strict',
|
|
125
144
|
typeSymbol: '@deepseek-ai/dsh-message-feedback/types#MessageFeedbackDeleteRequest',
|
|
126
145
|
create: _deepseek_ai_dsh_message_feedback_messageFeedback_delete_parameter_0$schema,
|
|
146
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string","description":"Session that owns the feedback."},"messageId":{"type":"string","description":"Message whose feedback should be absent after this operation."},"ifVersion":{"type":"string","description":"Observed item version; ignored when the item is already absent."}},"required":["sessionId","messageId","ifVersion"],"additionalProperties":true},
|
|
147
|
+
},
|
|
148
|
+
strictCodec: {
|
|
149
|
+
mode: 'strict',
|
|
150
|
+
typeSymbol: '@deepseek-ai/dsh-message-feedback/types#MessageFeedbackDeleteRequest',
|
|
151
|
+
create: _deepseek_ai_dsh_message_feedback_messageFeedback_delete_parameter_0_strict$schema,
|
|
152
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string","description":"Session that owns the feedback."},"messageId":{"type":"string","description":"Message whose feedback should be absent after this operation."},"ifVersion":{"type":"string","description":"Observed item version; ignored when the item is already absent."}},"required":["sessionId","messageId","ifVersion"],"additionalProperties":false},
|
|
127
153
|
},
|
|
128
154
|
},
|
|
129
155
|
],
|
|
@@ -131,24 +157,31 @@ export const TYPERT_REMOTE = {
|
|
|
131
157
|
mode: 'strict',
|
|
132
158
|
typeSymbol: '@deepseek-ai/dsh-message-feedback/types#MessageFeedbackDeleteResult',
|
|
133
159
|
create: _deepseek_ai_dsh_message_feedback_messageFeedback_delete_result$schema,
|
|
160
|
+
description: 'the stable absent postcondition or an explicit failure.',
|
|
161
|
+
jsonSchema: {"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":true},"value":{"type":"object","properties":{"absent":{"type":"boolean","const":true,"description":"Stable postcondition shared by the first deletion and every retry."}},"required":["absent"],"additionalProperties":true}},"required":["ok","value"],"additionalProperties":true},{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"oneOf":[{"type":"object","properties":{"code":{"type":"string","const":"session-not-found"},"sessionId":{"type":"string"}},"required":["code","sessionId"],"additionalProperties":true},{"type":"object","properties":{"code":{"type":"string","const":"version-conflict"},"current":{"oneOf":[{"type":"null","const":null},{"type":"object","properties":{"messageId":{"type":"string","description":"Stable identity of the assistant message inside the owning Session."},"rating":{"type":"string","enum":["positive","negative"],"description":"Overall positive or negative judgment."},"note":{"type":"string","description":"Optional explanation, preserved verbatim after validation."},"category":{"type":"string","enum":["other","task-result","instruction-following","product-interaction","service-stability","resource-cost","security-privacy-permission"],"description":"Category the human filed the judgment under."},"version":{"type":"string","description":"Equality-only token replaced by every material create or update."},"createdAt":{"type":"number","description":"Host-assigned creation time in Unix epoch milliseconds."},"updatedAt":{"type":"number","description":"Host-assigned time of the most recent material update."}},"required":["messageId","rating","version","createdAt","updatedAt"],"additionalProperties":true}],"description":"Authoritative current item, or `null` when it does not exist."}},"required":["code","current"],"additionalProperties":true}]}},"required":["ok","error"],"additionalProperties":true}]},
|
|
134
162
|
},
|
|
135
163
|
sourceLocation: {"file":"packages/feedback/message-feedback/src/index.ts","line":207,"column":3},
|
|
136
164
|
},
|
|
137
|
-
{
|
|
138
|
-
id: '@deepseek-ai/dsh-message-feedback#messageFeedback/list',
|
|
165
|
+
'messageFeedback/list': {
|
|
139
166
|
service: 'messageFeedback',
|
|
140
|
-
|
|
141
|
-
method: 'list',
|
|
167
|
+
description: 'Read current feedback from the canonical log.',
|
|
142
168
|
invocation: { kind: 'direct' },
|
|
143
169
|
parameters: [
|
|
144
170
|
{
|
|
145
171
|
name: 'request',
|
|
146
|
-
|
|
172
|
+
description: 'Session to inspect.',
|
|
147
173
|
source: 'json',
|
|
148
174
|
codec: {
|
|
149
175
|
mode: 'strict',
|
|
150
176
|
typeSymbol: '@deepseek-ai/dsh-message-feedback/types#MessageFeedbackListRequest',
|
|
151
177
|
create: _deepseek_ai_dsh_message_feedback_messageFeedback_list_parameter_0$schema,
|
|
178
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string","description":"Session whose feedback events should be read."}},"required":["sessionId"],"additionalProperties":true},
|
|
179
|
+
},
|
|
180
|
+
strictCodec: {
|
|
181
|
+
mode: 'strict',
|
|
182
|
+
typeSymbol: '@deepseek-ai/dsh-message-feedback/types#MessageFeedbackListRequest',
|
|
183
|
+
create: _deepseek_ai_dsh_message_feedback_messageFeedback_list_parameter_0_strict$schema,
|
|
184
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string","description":"Session whose feedback events should be read."}},"required":["sessionId"],"additionalProperties":false},
|
|
152
185
|
},
|
|
153
186
|
},
|
|
154
187
|
],
|
|
@@ -156,24 +189,31 @@ export const TYPERT_REMOTE = {
|
|
|
156
189
|
mode: 'strict',
|
|
157
190
|
typeSymbol: '@deepseek-ai/dsh-message-feedback/types#MessageFeedbackListResult',
|
|
158
191
|
create: _deepseek_ai_dsh_message_feedback_messageFeedback_list_result$schema,
|
|
192
|
+
description: 'immutable items or a definite persistence miss.',
|
|
193
|
+
jsonSchema: {"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":true},"value":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"messageId":{"type":"string","description":"Stable identity of the assistant message inside the owning Session."},"rating":{"type":"string","enum":["positive","negative"],"description":"Overall positive or negative judgment."},"note":{"type":"string","description":"Optional explanation, preserved verbatim after validation."},"category":{"type":"string","enum":["other","task-result","instruction-following","product-interaction","service-stability","resource-cost","security-privacy-permission"],"description":"Category the human filed the judgment under."},"version":{"type":"string","description":"Equality-only token replaced by every material create or update."},"createdAt":{"type":"number","description":"Host-assigned creation time in Unix epoch milliseconds."},"updatedAt":{"type":"number","description":"Host-assigned time of the most recent material update."}},"required":["messageId","rating","version","createdAt","updatedAt"],"additionalProperties":true},"description":"Fresh immutable item snapshots."}},"required":["items"],"additionalProperties":true}},"required":["ok","value"],"additionalProperties":true},{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","properties":{"code":{"type":"string","const":"session-not-found"},"sessionId":{"type":"string"}},"required":["code","sessionId"],"additionalProperties":true}},"required":["ok","error"],"additionalProperties":true}]},
|
|
159
194
|
},
|
|
160
195
|
sourceLocation: {"file":"packages/feedback/message-feedback/src/index.ts","line":155,"column":3},
|
|
161
196
|
},
|
|
162
|
-
{
|
|
163
|
-
id: '@deepseek-ai/dsh-message-feedback#messageFeedback/put',
|
|
197
|
+
'messageFeedback/put': {
|
|
164
198
|
service: 'messageFeedback',
|
|
165
|
-
|
|
166
|
-
method: 'put',
|
|
199
|
+
description: 'Create or replace feedback after checking its current version. Matching no-ops retain the version and append no event.',
|
|
167
200
|
invocation: { kind: 'direct' },
|
|
168
201
|
parameters: [
|
|
169
202
|
{
|
|
170
203
|
name: 'request',
|
|
171
|
-
|
|
204
|
+
description: 'Target, desired value, and observed item version.',
|
|
172
205
|
source: 'json',
|
|
173
206
|
codec: {
|
|
174
207
|
mode: 'strict',
|
|
175
208
|
typeSymbol: '@deepseek-ai/dsh-message-feedback/types#MessageFeedbackPutRequest',
|
|
176
209
|
create: _deepseek_ai_dsh_message_feedback_messageFeedback_put_parameter_0$schema,
|
|
210
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string","description":"Persisted Session that owns the target message."},"messageId":{"type":"string","description":"Target assistant-message identity."},"rating":{"type":"string","enum":["positive","negative"],"description":"Desired overall judgment."},"note":{"type":"string","description":"Optional non-blank explanation."},"category":{"type":"string","enum":["other","task-result","instruction-following","product-interaction","service-stability","resource-cost","security-privacy-permission"],"description":"Optional category; absent keeps the item uncategorized."},"ifVersion":{"oneOf":[{"type":"null","const":null},{"type":"string"}],"description":"Observed item version, or `null` to require that no item exists."}},"required":["sessionId","messageId","rating","ifVersion"],"additionalProperties":true},
|
|
211
|
+
},
|
|
212
|
+
strictCodec: {
|
|
213
|
+
mode: 'strict',
|
|
214
|
+
typeSymbol: '@deepseek-ai/dsh-message-feedback/types#MessageFeedbackPutRequest',
|
|
215
|
+
create: _deepseek_ai_dsh_message_feedback_messageFeedback_put_parameter_0_strict$schema,
|
|
216
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string","description":"Persisted Session that owns the target message."},"messageId":{"type":"string","description":"Target assistant-message identity."},"rating":{"type":"string","enum":["positive","negative"],"description":"Desired overall judgment."},"note":{"type":"string","description":"Optional non-blank explanation."},"category":{"type":"string","enum":["other","task-result","instruction-following","product-interaction","service-stability","resource-cost","security-privacy-permission"],"description":"Optional category; absent keeps the item uncategorized."},"ifVersion":{"oneOf":[{"type":"null","const":null},{"type":"string"}],"description":"Observed item version, or `null` to require that no item exists."}},"required":["sessionId","messageId","rating","ifVersion"],"additionalProperties":false},
|
|
177
217
|
},
|
|
178
218
|
},
|
|
179
219
|
],
|
|
@@ -181,10 +221,12 @@ export const TYPERT_REMOTE = {
|
|
|
181
221
|
mode: 'strict',
|
|
182
222
|
typeSymbol: '@deepseek-ai/dsh-message-feedback/types#MessageFeedbackPutResult',
|
|
183
223
|
create: _deepseek_ai_dsh_message_feedback_messageFeedback_put_result$schema,
|
|
224
|
+
description: 'the durable item or an explicit business failure.',
|
|
225
|
+
jsonSchema: {"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":true},"value":{"type":"object","properties":{"messageId":{"type":"string","description":"Stable identity of the assistant message inside the owning Session."},"rating":{"type":"string","enum":["positive","negative"],"description":"Overall positive or negative judgment."},"note":{"type":"string","description":"Optional explanation, preserved verbatim after validation."},"category":{"type":"string","enum":["other","task-result","instruction-following","product-interaction","service-stability","resource-cost","security-privacy-permission"],"description":"Category the human filed the judgment under."},"version":{"type":"string","description":"Equality-only token replaced by every material create or update."},"createdAt":{"type":"number","description":"Host-assigned creation time in Unix epoch milliseconds."},"updatedAt":{"type":"number","description":"Host-assigned time of the most recent material update."}},"required":["messageId","rating","version","createdAt","updatedAt"],"additionalProperties":true}},"required":["ok","value"],"additionalProperties":true},{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"oneOf":[{"type":"object","properties":{"code":{"type":"string","const":"session-not-found"},"sessionId":{"type":"string"}},"required":["code","sessionId"],"additionalProperties":true},{"type":"object","properties":{"code":{"type":"string","const":"target-not-found"},"sessionId":{"type":"string"},"messageId":{"type":"string"}},"required":["code","sessionId","messageId"],"additionalProperties":true},{"type":"object","properties":{"code":{"type":"string","const":"version-conflict"},"current":{"oneOf":[{"type":"null","const":null},{"type":"object","properties":{"messageId":{"type":"string","description":"Stable identity of the assistant message inside the owning Session."},"rating":{"type":"string","enum":["positive","negative"],"description":"Overall positive or negative judgment."},"note":{"type":"string","description":"Optional explanation, preserved verbatim after validation."},"category":{"type":"string","enum":["other","task-result","instruction-following","product-interaction","service-stability","resource-cost","security-privacy-permission"],"description":"Category the human filed the judgment under."},"version":{"type":"string","description":"Equality-only token replaced by every material create or update."},"createdAt":{"type":"number","description":"Host-assigned creation time in Unix epoch milliseconds."},"updatedAt":{"type":"number","description":"Host-assigned time of the most recent material update."}},"required":["messageId","rating","version","createdAt","updatedAt"],"additionalProperties":true}],"description":"Authoritative current item, or `null` when it does not exist."}},"required":["code","current"],"additionalProperties":true},{"type":"object","properties":{"code":{"type":"string","const":"note-blank"}},"required":["code"],"additionalProperties":true},{"type":"object","properties":{"code":{"type":"string","const":"note-too-large"},"maxBytes":{"type":"number"},"actualBytes":{"type":"number"}},"required":["code","maxBytes","actualBytes"],"additionalProperties":true}]}},"required":["ok","error"],"additionalProperties":true}]},
|
|
184
226
|
},
|
|
185
227
|
sourceLocation: {"file":"packages/feedback/message-feedback/src/index.ts","line":167,"column":3},
|
|
186
228
|
},
|
|
187
|
-
|
|
188
|
-
}
|
|
229
|
+
},
|
|
230
|
+
}, z)
|
|
189
231
|
|
|
190
232
|
export default TYPERT_REMOTE
|
package/locale/en.json
ADDED
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-message-feedback",
|
|
3
3
|
"description": "Canonical Session-log ratings and notes for finalized assistant messages",
|
|
4
|
-
"version": "0.2.1-alpha.
|
|
4
|
+
"version": "0.2.1-alpha.4",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -31,9 +31,11 @@
|
|
|
31
31
|
"default": "./lib/typert.remote-client.js"
|
|
32
32
|
},
|
|
33
33
|
"./src/*": "./src/*",
|
|
34
|
-
"./package.json": "./package.json"
|
|
34
|
+
"./package.json": "./package.json",
|
|
35
|
+
"./locale/*.json": "./locale/*.json"
|
|
35
36
|
},
|
|
36
37
|
"files": [
|
|
38
|
+
"locale/*.json",
|
|
37
39
|
"lib/index.js",
|
|
38
40
|
"lib/types/**/*.js",
|
|
39
41
|
"lib/types/**/*.d.ts",
|
|
@@ -44,28 +46,28 @@
|
|
|
44
46
|
],
|
|
45
47
|
"license": "MIT",
|
|
46
48
|
"peerDependencies": {
|
|
47
|
-
"@deepseek-ai/dsh-brand": "0.2.1-alpha.
|
|
48
|
-
"@deepseek-ai/dsh-llm": "0.2.1-alpha.
|
|
49
|
-
"@deepseek-ai/dsh-session": "0.2.1-alpha.
|
|
50
|
-
"@deepseek-ai/dsh-session-persistence": "0.2.1-alpha.
|
|
51
|
-
"@deepseek-ai/dsh-typert-protocol": "0.2.1-alpha.
|
|
52
|
-
"@deepseek-ai/cordis": "~4.0.5-alpha.
|
|
53
|
-
"@deepseek-ai/dsh-command-feedback": "0.2.1-alpha.
|
|
49
|
+
"@deepseek-ai/dsh-brand": "0.2.1-alpha.4",
|
|
50
|
+
"@deepseek-ai/dsh-llm": "0.2.1-alpha.4",
|
|
51
|
+
"@deepseek-ai/dsh-session": "0.2.1-alpha.4",
|
|
52
|
+
"@deepseek-ai/dsh-session-persistence": "0.2.1-alpha.4",
|
|
53
|
+
"@deepseek-ai/dsh-typert-protocol": "0.2.1-alpha.4",
|
|
54
|
+
"@deepseek-ai/cordis": "~4.0.5-alpha.2",
|
|
55
|
+
"@deepseek-ai/dsh-command-feedback": "0.2.1-alpha.4"
|
|
54
56
|
},
|
|
55
57
|
"dependencies": {
|
|
56
|
-
"@deepseek-ai/schemastery": "~3.18.5-alpha.
|
|
57
|
-
"zod": "
|
|
58
|
+
"@deepseek-ai/schemastery": "~3.18.5-alpha.2",
|
|
59
|
+
"zod": "4.4.3"
|
|
58
60
|
},
|
|
59
61
|
"devDependencies": {
|
|
60
|
-
"@deepseek-ai/cordis-plugin-include": "~1.0.10-alpha.
|
|
61
|
-
"@deepseek-ai/cordis-plugin-loader": "~1.0.6-alpha.
|
|
62
|
-
"@deepseek-ai/dsh-brand": "0.2.1-alpha.
|
|
63
|
-
"@deepseek-ai/dsh-llm": "0.2.1-alpha.
|
|
64
|
-
"@deepseek-ai/dsh-session": "0.2.1-alpha.
|
|
65
|
-
"@deepseek-ai/dsh-session-persistence": "0.2.1-alpha.
|
|
66
|
-
"@deepseek-ai/dsh-session-persistence-jsonl": "0.2.1-alpha.
|
|
67
|
-
"@deepseek-ai/dsh-typert-protocol": "0.2.1-alpha.
|
|
68
|
-
"@deepseek-ai/cordis": "~4.0.5-alpha.
|
|
69
|
-
"@deepseek-ai/dsh-command-feedback": "0.2.1-alpha.
|
|
62
|
+
"@deepseek-ai/cordis-plugin-include": "~1.0.10-alpha.2",
|
|
63
|
+
"@deepseek-ai/cordis-plugin-loader": "~1.0.6-alpha.2",
|
|
64
|
+
"@deepseek-ai/dsh-brand": "0.2.1-alpha.4",
|
|
65
|
+
"@deepseek-ai/dsh-llm": "0.2.1-alpha.4",
|
|
66
|
+
"@deepseek-ai/dsh-session": "0.2.1-alpha.4",
|
|
67
|
+
"@deepseek-ai/dsh-session-persistence": "0.2.1-alpha.4",
|
|
68
|
+
"@deepseek-ai/dsh-session-persistence-jsonl": "0.2.1-alpha.4",
|
|
69
|
+
"@deepseek-ai/dsh-typert-protocol": "0.2.1-alpha.4",
|
|
70
|
+
"@deepseek-ai/cordis": "~4.0.5-alpha.2",
|
|
71
|
+
"@deepseek-ai/dsh-command-feedback": "0.2.1-alpha.4"
|
|
70
72
|
}
|
|
71
73
|
}
|