@wowyuarm/dsh-agent-team 0.1.9 → 0.1.11
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.md +17 -11
- package/README.zh.md +17 -11
- package/package.json +61 -47
- package/packages/agent-team/README.md +6 -4
- package/packages/agent-team/README.zh.md +6 -3
- package/packages/agent-team/lib/context-management.js +48 -55
- package/packages/agent-team/lib/context-projection.js +22 -8
- package/packages/agent-team/lib/context-source.js +163 -23
- package/packages/agent-team/lib/index.js +349 -176
- package/packages/agent-team/lib/invariant.js +38 -4
- package/packages/agent-team/lib/ledger.js +658 -294
- package/packages/agent-team/lib/member-context.js +6 -2
- package/packages/agent-team/lib/member-time-context.js +141 -0
- package/packages/agent-team/lib/pressure-policy.js +34 -11
- package/packages/agent-team/lib/progress-nudge.js +12 -4
- package/packages/agent-team/lib/session-event-cursor.js +116 -0
- package/packages/agent-team/lib/session-remediation.js +493 -0
- package/packages/agent-team/lib/spec.js +49 -36
- package/packages/agent-team/lib/stored-session-reader.js +138 -0
- package/packages/agent-team/lib/time-format.js +56 -0
- package/packages/agent-team/lib/typert.host.js +163 -63
- package/packages/agent-team/lib/typert.remote-client.d.ts.map +1 -1
- package/packages/agent-team/lib/typert.remote-client.js +105 -32
- package/packages/agent-team/lib/types/context-management.d.ts +13 -1
- package/packages/agent-team/lib/types/context-management.d.ts.map +1 -1
- package/packages/agent-team/lib/types/context-projection.d.ts +8 -0
- package/packages/agent-team/lib/types/context-projection.d.ts.map +1 -1
- package/packages/agent-team/lib/types/context-source.d.ts +70 -36
- package/packages/agent-team/lib/types/context-source.d.ts.map +1 -1
- package/packages/agent-team/lib/types/index.d.ts +110 -9
- package/packages/agent-team/lib/types/index.d.ts.map +1 -1
- package/packages/agent-team/lib/types/invariant.d.ts.map +1 -1
- package/packages/agent-team/lib/types/ledger.d.ts +205 -7
- package/packages/agent-team/lib/types/ledger.d.ts.map +1 -1
- package/packages/agent-team/lib/types/member-context.d.ts.map +1 -1
- package/packages/agent-team/lib/types/member-time-context.d.ts +83 -0
- package/packages/agent-team/lib/types/member-time-context.d.ts.map +1 -0
- package/packages/agent-team/lib/types/pressure-policy.d.ts +18 -0
- package/packages/agent-team/lib/types/pressure-policy.d.ts.map +1 -1
- package/packages/agent-team/lib/types/progress-nudge.d.ts.map +1 -1
- package/packages/agent-team/lib/types/session-event-cursor.d.ts +119 -0
- package/packages/agent-team/lib/types/session-event-cursor.d.ts.map +1 -0
- package/packages/agent-team/lib/types/session-remediation.d.ts +172 -0
- package/packages/agent-team/lib/types/session-remediation.d.ts.map +1 -0
- package/packages/agent-team/lib/types/spec.d.ts.map +1 -1
- package/packages/agent-team/lib/types/stored-session-reader.d.ts +92 -0
- package/packages/agent-team/lib/types/stored-session-reader.d.ts.map +1 -0
- package/packages/agent-team/lib/types/time-format.d.ts +28 -0
- package/packages/agent-team/lib/types/time-format.d.ts.map +1 -0
- package/packages/agent-team/lib/types/types/entities.d.ts +36 -2
- package/packages/agent-team/lib/types/types/entities.d.ts.map +1 -1
- package/packages/agent-team/lib/types/types/operations.d.ts +45 -19
- package/packages/agent-team/lib/types/types/operations.d.ts.map +1 -1
- package/packages/agent-team/lib/types/types/requests-results.d.ts +50 -3
- package/packages/agent-team/lib/types/types/requests-results.d.ts.map +1 -1
- package/packages/agent-team/preset/team-member/agent.cordis.yml +21 -4
- package/packages/client-agent-team/README.md +1 -1
- package/packages/client-agent-team/README.zh.md +1 -1
- package/packages/client-agent-team/lib/client.js +1121 -402
- package/packages/client-agent-team/lib/client.js.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamAgentsPanel.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamAgentsPanel.js +24 -4
- package/packages/client-agent-team/lib/types/client/TeamChannelPage.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamChannelPage.js +42 -22
- package/packages/client-agent-team/lib/types/client/TeamChannelsPanel.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamChannelsPanel.js +13 -24
- package/packages/client-agent-team/lib/types/client/TeamComposer.d.ts +11 -5
- package/packages/client-agent-team/lib/types/client/TeamComposer.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamComposer.js +15 -9
- package/packages/client-agent-team/lib/types/client/TeamConversation.d.ts +1 -1
- package/packages/client-agent-team/lib/types/client/TeamConversation.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamConversation.js +8 -1
- package/packages/client-agent-team/lib/types/client/TeamInboxPage.d.ts +21 -0
- package/packages/client-agent-team/lib/types/client/TeamInboxPage.d.ts.map +1 -0
- package/packages/client-agent-team/lib/types/client/TeamInboxPage.js +71 -0
- package/packages/client-agent-team/lib/types/client/TeamMemberEditor.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamMemberEditor.js +8 -24
- package/packages/client-agent-team/lib/types/client/TeamMessage.d.ts +9 -2
- package/packages/client-agent-team/lib/types/client/TeamMessage.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamMessage.js +13 -6
- package/packages/client-agent-team/lib/types/client/TeamPresenceDot.d.ts +8 -0
- package/packages/client-agent-team/lib/types/client/TeamPresenceDot.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamPresenceDot.js +21 -1
- package/packages/client-agent-team/lib/types/client/TeamThreadPage.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamThreadPage.js +106 -32
- package/packages/client-agent-team/lib/types/client/TeamWorkspaceBrowser.d.ts +1 -1
- package/packages/client-agent-team/lib/types/client/TeamWorkspaceBrowser.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamWorkspaceBrowser.js +50 -7
- package/packages/client-agent-team/lib/types/client/index.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/index.js +25 -9
- package/packages/client-agent-team/lib/types/client/locales.d.ts +18 -0
- package/packages/client-agent-team/lib/types/client/locales.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/locales.js +18 -0
- package/packages/client-agent-team/lib/types/client/navigation.d.ts +10 -0
- package/packages/client-agent-team/lib/types/client/navigation.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/navigation.js +18 -7
- package/packages/client-agent-team/lib/types/client/scope-coverage.d.ts +41 -0
- package/packages/client-agent-team/lib/types/client/scope-coverage.d.ts.map +1 -0
- package/packages/client-agent-team/lib/types/client/scope-coverage.js +64 -0
- package/packages/client-agent-team/lib/types/client/slots.d.ts +8 -2
- package/packages/client-agent-team/lib/types/client/slots.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/team-changes.d.ts +26 -1
- package/packages/client-agent-team/lib/types/client/team-changes.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/team-changes.js +66 -15
- package/packages/client-agent-team/lib/types/client/team-dialog-save.d.ts +20 -0
- package/packages/client-agent-team/lib/types/client/team-dialog-save.d.ts.map +1 -0
- package/packages/client-agent-team/lib/types/client/team-dialog-save.js +36 -0
- package/packages/client-agent-team/lib/types/client/team-formatters.d.ts +9 -0
- package/packages/client-agent-team/lib/types/client/team-formatters.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/team-formatters.js +34 -6
- package/packages/tool-agent-team/README.md +8 -6
- package/packages/tool-agent-team/README.zh.md +8 -6
- package/packages/tool-agent-team/lib/context-tools.js +18 -14
- package/packages/tool-agent-team/lib/host-access.js +20 -0
- package/packages/tool-agent-team/lib/index.js +314 -123
- package/packages/tool-agent-team/lib/types/context-tools.d.ts.map +1 -1
- package/packages/tool-agent-team/lib/types/host-access.d.ts +14 -0
- package/packages/tool-agent-team/lib/types/host-access.d.ts.map +1 -0
- package/packages/tool-agent-team/lib/types/index.d.ts.map +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import agentTeamRemote from '../../../agent-team/lib/typert.remote-client.js';
|
|
2
2
|
import { TeamNavigation } from "./navigation.js";
|
|
3
|
-
import { TeamChangeStream } from "./team-changes.js";
|
|
3
|
+
import { TeamChangeStream, TeamReadStream } from "./team-changes.js";
|
|
4
4
|
import { TeamDraftStore } from "./drafts.js";
|
|
5
5
|
import { TeamFooterAction } from "./TeamFooterAction.js";
|
|
6
6
|
import { TeamSettings } from "./TeamSettings.js";
|
|
@@ -12,7 +12,11 @@ const NS = 'team';
|
|
|
12
12
|
export const inject = [
|
|
13
13
|
'slots', 'workspaces', 'locale', 'remote', 'remote.session', 'sessions', 'connection', 'conversation',
|
|
14
14
|
];
|
|
15
|
-
function registerModeShadow(ctx, navigation, changes, drafts, name, component, extraInject
|
|
15
|
+
function registerModeShadow(ctx, navigation, changes, reads, drafts, name, component, extraInject,
|
|
16
|
+
// Keyed seats (`main`) address one panel by key; the reserved 'conversation'
|
|
17
|
+
// key is where the shipped Conversation registers, so the Team seat shadows
|
|
18
|
+
// that same panel instead of adding a second one.
|
|
19
|
+
entryKey) {
|
|
16
20
|
// Stay in Team mode: the conversation shadow stands down for Member Session
|
|
17
21
|
// views (see registerModeShadow), so the shipped conversation root renders
|
|
18
22
|
// the selected Member Session inside the Team shell.
|
|
@@ -29,6 +33,8 @@ function registerModeShadow(ctx, navigation, changes, drafts, name, component, e
|
|
|
29
33
|
// Remote bindings shared by every Team slot; surface-specific entries extend it below.
|
|
30
34
|
const sharedRemotes = {
|
|
31
35
|
loadChannels: (request) => ctx.remote.agentTeam.view(request),
|
|
36
|
+
loadInbox: (request) => ctx.remote.agentTeam.inbox(request),
|
|
37
|
+
subscribeReads: (listener) => reads.subscribe(listener),
|
|
32
38
|
subscribeChanges: (scope, listener) => changes.subscribe(scope, listener),
|
|
33
39
|
drafts,
|
|
34
40
|
loadMembers: (request) => ctx.remote.agentTeam.members(request),
|
|
@@ -48,13 +54,14 @@ function registerModeShadow(ctx, navigation, changes, drafts, name, component, e
|
|
|
48
54
|
let dispose;
|
|
49
55
|
const reconcile = () => {
|
|
50
56
|
const snapshot = navigation.getSnapshot();
|
|
51
|
-
// The
|
|
57
|
+
// The main panel seat yields to the shipped conversation root while a
|
|
52
58
|
// Member Session view is embedded; both sidebar seats stay shadowed so
|
|
53
59
|
// the Team chrome keeps working around the Member conversation.
|
|
54
|
-
const active = snapshot.mode === 'team' && !(name === '
|
|
60
|
+
const active = snapshot.mode === 'team' && !(name === 'main' && snapshot.memberSessionId !== undefined);
|
|
55
61
|
if (active && dispose === undefined) {
|
|
56
62
|
dispose = ctx.slots.register({
|
|
57
63
|
name,
|
|
64
|
+
...(entryKey === undefined ? {} : { key: entryKey }),
|
|
58
65
|
priority: -100,
|
|
59
66
|
locale: NS,
|
|
60
67
|
inject: () => ({
|
|
@@ -62,8 +69,16 @@ function registerModeShadow(ctx, navigation, changes, drafts, name, component, e
|
|
|
62
69
|
...extraInject?.(),
|
|
63
70
|
...navigation.actions(),
|
|
64
71
|
...sharedRemotes,
|
|
65
|
-
...(name === '
|
|
66
|
-
|
|
72
|
+
...(name === 'main' ? {
|
|
73
|
+
// A committed durable read consumes this reader's mention
|
|
74
|
+
// markers; the Host's changes stream never wakes on reads, so
|
|
75
|
+
// the Human's badge refreshes from the completed read itself.
|
|
76
|
+
readThread: async (request) => {
|
|
77
|
+
const result = await ctx.remote.agentTeam.readThread(request);
|
|
78
|
+
if (result.ok)
|
|
79
|
+
reads.bump();
|
|
80
|
+
return result;
|
|
81
|
+
},
|
|
67
82
|
loadThreadHistory: (request) => ctx.remote.agentTeam.threadHistory(request),
|
|
68
83
|
threadObservations: (request) => ctx.remote.agentTeam.threadObservations(request),
|
|
69
84
|
sendMessage: (request) => ctx.remote.agentTeam.sendMessage(request),
|
|
@@ -138,6 +153,7 @@ function applyUi(ctx) {
|
|
|
138
153
|
};
|
|
139
154
|
}, 'agent-team: member session restore');
|
|
140
155
|
const changes = new TeamChangeStream((request, signal) => ctx.remote.agentTeam.changes(request, signal));
|
|
156
|
+
const reads = new TeamReadStream();
|
|
141
157
|
const loadMemberGroups = async () => {
|
|
142
158
|
const workspaces = ctx.workspaces.list.getSnapshot().items;
|
|
143
159
|
const groups = await Promise.all(workspaces.map(async (workspace) => {
|
|
@@ -170,9 +186,9 @@ function applyUi(ctx) {
|
|
|
170
186
|
loadMemberGroups,
|
|
171
187
|
}),
|
|
172
188
|
}, TeamFooterAction));
|
|
173
|
-
registerModeShadow(ctx, navigation, changes, drafts, 'sidebar.workspaces', TeamWorkspaceBrowser);
|
|
174
|
-
registerModeShadow(ctx, navigation, changes, drafts, '
|
|
175
|
-
registerModeShadow(ctx, navigation, changes, drafts, 'sidebar.settings', TeamSettings, () => ({ loadMemberGroups }));
|
|
189
|
+
registerModeShadow(ctx, navigation, changes, reads, drafts, 'sidebar.workspaces', TeamWorkspaceBrowser);
|
|
190
|
+
registerModeShadow(ctx, navigation, changes, reads, drafts, 'main', TeamConversation, undefined, 'conversation');
|
|
191
|
+
registerModeShadow(ctx, navigation, changes, reads, drafts, 'sidebar.settings', TeamSettings, () => ({ loadMemberGroups }));
|
|
176
192
|
}
|
|
177
193
|
export async function apply(ctx) {
|
|
178
194
|
const disposeRemote = await ctx.remote.$mount(agentTeamRemote);
|
|
@@ -27,6 +27,14 @@ export declare const zh: {
|
|
|
27
27
|
readonly statusError: "错误";
|
|
28
28
|
readonly statusUnavailable: "不可用";
|
|
29
29
|
readonly addChannel: "新建频道";
|
|
30
|
+
readonly mentionsOfMe: "提到我";
|
|
31
|
+
readonly mentionsOfMeWithCount: "提到我,{count} 条未读提及";
|
|
32
|
+
readonly loadingInbox: "正在加载提到我…";
|
|
33
|
+
readonly inboxEmptyTitle: "还没有人提到你";
|
|
34
|
+
readonly inboxEmptyHint: "需要你知道或做决定时,成员会提到你";
|
|
35
|
+
readonly inboxTimeToday: "今天";
|
|
36
|
+
readonly inboxTimeYesterday: "昨天";
|
|
37
|
+
readonly inboxHeaderMeta: "共 {threads} 个 Thread · {mentions} 条提及,按最新提及排序";
|
|
30
38
|
readonly channelName: "名称";
|
|
31
39
|
readonly channelDescription: "说明";
|
|
32
40
|
readonly initialMembers: "初始成员";
|
|
@@ -40,6 +48,7 @@ export declare const zh: {
|
|
|
40
48
|
readonly resumeAgent: "恢复";
|
|
41
49
|
readonly restartAgent: "重启";
|
|
42
50
|
readonly restartStillUnavailable: "重启已执行,成员仍不可用:{diagnostic}";
|
|
51
|
+
readonly restartRefusedNoRestart: "会话日志被确定拒绝,修复无可用项,重启无法解决:{detail}";
|
|
43
52
|
readonly restartFailed: "重启执行失败:{message}";
|
|
44
53
|
readonly archiveAgent: "归档";
|
|
45
54
|
readonly archiveAgentTitle: "归档 Agent:{name}";
|
|
@@ -175,6 +184,14 @@ export declare const en: {
|
|
|
175
184
|
readonly statusError: "Error";
|
|
176
185
|
readonly statusUnavailable: "Unavailable";
|
|
177
186
|
readonly addChannel: "New Channel";
|
|
187
|
+
readonly mentionsOfMe: "Mentions of me";
|
|
188
|
+
readonly mentionsOfMeWithCount: "Mentions of me, {count} unread mention(s)";
|
|
189
|
+
readonly loadingInbox: "Loading mentions…";
|
|
190
|
+
readonly inboxEmptyTitle: "Nobody has mentioned you yet";
|
|
191
|
+
readonly inboxEmptyHint: "Members will mention you when you must know or decide";
|
|
192
|
+
readonly inboxTimeToday: "Today";
|
|
193
|
+
readonly inboxTimeYesterday: "Yesterday";
|
|
194
|
+
readonly inboxHeaderMeta: "{threads} Thread(s) · {mentions} mention(s), newest first";
|
|
178
195
|
readonly channelName: "Name";
|
|
179
196
|
readonly channelDescription: "Description";
|
|
180
197
|
readonly initialMembers: "Initial members";
|
|
@@ -188,6 +205,7 @@ export declare const en: {
|
|
|
188
205
|
readonly resumeAgent: "Resume";
|
|
189
206
|
readonly restartAgent: "Restart";
|
|
190
207
|
readonly restartStillUnavailable: "Restart ran, but the Member is still unavailable: {diagnostic}";
|
|
208
|
+
readonly restartRefusedNoRestart: "The session log is deterministically refused with nothing repairable; restarting cannot fix it: {detail}";
|
|
191
209
|
readonly restartFailed: "Restart failed: {message}";
|
|
192
210
|
readonly archiveAgent: "Archive";
|
|
193
211
|
readonly archiveAgentTitle: "Archive Agent: {name}";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../src/client/locales.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../src/client/locales.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4JL,CAAA;AAEV,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4JL,CAAA;AAEV,MAAM,MAAM,OAAO,GAAG,MAAM,OAAO,EAAE,CAAA"}
|
|
@@ -27,6 +27,14 @@ export const zh = {
|
|
|
27
27
|
statusError: '错误',
|
|
28
28
|
statusUnavailable: '不可用',
|
|
29
29
|
addChannel: '新建频道',
|
|
30
|
+
mentionsOfMe: '提到我',
|
|
31
|
+
mentionsOfMeWithCount: '提到我,{count} 条未读提及',
|
|
32
|
+
loadingInbox: '正在加载提到我…',
|
|
33
|
+
inboxEmptyTitle: '还没有人提到你',
|
|
34
|
+
inboxEmptyHint: '需要你知道或做决定时,成员会提到你',
|
|
35
|
+
inboxTimeToday: '今天',
|
|
36
|
+
inboxTimeYesterday: '昨天',
|
|
37
|
+
inboxHeaderMeta: '共 {threads} 个 Thread · {mentions} 条提及,按最新提及排序',
|
|
30
38
|
channelName: '名称',
|
|
31
39
|
channelDescription: '说明',
|
|
32
40
|
initialMembers: '初始成员',
|
|
@@ -40,6 +48,7 @@ export const zh = {
|
|
|
40
48
|
resumeAgent: '恢复',
|
|
41
49
|
restartAgent: '重启',
|
|
42
50
|
restartStillUnavailable: '重启已执行,成员仍不可用:{diagnostic}',
|
|
51
|
+
restartRefusedNoRestart: '会话日志被确定拒绝,修复无可用项,重启无法解决:{detail}',
|
|
43
52
|
restartFailed: '重启执行失败:{message}',
|
|
44
53
|
archiveAgent: '归档',
|
|
45
54
|
archiveAgentTitle: '归档 Agent:{name}',
|
|
@@ -175,6 +184,14 @@ export const en = {
|
|
|
175
184
|
statusError: 'Error',
|
|
176
185
|
statusUnavailable: 'Unavailable',
|
|
177
186
|
addChannel: 'New Channel',
|
|
187
|
+
mentionsOfMe: 'Mentions of me',
|
|
188
|
+
mentionsOfMeWithCount: 'Mentions of me, {count} unread mention(s)',
|
|
189
|
+
loadingInbox: 'Loading mentions…',
|
|
190
|
+
inboxEmptyTitle: 'Nobody has mentioned you yet',
|
|
191
|
+
inboxEmptyHint: 'Members will mention you when you must know or decide',
|
|
192
|
+
inboxTimeToday: 'Today',
|
|
193
|
+
inboxTimeYesterday: 'Yesterday',
|
|
194
|
+
inboxHeaderMeta: '{threads} Thread(s) · {mentions} mention(s), newest first',
|
|
178
195
|
channelName: 'Name',
|
|
179
196
|
channelDescription: 'Description',
|
|
180
197
|
initialMembers: 'Initial members',
|
|
@@ -188,6 +205,7 @@ export const en = {
|
|
|
188
205
|
resumeAgent: 'Resume',
|
|
189
206
|
restartAgent: 'Restart',
|
|
190
207
|
restartStillUnavailable: 'Restart ran, but the Member is still unavailable: {diagnostic}',
|
|
208
|
+
restartRefusedNoRestart: 'The session log is deterministically refused with nothing repairable; restarting cannot fix it: {detail}',
|
|
191
209
|
restartFailed: 'Restart failed: {message}',
|
|
192
210
|
archiveAgent: 'Archive',
|
|
193
211
|
archiveAgentTitle: 'Archive Agent: {name}',
|
|
@@ -9,6 +9,12 @@ export interface TeamNavigationSnapshot {
|
|
|
9
9
|
taskRef?: AgentTeamTaskRef;
|
|
10
10
|
threadRef?: AgentTeamThreadRef;
|
|
11
11
|
taskNumber?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Durable position of the Human mention-Inbox page (a navigation fact, not
|
|
14
|
+
* an unread fact): selecting Inbox clears the Channel/Thread faces, and a
|
|
15
|
+
* reload reopens the page. Read markers only move through Thread reads.
|
|
16
|
+
*/
|
|
17
|
+
inbox?: boolean;
|
|
12
18
|
/** Runtime-only Member Session embedded in the conversation seat; never persisted. */
|
|
13
19
|
memberSessionId?: SessionId;
|
|
14
20
|
/** Runtime-only session to restore when the Member view closes; never persisted. */
|
|
@@ -21,6 +27,8 @@ export interface TeamNavigationActions {
|
|
|
21
27
|
selectWorkspace: (workspaceId: WorkspaceId) => void;
|
|
22
28
|
selectChannel: (channelRef: AgentTeamChannelRef) => void;
|
|
23
29
|
selectThread: (threadRef: AgentTeamThreadRef, channelRef?: AgentTeamChannelRef, taskRef?: AgentTeamTaskRef, taskNumber?: number) => void;
|
|
30
|
+
/** Open the Human mention-Inbox page; clears the Channel/Thread faces. */
|
|
31
|
+
selectInbox: () => void;
|
|
24
32
|
backToWorkspace: () => void;
|
|
25
33
|
/** Leave the selected Channel for the workspace Channel list; keeps mode and Workspace. */
|
|
26
34
|
backToChannels: () => void;
|
|
@@ -47,6 +55,8 @@ export declare class TeamNavigation {
|
|
|
47
55
|
private clearMemberSession;
|
|
48
56
|
private setWorkspace;
|
|
49
57
|
private setChannel;
|
|
58
|
+
/** The Inbox is a face, not workspace content: selecting a Workspace leaves it. */
|
|
59
|
+
private setInbox;
|
|
50
60
|
private clearChannel;
|
|
51
61
|
private setThread;
|
|
52
62
|
private commit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../src/client/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kDAAkD,CAAA;AACnF,OAAO,KAA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F,OAAO,CAAC,QAAQ;IAOhB,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,SAAS;IAkBjB,OAAO,CAAC,MAAM;CAKf;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -9,6 +9,7 @@ function readSnapshot() {
|
|
|
9
9
|
mode: parsed.mode === 'team' ? 'team' : 'conversation',
|
|
10
10
|
...(typeof parsed.workspaceId === 'string' ? { workspaceId: parsed.workspaceId } : {}),
|
|
11
11
|
...(typeof parsed.channelRef === 'string' ? { channelRef: parsed.channelRef } : {}),
|
|
12
|
+
...(parsed.inbox === true ? { inbox: true } : {}),
|
|
12
13
|
...(hasThread ? {
|
|
13
14
|
threadRef: parsed.threadRef,
|
|
14
15
|
...(typeof parsed.taskRef === 'string' ? { taskRef: parsed.taskRef } : {}),
|
|
@@ -24,11 +25,12 @@ function persistSnapshot(snapshot) {
|
|
|
24
25
|
if (typeof localStorage === 'undefined')
|
|
25
26
|
return;
|
|
26
27
|
try {
|
|
27
|
-
const { mode, workspaceId, channelRef, taskRef, threadRef, taskNumber } = snapshot;
|
|
28
|
+
const { mode, workspaceId, channelRef, taskRef, threadRef, taskNumber, inbox } = snapshot;
|
|
28
29
|
localStorage.setItem(STORAGE_KEY, JSON.stringify({
|
|
29
30
|
mode,
|
|
30
31
|
...(workspaceId === undefined ? {} : { workspaceId }),
|
|
31
32
|
...(channelRef === undefined ? {} : { channelRef }),
|
|
33
|
+
...(inbox === true ? { inbox: true } : {}),
|
|
32
34
|
...(taskRef === undefined ? {} : { taskRef }),
|
|
33
35
|
...(threadRef === undefined ? {} : { threadRef }),
|
|
34
36
|
...(taskNumber === undefined ? {} : { taskNumber }),
|
|
@@ -54,6 +56,7 @@ export class TeamNavigation {
|
|
|
54
56
|
selectWorkspace: workspaceId => { this.clearMemberSession(); this.setWorkspace(workspaceId); },
|
|
55
57
|
selectChannel: channelRef => { this.clearMemberSession(); this.setChannel(channelRef); },
|
|
56
58
|
selectThread: (threadRef, channelRef, taskRef, taskNumber) => { this.clearMemberSession(); this.setThread(threadRef, channelRef, taskRef, taskNumber); },
|
|
59
|
+
selectInbox: () => { this.clearMemberSession(); this.setInbox(); },
|
|
57
60
|
backToWorkspace: () => { this.clearMemberSession(); this.setThread(undefined); },
|
|
58
61
|
backToChannels: () => { this.clearMemberSession(); this.clearChannel(); },
|
|
59
62
|
enterMemberSession: (sessionId, returnToSessionId) => { this.setMemberSession(sessionId, returnToSessionId); },
|
|
@@ -91,19 +94,27 @@ export class TeamNavigation {
|
|
|
91
94
|
this.commit();
|
|
92
95
|
}
|
|
93
96
|
setWorkspace(workspaceId) {
|
|
94
|
-
if (this.snapshot.workspaceId === workspaceId)
|
|
97
|
+
if (this.snapshot.workspaceId === workspaceId && this.snapshot.inbox !== true)
|
|
95
98
|
return;
|
|
96
|
-
const { channelRef: _channelRef, taskRef: _taskRef, threadRef: _threadRef, taskNumber: _taskNumber, ...base } = this.snapshot;
|
|
99
|
+
const { channelRef: _channelRef, taskRef: _taskRef, threadRef: _threadRef, taskNumber: _taskNumber, inbox: _inbox, ...base } = this.snapshot;
|
|
97
100
|
this.snapshot = { ...base, workspaceId };
|
|
98
101
|
this.commit();
|
|
99
102
|
}
|
|
100
103
|
setChannel(channelRef) {
|
|
101
|
-
if (this.snapshot.channelRef === channelRef && this.snapshot.threadRef === undefined)
|
|
104
|
+
if (this.snapshot.channelRef === channelRef && this.snapshot.threadRef === undefined && this.snapshot.inbox !== true)
|
|
102
105
|
return;
|
|
103
|
-
const { taskRef: _taskRef, threadRef: _threadRef, taskNumber: _taskNumber, ...base } = this.snapshot;
|
|
106
|
+
const { taskRef: _taskRef, threadRef: _threadRef, taskNumber: _taskNumber, inbox: _inbox, ...base } = this.snapshot;
|
|
104
107
|
this.snapshot = { ...base, channelRef };
|
|
105
108
|
this.commit();
|
|
106
109
|
}
|
|
110
|
+
/** The Inbox is a face, not workspace content: selecting a Workspace leaves it. */
|
|
111
|
+
setInbox() {
|
|
112
|
+
if (this.snapshot.inbox === true && this.snapshot.channelRef === undefined && this.snapshot.threadRef === undefined)
|
|
113
|
+
return;
|
|
114
|
+
const { channelRef: _channelRef, taskRef: _taskRef, threadRef: _threadRef, taskNumber: _taskNumber, ...base } = this.snapshot;
|
|
115
|
+
this.snapshot = { ...base, inbox: true };
|
|
116
|
+
this.commit();
|
|
117
|
+
}
|
|
107
118
|
clearChannel() {
|
|
108
119
|
const { channelRef: _channelRef, ...base } = this.snapshot;
|
|
109
120
|
if (this.snapshot.channelRef === undefined)
|
|
@@ -112,14 +123,14 @@ export class TeamNavigation {
|
|
|
112
123
|
this.commit();
|
|
113
124
|
}
|
|
114
125
|
setThread(threadRef, channelRef, taskRef, taskNumber) {
|
|
115
|
-
if (this.snapshot.threadRef === threadRef && this.snapshot.taskRef === taskRef && this.snapshot.channelRef === channelRef && this.snapshot.taskNumber === taskNumber)
|
|
126
|
+
if (this.snapshot.threadRef === threadRef && this.snapshot.taskRef === taskRef && this.snapshot.channelRef === channelRef && this.snapshot.taskNumber === taskNumber && this.snapshot.inbox !== true)
|
|
116
127
|
return;
|
|
117
128
|
if (threadRef === undefined) {
|
|
118
129
|
const { taskRef: _taskRef, threadRef: _threadRef, taskNumber: _taskNumber, ...base } = this.snapshot;
|
|
119
130
|
this.snapshot = base;
|
|
120
131
|
}
|
|
121
132
|
else {
|
|
122
|
-
const { channelRef: _channelRef, taskRef: _taskRef, threadRef: _threadRef, taskNumber: _taskNumber, ...base } = this.snapshot;
|
|
133
|
+
const { channelRef: _channelRef, taskRef: _taskRef, threadRef: _threadRef, taskNumber: _taskNumber, inbox: _inbox, ...base } = this.snapshot;
|
|
123
134
|
this.snapshot = {
|
|
124
135
|
...base,
|
|
125
136
|
threadRef,
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** The change scopes whose wakes one surface answers with a shared refresh round. */
|
|
2
|
+
export type SupplementalScope = 'workspace' | 'presence';
|
|
3
|
+
/** One change wake, carrying a version from the scope that issued it. */
|
|
4
|
+
export interface ScopeWake {
|
|
5
|
+
readonly scope: SupplementalScope;
|
|
6
|
+
readonly version: number;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Per-scope coverage of the change versions one surface has already answered.
|
|
10
|
+
*
|
|
11
|
+
* A version is only comparable inside the scope that issued it: the Host
|
|
12
|
+
* answers a workspace scope from the durable ledger position and a presence
|
|
13
|
+
* scope from its process-local wake epoch, which starts low and climbs on every
|
|
14
|
+
* Agent transition. One high-water mark shared by both would therefore let a
|
|
15
|
+
* presence epoch swallow a later, smaller ledger sequence and park the surface
|
|
16
|
+
* on stale data, so coverage and pending versions are kept per scope.
|
|
17
|
+
*
|
|
18
|
+
* One round answers one version per scope. The Host delivers one event to every
|
|
19
|
+
* matching scope, so the first version a round sees in a scope it has not
|
|
20
|
+
* answered yet is that event reaching a second scope, and joins the round
|
|
21
|
+
* already fetching instead of earning a second identical read. A newer version
|
|
22
|
+
* in a scope the round has answered arrived after the round issued its fetch,
|
|
23
|
+
* so it owes one trailing round.
|
|
24
|
+
*/
|
|
25
|
+
export declare class ScopeCoverage {
|
|
26
|
+
private readonly covered;
|
|
27
|
+
private readonly pending;
|
|
28
|
+
/** The scopes the open round has an answer for. */
|
|
29
|
+
private readonly answered;
|
|
30
|
+
private fetching;
|
|
31
|
+
/** Folds one wake in and answers whether it opens a round. */
|
|
32
|
+
wake(scope: SupplementalScope, version: number): boolean;
|
|
33
|
+
/** Opens a round's fetch window; versions observed from here on are pending. */
|
|
34
|
+
beginRound(): void;
|
|
35
|
+
/** Closes a round's fetch window and answers whether a trailing round is owed. */
|
|
36
|
+
finishRound(): boolean;
|
|
37
|
+
/** Drops every observation: a new owner starts with nothing covered. */
|
|
38
|
+
reset(): void;
|
|
39
|
+
private coveredOf;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=scope-coverage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-coverage.d.ts","sourceRoot":"","sources":["../../../src/client/scope-coverage.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG,UAAU,CAAA;AAExD,yEAAyE;AACzE,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAA;IACjC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAuC;IAC/D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAuC;IAC/D,mDAAmD;IACnD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA+B;IACxD,OAAO,CAAC,QAAQ,CAAQ;IAExB,8DAA8D;IAC9D,IAAI,CAAC,KAAK,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO;IAWxD,gFAAgF;IAChF,UAAU,IAAI,IAAI;IAKlB,kFAAkF;IAClF,WAAW,IAAI,OAAO;IAYtB,wEAAwE;IACxE,KAAK,IAAI,IAAI;IAOb,OAAO,CAAC,SAAS;CAGlB"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-scope coverage of the change versions one surface has already answered.
|
|
3
|
+
*
|
|
4
|
+
* A version is only comparable inside the scope that issued it: the Host
|
|
5
|
+
* answers a workspace scope from the durable ledger position and a presence
|
|
6
|
+
* scope from its process-local wake epoch, which starts low and climbs on every
|
|
7
|
+
* Agent transition. One high-water mark shared by both would therefore let a
|
|
8
|
+
* presence epoch swallow a later, smaller ledger sequence and park the surface
|
|
9
|
+
* on stale data, so coverage and pending versions are kept per scope.
|
|
10
|
+
*
|
|
11
|
+
* One round answers one version per scope. The Host delivers one event to every
|
|
12
|
+
* matching scope, so the first version a round sees in a scope it has not
|
|
13
|
+
* answered yet is that event reaching a second scope, and joins the round
|
|
14
|
+
* already fetching instead of earning a second identical read. A newer version
|
|
15
|
+
* in a scope the round has answered arrived after the round issued its fetch,
|
|
16
|
+
* so it owes one trailing round.
|
|
17
|
+
*/
|
|
18
|
+
export class ScopeCoverage {
|
|
19
|
+
covered = new Map();
|
|
20
|
+
pending = new Map();
|
|
21
|
+
/** The scopes the open round has an answer for. */
|
|
22
|
+
answered = new Set();
|
|
23
|
+
fetching = false;
|
|
24
|
+
/** Folds one wake in and answers whether it opens a round. */
|
|
25
|
+
wake(scope, version) {
|
|
26
|
+
if (version <= this.coveredOf(scope))
|
|
27
|
+
return false;
|
|
28
|
+
if (this.fetching && this.answered.has(scope)) {
|
|
29
|
+
this.pending.set(scope, Math.max(this.pending.get(scope) ?? 0, version));
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
this.answered.add(scope);
|
|
33
|
+
this.covered.set(scope, version);
|
|
34
|
+
return !this.fetching;
|
|
35
|
+
}
|
|
36
|
+
/** Opens a round's fetch window; versions observed from here on are pending. */
|
|
37
|
+
beginRound() {
|
|
38
|
+
this.pending.clear();
|
|
39
|
+
this.fetching = true;
|
|
40
|
+
}
|
|
41
|
+
/** Closes a round's fetch window and answers whether a trailing round is owed. */
|
|
42
|
+
finishRound() {
|
|
43
|
+
this.fetching = false;
|
|
44
|
+
this.answered.clear();
|
|
45
|
+
let owed = false;
|
|
46
|
+
for (const [scope, version] of this.pending) {
|
|
47
|
+
if (version <= this.coveredOf(scope))
|
|
48
|
+
continue;
|
|
49
|
+
this.covered.set(scope, version);
|
|
50
|
+
owed = true;
|
|
51
|
+
}
|
|
52
|
+
return owed;
|
|
53
|
+
}
|
|
54
|
+
/** Drops every observation: a new owner starts with nothing covered. */
|
|
55
|
+
reset() {
|
|
56
|
+
this.covered.clear();
|
|
57
|
+
this.pending.clear();
|
|
58
|
+
this.answered.clear();
|
|
59
|
+
this.fetching = false;
|
|
60
|
+
}
|
|
61
|
+
coveredOf(scope) {
|
|
62
|
+
return this.covered.get(scope) ?? 0;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
2
|
-
import type { AgentTeamAddMemberRequest, AgentTeamArchiveChannelRequest, AgentTeamArchiveChannelResult, AgentTeamArchiveMemberRequest, AgentTeamArchiveMemberResult, AgentTeamChannelRef, AgentTeamClientMemberStatus, AgentTeamClearMemberContextRequest, AgentTeamClearMemberContextResult, AgentTeamCreateChannelRequest, AgentTeamCreateChannelResult, AgentTeamJoinChannelRequest, AgentTeamJoinChannelResult, AgentTeamGetAttachmentRequest, AgentTeamGetAttachmentResult, AgentTeamPutAttachmentRequest, AgentTeamPutAttachmentResult, AgentTeamMemberResult, AgentTeamRecoverMemberRequest, AgentTeamRecoverMemberResult, AgentTeamMembersRequest, AgentTeamRemoveChannelMemberRequest, AgentTeamRemoveChannelMemberResult, AgentTeamReplyRequest, AgentTeamResolveTaskRefsRequest, AgentTeamResolveTaskRefsResult, AgentTeamReplyResult, AgentTeamConfirmationRequired, AgentTeamThreadHistory, AgentTeamThreadHistoryRequest, AgentTeamThreadObservations, AgentTeamThreadObservationsRequest, AgentTeamThreadReadRequest, AgentTeamThreadReadResult, AgentTeamPromoteThreadRequest, AgentTeamPromoteThreadResult, AgentTeamTaskRequest, AgentTeamTaskResult, AgentTeamSendMessageRequest, AgentTeamSendMessageResult, AgentTeamUpdateChannelRequest, AgentTeamUpdateChannelResult, AgentTeamUpdateMemberRequest, AgentTeamView, AgentTeamViewRequest } from '@wowyuarm/dsh-agent-team/types';
|
|
2
|
+
import type { AgentTeamAddMemberRequest, AgentTeamArchiveChannelRequest, AgentTeamArchiveChannelResult, AgentTeamArchiveMemberRequest, AgentTeamArchiveMemberResult, AgentTeamChannelRef, AgentTeamClientMemberStatus, AgentTeamClearMemberContextRequest, AgentTeamClearMemberContextResult, AgentTeamCreateChannelRequest, AgentTeamCreateChannelResult, AgentTeamInbox, AgentTeamInboxRequest, AgentTeamJoinChannelRequest, AgentTeamJoinChannelResult, AgentTeamGetAttachmentRequest, AgentTeamGetAttachmentResult, AgentTeamPutAttachmentRequest, AgentTeamPutAttachmentResult, AgentTeamMemberResult, AgentTeamRecoverMemberRequest, AgentTeamRecoverMemberResult, AgentTeamMembersRequest, AgentTeamRemoveChannelMemberRequest, AgentTeamRemoveChannelMemberResult, AgentTeamReplyRequest, AgentTeamResolveTaskRefsRequest, AgentTeamResolveTaskRefsResult, AgentTeamReplyResult, AgentTeamConfirmationRequired, AgentTeamThreadHistory, AgentTeamThreadHistoryRequest, AgentTeamThreadObservations, AgentTeamThreadObservationsRequest, AgentTeamThreadReadRequest, AgentTeamThreadReadResult, AgentTeamPromoteThreadRequest, AgentTeamPromoteThreadResult, AgentTeamTaskRequest, AgentTeamTaskResult, AgentTeamSendMessageRequest, AgentTeamSendMessageResult, AgentTeamUpdateChannelRequest, AgentTeamUpdateChannelResult, AgentTeamUpdateMemberRequest, AgentTeamView, AgentTeamViewRequest } from '@wowyuarm/dsh-agent-team/types';
|
|
3
3
|
import type { RemoteResult } from '@deepseek-ai/dsh-typert-protocol';
|
|
4
4
|
import type { TeamNavigationActions, TeamNavigationSnapshot } from './navigation.ts';
|
|
5
5
|
import type { TeamChangeListener, TeamChangeScope } from './team-changes.ts';
|
|
@@ -42,6 +42,10 @@ export interface TeamModelCatalog {
|
|
|
42
42
|
export type TeamSidebarProps = PropsRuntime<'sidebar.workspaces'> & PropsLocale<'team'> & TeamNavigationActions & {
|
|
43
43
|
navigation: TeamNavigationSource;
|
|
44
44
|
loadMembers: (request: AgentTeamMembersRequest) => Promise<RemoteResult<readonly AgentTeamClientMemberStatus[]>>;
|
|
45
|
+
/** Human direct-only Inbox slice; the badge sums each visible Workspace's total. */
|
|
46
|
+
loadInbox: (request: AgentTeamInboxRequest) => Promise<RemoteResult<AgentTeamInbox>>;
|
|
47
|
+
/** Fired after every committed durable Thread read; the badge refreshes without waiting for a changes wake. */
|
|
48
|
+
subscribeReads: (listener: () => void) => () => void;
|
|
45
49
|
subscribeChanges: SubscribeTeamChanges;
|
|
46
50
|
addMember: (request: AgentTeamAddMemberRequest) => Promise<RemoteResult<AgentTeamMemberResult>>;
|
|
47
51
|
loadChannels: (request: AgentTeamViewRequest) => Promise<RemoteResult<AgentTeamView>>;
|
|
@@ -65,7 +69,7 @@ export type TeamSidebarProps = PropsRuntime<'sidebar.workspaces'> & PropsLocale<
|
|
|
65
69
|
openMemberSession: (sessionId: AgentTeamClientMemberStatus['member']['sessionId']) => void;
|
|
66
70
|
selectedChannelRef?: AgentTeamChannelRef;
|
|
67
71
|
};
|
|
68
|
-
export type TeamConversationProps = PropsRuntime<'
|
|
72
|
+
export type TeamConversationProps = PropsRuntime<'main'> & PropsLocale<'team'> & TeamNavigationActions & {
|
|
69
73
|
navigation: TeamNavigationSource;
|
|
70
74
|
/** Keyed composer draft cache; one store per Client context. */
|
|
71
75
|
drafts: TeamDraftStore;
|
|
@@ -83,6 +87,8 @@ export type TeamConversationProps = PropsRuntime<'conversation'> & PropsLocale<'
|
|
|
83
87
|
promoteThread: (request: AgentTeamPromoteThreadRequest) => Promise<RemoteResult<AgentTeamPromoteThreadResult>>;
|
|
84
88
|
resolveTaskRefs: (request: AgentTeamResolveTaskRefsRequest) => Promise<RemoteResult<AgentTeamResolveTaskRefsResult>>;
|
|
85
89
|
loadMembers: (request: AgentTeamMembersRequest) => Promise<RemoteResult<readonly AgentTeamClientMemberStatus[]>>;
|
|
90
|
+
/** Human direct-only Inbox slice; the Inbox page merges one call per visible Workspace. */
|
|
91
|
+
loadInbox: (request: AgentTeamInboxRequest) => Promise<RemoteResult<AgentTeamInbox>>;
|
|
86
92
|
/** Human-only Thread Attention observations; the Thread composer ranks the returned followers first. */
|
|
87
93
|
threadObservations: (request: AgentTeamThreadObservationsRequest) => Promise<RemoteResult<AgentTeamThreadObservations>>;
|
|
88
94
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slots.d.ts","sourceRoot":"","sources":["../../../src/client/slots.ts"],"names":[],"mappings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AY,CAAC,2BAA2B,CAAC,CAAC,CAAA;CACxH,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC,kBAAkB,CAAC,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG;IACvF,gBAAgB,EAAE,MAAM,OAAO,CAAC,SAAS,eAAe,EAAE,CAAC,CAAA;CAC5D,CAAA;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,OAAO,EAAE,SAAS,2BAA2B,EAAE,CAAA;CACzD;AAED,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,uBAAuB,CAAC,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,qBAAqB,GAAG;IAClH,UAAU,EAAE,oBAAoB,CAAA;IAChC,gBAAgB,EAAE,MAAM,OAAO,CAAC,SAAS,eAAe,EAAE,CAAC,CAAA;CAC5D,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { RemoteResult } from '@deepseek-ai/dsh-typert-protocol';
|
|
2
2
|
import type { AgentTeamChangeScope, AgentTeamChangesRequest, AgentTeamChangesResult } from '@wowyuarm/dsh-agent-team/types';
|
|
3
|
-
|
|
3
|
+
/** One poll observes one scope, or every Team change when the scope is omitted. */
|
|
4
|
+
export type TeamChangeScope = AgentTeamChangeScope | undefined;
|
|
4
5
|
/** One invalidation delivered to every surface subscribed to one scope. */
|
|
5
6
|
export type TeamChangeUpdate = {
|
|
6
7
|
readonly type: 'changed';
|
|
@@ -15,14 +16,38 @@ type ChangesFn = (request: AgentTeamChangesRequest, signal?: AbortSignal) => Pro
|
|
|
15
16
|
* One long-poll per change scope, shared by every listening surface: panels
|
|
16
17
|
* and pages never open parallel `changes` requests for the same scope, and
|
|
17
18
|
* the poll is aborted as soon as the last subscriber leaves.
|
|
19
|
+
*
|
|
20
|
+
* Each poll keeps its own cursor, and a cursor only means something inside the
|
|
21
|
+
* scope it was issued for: the Host answers a presence scope from a
|
|
22
|
+
* process-local wake epoch and every other scope from a durable ledger
|
|
23
|
+
* position.
|
|
18
24
|
*/
|
|
19
25
|
export declare class TeamChangeStream {
|
|
20
26
|
private readonly changes;
|
|
21
27
|
private readonly polls;
|
|
28
|
+
/**
|
|
29
|
+
* The last version each scope key answered with, kept after that scope's poll
|
|
30
|
+
* is torn down: a commit landing while no poll exists is otherwise folded into
|
|
31
|
+
* the replacement poll's opening sample, which reports nothing.
|
|
32
|
+
*/
|
|
33
|
+
private readonly observed;
|
|
22
34
|
constructor(changes: ChangesFn);
|
|
23
35
|
subscribe(scope: TeamChangeScope, listener: TeamChangeListener): () => void;
|
|
24
36
|
private run;
|
|
25
37
|
private fail;
|
|
26
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* The Host's `changes` stream never wakes on a Thread read — a read advances
|
|
41
|
+
* only the reader's private watermark, so no shared projection changes. A
|
|
42
|
+
* durable read does consume the reader's own mention markers, so the Human's
|
|
43
|
+
* badge and Inbox page refresh from the completed read itself instead of
|
|
44
|
+
* waiting for the next unrelated commit.
|
|
45
|
+
*/
|
|
46
|
+
export declare class TeamReadStream {
|
|
47
|
+
private version;
|
|
48
|
+
private readonly listeners;
|
|
49
|
+
bump(): void;
|
|
50
|
+
subscribe(listener: () => void): () => void;
|
|
51
|
+
}
|
|
27
52
|
export {};
|
|
28
53
|
//# sourceMappingURL=team-changes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"team-changes.d.ts","sourceRoot":"","sources":["../../../src/client/team-changes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAE3H,MAAM,MAAM,eAAe,GAAG,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"team-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