@wowyuarm/dsh-agent-team 0.1.14-alpha.2 → 0.1.14
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 +5 -3
- package/README.zh.md +5 -3
- package/cordis.patch.yml +2 -185
- package/package.json +52 -46
- package/packages/agent-team/README.md +1 -1
- package/packages/agent-team/README.zh.md +1 -1
- package/packages/agent-team/core-skills/member-memory-manager/SKILL.md +30 -0
- package/packages/agent-team/lib/context-continuity-host.js +91 -0
- package/packages/agent-team/lib/context-projection.js +266 -489
- package/packages/agent-team/lib/context-source.js +17 -106
- package/packages/agent-team/lib/human-avatar.js +61 -0
- package/packages/agent-team/lib/human-profile.js +46 -0
- package/packages/agent-team/lib/human-update-check.js +119 -0
- package/packages/agent-team/lib/index.js +408 -264
- package/packages/agent-team/lib/ledger.js +120 -15
- package/packages/agent-team/lib/member-context.js +9 -8
- package/packages/agent-team/lib/member-runtime.js +1 -1
- package/packages/agent-team/lib/member-time-context.js +2 -5
- package/packages/agent-team/lib/preset-roster.js +15 -0
- package/packages/agent-team/lib/pressure-policy.js +9 -6
- package/packages/agent-team/lib/session-remediation.js +493 -0
- package/packages/agent-team/lib/stored-session-reader.js +2 -1
- package/packages/agent-team/lib/typert.host.js +605 -291
- package/packages/agent-team/lib/typert.remote-client.d.ts +15 -6
- package/packages/agent-team/lib/typert.remote-client.d.ts.map +1 -1
- package/packages/agent-team/lib/typert.remote-client.js +367 -244
- package/packages/agent-team/lib/types/context-continuity-host.d.ts +84 -0
- package/packages/agent-team/lib/types/context-continuity-host.d.ts.map +1 -0
- package/packages/agent-team/lib/types/context-projection.d.ts +130 -185
- package/packages/agent-team/lib/types/context-projection.d.ts.map +1 -1
- package/packages/agent-team/lib/types/context-source.d.ts +17 -81
- package/packages/agent-team/lib/types/context-source.d.ts.map +1 -1
- package/packages/agent-team/lib/types/human-avatar.d.ts +29 -0
- package/packages/agent-team/lib/types/human-avatar.d.ts.map +1 -0
- package/packages/agent-team/lib/types/human-profile.d.ts +44 -0
- package/packages/agent-team/lib/types/human-profile.d.ts.map +1 -0
- package/packages/agent-team/lib/types/human-update-check.d.ts +73 -0
- package/packages/agent-team/lib/types/human-update-check.d.ts.map +1 -0
- package/packages/agent-team/lib/types/index.d.ts +112 -38
- package/packages/agent-team/lib/types/index.d.ts.map +1 -1
- package/packages/agent-team/lib/types/ledger.d.ts +31 -2
- package/packages/agent-team/lib/types/ledger.d.ts.map +1 -1
- package/packages/agent-team/lib/types/member-context.d.ts +0 -14
- package/packages/agent-team/lib/types/member-context.d.ts.map +1 -1
- package/packages/agent-team/lib/types/member-time-context.d.ts +0 -15
- package/packages/agent-team/lib/types/member-time-context.d.ts.map +1 -1
- package/packages/agent-team/lib/types/preset-roster.d.ts +5 -0
- package/packages/agent-team/lib/types/preset-roster.d.ts.map +1 -0
- package/packages/agent-team/lib/types/pressure-policy.d.ts +6 -0
- package/packages/agent-team/lib/types/pressure-policy.d.ts.map +1 -1
- 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/stored-session-reader.d.ts +2 -1
- package/packages/agent-team/lib/types/stored-session-reader.d.ts.map +1 -1
- package/packages/agent-team/lib/types/types/entities.d.ts +20 -3
- package/packages/agent-team/lib/types/types/entities.d.ts.map +1 -1
- package/packages/agent-team/lib/types/types/requests-results.d.ts +63 -0
- package/packages/agent-team/lib/types/types/requests-results.d.ts.map +1 -1
- package/packages/agent-team/preset/team-member/agent.cordis.yml +166 -0
- package/packages/client-agent-team/lib/client.js +1667 -516
- package/packages/client-agent-team/lib/client.js.map +1 -1
- package/packages/client-agent-team/lib/types/client/HumanSettingsSection.d.ts +15 -0
- package/packages/client-agent-team/lib/types/client/HumanSettingsSection.d.ts.map +1 -0
- package/packages/client-agent-team/lib/types/client/HumanSettingsSection.js +115 -0
- package/packages/client-agent-team/lib/types/client/TeamAgentsPanel.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamAgentsPanel.js +12 -8
- package/packages/client-agent-team/lib/types/client/TeamAvatarStack.d.ts +22 -1
- package/packages/client-agent-team/lib/types/client/TeamAvatarStack.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamAvatarStack.js +25 -2
- package/packages/client-agent-team/lib/types/client/TeamChannelPage.d.ts +6 -1
- package/packages/client-agent-team/lib/types/client/TeamChannelPage.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamChannelPage.js +69 -31
- package/packages/client-agent-team/lib/types/client/TeamChannelsPanel.js +4 -4
- package/packages/client-agent-team/lib/types/client/TeamComposer.js +3 -3
- 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 +12 -5
- package/packages/client-agent-team/lib/types/client/TeamFooterAction.js +2 -2
- package/packages/client-agent-team/lib/types/client/TeamInboxPage.d.ts +4 -1
- package/packages/client-agent-team/lib/types/client/TeamInboxPage.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamInboxPage.js +22 -7
- package/packages/client-agent-team/lib/types/client/TeamMemberEditor.d.ts +11 -1
- package/packages/client-agent-team/lib/types/client/TeamMemberEditor.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamMemberEditor.js +69 -8
- package/packages/client-agent-team/lib/types/client/TeamMembersAction.js +2 -2
- package/packages/client-agent-team/lib/types/client/TeamMessage.d.ts +18 -3
- package/packages/client-agent-team/lib/types/client/TeamMessage.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamMessage.js +213 -67
- package/packages/client-agent-team/lib/types/client/TeamRowMenu.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamRowMenu.js +2 -2
- package/packages/client-agent-team/lib/types/client/TeamSidebarSection.js +2 -2
- package/packages/client-agent-team/lib/types/client/TeamThreadPage.d.ts +5 -0
- package/packages/client-agent-team/lib/types/client/TeamThreadPage.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamThreadPage.js +55 -29
- package/packages/client-agent-team/lib/types/client/TeamWorkspaceBrowser.js +3 -3
- package/packages/client-agent-team/lib/types/client/TeamWorkspaceSelector.js +2 -2
- package/packages/client-agent-team/lib/types/client/avatar-image.d.ts +21 -0
- package/packages/client-agent-team/lib/types/client/avatar-image.d.ts.map +1 -0
- package/packages/client-agent-team/lib/types/client/avatar-image.js +9 -0
- package/packages/client-agent-team/lib/types/client/human-identity.d.ts +94 -0
- package/packages/client-agent-team/lib/types/client/human-identity.d.ts.map +1 -0
- package/packages/client-agent-team/lib/types/client/human-identity.js +117 -0
- package/packages/client-agent-team/lib/types/client/index.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/index.js +112 -41
- package/packages/client-agent-team/lib/types/client/locales.d.ts +72 -2
- package/packages/client-agent-team/lib/types/client/locales.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/locales.js +78 -2
- package/packages/client-agent-team/lib/types/client/multi-menu-field.js +2 -2
- package/packages/client-agent-team/lib/types/client/refs.d.ts +71 -0
- package/packages/client-agent-team/lib/types/client/refs.d.ts.map +1 -0
- package/packages/client-agent-team/lib/types/client/refs.js +181 -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-formatters.d.ts +57 -9
- 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 +85 -17
- package/packages/tool-agent-team/README.md +1 -1
- package/packages/tool-agent-team/README.zh.md +1 -1
- package/packages/tool-agent-team/lib/context-tools.js +20 -6
- package/packages/tool-agent-team/lib/index.js +2 -2
- package/packages/tool-agent-team/lib/types/context-tools.d.ts.map +1 -1
- package/packages/agent-team/lib/context-management.js +0 -371
- package/packages/agent-team/lib/types/context-management.d.ts +0 -154
- package/packages/agent-team/lib/types/context-management.d.ts.map +0 -1
- package/packages/client-agent-team/lib/types/client/task-refs.d.ts +0 -31
- package/packages/client-agent-team/lib/types/client/task-refs.d.ts.map +0 -1
- package/packages/client-agent-team/lib/types/client/task-refs.js +0 -99
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import agentTeamRemote from '@wowyuarm/dsh-agent-team/remote';
|
|
2
|
+
import { HumanSettingsSection } from "./HumanSettingsSection.js";
|
|
3
|
+
import { HUMAN_PROFILE_NAMESPACE, TeamHumanIdentity } from "./human-identity.js";
|
|
4
|
+
import { bytesToBase64 } from "./attachment-preview.js";
|
|
2
5
|
import { TeamNavigation } from "./navigation.js";
|
|
3
6
|
import { TeamChangeStream, TeamReadStream } from "./team-changes.js";
|
|
4
7
|
import { TeamDraftStore } from "./drafts.js";
|
|
@@ -10,28 +13,9 @@ import { en, zh } from "./locales.js";
|
|
|
10
13
|
export { TeamNavigation } from "./navigation.js";
|
|
11
14
|
const NS = 'team';
|
|
12
15
|
export const inject = [
|
|
13
|
-
'slots', 'workspaces', 'locale', 'remote', 'remote.session', 'sessions', 'connection', 'conversation',
|
|
16
|
+
'slots', 'workspaces', 'locale', 'remote', 'remote.session', 'sessions', 'connection', 'conversation',
|
|
14
17
|
];
|
|
15
|
-
|
|
16
|
-
* 0.1.7 moved the conversation selection into the workspace service: the
|
|
17
|
-
* rendered session is the one holding its `mainView` reference (the shipped
|
|
18
|
-
* consumers read the same projection), so the Team client reads the selection
|
|
19
|
-
* through retention instead of a service-owned `current`.
|
|
20
|
-
*/
|
|
21
|
-
function currentMainSessionId(ctx) {
|
|
22
|
-
const sessions = ctx.sessions;
|
|
23
|
-
return Object.values(sessions.list.getSnapshot().byId)
|
|
24
|
-
.find(session => (session.retainedBy.mainView ?? 0) > 0)?.id;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Session ids this client opened as Member views, per client instance. The
|
|
28
|
-
* 0.1.7 workspace service exposes no clear, so a dead return target leaves
|
|
29
|
-
* the departed Member selection in place; excluding Member sessions from the
|
|
30
|
-
* next capture keeps that stale selection from becoming a false return
|
|
31
|
-
* target.
|
|
32
|
-
*/
|
|
33
|
-
const openedMemberSessions = new WeakMap();
|
|
34
|
-
function registerModeShadow(ctx, navigation, changes, reads, drafts, name, component, extraInject,
|
|
18
|
+
function registerModeShadow(ctx, navigation, changes, reads, drafts, humanIdentity, name, component, extraInject,
|
|
35
19
|
// Keyed seats (`main`) address one panel by key; the reserved 'conversation'
|
|
36
20
|
// key is where the shipped Conversation registers, so the Team seat shadows
|
|
37
21
|
// that same panel instead of adding a second one.
|
|
@@ -40,16 +24,14 @@ entryKey) {
|
|
|
40
24
|
// views (see registerModeShadow), so the shipped conversation root renders
|
|
41
25
|
// the selected Member Session inside the Team shell.
|
|
42
26
|
const openMemberSessionImpl = (sessionId) => {
|
|
27
|
+
const sessions = ctx.sessions;
|
|
43
28
|
const snapshot = navigation.getSnapshot();
|
|
44
|
-
const current =
|
|
29
|
+
const current = sessions.list.getSnapshot().current;
|
|
45
30
|
// The return target is captured on first entry only — switching between
|
|
46
31
|
// Member Sessions must keep pointing at the Human's original session.
|
|
47
|
-
const
|
|
48
|
-
openedMemberSessions.set(ctx, memberSessions);
|
|
49
|
-
memberSessions.add(sessionId);
|
|
50
|
-
const returnTo = snapshot.memberSessionId === undefined && current !== undefined && current !== sessionId && !memberSessions.has(current) ? current : undefined;
|
|
32
|
+
const returnTo = snapshot.memberSessionId === undefined && current !== undefined && current !== sessionId ? current : undefined;
|
|
51
33
|
navigation.actions().enterMemberSession(sessionId, returnTo);
|
|
52
|
-
|
|
34
|
+
sessions.open(sessionId);
|
|
53
35
|
};
|
|
54
36
|
// Remote bindings shared by every Team slot; surface-specific entries extend it below.
|
|
55
37
|
const sharedRemotes = {
|
|
@@ -58,6 +40,7 @@ entryKey) {
|
|
|
58
40
|
subscribeReads: (listener) => reads.subscribe(listener),
|
|
59
41
|
subscribeChanges: (scope, listener) => changes.subscribe(scope, listener),
|
|
60
42
|
drafts,
|
|
43
|
+
humanIdentity,
|
|
61
44
|
loadMembers: (request) => ctx.remote.agentTeam.members(request),
|
|
62
45
|
joinChannel: (request) => ctx.remote.agentTeam.joinChannel(request),
|
|
63
46
|
removeChannelMember: (request) => ctx.remote.agentTeam.removeChannelMember(request),
|
|
@@ -111,6 +94,7 @@ entryKey) {
|
|
|
111
94
|
changeTask: (request) => ctx.remote.agentTeam.changeTask(request),
|
|
112
95
|
promoteThread: (request) => ctx.remote.agentTeam.promoteThread(request),
|
|
113
96
|
resolveTaskRefs: (request) => ctx.remote.agentTeam.resolveTaskRefs(request),
|
|
97
|
+
resolveThreadRefs: (request) => ctx.remote.agentTeam.resolveThreadRefs(request),
|
|
114
98
|
} : {}),
|
|
115
99
|
...(name === 'sidebar.workspaces' ? {
|
|
116
100
|
addMember: (request) => ctx.remote.agentTeam.addMember(request),
|
|
@@ -139,20 +123,44 @@ function applyUi(ctx) {
|
|
|
139
123
|
const disposeNavigation = ctx.reflect.provide('teamNavigation', navigation);
|
|
140
124
|
const drafts = new TeamDraftStore();
|
|
141
125
|
const disposeDrafts = ctx.reflect.provide('teamDrafts', drafts);
|
|
126
|
+
// The Human's own identity: one projection every seat reads, refreshed once
|
|
127
|
+
// after a profile write so a rename reaches the timeline and the member refs
|
|
128
|
+
// without a reload. Reads are demand-driven — the first seat that subscribes
|
|
129
|
+
// starts the read.
|
|
130
|
+
// The profile page writes through the settings transport. It arrives from the
|
|
131
|
+
// settings plugin, and Cordis refuses a `remote.<namespace>` read that was
|
|
132
|
+
// never injected, so the binding is an optional injection rather than either
|
|
133
|
+
// a hard activation dependency (a settings-less host would lose Team mode
|
|
134
|
+
// entirely) or an undeclared read (which throws at the first write).
|
|
135
|
+
let settingsTransport;
|
|
136
|
+
ctx.inject(['remote.settings'], (scope) => {
|
|
137
|
+
settingsTransport = scope.remote.settings;
|
|
138
|
+
});
|
|
139
|
+
const humanIdentity = new TeamHumanIdentity({
|
|
140
|
+
loadProfile: () => ctx.remote.agentTeam.humanProfile({}),
|
|
141
|
+
loadAvatarUrl: async (avatarRef) => {
|
|
142
|
+
// Avatar bytes ride the dedicated avatar Remote (never the TTL-bound
|
|
143
|
+
// attachment cache); a data URL is what an `<img>` seat can show directly.
|
|
144
|
+
const result = await ctx.remote.agentTeam.getHumanAvatar({ avatarRef });
|
|
145
|
+
if (!result.ok || !result.value.mediaType.startsWith('image/'))
|
|
146
|
+
return null;
|
|
147
|
+
return `data:${result.value.mediaType};base64,${result.value.bytesBase64}`;
|
|
148
|
+
},
|
|
149
|
+
});
|
|
142
150
|
ctx.effect(() => () => {
|
|
143
151
|
navigation.dispose();
|
|
144
152
|
drafts.dispose();
|
|
153
|
+
humanIdentity.dispose();
|
|
145
154
|
void disposeNavigation();
|
|
146
155
|
void disposeDrafts();
|
|
147
156
|
}, 'agent-team: navigation service');
|
|
148
157
|
// The one restore owner: leaving an embedded Member Session view must
|
|
149
|
-
// rebind the underlying
|
|
150
|
-
//
|
|
151
|
-
//
|
|
152
|
-
// still IS the departed Member session — so a selection someone
|
|
153
|
-
// in the meantime survives. A dead return target
|
|
154
|
-
//
|
|
155
|
-
// behind the Team seat until the next open.
|
|
158
|
+
// rebind the underlying current session, or the stale Member current later
|
|
159
|
+
// masks to undefined when the Host disposes that session (rollover) and
|
|
160
|
+
// the conversation seat remounts. Takeover is conditional — only when the
|
|
161
|
+
// current still IS the departed Member session — so a selection someone
|
|
162
|
+
// else made in the meantime survives. A dead return target clears instead
|
|
163
|
+
// of opening an unknown id.
|
|
156
164
|
ctx.effect(() => {
|
|
157
165
|
let previous = navigation.getSnapshot();
|
|
158
166
|
const restore = () => {
|
|
@@ -162,10 +170,13 @@ function applyUi(ctx) {
|
|
|
162
170
|
previous = snapshot;
|
|
163
171
|
if (departed === undefined || snapshot.memberSessionId !== undefined)
|
|
164
172
|
return;
|
|
165
|
-
|
|
173
|
+
const sessions = ctx.sessions;
|
|
174
|
+
if (sessions.list.getSnapshot().current !== departed)
|
|
166
175
|
return;
|
|
167
|
-
if (returnTo !== undefined &&
|
|
168
|
-
|
|
176
|
+
if (returnTo !== undefined && sessions.list.getSnapshot().byId[returnTo] !== undefined)
|
|
177
|
+
sessions.open(returnTo);
|
|
178
|
+
else
|
|
179
|
+
sessions.clear();
|
|
169
180
|
};
|
|
170
181
|
const unsubscribe = navigation.subscribe(restore);
|
|
171
182
|
return () => {
|
|
@@ -202,7 +213,7 @@ function applyUi(ctx) {
|
|
|
202
213
|
navigation,
|
|
203
214
|
...navigation.actions(),
|
|
204
215
|
// The footer is the only surface that leaves Team mode; closing the
|
|
205
|
-
// embedded Member Session view rebinds the underlying
|
|
216
|
+
// embedded Member Session view rebinds the underlying current through
|
|
206
217
|
// the same root-scope restore owner, so there is exactly one restore
|
|
207
218
|
// path and no double open.
|
|
208
219
|
leaveTeam: () => {
|
|
@@ -211,9 +222,69 @@ function applyUi(ctx) {
|
|
|
211
222
|
},
|
|
212
223
|
}),
|
|
213
224
|
}, TeamFooterAction));
|
|
214
|
-
registerModeShadow(ctx, navigation, changes, reads, drafts, 'sidebar.workspaces', TeamWorkspaceBrowser);
|
|
215
|
-
registerModeShadow(ctx, navigation, changes, reads, drafts, 'main', TeamConversation, undefined, 'conversation');
|
|
216
|
-
registerModeShadow(ctx, navigation, changes, reads, drafts, 'sidebar.settings', TeamMembersAction, () => ({ loadMemberGroups }));
|
|
225
|
+
registerModeShadow(ctx, navigation, changes, reads, drafts, humanIdentity, 'sidebar.workspaces', TeamWorkspaceBrowser);
|
|
226
|
+
registerModeShadow(ctx, navigation, changes, reads, drafts, humanIdentity, 'main', TeamConversation, undefined, 'conversation');
|
|
227
|
+
registerModeShadow(ctx, navigation, changes, reads, drafts, humanIdentity, 'sidebar.settings', TeamMembersAction, () => ({ loadMemberGroups }));
|
|
228
|
+
// The Human profile page: one settings section over the `agent-team-human`
|
|
229
|
+
// namespace, ordered between General (0) and Models (10) so identity sits
|
|
230
|
+
// near the top. Writes go through the settings controller, which answers
|
|
231
|
+
// with the Host's own rejection reason (a name collides, an empty one), and
|
|
232
|
+
// the shared identity re-reads afterwards, so a rename lands in the timeline
|
|
233
|
+
// and the member refs at the same moment the page shows it.
|
|
234
|
+
ctx.slots.inject('settings.section', () => ctx.slots.register({
|
|
235
|
+
name: 'settings.section',
|
|
236
|
+
id: 'team-human',
|
|
237
|
+
order: 5,
|
|
238
|
+
label: () => ctx.locale.bind(NS)('humanSettingsNav'),
|
|
239
|
+
locale: NS,
|
|
240
|
+
inject: () => ({
|
|
241
|
+
identity: humanIdentity,
|
|
242
|
+
saveName: async (name) => {
|
|
243
|
+
const settings = settingsTransport;
|
|
244
|
+
if (settings === undefined)
|
|
245
|
+
return 'the settings service is unavailable';
|
|
246
|
+
const saved = await settings.update(HUMAN_PROFILE_NAMESPACE, { name }, undefined);
|
|
247
|
+
if (!saved.ok)
|
|
248
|
+
return saved.error.message;
|
|
249
|
+
await humanIdentity.refresh();
|
|
250
|
+
return undefined;
|
|
251
|
+
},
|
|
252
|
+
uploadAvatar: async (file) => {
|
|
253
|
+
const put = await ctx.remote.agentTeam.putHumanAvatar({
|
|
254
|
+
name: file.name,
|
|
255
|
+
...(file.type === '' ? {} : { mediaType: file.type }),
|
|
256
|
+
bytesBase64: bytesToBase64(new Uint8Array(await file.arrayBuffer())),
|
|
257
|
+
});
|
|
258
|
+
if (!put.ok)
|
|
259
|
+
return put.error.message;
|
|
260
|
+
const settings = settingsTransport;
|
|
261
|
+
if (settings === undefined)
|
|
262
|
+
return 'the settings service is unavailable';
|
|
263
|
+
const saved = await settings.update(HUMAN_PROFILE_NAMESPACE, { avatarRef: put.value.avatarRef }, undefined);
|
|
264
|
+
if (!saved.ok)
|
|
265
|
+
return saved.error.message;
|
|
266
|
+
await humanIdentity.refresh();
|
|
267
|
+
return undefined;
|
|
268
|
+
},
|
|
269
|
+
removeAvatar: async () => {
|
|
270
|
+
const { avatarRef } = humanIdentity.getSnapshot();
|
|
271
|
+
if (avatarRef === undefined)
|
|
272
|
+
return undefined;
|
|
273
|
+
const settings = settingsTransport;
|
|
274
|
+
if (settings === undefined)
|
|
275
|
+
return 'the settings service is unavailable';
|
|
276
|
+
// Bytes first, then the reference: a failed clear leaves a readable
|
|
277
|
+
// avatar instead of a reference to bytes nobody can load. Clearing one
|
|
278
|
+
// field is a path op — a merge patch cannot express removal.
|
|
279
|
+
await ctx.remote.agentTeam.removeHumanAvatar({ avatarRef });
|
|
280
|
+
const cleared = await settings.mutate(HUMAN_PROFILE_NAMESPACE, [{ op: 'unset', path: ['avatarRef'] }], undefined);
|
|
281
|
+
if (!cleared.ok)
|
|
282
|
+
return cleared.error.message;
|
|
283
|
+
await humanIdentity.refresh();
|
|
284
|
+
return undefined;
|
|
285
|
+
},
|
|
286
|
+
}),
|
|
287
|
+
}, HumanSettingsSection));
|
|
217
288
|
}
|
|
218
289
|
export async function apply(ctx) {
|
|
219
290
|
const disposeRemote = await ctx.remote.$mount(agentTeamRemote);
|
|
@@ -111,6 +111,28 @@ export declare const zh: {
|
|
|
111
111
|
readonly timelineLabel: "消息时间线";
|
|
112
112
|
readonly taskClosedNotice: "任务已关闭,重新打开后可继续讨论";
|
|
113
113
|
readonly human: "Human";
|
|
114
|
+
readonly humanSettingsNav: "我的资料";
|
|
115
|
+
readonly humanSettingsTitle: "我的资料";
|
|
116
|
+
readonly humanSettingsIntro: "这是 Agent Team 的资料页:名字用在 Team 的消息与成员列表里,头像出现在你发出的消息旁。";
|
|
117
|
+
readonly humanSettingsName: "名字";
|
|
118
|
+
readonly humanSettingsNameHint: "Agents 用这个名字 @ 到你;改名只对之后的消息生效。";
|
|
119
|
+
readonly humanSettingsNameEmpty: "名字不能为空。";
|
|
120
|
+
readonly humanSettingsNameFailed: "名字没保存上:{message}";
|
|
121
|
+
readonly humanSettingsAvatar: "头像";
|
|
122
|
+
readonly humanSettingsAvatarHint: "只收图片,最大 10MB;移除或损坏时回退为默认头像。";
|
|
123
|
+
readonly humanSettingsSave: "保存";
|
|
124
|
+
readonly humanSettingsSaving: "正在保存…";
|
|
125
|
+
readonly humanSettingsUpload: "上传头像";
|
|
126
|
+
readonly humanSettingsUploading: "正在上传…";
|
|
127
|
+
readonly humanSettingsReplace: "更换头像";
|
|
128
|
+
readonly humanSettingsRemoveAvatar: "移除头像";
|
|
129
|
+
readonly humanSettingsAvatarNotImage: "只收图片文件。";
|
|
130
|
+
readonly humanSettingsAvatarTooLarge: "图片不能超过 10MB。";
|
|
131
|
+
readonly humanSettingsAvatarFailed: "头像没能保存:{message}";
|
|
132
|
+
readonly humanSettingsLoading: "正在载入资料…";
|
|
133
|
+
readonly humanSettingsUnavailable: "资料读不出来:{message}";
|
|
134
|
+
readonly humanSettingsVersion: "版本 {version}";
|
|
135
|
+
readonly humanSettingsUpdateAvailable: "有新版本 {version},去查看发布说明";
|
|
114
136
|
readonly taskStatusTodo: "待处理";
|
|
115
137
|
readonly taskStatusInProgress: "进行中";
|
|
116
138
|
readonly taskStatusInReview: "待验收";
|
|
@@ -123,6 +145,8 @@ export declare const zh: {
|
|
|
123
145
|
readonly openTaskUnread: "打开 Task #{number}({count} 条新动态)";
|
|
124
146
|
readonly openThreadUnread: "打开讨论({count} 条新动态)";
|
|
125
147
|
readonly threadLabel: "讨论";
|
|
148
|
+
readonly channelLabel: "频道 · {name}";
|
|
149
|
+
readonly memberLabel: "成员 · @{name}";
|
|
126
150
|
readonly recentActivity: "最近活动 {time}";
|
|
127
151
|
readonly replyAction: "回复";
|
|
128
152
|
readonly claimers: "由 {names} 处理";
|
|
@@ -147,7 +171,18 @@ export declare const zh: {
|
|
|
147
171
|
readonly autoReadIncomplete: "仍有未读更新未能自动读取";
|
|
148
172
|
readonly olderHistory: "更早历史";
|
|
149
173
|
readonly runtimeRisk: "当前运行风险";
|
|
150
|
-
readonly
|
|
174
|
+
readonly riskClassSessionRefused: "会话被拒绝";
|
|
175
|
+
readonly riskClassSessionUnreadable: "会话不可读";
|
|
176
|
+
readonly riskClassPresetComposition: "预设装配失败";
|
|
177
|
+
readonly riskClassRollover: "上下文交接中";
|
|
178
|
+
readonly riskClassRuntime: "运行时故障";
|
|
179
|
+
readonly riskClassActivation: "激活失败";
|
|
180
|
+
readonly riskSessionRefused: "{member} 当前不可用";
|
|
181
|
+
readonly riskSessionUnreadable: "{member} 的会话无法读取";
|
|
182
|
+
readonly riskPresetComposition: "{member} 的预设无法装配";
|
|
183
|
+
readonly riskRollover: "{member} 正在交接上下文";
|
|
184
|
+
readonly riskRuntime: "{member} 遇到运行时故障";
|
|
185
|
+
readonly riskActivation: "{member} 激活失败";
|
|
151
186
|
readonly acceptTask: "验收";
|
|
152
187
|
readonly closeTask: "关闭任务";
|
|
153
188
|
readonly reopenTask: "重新打开";
|
|
@@ -288,6 +323,28 @@ export declare const en: {
|
|
|
288
323
|
readonly timelineLabel: "Message timeline";
|
|
289
324
|
readonly taskClosedNotice: "This task is closed; reopen it to continue the discussion";
|
|
290
325
|
readonly human: "Human";
|
|
326
|
+
readonly humanSettingsNav: "Profile";
|
|
327
|
+
readonly humanSettingsTitle: "Profile";
|
|
328
|
+
readonly humanSettingsIntro: "This is your Agent Team profile: the name applies to Team messages and member lists, and the avatar appears beside your messages.";
|
|
329
|
+
readonly humanSettingsName: "Name";
|
|
330
|
+
readonly humanSettingsNameHint: "Agents @ you by this name; a rename applies to later messages only.";
|
|
331
|
+
readonly humanSettingsNameEmpty: "A name is required.";
|
|
332
|
+
readonly humanSettingsNameFailed: "The name was not saved: {message}";
|
|
333
|
+
readonly humanSettingsAvatar: "Avatar";
|
|
334
|
+
readonly humanSettingsAvatarHint: "Images only, up to 10MB; removing it — or unreadable bytes — falls back to the default avatar.";
|
|
335
|
+
readonly humanSettingsSave: "Save";
|
|
336
|
+
readonly humanSettingsSaving: "Saving…";
|
|
337
|
+
readonly humanSettingsUpload: "Upload avatar";
|
|
338
|
+
readonly humanSettingsUploading: "Uploading…";
|
|
339
|
+
readonly humanSettingsReplace: "Replace avatar";
|
|
340
|
+
readonly humanSettingsRemoveAvatar: "Remove avatar";
|
|
341
|
+
readonly humanSettingsAvatarNotImage: "Images only.";
|
|
342
|
+
readonly humanSettingsAvatarTooLarge: "The image must be 10MB or smaller.";
|
|
343
|
+
readonly humanSettingsAvatarFailed: "The avatar was not saved: {message}";
|
|
344
|
+
readonly humanSettingsLoading: "Loading profile…";
|
|
345
|
+
readonly humanSettingsUnavailable: "The profile could not be read: {message}";
|
|
346
|
+
readonly humanSettingsVersion: "Version {version}";
|
|
347
|
+
readonly humanSettingsUpdateAvailable: "New version {version} available — see the release notes";
|
|
291
348
|
readonly taskStatusTodo: "To do";
|
|
292
349
|
readonly taskStatusInProgress: "In progress";
|
|
293
350
|
readonly taskStatusInReview: "In review";
|
|
@@ -300,6 +357,8 @@ export declare const en: {
|
|
|
300
357
|
readonly openTaskUnread: "Open Task #{number} ({count} new updates)";
|
|
301
358
|
readonly openThreadUnread: "Open thread ({count} new updates)";
|
|
302
359
|
readonly threadLabel: "Thread";
|
|
360
|
+
readonly channelLabel: "Channel · {name}";
|
|
361
|
+
readonly memberLabel: "Member · @{name}";
|
|
303
362
|
readonly recentActivity: "Last activity {time}";
|
|
304
363
|
readonly replyAction: "Reply";
|
|
305
364
|
readonly claimers: "Handled by {names}";
|
|
@@ -324,7 +383,18 @@ export declare const en: {
|
|
|
324
383
|
readonly autoReadIncomplete: "Some unread updates could not be read automatically";
|
|
325
384
|
readonly olderHistory: "Older history";
|
|
326
385
|
readonly runtimeRisk: "Current runtime risk";
|
|
327
|
-
readonly
|
|
386
|
+
readonly riskClassSessionRefused: "Session refused";
|
|
387
|
+
readonly riskClassSessionUnreadable: "Session unreadable";
|
|
388
|
+
readonly riskClassPresetComposition: "Preset composition failed";
|
|
389
|
+
readonly riskClassRollover: "Context rollover";
|
|
390
|
+
readonly riskClassRuntime: "Runtime failure";
|
|
391
|
+
readonly riskClassActivation: "Activation failed";
|
|
392
|
+
readonly riskSessionRefused: "{member} is unavailable";
|
|
393
|
+
readonly riskSessionUnreadable: "{member} has an unreadable Session";
|
|
394
|
+
readonly riskPresetComposition: "{member} has an uncomposable preset";
|
|
395
|
+
readonly riskRollover: "{member} is rolling over its context";
|
|
396
|
+
readonly riskRuntime: "{member} hit a runtime failure";
|
|
397
|
+
readonly riskActivation: "{member} failed to activate";
|
|
328
398
|
readonly acceptTask: "Accept";
|
|
329
399
|
readonly closeTask: "Close task";
|
|
330
400
|
readonly reopenTask: "Reopen";
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuNL,CAAA;AAEV,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqNL,CAAA;AAEV,MAAM,MAAM,OAAO,GAAG,MAAM,OAAO,EAAE,CAAA"}
|
|
@@ -111,6 +111,28 @@ export const zh = {
|
|
|
111
111
|
timelineLabel: '消息时间线',
|
|
112
112
|
taskClosedNotice: '任务已关闭,重新打开后可继续讨论',
|
|
113
113
|
human: 'Human',
|
|
114
|
+
humanSettingsNav: '我的资料',
|
|
115
|
+
humanSettingsTitle: '我的资料',
|
|
116
|
+
humanSettingsIntro: '这是 Agent Team 的资料页:名字用在 Team 的消息与成员列表里,头像出现在你发出的消息旁。',
|
|
117
|
+
humanSettingsName: '名字',
|
|
118
|
+
humanSettingsNameHint: 'Agents 用这个名字 @ 到你;改名只对之后的消息生效。',
|
|
119
|
+
humanSettingsNameEmpty: '名字不能为空。',
|
|
120
|
+
humanSettingsNameFailed: '名字没保存上:{message}',
|
|
121
|
+
humanSettingsAvatar: '头像',
|
|
122
|
+
humanSettingsAvatarHint: '只收图片,最大 10MB;移除或损坏时回退为默认头像。',
|
|
123
|
+
humanSettingsSave: '保存',
|
|
124
|
+
humanSettingsSaving: '正在保存…',
|
|
125
|
+
humanSettingsUpload: '上传头像',
|
|
126
|
+
humanSettingsUploading: '正在上传…',
|
|
127
|
+
humanSettingsReplace: '更换头像',
|
|
128
|
+
humanSettingsRemoveAvatar: '移除头像',
|
|
129
|
+
humanSettingsAvatarNotImage: '只收图片文件。',
|
|
130
|
+
humanSettingsAvatarTooLarge: '图片不能超过 10MB。',
|
|
131
|
+
humanSettingsAvatarFailed: '头像没能保存:{message}',
|
|
132
|
+
humanSettingsLoading: '正在载入资料…',
|
|
133
|
+
humanSettingsUnavailable: '资料读不出来:{message}',
|
|
134
|
+
humanSettingsVersion: '版本 {version}',
|
|
135
|
+
humanSettingsUpdateAvailable: '有新版本 {version},去查看发布说明',
|
|
114
136
|
taskStatusTodo: '待处理',
|
|
115
137
|
taskStatusInProgress: '进行中',
|
|
116
138
|
taskStatusInReview: '待验收',
|
|
@@ -123,6 +145,8 @@ export const zh = {
|
|
|
123
145
|
openTaskUnread: '打开 Task #{number}({count} 条新动态)',
|
|
124
146
|
openThreadUnread: '打开讨论({count} 条新动态)',
|
|
125
147
|
threadLabel: '讨论',
|
|
148
|
+
channelLabel: '频道 · {name}',
|
|
149
|
+
memberLabel: '成员 · @{name}',
|
|
126
150
|
recentActivity: '最近活动 {time}',
|
|
127
151
|
replyAction: '回复',
|
|
128
152
|
claimers: '由 {names} 处理',
|
|
@@ -147,7 +171,22 @@ export const zh = {
|
|
|
147
171
|
autoReadIncomplete: '仍有未读更新未能自动读取',
|
|
148
172
|
olderHistory: '更早历史',
|
|
149
173
|
runtimeRisk: '当前运行风险',
|
|
150
|
-
|
|
174
|
+
// The diagnostic's structured class is the localizable axis: it names what
|
|
175
|
+
// kind of problem this is, while the Host detail stays English and moves to
|
|
176
|
+
// the row's title. One label names the class, one sentence states it of the
|
|
177
|
+
// Member.
|
|
178
|
+
riskClassSessionRefused: '会话被拒绝',
|
|
179
|
+
riskClassSessionUnreadable: '会话不可读',
|
|
180
|
+
riskClassPresetComposition: '预设装配失败',
|
|
181
|
+
riskClassRollover: '上下文交接中',
|
|
182
|
+
riskClassRuntime: '运行时故障',
|
|
183
|
+
riskClassActivation: '激活失败',
|
|
184
|
+
riskSessionRefused: '{member} 当前不可用',
|
|
185
|
+
riskSessionUnreadable: '{member} 的会话无法读取',
|
|
186
|
+
riskPresetComposition: '{member} 的预设无法装配',
|
|
187
|
+
riskRollover: '{member} 正在交接上下文',
|
|
188
|
+
riskRuntime: '{member} 遇到运行时故障',
|
|
189
|
+
riskActivation: '{member} 激活失败',
|
|
151
190
|
acceptTask: '验收',
|
|
152
191
|
closeTask: '关闭任务',
|
|
153
192
|
reopenTask: '重新打开',
|
|
@@ -288,6 +327,28 @@ export const en = {
|
|
|
288
327
|
timelineLabel: 'Message timeline',
|
|
289
328
|
taskClosedNotice: 'This task is closed; reopen it to continue the discussion',
|
|
290
329
|
human: 'Human',
|
|
330
|
+
humanSettingsNav: 'Profile',
|
|
331
|
+
humanSettingsTitle: 'Profile',
|
|
332
|
+
humanSettingsIntro: 'This is your Agent Team profile: the name applies to Team messages and member lists, and the avatar appears beside your messages.',
|
|
333
|
+
humanSettingsName: 'Name',
|
|
334
|
+
humanSettingsNameHint: 'Agents @ you by this name; a rename applies to later messages only.',
|
|
335
|
+
humanSettingsNameEmpty: 'A name is required.',
|
|
336
|
+
humanSettingsNameFailed: 'The name was not saved: {message}',
|
|
337
|
+
humanSettingsAvatar: 'Avatar',
|
|
338
|
+
humanSettingsAvatarHint: 'Images only, up to 10MB; removing it — or unreadable bytes — falls back to the default avatar.',
|
|
339
|
+
humanSettingsSave: 'Save',
|
|
340
|
+
humanSettingsSaving: 'Saving…',
|
|
341
|
+
humanSettingsUpload: 'Upload avatar',
|
|
342
|
+
humanSettingsUploading: 'Uploading…',
|
|
343
|
+
humanSettingsReplace: 'Replace avatar',
|
|
344
|
+
humanSettingsRemoveAvatar: 'Remove avatar',
|
|
345
|
+
humanSettingsAvatarNotImage: 'Images only.',
|
|
346
|
+
humanSettingsAvatarTooLarge: 'The image must be 10MB or smaller.',
|
|
347
|
+
humanSettingsAvatarFailed: 'The avatar was not saved: {message}',
|
|
348
|
+
humanSettingsLoading: 'Loading profile…',
|
|
349
|
+
humanSettingsUnavailable: 'The profile could not be read: {message}',
|
|
350
|
+
humanSettingsVersion: 'Version {version}',
|
|
351
|
+
humanSettingsUpdateAvailable: 'New version {version} available — see the release notes',
|
|
291
352
|
taskStatusTodo: 'To do',
|
|
292
353
|
taskStatusInProgress: 'In progress',
|
|
293
354
|
taskStatusInReview: 'In review',
|
|
@@ -300,6 +361,8 @@ export const en = {
|
|
|
300
361
|
openTaskUnread: 'Open Task #{number} ({count} new updates)',
|
|
301
362
|
openThreadUnread: 'Open thread ({count} new updates)',
|
|
302
363
|
threadLabel: 'Thread',
|
|
364
|
+
channelLabel: 'Channel · {name}',
|
|
365
|
+
memberLabel: 'Member · @{name}',
|
|
303
366
|
recentActivity: 'Last activity {time}',
|
|
304
367
|
replyAction: 'Reply',
|
|
305
368
|
claimers: 'Handled by {names}',
|
|
@@ -324,7 +387,20 @@ export const en = {
|
|
|
324
387
|
autoReadIncomplete: 'Some unread updates could not be read automatically',
|
|
325
388
|
olderHistory: 'Older history',
|
|
326
389
|
runtimeRisk: 'Current runtime risk',
|
|
327
|
-
|
|
390
|
+
// See the zh block: the structured class names the kind of problem, the
|
|
391
|
+
// sentence states it of the Member, and the Host detail rides the title.
|
|
392
|
+
riskClassSessionRefused: 'Session refused',
|
|
393
|
+
riskClassSessionUnreadable: 'Session unreadable',
|
|
394
|
+
riskClassPresetComposition: 'Preset composition failed',
|
|
395
|
+
riskClassRollover: 'Context rollover',
|
|
396
|
+
riskClassRuntime: 'Runtime failure',
|
|
397
|
+
riskClassActivation: 'Activation failed',
|
|
398
|
+
riskSessionRefused: '{member} is unavailable',
|
|
399
|
+
riskSessionUnreadable: '{member} has an unreadable Session',
|
|
400
|
+
riskPresetComposition: '{member} has an uncomposable preset',
|
|
401
|
+
riskRollover: '{member} is rolling over its context',
|
|
402
|
+
riskRuntime: '{member} hit a runtime failure',
|
|
403
|
+
riskActivation: '{member} failed to activate',
|
|
328
404
|
acceptTask: 'Accept',
|
|
329
405
|
closeTask: 'Close task',
|
|
330
406
|
reopenTask: 'Reopen',
|
|
@@ -4,7 +4,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
4
4
|
// without closing the list so several entries can be picked in one pass; the
|
|
5
5
|
// capped card scrolls internally through long catalogs.
|
|
6
6
|
import { useState } from 'react';
|
|
7
|
-
import {
|
|
7
|
+
import { IconChevronDownOutline14, Menu } from '@deepseek-ai/dsh-client-ui-primitives';
|
|
8
8
|
import createCss from './create.module.css';
|
|
9
9
|
import css from './sidebar.module.css';
|
|
10
10
|
/**
|
|
@@ -26,5 +26,5 @@ export function MultiMenuField({ label, options, selected, onToggle, disabled =
|
|
|
26
26
|
...(option.disabled === true ? { disabled: true } : {}),
|
|
27
27
|
...(option.icon === undefined ? {} : { icon: option.icon }),
|
|
28
28
|
}));
|
|
29
|
-
return (_jsxs("div", { className: createCss.field, children: [_jsx("span", { children: label }), options.length === 0 && emptyText !== undefined ? _jsx("small", { className: css.editHint, children: emptyText }) : (_jsx(Menu, { open: open, portal: true, className: createCss.menuCap, items: items, selectedIds: selected, onSelect: id => { onToggle(id); }, onClose: () => { setOpen(false); }, anchor: _jsxs("button", { type: "button", className: createCss.selectTrigger, "aria-label": label, "aria-haspopup": "menu", "aria-expanded": open, disabled: disabled, onClick: () => { setOpen(value => !value); }, children: [_jsx("span", { className: createCss.selectValue, children: selected.length === 0 ? triggerEmptyLabel : formatCount(selected.length) }), _jsx("span", { className: `${createCss.chevron} ${open ? createCss.chevronOpen : ''}`, "aria-hidden": true, children: _jsx(
|
|
29
|
+
return (_jsxs("div", { className: createCss.field, children: [_jsx("span", { children: label }), options.length === 0 && emptyText !== undefined ? _jsx("small", { className: css.editHint, children: emptyText }) : (_jsx(Menu, { open: open, portal: true, className: createCss.menuCap, items: items, selectedIds: selected, onSelect: id => { onToggle(id); }, onClose: () => { setOpen(false); }, anchor: _jsxs("button", { type: "button", className: createCss.selectTrigger, "aria-label": label, "aria-haspopup": "menu", "aria-expanded": open, disabled: disabled, onClick: () => { setOpen(value => !value); }, children: [_jsx("span", { className: createCss.selectValue, children: selected.length === 0 ? triggerEmptyLabel : formatCount(selected.length) }), _jsx("span", { className: `${createCss.chevron} ${open ? createCss.chevronOpen : ''}`, "aria-hidden": true, children: _jsx(IconChevronDownOutline14, {}) })] }) }))] }));
|
|
30
30
|
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { SessionId } from '@deepseek-ai/dsh-session';
|
|
2
|
+
import type { RemoteResult } from '@deepseek-ai/dsh-typert-protocol';
|
|
3
|
+
import type { AgentTeamChannel, AgentTeamChannelRef, AgentTeamClientMemberStatus, AgentTeamMemberId, AgentTeamResolveTaskRefsRequest, AgentTeamResolveTaskRefsResult, AgentTeamResolveThreadRefsRequest, AgentTeamResolveThreadRefsResult, AgentTeamTaskRef, AgentTeamThreadRef } from '@wowyuarm/dsh-agent-team/types';
|
|
4
|
+
/** Navigation facts for one branded Task ref, resolved once per session. */
|
|
5
|
+
export interface ResolvedTaskRef {
|
|
6
|
+
readonly taskRef: AgentTeamTaskRef;
|
|
7
|
+
readonly channelRef: AgentTeamChannelRef;
|
|
8
|
+
readonly threadRef: AgentTeamThreadRef;
|
|
9
|
+
readonly taskNumber: number;
|
|
10
|
+
}
|
|
11
|
+
/** Navigation facts for one branded Thread ref, resolved once per session. */
|
|
12
|
+
export interface ResolvedThreadRef {
|
|
13
|
+
readonly threadRef: AgentTeamThreadRef;
|
|
14
|
+
readonly channelRef: AgentTeamChannelRef;
|
|
15
|
+
readonly taskRef?: AgentTeamTaskRef;
|
|
16
|
+
readonly taskNumber?: number;
|
|
17
|
+
/** Opening-line gist distinguishing one Thread chip from another. */
|
|
18
|
+
readonly title: string;
|
|
19
|
+
}
|
|
20
|
+
/** One roster-resolved Member behind a `member:` chip. */
|
|
21
|
+
export interface ResolvedMemberRef {
|
|
22
|
+
readonly memberId: AgentTeamMemberId;
|
|
23
|
+
/** Bare handle without the `@`; the chip renders it. */
|
|
24
|
+
readonly handle: string;
|
|
25
|
+
/** Present for agent Members; absent for the Human (no session to open). */
|
|
26
|
+
readonly sessionId?: SessionId;
|
|
27
|
+
/** Only active agent Members open a session — mirrors the agent card rule. */
|
|
28
|
+
readonly openable: boolean;
|
|
29
|
+
}
|
|
30
|
+
/** Compare refs by branded prefix plus hyphen-stripped UUID, so abbreviated spellings line up with their full form. */
|
|
31
|
+
export declare function refKeyOf(ref: string): string;
|
|
32
|
+
/** React binding: re-renders the caller when any Task ref resolution lands. */
|
|
33
|
+
export declare const useResolvedTaskRefVersion: () => number;
|
|
34
|
+
export declare const cachedResolvedTaskRef: (ref: AgentTeamTaskRef) => ResolvedTaskRef | undefined;
|
|
35
|
+
/** Store one Task resolution (click path) and wake every rendered link. */
|
|
36
|
+
export declare const rememberResolvedTaskRef: (entry: ResolvedTaskRef) => void;
|
|
37
|
+
export declare const resolveUnknownTaskRefs: (refs: readonly AgentTeamTaskRef[], lookup: (refs: readonly AgentTeamTaskRef[]) => Promise<readonly ResolvedTaskRef[]>) => Promise<void>;
|
|
38
|
+
/** React binding: re-renders the caller when any Thread ref resolution lands. */
|
|
39
|
+
export declare const useResolvedThreadRefVersion: () => number;
|
|
40
|
+
export declare const cachedResolvedThreadRef: (ref: AgentTeamThreadRef) => ResolvedThreadRef | undefined;
|
|
41
|
+
/** Store one Thread resolution (click path) and wake every rendered link. */
|
|
42
|
+
export declare const rememberResolvedThreadRef: (entry: ResolvedThreadRef) => void;
|
|
43
|
+
export declare const resolveUnknownThreadRefs: (refs: readonly AgentTeamThreadRef[], lookup: (refs: readonly AgentTeamThreadRef[]) => Promise<readonly ResolvedThreadRef[]>) => Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* Click-path Task lookup: remember every resolved entry and hand them back
|
|
46
|
+
* for immediate navigation (see hostRefLookup for the ordering contract).
|
|
47
|
+
*/
|
|
48
|
+
export declare const hostTaskRefLookup: (resolveTaskRefs: (request: AgentTeamResolveTaskRefsRequest) => Promise<RemoteResult<AgentTeamResolveTaskRefsResult>>, workspaceId: AgentTeamResolveTaskRefsRequest["workspaceId"]) => ((taskRefs: readonly AgentTeamTaskRef[]) => Promise<readonly ResolvedTaskRef[]>);
|
|
49
|
+
/**
|
|
50
|
+
* Click-path Thread lookup: remember every resolved entry and hand them back
|
|
51
|
+
* for immediate navigation (see hostRefLookup for the ordering contract).
|
|
52
|
+
*/
|
|
53
|
+
export declare const hostThreadRefLookup: (resolveThreadRefs: (request: AgentTeamResolveThreadRefsRequest) => Promise<RemoteResult<AgentTeamResolveThreadRefsResult>>, workspaceId: AgentTeamResolveThreadRefsRequest["workspaceId"]) => ((threadRefs: readonly AgentTeamThreadRef[]) => Promise<readonly ResolvedThreadRef[]>);
|
|
54
|
+
/** Resolve one Task ref through the Host and jump to its home Channel Thread. */
|
|
55
|
+
export declare const jumpToTaskThread: (resolveTaskRefs: (request: AgentTeamResolveTaskRefsRequest) => Promise<RemoteResult<AgentTeamResolveTaskRefsResult>>, workspaceId: AgentTeamResolveTaskRefsRequest["workspaceId"], taskRef: AgentTeamTaskRef, selectThread: (threadRef: AgentTeamThreadRef, channelRef?: AgentTeamChannelRef, taskRef?: AgentTeamTaskRef, taskNumber?: number) => void) => void;
|
|
56
|
+
/** Resolve one Thread ref through the Host and jump to its home Channel Thread. */
|
|
57
|
+
export declare const jumpToThread: (resolveThreadRefs: (request: AgentTeamResolveThreadRefsRequest) => Promise<RemoteResult<AgentTeamResolveThreadRefsResult>>, workspaceId: AgentTeamResolveThreadRefsRequest["workspaceId"], threadRef: AgentTeamThreadRef, selectThread: (threadRef: AgentTeamThreadRef, channelRef?: AgentTeamChannelRef, taskRef?: AgentTeamTaskRef, taskNumber?: number) => void) => void;
|
|
58
|
+
/**
|
|
59
|
+
* Display name for one authored channel ref, or undefined when the loaded
|
|
60
|
+
* roster does not know it — the caller keeps plain text. Archived Channels
|
|
61
|
+
* never resolve: they are gone from every Team surface, so their refs are
|
|
62
|
+
* not links either.
|
|
63
|
+
*/
|
|
64
|
+
export declare const rosterChannelName: (channels: readonly AgentTeamChannel[], channelRef: AgentTeamChannelRef) => string | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Roster facts for one authored member ref, or undefined when nobody on the
|
|
67
|
+
* roster answers to it — the caller keeps plain text. The Human resolves to
|
|
68
|
+
* a handle with no session: informative, never a link.
|
|
69
|
+
*/
|
|
70
|
+
export declare const rosterMember: (members: readonly AgentTeamClientMemberStatus[], humanMemberId: AgentTeamMemberId | undefined, humanHandle: string, memberRef: AgentTeamMemberId) => ResolvedMemberRef | undefined;
|
|
71
|
+
//# sourceMappingURL=refs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refs.d.ts","sourceRoot":"","sources":["../../../src/client/refs.ts"],"names":[],"mappings":"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"}
|