@deepseek-ai/dsh-api-session-controller 0.1.6-alpha.1 → 0.1.7-alpha.1
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.i18n.yaml +2 -2
- package/README.md +42 -7
- package/README.zh.md +42 -7
- package/lib/client.js +1037 -992
- package/lib/index.js +314 -183
- package/lib/typert.host.js +539 -331
- package/lib/typert.remote-client.d.ts +10 -5
- package/lib/typert.remote-client.js +374 -264
- package/lib/types/agent.d.ts +1 -1
- package/lib/types/agent.js +8 -1
- package/lib/types/archived-session-gate.d.ts +30 -0
- package/lib/types/archived-session-gate.js +52 -0
- package/lib/types/client/contract/session.d.ts +2 -0
- package/lib/types/client/contract/sessions.d.ts +65 -35
- package/lib/types/client/contract/snapshot.d.ts +0 -14
- package/lib/types/client/index.d.ts +12 -3
- package/lib/types/client/index.js +16 -5
- package/lib/types/client/scope.d.ts +13 -3
- package/lib/types/client/scope.js +15 -22
- package/lib/types/client/sessions/lineage.d.ts +5 -5
- package/lib/types/client/sessions/lineage.js +3 -4
- package/lib/types/client/sessions/manager.d.ts +91 -105
- package/lib/types/client/sessions/manager.js +307 -434
- package/lib/types/client/sessions/projection-store.d.ts +34 -21
- package/lib/types/client/sessions/projection-store.js +48 -24
- package/lib/types/client/sessions/remotes.d.ts +1 -2
- package/lib/types/client/sessions/service.d.ts +53 -150
- package/lib/types/client/sessions/service.js +267 -264
- package/lib/types/client/sessions/session.d.ts +24 -35
- package/lib/types/client/sessions/session.js +131 -73
- package/lib/types/commands.d.ts +6 -4
- package/lib/types/commands.js +82 -40
- package/lib/types/control.d.ts +2 -4
- package/lib/types/control.js +2 -84
- package/lib/types/history.js +1 -1
- package/lib/types/index.d.ts +34 -7
- package/lib/types/index.js +118 -14
- package/lib/types/list.js +24 -15
- package/lib/types/skill-catalog.js +60 -50
- package/lib/types/types.d.ts +40 -40
- package/lib/types/types.js +0 -1
- package/package.json +71 -76
- package/lib/types/client/sessions/queue-mirror.d.ts +0 -26
- package/lib/types/client/sessions/queue-mirror.js +0 -61
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-api-session-controller",
|
|
3
3
|
"description": "Session Remote commands, cold reads, and live control transport",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.7-alpha.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -67,45 +67,41 @@
|
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"mime-types": "^3.0.2",
|
|
69
69
|
"zod": "^4.4.3",
|
|
70
|
-
"@deepseek-ai/
|
|
71
|
-
"@deepseek-ai/
|
|
72
|
-
"@deepseek-ai/dsh-
|
|
70
|
+
"@deepseek-ai/dsh-deque": "^0.1.7-alpha.1",
|
|
71
|
+
"@deepseek-ai/schemastery": "^3.18.3",
|
|
72
|
+
"@deepseek-ai/dsh-brand": "^0.1.7-alpha.1"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@deepseek-ai/
|
|
76
|
-
"@deepseek-ai/dsh-agent
|
|
77
|
-
"@deepseek-ai/
|
|
78
|
-
"@deepseek-ai/dsh-
|
|
79
|
-
"@deepseek-ai/dsh-
|
|
80
|
-
"@deepseek-ai/dsh-client-
|
|
81
|
-
"@deepseek-ai/dsh-
|
|
82
|
-
"@deepseek-ai/dsh-
|
|
83
|
-
"@deepseek-ai/dsh-
|
|
84
|
-
"@deepseek-ai/dsh-
|
|
85
|
-
"@deepseek-ai/dsh-
|
|
86
|
-
"@deepseek-ai/dsh-
|
|
87
|
-
"@deepseek-ai/dsh-native-command": "^0.1.
|
|
88
|
-
"@deepseek-ai/dsh-scope": "^0.1.
|
|
89
|
-
"@deepseek-ai/dsh-session": "^0.1.
|
|
90
|
-
"@deepseek-ai/dsh-session-
|
|
91
|
-
"@deepseek-ai/dsh-session-
|
|
92
|
-
"@deepseek-ai/dsh-
|
|
93
|
-
"@deepseek-ai/dsh-
|
|
94
|
-
"@deepseek-ai/dsh-
|
|
95
|
-
"@deepseek-ai/dsh-
|
|
96
|
-
"@deepseek-ai/dsh-
|
|
97
|
-
"@deepseek-ai/dsh-
|
|
98
|
-
"@deepseek-ai/dsh-util-values": "^0.1.
|
|
99
|
-
"@deepseek-ai/dsh-
|
|
100
|
-
"@deepseek-ai/dsh-workspace": "^0.1.
|
|
101
|
-
"@deepseek-ai/dsh-
|
|
102
|
-
"@deepseek-ai/dsh-
|
|
103
|
-
"@deepseek-ai/dsh-session-title": "^0.1.6-alpha.1"
|
|
75
|
+
"@deepseek-ai/cordis": "^4.0.3",
|
|
76
|
+
"@deepseek-ai/dsh-agent": "^0.1.7-alpha.1",
|
|
77
|
+
"@deepseek-ai/dsh-agent-default-model": "^0.1.7-alpha.1",
|
|
78
|
+
"@deepseek-ai/dsh-agent-preset-registry": "^0.1.7-alpha.1",
|
|
79
|
+
"@deepseek-ai/dsh-api-gateway": "^0.1.7-alpha.1",
|
|
80
|
+
"@deepseek-ai/dsh-client-connection": "^0.1.7-alpha.1",
|
|
81
|
+
"@deepseek-ai/dsh-client-file-upload": "^0.1.7-alpha.1",
|
|
82
|
+
"@deepseek-ai/dsh-commands": "^0.1.7-alpha.1",
|
|
83
|
+
"@deepseek-ai/dsh-attachment": "^0.1.7-alpha.1",
|
|
84
|
+
"@deepseek-ai/dsh-fs": "^0.1.7-alpha.1",
|
|
85
|
+
"@deepseek-ai/dsh-llm": "^0.1.7-alpha.1",
|
|
86
|
+
"@deepseek-ai/dsh-file-reference": "^0.1.7-alpha.1",
|
|
87
|
+
"@deepseek-ai/dsh-native-command": "^0.1.7-alpha.1",
|
|
88
|
+
"@deepseek-ai/dsh-scope": "^0.1.7-alpha.1",
|
|
89
|
+
"@deepseek-ai/dsh-session-projection-cache": "^0.1.7-alpha.1",
|
|
90
|
+
"@deepseek-ai/dsh-session-title": "^0.1.7-alpha.1",
|
|
91
|
+
"@deepseek-ai/dsh-session-query": "^0.1.7-alpha.1",
|
|
92
|
+
"@deepseek-ai/dsh-skill": "^0.1.7-alpha.1",
|
|
93
|
+
"@deepseek-ai/dsh-typert-registry": "^0.1.7-alpha.1",
|
|
94
|
+
"@deepseek-ai/dsh-typert-protocol": "^0.1.7-alpha.1",
|
|
95
|
+
"@deepseek-ai/dsh-session": "^0.1.7-alpha.1",
|
|
96
|
+
"@deepseek-ai/dsh-util-time": "^0.1.7-alpha.1",
|
|
97
|
+
"@deepseek-ai/dsh-subagent": "^0.1.7-alpha.1",
|
|
98
|
+
"@deepseek-ai/dsh-util-values": "^0.1.7-alpha.1",
|
|
99
|
+
"@deepseek-ai/dsh-workspace": "^0.1.7-alpha.1",
|
|
100
|
+
"@deepseek-ai/dsh-util-workspace-path": "^0.1.7-alpha.1",
|
|
101
|
+
"@deepseek-ai/dsh-session-projection": "^0.1.7-alpha.1",
|
|
102
|
+
"@deepseek-ai/dsh-session-persistence": "^0.1.7-alpha.1"
|
|
104
103
|
},
|
|
105
104
|
"peerDependenciesMeta": {
|
|
106
|
-
"@deepseek-ai/dsh-jobs": {
|
|
107
|
-
"optional": true
|
|
108
|
-
},
|
|
109
105
|
"@deepseek-ai/dsh-session-persistence": {
|
|
110
106
|
"optional": true
|
|
111
107
|
},
|
|
@@ -115,46 +111,45 @@
|
|
|
115
111
|
},
|
|
116
112
|
"devDependencies": {
|
|
117
113
|
"@types/mime-types": "^3.0.1",
|
|
118
|
-
"@deepseek-ai/
|
|
119
|
-
"@deepseek-ai/dsh-agent": "^0.1.
|
|
120
|
-
"@deepseek-ai/dsh-agent-
|
|
121
|
-
"@deepseek-ai/dsh-
|
|
122
|
-
"@deepseek-ai/dsh-
|
|
123
|
-
"@deepseek-ai/dsh-
|
|
124
|
-
"@deepseek-ai/dsh-
|
|
125
|
-
"@deepseek-ai/dsh-
|
|
126
|
-
"@deepseek-ai/dsh-client-
|
|
127
|
-
"@deepseek-ai/dsh-
|
|
128
|
-
"@deepseek-ai/dsh-
|
|
129
|
-
"@deepseek-ai/dsh-
|
|
130
|
-
"@deepseek-ai/dsh-
|
|
131
|
-
"@deepseek-ai/dsh-
|
|
132
|
-
"@deepseek-ai/dsh-
|
|
133
|
-
"@deepseek-ai/
|
|
134
|
-
"@deepseek-ai/dsh-
|
|
135
|
-
"@deepseek-ai/dsh-
|
|
136
|
-
"@deepseek-ai/dsh-
|
|
137
|
-
"@deepseek-ai/dsh-
|
|
138
|
-
"@deepseek-ai/dsh-
|
|
139
|
-
"@deepseek-ai/dsh-
|
|
140
|
-
"@deepseek-ai/dsh-session": "^0.1.
|
|
141
|
-
"@deepseek-ai/dsh-session-
|
|
142
|
-
"@deepseek-ai/dsh-session-title": "^0.1.
|
|
143
|
-
"@deepseek-ai/dsh-skill": "^0.1.
|
|
144
|
-
"@deepseek-ai/dsh-storage": "^0.1.
|
|
145
|
-
"@deepseek-ai/dsh-
|
|
146
|
-
"@deepseek-ai/dsh-
|
|
147
|
-
"@deepseek-ai/dsh-
|
|
148
|
-
"@deepseek-ai/dsh-
|
|
149
|
-
"@deepseek-ai/dsh-
|
|
150
|
-
"@deepseek-ai/dsh-util-
|
|
151
|
-
"@deepseek-ai/dsh-
|
|
152
|
-
"@deepseek-ai/dsh-
|
|
153
|
-
"@deepseek-ai/dsh-util-
|
|
154
|
-
"@deepseek-ai/dsh-
|
|
155
|
-
"@deepseek-ai/dsh-
|
|
156
|
-
"@deepseek-ai/dsh-util-
|
|
157
|
-
"@deepseek-ai/dsh-workspace": "^0.1.6-alpha.1"
|
|
114
|
+
"@deepseek-ai/dsh-agent": "^0.1.7-alpha.1",
|
|
115
|
+
"@deepseek-ai/dsh-agent-default-model": "^0.1.7-alpha.1",
|
|
116
|
+
"@deepseek-ai/dsh-agent-loop": "^0.1.7-alpha.1",
|
|
117
|
+
"@deepseek-ai/dsh-api-gateway": "^0.1.7-alpha.1",
|
|
118
|
+
"@deepseek-ai/dsh-client-connection": "^0.1.7-alpha.1",
|
|
119
|
+
"@deepseek-ai/dsh-attachment": "^0.1.7-alpha.1",
|
|
120
|
+
"@deepseek-ai/dsh-client-file-upload": "^0.1.7-alpha.1",
|
|
121
|
+
"@deepseek-ai/dsh-client-store": "^0.1.7-alpha.1",
|
|
122
|
+
"@deepseek-ai/dsh-client-test-runtime": "^0.1.7-alpha.1",
|
|
123
|
+
"@deepseek-ai/dsh-commands": "^0.1.7-alpha.1",
|
|
124
|
+
"@deepseek-ai/dsh-file-reference": "^0.1.7-alpha.1",
|
|
125
|
+
"@deepseek-ai/dsh-fs": "^0.1.7-alpha.1",
|
|
126
|
+
"@deepseek-ai/dsh-fs-local": "^0.1.7-alpha.1",
|
|
127
|
+
"@deepseek-ai/dsh-llm": "^0.1.7-alpha.1",
|
|
128
|
+
"@deepseek-ai/dsh-agent-preset-registry": "^0.1.7-alpha.1",
|
|
129
|
+
"@deepseek-ai/cordis": "^4.0.3",
|
|
130
|
+
"@deepseek-ai/dsh-native-command": "^0.1.7-alpha.1",
|
|
131
|
+
"@deepseek-ai/dsh-agent-loop-testkit": "^0.1.7-alpha.1",
|
|
132
|
+
"@deepseek-ai/dsh-permission-presets": "^0.1.7-alpha.1",
|
|
133
|
+
"@deepseek-ai/dsh-scope": "^0.1.7-alpha.1",
|
|
134
|
+
"@deepseek-ai/dsh-session-persistence": "^0.1.7-alpha.1",
|
|
135
|
+
"@deepseek-ai/dsh-session": "^0.1.7-alpha.1",
|
|
136
|
+
"@deepseek-ai/dsh-session-projection": "^0.1.7-alpha.1",
|
|
137
|
+
"@deepseek-ai/dsh-session-projection-cache": "^0.1.7-alpha.1",
|
|
138
|
+
"@deepseek-ai/dsh-session-title": "^0.1.7-alpha.1",
|
|
139
|
+
"@deepseek-ai/dsh-skill": "^0.1.7-alpha.1",
|
|
140
|
+
"@deepseek-ai/dsh-storage": "^0.1.7-alpha.1",
|
|
141
|
+
"@deepseek-ai/dsh-remote-mock": "^0.1.7-alpha.1",
|
|
142
|
+
"@deepseek-ai/dsh-typert-protocol": "^0.1.7-alpha.1",
|
|
143
|
+
"@deepseek-ai/dsh-typert-registry": "^0.1.7-alpha.1",
|
|
144
|
+
"@deepseek-ai/dsh-util-crypto": "^0.1.7-alpha.1",
|
|
145
|
+
"@deepseek-ai/dsh-storage-domain": "^0.1.7-alpha.1",
|
|
146
|
+
"@deepseek-ai/dsh-util-time": "^0.1.7-alpha.1",
|
|
147
|
+
"@deepseek-ai/dsh-storage-json": "^0.1.7-alpha.1",
|
|
148
|
+
"@deepseek-ai/dsh-session-query": "^0.1.7-alpha.1",
|
|
149
|
+
"@deepseek-ai/dsh-util-workspace-path": "^0.1.7-alpha.1",
|
|
150
|
+
"@deepseek-ai/dsh-workspace": "^0.1.7-alpha.1",
|
|
151
|
+
"@deepseek-ai/dsh-subagent": "^0.1.7-alpha.1",
|
|
152
|
+
"@deepseek-ai/dsh-util-values": "^0.1.7-alpha.1"
|
|
158
153
|
},
|
|
159
154
|
"scripts": {
|
|
160
155
|
"bundle": "tsdown",
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { SessionQueuedItem } from '../../types.ts';
|
|
2
|
-
import type { SessionEvent } from '@deepseek-ai/dsh-session/types';
|
|
3
|
-
import type { QueuedMessage } from '../contract/snapshot.ts';
|
|
4
|
-
type QueueItems = readonly SessionQueuedItem[];
|
|
5
|
-
/** Authoritative transient queue projection and durable steering handoff. */
|
|
6
|
-
export declare class SessionQueueMirror {
|
|
7
|
-
private current;
|
|
8
|
-
/**
|
|
9
|
-
* Return the current immutable queue projection.
|
|
10
|
-
* @returns current queue rows.
|
|
11
|
-
*/
|
|
12
|
-
snapshot(): readonly QueuedMessage[];
|
|
13
|
-
/**
|
|
14
|
-
* Replace from one authoritative stream queue frame.
|
|
15
|
-
* @param items - complete host queue snapshot.
|
|
16
|
-
*/
|
|
17
|
-
replace(items: QueueItems): void;
|
|
18
|
-
/**
|
|
19
|
-
* Retire a transient steering row once its durable message enters the log.
|
|
20
|
-
* @param event - newly contiguous durable Session event.
|
|
21
|
-
* @returns whether the projection changed.
|
|
22
|
-
*/
|
|
23
|
-
acceptDurable(event: SessionEvent): boolean;
|
|
24
|
-
}
|
|
25
|
-
export {};
|
|
26
|
-
//# sourceMappingURL=queue-mirror.d.ts.map
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
const QUEUE_PREVIEW_CHARS = 200;
|
|
2
|
-
// Attachment blocks are excluded: queue presentation renders them from
|
|
3
|
-
// `content`, so the text preview covers only what has no visual form.
|
|
4
|
-
function previewOf(content) {
|
|
5
|
-
const flat = content
|
|
6
|
-
.filter(block => block.type !== 'image' && block.type !== 'file')
|
|
7
|
-
.map(block => (block.type === 'text' ? block.text : `[${block.type}]`))
|
|
8
|
-
.join(' ').replace(/\s+/g, ' ').trim();
|
|
9
|
-
const chars = Array.from(flat);
|
|
10
|
-
return chars.length > QUEUE_PREVIEW_CHARS ? `${chars.slice(0, QUEUE_PREVIEW_CHARS).join('')}…` : flat;
|
|
11
|
-
}
|
|
12
|
-
function textOf(content) {
|
|
13
|
-
if (!content.every(block => block.type === 'text'))
|
|
14
|
-
return null;
|
|
15
|
-
return content.map(block => block.text).join('');
|
|
16
|
-
}
|
|
17
|
-
/** Authoritative transient queue projection and durable steering handoff. */
|
|
18
|
-
export class SessionQueueMirror {
|
|
19
|
-
current = [];
|
|
20
|
-
/**
|
|
21
|
-
* Return the current immutable queue projection.
|
|
22
|
-
* @returns current queue rows.
|
|
23
|
-
*/
|
|
24
|
-
snapshot() {
|
|
25
|
-
return this.current;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Replace from one authoritative stream queue frame.
|
|
29
|
-
* @param items - complete host queue snapshot.
|
|
30
|
-
*/
|
|
31
|
-
replace(items) {
|
|
32
|
-
this.current = items.map((item) => {
|
|
33
|
-
const content = item.message.content;
|
|
34
|
-
return {
|
|
35
|
-
id: item.id,
|
|
36
|
-
messageId: item.message.id,
|
|
37
|
-
placement: item.placement,
|
|
38
|
-
...(item.rpcId === undefined ? {} : { rpcId: item.rpcId }),
|
|
39
|
-
content,
|
|
40
|
-
preview: previewOf(content),
|
|
41
|
-
text: textOf(content),
|
|
42
|
-
};
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Retire a transient steering row once its durable message enters the log.
|
|
47
|
-
* @param event - newly contiguous durable Session event.
|
|
48
|
-
* @returns whether the projection changed.
|
|
49
|
-
*/
|
|
50
|
-
acceptDurable(event) {
|
|
51
|
-
if (event.type !== 'user/message')
|
|
52
|
-
return false;
|
|
53
|
-
const messageId = event.data.id;
|
|
54
|
-
const index = this.current.findIndex(item => item.placement === 'steering' && item.messageId === messageId);
|
|
55
|
-
if (index < 0)
|
|
56
|
-
return false;
|
|
57
|
-
this.current = this.current.filter((_item, candidate) => candidate !== index);
|
|
58
|
-
return true;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
//# sourceMappingURL=queue-mirror.js.map
|