@deepseek-ai/dsh-message-feedback 0.1.2-alpha.5 → 0.1.3-alpha.2

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-message-feedback",
3
- "description": "Lifecycle-bound per-message rating and note sidecar for the DeepSeek Harness",
4
- "version": "0.1.2-alpha.5",
3
+ "description": "Canonical Session-log ratings and notes for finalized assistant messages",
4
+ "version": "0.1.3-alpha.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -44,13 +44,12 @@
44
44
  ],
45
45
  "license": "MIT",
46
46
  "peerDependencies": {
47
- "@deepseek-ai/dsh-brand": "^0.1.2-alpha.5",
48
- "@deepseek-ai/dsh-llm": "^0.1.2-alpha.5",
49
- "@deepseek-ai/dsh-session-persistence": "^0.1.2-alpha.5",
50
- "@deepseek-ai/dsh-storage-domain": "^0.1.2-alpha.5",
51
- "@deepseek-ai/dsh-typert-protocol": "^0.1.2-alpha.5",
52
- "@deepseek-ai/cordis": "^4.0.2",
53
- "@deepseek-ai/dsh-session": "^0.1.2-alpha.5"
47
+ "@deepseek-ai/dsh-brand": "^0.1.3-alpha.2",
48
+ "@deepseek-ai/dsh-llm": "^0.1.3-alpha.2",
49
+ "@deepseek-ai/dsh-session": "^0.1.3-alpha.2",
50
+ "@deepseek-ai/dsh-session-persistence": "^0.1.3-alpha.2",
51
+ "@deepseek-ai/dsh-typert-protocol": "^0.1.3-alpha.2",
52
+ "@deepseek-ai/cordis": "^4.0.2"
54
53
  },
55
54
  "dependencies": {
56
55
  "zod": "^4.4.3",
@@ -58,16 +57,13 @@
58
57
  },
59
58
  "devDependencies": {
60
59
  "@deepseek-ai/cordis-plugin-include": "^1.0.7",
61
- "@deepseek-ai/dsh-brand": "^0.1.2-alpha.5",
62
- "@deepseek-ai/dsh-llm": "^0.1.2-alpha.5",
63
- "@deepseek-ai/dsh-session": "^0.1.2-alpha.5",
64
- "@deepseek-ai/dsh-session-persistence": "^0.1.2-alpha.5",
65
- "@deepseek-ai/dsh-session-persistence-jsonl": "^0.1.2-alpha.5",
66
- "@deepseek-ai/dsh-storage": "^0.1.2-alpha.5",
67
- "@deepseek-ai/dsh-storage-domain": "^0.1.2-alpha.5",
68
- "@deepseek-ai/dsh-storage-json": "^0.1.2-alpha.5",
69
- "@deepseek-ai/cordis": "^4.0.2",
70
60
  "@deepseek-ai/cordis-plugin-loader": "^1.0.3",
71
- "@deepseek-ai/dsh-typert-protocol": "^0.1.2-alpha.5"
61
+ "@deepseek-ai/dsh-brand": "^0.1.3-alpha.2",
62
+ "@deepseek-ai/dsh-llm": "^0.1.3-alpha.2",
63
+ "@deepseek-ai/dsh-session": "^0.1.3-alpha.2",
64
+ "@deepseek-ai/dsh-typert-protocol": "^0.1.3-alpha.2",
65
+ "@deepseek-ai/cordis": "^4.0.2",
66
+ "@deepseek-ai/dsh-session-persistence-jsonl": "^0.1.3-alpha.2",
67
+ "@deepseek-ai/dsh-session-persistence": "^0.1.3-alpha.2"
72
68
  }
73
69
  }
@@ -1,48 +0,0 @@
1
- /**
2
- * Durable storage-domain declaration for lifecycle-bound message feedback.
3
- * @module @deepseek-ai/dsh-message-feedback/src/spec
4
- */
5
- import { z } from 'zod';
6
- import type { SessionId } from '@deepseek-ai/dsh-session/types';
7
- import type { MessageFeedbackItem, MessageFeedbackVersion } from './types.ts';
8
- /** Runtime schema for the closed rating vocabulary. */
9
- export declare const messageFeedbackRatingSchema: z.ZodUnion<readonly [z.ZodLiteral<"positive">, z.ZodLiteral<"negative">]>;
10
- /** Runtime schema for one opaque item version stored on disk. */
11
- export declare const messageFeedbackVersionSchema: z.ZodPipe<z.ZodUUID, z.ZodTransform<MessageFeedbackVersion, string>>;
12
- /** Runtime schema for one current feedback item. */
13
- export declare const messageFeedbackItemSchema: z.ZodType<MessageFeedbackItem>;
14
- /** Persisted Session fields that fence a sidecar row to one log lifecycle. */
15
- export declare const messageFeedbackSessionIdentitySchema: z.ZodObject<{
16
- createdAt: z.ZodNumber;
17
- cwd: z.ZodOptional<z.ZodString>;
18
- }, z.core.$strip>;
19
- /** Persisted lifecycle identity inferred from its durable schema. */
20
- export type MessageFeedbackSessionIdentity = z.infer<typeof messageFeedbackSessionIdentitySchema>;
21
- /**
22
- * One whole-Session sidecar. Duplicate message ids would make item lookup
23
- * ambiguous; duplicate versions would break their independent identity.
24
- */
25
- export declare const messageFeedbackRowSchema: z.ZodObject<{
26
- session: z.ZodObject<{
27
- createdAt: z.ZodNumber;
28
- cwd: z.ZodOptional<z.ZodString>;
29
- }, z.core.$strip>;
30
- items: z.ZodArray<z.ZodType<MessageFeedbackItem, unknown, z.core.$ZodTypeInternals<MessageFeedbackItem, unknown>>>;
31
- }, z.core.$strip>;
32
- /** Durable sidecar row inferred from {@link messageFeedbackRowSchema}. */
33
- export type MessageFeedbackRow = z.infer<typeof messageFeedbackRowSchema>;
34
- /** One lifecycle-bound sidecar record per Session id. */
35
- export declare const messageFeedbackDomainSpec: {
36
- name: string;
37
- version: number;
38
- tables: {
39
- sessions: import("@deepseek-ai/dsh-storage-domain").DomainTableSpec<SessionId, {
40
- session: {
41
- createdAt: number;
42
- cwd?: string | undefined;
43
- };
44
- items: MessageFeedbackItem[];
45
- }>;
46
- };
47
- };
48
- //# sourceMappingURL=spec.d.ts.map
package/lib/types/spec.js DELETED
@@ -1,74 +0,0 @@
1
- /**
2
- * Durable storage-domain declaration for lifecycle-bound message feedback.
3
- * @module @deepseek-ai/dsh-message-feedback/src/spec
4
- */
5
- import { z } from 'zod';
6
- import { defineDomain, domainTable } from '@deepseek-ai/dsh-storage-domain';
7
- const nonNegativeSafeInteger = z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
8
- /** Runtime schema for the closed rating vocabulary. */
9
- export const messageFeedbackRatingSchema = z.union([
10
- z.literal('positive'),
11
- z.literal('negative'),
12
- ]);
13
- /** Runtime schema for one opaque item version stored on disk. */
14
- export const messageFeedbackVersionSchema = z.uuid()
15
- .transform(value => value);
16
- /** Runtime schema for one current feedback item. */
17
- // Zod infers transformed branded fields structurally, so it cannot name the
18
- // public interface even though every branded output is created below.
19
- export const messageFeedbackItemSchema = z.object({
20
- messageId: z.string().min(1).transform(value => value),
21
- rating: messageFeedbackRatingSchema,
22
- note: z.string().refine(note => note.trim().length > 0, {
23
- message: 'message feedback note must contain a non-whitespace character',
24
- }).optional(),
25
- version: messageFeedbackVersionSchema,
26
- createdAt: nonNegativeSafeInteger,
27
- updatedAt: nonNegativeSafeInteger,
28
- }).refine(item => item.updatedAt >= item.createdAt, {
29
- path: ['updatedAt'],
30
- message: 'message feedback updatedAt must not precede createdAt',
31
- });
32
- /** Persisted Session fields that fence a sidecar row to one log lifecycle. */
33
- export const messageFeedbackSessionIdentitySchema = z.object({
34
- createdAt: nonNegativeSafeInteger,
35
- cwd: z.string().optional(),
36
- });
37
- /**
38
- * One whole-Session sidecar. Duplicate message ids would make item lookup
39
- * ambiguous; duplicate versions would break their independent identity.
40
- */
41
- export const messageFeedbackRowSchema = z.object({
42
- session: messageFeedbackSessionIdentitySchema,
43
- items: z.array(messageFeedbackItemSchema),
44
- }).superRefine((row, ctx) => {
45
- const messageIds = new Set();
46
- const versions = new Set();
47
- row.items.forEach((item, index) => {
48
- if (messageIds.has(item.messageId)) {
49
- ctx.addIssue({
50
- code: 'custom',
51
- path: ['items', index, 'messageId'],
52
- message: `duplicate message feedback id '${item.messageId}'`,
53
- });
54
- }
55
- messageIds.add(item.messageId);
56
- if (versions.has(item.version)) {
57
- ctx.addIssue({
58
- code: 'custom',
59
- path: ['items', index, 'version'],
60
- message: `duplicate message feedback version '${item.version}'`,
61
- });
62
- }
63
- versions.add(item.version);
64
- });
65
- });
66
- /** One lifecycle-bound sidecar record per Session id. */
67
- export const messageFeedbackDomainSpec = defineDomain({
68
- name: 'message_feedback',
69
- version: 0,
70
- tables: {
71
- sessions: domainTable(messageFeedbackRowSchema),
72
- },
73
- });
74
- //# sourceMappingURL=spec.js.map