dsh-qqchat 0.2.4 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +5 -4
- package/README.md +3 -3
- package/client-src/plugin.cts +2 -2
- package/client-src/settings.cts +18 -1
- package/client-src/shared.cts +4 -4
- package/cordis.patch.yml +5 -0
- package/docs/ARCHITECTURE.en.md +1 -1
- package/docs/ARCHITECTURE.md +2 -1
- package/docs/DEVELOPMENT.md +3 -1
- package/docs/MEMORY.md +32 -4
- package/docs/MEMORY_CONTEXT.md +16 -0
- package/docs/README.md +2 -0
- package/docs/STREAMING.md +2 -2
- package/docs/prds/PRD-MEM-1-/347/276/244/350/256/260/345/277/206/344/270/216/347/276/244/345/217/213/350/256/260/345/277/206/347/255/226/347/225/245/350/260/203/346/225/264.md +396 -0
- package/docs/prds/README.md +62 -0
- package/lib/client.js +21 -4
- package/lib/config.js +3 -2
- package/lib/index.d.ts +2 -2
- package/lib/index.js +2 -3
- package/lib/session/agent-bridge.d.ts +3 -4
- package/lib/session/agent-bridge.js +40 -46
- package/lib/session/memory-snapshot.d.ts +4 -0
- package/lib/session/memory-snapshot.js +6 -2
- package/lib/session/runtime.js +15 -5
- package/lib/storage/db.d.ts +6 -1
- package/lib/storage/db.js +57 -0
- package/lib/storage/memory.d.ts +28 -2
- package/lib/storage/memory.js +375 -101
- package/lib/transport/rpc.js +2 -0
- package/lib/types.d.ts +26 -0
- package/package.json +24 -23
- package/prompts/group-compression.md +5 -0
- package/prompts/group-reflection.md +39 -0
- package/prompts/member-batch-reflection.md +39 -0
- package/prompts/member-compression.md +5 -0
- package/prompts/private-reflection.md +32 -0
- package/src/config.ts +3 -2
- package/src/index.ts +2 -3
- package/src/session/agent-bridge.ts +40 -47
- package/src/session/memory-snapshot.ts +6 -3
- package/src/session/runtime.ts +14 -4
- package/src/storage/db.ts +70 -0
- package/src/storage/memory.ts +343 -84
- package/src/transport/rpc.ts +1 -0
- package/src/types.ts +30 -0
package/src/types.ts
CHANGED
|
@@ -61,6 +61,7 @@ export interface StoredAttachmentSummary {
|
|
|
61
61
|
|
|
62
62
|
export interface QQChatRuntimeSettings {
|
|
63
63
|
memoryEnabled: boolean
|
|
64
|
+
memoryMemberBatchEnabled: boolean
|
|
64
65
|
groupReceiveMode: GroupReceiveMode
|
|
65
66
|
groupReplyFormat: ReplyFormat
|
|
66
67
|
directReplyFormat: ReplyFormat
|
|
@@ -73,6 +74,7 @@ export interface QQChatRuntimeSettings {
|
|
|
73
74
|
|
|
74
75
|
export interface QQChatRuntimeSettingsPatch {
|
|
75
76
|
memoryEnabled?: boolean
|
|
77
|
+
memoryMemberBatchEnabled?: boolean
|
|
76
78
|
groupReceiveMode?: GroupReceiveMode
|
|
77
79
|
groupReplyFormat?: ReplyFormat
|
|
78
80
|
directReplyFormat?: ReplyFormat
|
|
@@ -419,6 +421,18 @@ export interface ModelRoute {
|
|
|
419
421
|
sessionId?: string
|
|
420
422
|
}
|
|
421
423
|
|
|
424
|
+
export type ReflectionScopeType = 'group' | 'member' | 'private'
|
|
425
|
+
export type ReflectionTaskType = 'group' | 'member-batch' | 'private-owner'
|
|
426
|
+
|
|
427
|
+
export interface ReflectionTaskInput {
|
|
428
|
+
scopeType: ReflectionScopeType
|
|
429
|
+
scopeKey: number
|
|
430
|
+
taskType: ReflectionTaskType
|
|
431
|
+
startMessageId: number
|
|
432
|
+
endMessageId: number
|
|
433
|
+
idempotencyKey: string
|
|
434
|
+
}
|
|
435
|
+
|
|
422
436
|
export interface PendingReply {
|
|
423
437
|
text: string
|
|
424
438
|
onTextDelta?: (delta: string) => void
|
|
@@ -440,6 +454,22 @@ export interface ReflectionMemberUpdate {
|
|
|
440
454
|
nicknames?: unknown
|
|
441
455
|
}
|
|
442
456
|
|
|
457
|
+
export interface ReflectionMemberBatchUpdate {
|
|
458
|
+
senderId?: unknown
|
|
459
|
+
profile_add?: unknown
|
|
460
|
+
profile_remove?: unknown
|
|
461
|
+
pattern_add?: unknown
|
|
462
|
+
pattern_remove?: unknown
|
|
463
|
+
summary?: unknown
|
|
464
|
+
daily?: unknown
|
|
465
|
+
memory?: unknown
|
|
466
|
+
nicknames?: unknown
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
export interface MemberBatchReflectionPayload {
|
|
470
|
+
members?: ReflectionMemberBatchUpdate[]
|
|
471
|
+
}
|
|
472
|
+
|
|
443
473
|
export interface ReflectionPayload {
|
|
444
474
|
group?: ReflectionGroupUpdate
|
|
445
475
|
members?: ReflectionMemberUpdate[]
|