@nanmicoder/dsh-agent-teams 0.1.12 → 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 +43 -7
- package/README_ZH.md +20 -7
- package/lib/client/ActivityPanel.js +219 -50
- package/lib/client/StagingPlanEditor.js +493 -0
- package/lib/client/activity-model.js +71 -0
- package/lib/client/activity-monitor.js +39 -13
- package/lib/client/index.js +2 -2
- package/lib/client/locales.js +224 -2
- package/lib/client.js +1808 -250
- package/lib/client.js.map +1 -1
- package/lib/command.js +116 -99
- package/lib/index.js +286 -14
- package/lib/members.js +137 -16
- package/lib/profiles.js +572 -0
- package/lib/quality-gates.js +777 -0
- package/lib/scheduler.js +215 -18
- package/lib/snapshot.js +25 -1
- package/lib/state.js +116 -10
- package/lib/tools.js +1230 -38
- package/lib/types/client/ActivityPanel.d.ts +3 -1
- package/lib/types/client/StagingPlanEditor.d.ts +17 -0
- package/lib/types/client/activity-model.d.ts +67 -0
- package/lib/types/client/activity-monitor.d.ts +32 -7
- package/lib/types/client/locales.d.ts +222 -0
- package/lib/types/command.d.ts +11 -56
- package/lib/types/event-types.d.ts +35 -1
- package/lib/types/index.d.ts +9 -0
- package/lib/types/members.d.ts +48 -3
- package/lib/types/profiles.d.ts +124 -0
- package/lib/types/quality-gates.d.ts +148 -0
- package/lib/types/scheduler.d.ts +48 -1
- package/lib/types/snapshot.d.ts +18 -1
- package/lib/types/state.d.ts +8 -3
- package/lib/types/tools.d.ts +73 -9
- package/lib/types/types.d.ts +118 -0
- package/lib/types.js +11 -0
- package/package.json +10 -4
- package/release-notes/v0.1.13.md +60 -0
- package/release-notes/v0.1.14.md +68 -0
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
* always-available monitor.
|
|
17
17
|
* @module dsh-agent-teams/client/activity
|
|
18
18
|
*/
|
|
19
|
+
import type { ModelDirectoryResolver } from '@deepseek-ai/dsh-client-ui-model-selection/client';
|
|
19
20
|
import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
|
|
20
21
|
import type { SessionId } from '@deepseek-ai/dsh-session/types';
|
|
21
22
|
import type { ObservableSnapshot, SessionListState } from '@deepseek-ai/dsh-client-runtime/client';
|
|
@@ -24,6 +25,7 @@ import type { ObservableSnapshot, SessionListState } from '@deepseek-ai/dsh-clie
|
|
|
24
25
|
* session is the one currently open. */
|
|
25
26
|
export type ActivityPanelProps = {
|
|
26
27
|
readonly sessionsList: ObservableSnapshot<SessionListState>;
|
|
28
|
+
readonly modelDirectories: ModelDirectoryResolver;
|
|
27
29
|
readonly openMember: (parentId: SessionId, childId: SessionId) => void;
|
|
28
30
|
} & PropsLocale<'agentTeams'>;
|
|
29
|
-
export declare function ActivityPanel({ sessionsList, openMember, t }: ActivityPanelProps): import("react").JSX.Element | null;
|
|
31
|
+
export declare function ActivityPanel({ sessionsList, modelDirectories, openMember, t }: ActivityPanelProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Editable pre-run roster and DAG review for staged AgentTeams plans.
|
|
3
|
+
*
|
|
4
|
+
* This leaf owns only transient form/disclosure state. Durable truth remains
|
|
5
|
+
* on the host and returns through the ordinary activity polling snapshot.
|
|
6
|
+
* @module dsh-agent-teams/client/staging-plan
|
|
7
|
+
*/
|
|
8
|
+
import type { ModelDirectory } from '@deepseek-ai/dsh-client-ui-model-selection/client';
|
|
9
|
+
import type { ActivityTeam } from './activity-monitor.ts';
|
|
10
|
+
import type { AgentTeamsTranslate } from './locales.ts';
|
|
11
|
+
export declare function StagingPlanEditor({ team, modelDirectory, onContinuePlanning, onDiscarded, t }: {
|
|
12
|
+
readonly team: ActivityTeam;
|
|
13
|
+
readonly modelDirectory: ModelDirectory;
|
|
14
|
+
readonly onContinuePlanning: () => void;
|
|
15
|
+
readonly onDiscarded: () => void;
|
|
16
|
+
readonly t: AgentTeamsTranslate;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
@@ -34,6 +34,59 @@ export declare const COMPACT_DAG_NODE_WIDTH = 92;
|
|
|
34
34
|
export declare const COMPACT_DAG_NODE_HEIGHT = 30;
|
|
35
35
|
export declare const COMPACT_DAG_COLUMN_GAP = 26;
|
|
36
36
|
export declare const COMPACT_DAG_ROW_GAP = 8;
|
|
37
|
+
/** Compact `provider/model` route, or just the model when the provider is absent. */
|
|
38
|
+
export declare function memberRouteLabel(member: {
|
|
39
|
+
readonly provider?: string;
|
|
40
|
+
readonly model?: string;
|
|
41
|
+
} | undefined): string;
|
|
42
|
+
/**
|
|
43
|
+
* Compact route shown on a running task. Prefer the task's own snapshot
|
|
44
|
+
* field; fall back to the assignee member when older hosts omit it.
|
|
45
|
+
*/
|
|
46
|
+
export declare function taskModelLabel(task: {
|
|
47
|
+
readonly model?: string;
|
|
48
|
+
readonly assignee: string;
|
|
49
|
+
}, members: readonly {
|
|
50
|
+
readonly name: string;
|
|
51
|
+
readonly provider?: string;
|
|
52
|
+
readonly model?: string;
|
|
53
|
+
}[]): string;
|
|
54
|
+
/** Short model id for tight DAG/chip surfaces (`openai/gpt-5.6-sol` → `gpt-5.6-sol`). */
|
|
55
|
+
export declare function compactModelLabel(route: string): string;
|
|
56
|
+
/** A live team the current captain still owns and has not halted. */
|
|
57
|
+
export declare function liveCaptainTeam<T extends {
|
|
58
|
+
readonly captainSessionId: string;
|
|
59
|
+
readonly halted?: boolean;
|
|
60
|
+
}>(teams: readonly T[], sessionId: string | undefined): T | undefined;
|
|
61
|
+
/** Whether the captain chat should keep showing the in-progress banner. */
|
|
62
|
+
export declare function teamIsActive(team: {
|
|
63
|
+
readonly phase?: string;
|
|
64
|
+
readonly halted?: boolean;
|
|
65
|
+
readonly members: readonly {
|
|
66
|
+
readonly status?: string;
|
|
67
|
+
readonly activity?: string;
|
|
68
|
+
}[];
|
|
69
|
+
readonly tasks: readonly {
|
|
70
|
+
readonly status: string;
|
|
71
|
+
}[];
|
|
72
|
+
}): boolean;
|
|
73
|
+
/** Compact banner copy: running members, otherwise the current planning state. */
|
|
74
|
+
export declare function teamProgressSummary(team: {
|
|
75
|
+
readonly members: readonly {
|
|
76
|
+
readonly name: string;
|
|
77
|
+
readonly status?: string;
|
|
78
|
+
readonly activity?: string;
|
|
79
|
+
readonly currentTask?: string;
|
|
80
|
+
}[];
|
|
81
|
+
readonly tasks: readonly {
|
|
82
|
+
readonly id: string;
|
|
83
|
+
readonly subject: string;
|
|
84
|
+
readonly status: string;
|
|
85
|
+
}[];
|
|
86
|
+
}, separator: string): {
|
|
87
|
+
readonly working: number;
|
|
88
|
+
readonly detail: string;
|
|
89
|
+
};
|
|
37
90
|
/** Use a fill-width grid when the task graph has no real dependency edges. */
|
|
38
91
|
export declare function usesParallelTaskGrid<T extends RelationshipTask>(tasks: readonly T[]): boolean;
|
|
39
92
|
/**
|
|
@@ -45,6 +98,20 @@ export declare function usesParallelTaskGrid<T extends RelationshipTask>(tasks:
|
|
|
45
98
|
* while its local open state is being reset.
|
|
46
99
|
*/
|
|
47
100
|
export declare function activityPanelExpandedForSession(open: boolean, owner: string | undefined, current: string | undefined): boolean;
|
|
101
|
+
/** Inputs for deciding whether genuinely new live work may expand the panel. */
|
|
102
|
+
export interface ActivityPanelAutoExpandInput {
|
|
103
|
+
readonly alreadyAutoOpened: boolean;
|
|
104
|
+
readonly pageSettled: boolean;
|
|
105
|
+
readonly restoreComplete: boolean;
|
|
106
|
+
readonly previousLiveTeamIds: ReadonlySet<string>;
|
|
107
|
+
readonly currentLiveTeamIds: readonly string[];
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Auto-expand only for live teams that appear after the current session's
|
|
111
|
+
* initial restore pass. Replayed cards, archived teams, and live teams restored
|
|
112
|
+
* while reopening a conversation must remain behind the collapsed badge.
|
|
113
|
+
*/
|
|
114
|
+
export declare function activityPanelShouldAutoExpand({ alreadyAutoOpened, pageSettled, restoreComplete, previousLiveTeamIds, currentLiveTeamIds, }: ActivityPanelAutoExpandInput): boolean;
|
|
48
115
|
/**
|
|
49
116
|
* Resolve the task whose dependency chain should be highlighted.
|
|
50
117
|
*
|
|
@@ -4,6 +4,10 @@ export interface ActivityMember {
|
|
|
4
4
|
readonly id: string;
|
|
5
5
|
readonly name: string;
|
|
6
6
|
readonly role: string;
|
|
7
|
+
readonly provider?: string;
|
|
8
|
+
readonly model?: string;
|
|
9
|
+
readonly reasoningEffort?: string;
|
|
10
|
+
readonly executionPrompt?: string;
|
|
7
11
|
readonly status?: 'idle' | 'working' | 'removed';
|
|
8
12
|
readonly activity: 'working' | 'idle' | 'unknown';
|
|
9
13
|
readonly progress: number;
|
|
@@ -16,11 +20,16 @@ export interface ActivityMember {
|
|
|
16
20
|
export interface ActivityTask {
|
|
17
21
|
readonly id: string;
|
|
18
22
|
readonly subject: string;
|
|
23
|
+
readonly description?: string;
|
|
19
24
|
readonly status: string;
|
|
20
|
-
readonly state: 'blocked' | 'open' | 'running' | 'completed';
|
|
25
|
+
readonly state: 'blocked' | 'open' | 'running' | 'completed' | 'failed' | 'cancelled';
|
|
21
26
|
readonly assignee: string;
|
|
27
|
+
readonly model?: string;
|
|
22
28
|
readonly dependencies: readonly string[];
|
|
23
29
|
readonly depth: number;
|
|
30
|
+
readonly kind?: string;
|
|
31
|
+
readonly round?: number;
|
|
32
|
+
readonly verdict?: string;
|
|
24
33
|
}
|
|
25
34
|
/** One captain-inbox preview row. */
|
|
26
35
|
export interface ActivityMessage {
|
|
@@ -34,6 +43,9 @@ export interface ActivityTeam {
|
|
|
34
43
|
readonly name: string;
|
|
35
44
|
readonly description?: string;
|
|
36
45
|
readonly captainSessionId: string;
|
|
46
|
+
readonly phase: 'staged' | 'running';
|
|
47
|
+
readonly planReviewState?: 'awaiting_review' | 'awaiting_feedback';
|
|
48
|
+
readonly halted?: boolean;
|
|
37
49
|
readonly members: readonly ActivityMember[];
|
|
38
50
|
readonly tasks: readonly ActivityTask[];
|
|
39
51
|
readonly messageCount: number;
|
|
@@ -71,8 +83,16 @@ export declare function getActivitySnapshotsSnapshot(): ActivitySnapshots;
|
|
|
71
83
|
export declare function updateActivitySnapshots(update: Partial<ActivitySnapshots>): void;
|
|
72
84
|
/** Poll cadence for the live host snapshot route. */
|
|
73
85
|
export declare const ACTIVITY_POLL_MS = 1000;
|
|
86
|
+
/**
|
|
87
|
+
* Low-frequency probe cadence while a cardless discovery session still owns
|
|
88
|
+
* no team. The probe keeps the panel able to pick up a team created later in
|
|
89
|
+
* that session (e.g. a run_code-wrapped agent_teams_create) without turning
|
|
90
|
+
* every ordinary session into a one-second filesystem scan.
|
|
91
|
+
*/
|
|
92
|
+
export declare const ACTIVITY_PROBE_MS = 5000;
|
|
74
93
|
/** Host route serving live and archived team snapshots. */
|
|
75
94
|
export declare const ACTIVITY_STATE_URL = "/plugins/dsh-agent-teams/state";
|
|
95
|
+
export declare const ACTIVITY_HALT_URL = "/plugins/dsh-agent-teams/halt";
|
|
76
96
|
interface ActivityFetchResponse {
|
|
77
97
|
readonly ok: boolean;
|
|
78
98
|
json(): Promise<unknown>;
|
|
@@ -105,12 +125,17 @@ export interface ActivityPollingController {
|
|
|
105
125
|
* Start the single polling loop for the current session's requested targets.
|
|
106
126
|
*
|
|
107
127
|
* With neither targets nor a discovery session this is deliberately inert.
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
128
|
+
* Explicit card targets poll at the live cadence from the start. A discovery
|
|
129
|
+
* session performs an immediate live+archive restore pass, then — while it
|
|
130
|
+
* still owns no team — probes on a low-frequency cadence, so a team created
|
|
131
|
+
* later in that session (e.g. a run_code-wrapped agent_teams_create) is
|
|
132
|
+
* discovered without a manual reload, without turning every ordinary session
|
|
133
|
+
* into a one-second filesystem scan. The moment a team for the discovery
|
|
134
|
+
* session appears, the controller upgrades to the live one-second cadence for
|
|
135
|
+
* the rest of its lifetime. The caller — the session view, which stops the
|
|
136
|
+
* controller when the session is no longer current — bounds the lifetime, and
|
|
137
|
+
* archive state is refreshed when a target or a previously discovered live
|
|
138
|
+
* team disappears.
|
|
114
139
|
*/
|
|
115
140
|
export declare function startActivityPolling(monitorTargets: readonly ActivityMonitorTarget[], runtime?: ActivityPollingRuntime): ActivityPollingController;
|
|
116
141
|
export {};
|
|
@@ -13,6 +13,16 @@ export declare const zh: {
|
|
|
13
13
|
'activity.dockRight': string;
|
|
14
14
|
'activity.collapse': string;
|
|
15
15
|
'activity.empty': string;
|
|
16
|
+
'team.stop': string;
|
|
17
|
+
'team.stopped': string;
|
|
18
|
+
'team.stopTitle': string;
|
|
19
|
+
'team.stopDescription': string;
|
|
20
|
+
'team.stopCancel': string;
|
|
21
|
+
'team.stopConfirm': string;
|
|
22
|
+
'team.stopping': string;
|
|
23
|
+
'team.stopFailed': string;
|
|
24
|
+
'team.stopRequestFailed': string;
|
|
25
|
+
'team.discarded': string;
|
|
16
26
|
'format.listSeparator': string;
|
|
17
27
|
'task.status.pending': string;
|
|
18
28
|
'task.status.claimed': string;
|
|
@@ -20,6 +30,7 @@ export declare const zh: {
|
|
|
20
30
|
'task.status.completed': string;
|
|
21
31
|
'task.status.failed': string;
|
|
22
32
|
'task.status.cancelled': string;
|
|
33
|
+
'task.status.notRun': string;
|
|
23
34
|
'member.state.working': string;
|
|
24
35
|
'member.state.failed': string;
|
|
25
36
|
'member.state.waiting': string;
|
|
@@ -28,7 +39,11 @@ export declare const zh: {
|
|
|
28
39
|
'member.state.removed': string;
|
|
29
40
|
'member.state.pending': string;
|
|
30
41
|
'member.state.unassigned': string;
|
|
42
|
+
'member.state.staged': string;
|
|
43
|
+
'member.state.notCreated': string;
|
|
44
|
+
'member.state.stopped': string;
|
|
31
45
|
'member.status.executing': string;
|
|
46
|
+
'member.status.executingModel': string;
|
|
32
47
|
'member.status.working': string;
|
|
33
48
|
'member.status.waitingOn': string;
|
|
34
49
|
'member.status.waitingPrerequisite': string;
|
|
@@ -36,14 +51,22 @@ export declare const zh: {
|
|
|
36
51
|
'member.status.delivered': string;
|
|
37
52
|
'member.status.idle': string;
|
|
38
53
|
'member.status.unknown': string;
|
|
54
|
+
'member.status.staged': string;
|
|
55
|
+
'member.status.settled': string;
|
|
56
|
+
'member.status.discarded': string;
|
|
57
|
+
'member.status.stopped': string;
|
|
39
58
|
'task.assignee.unclaimed': string;
|
|
40
59
|
'task.summary.waitingBreakdown': string;
|
|
60
|
+
'task.summary.staged': string;
|
|
61
|
+
'task.summary.discarded': string;
|
|
41
62
|
'task.summary.allDelivered': string;
|
|
63
|
+
'task.summary.ended': string;
|
|
42
64
|
'task.summary.blockedAndRunning': string;
|
|
43
65
|
'task.summary.more': string;
|
|
44
66
|
'task.summary.running': string;
|
|
45
67
|
'task.summary.ready': string;
|
|
46
68
|
'task.summary.blocked': string;
|
|
69
|
+
'task.summary.failedSettled': string;
|
|
47
70
|
'task.summary.waitingSchedule': string;
|
|
48
71
|
'progress.aria': string;
|
|
49
72
|
'progress.title': string;
|
|
@@ -57,13 +80,89 @@ export declare const zh: {
|
|
|
57
80
|
'dependency.hint.chain': string;
|
|
58
81
|
'dependency.hint.pinned': string;
|
|
59
82
|
'task.runningAria': string;
|
|
83
|
+
'task.model': string;
|
|
84
|
+
'member.model': string;
|
|
60
85
|
'task.detail.completed': string;
|
|
61
86
|
'task.detail.noPrerequisite': string;
|
|
62
87
|
'task.detail.ready': string;
|
|
63
88
|
'task.detail.waitingOn': string;
|
|
89
|
+
'task.detail.notRun': string;
|
|
64
90
|
'task.detail.noDownstream': string;
|
|
65
91
|
'task.detail.unlocks': string;
|
|
66
92
|
'team.ended': string;
|
|
93
|
+
'plan.badge': string;
|
|
94
|
+
'plan.title': string;
|
|
95
|
+
'plan.description': string;
|
|
96
|
+
'plan.member.role': string;
|
|
97
|
+
'plan.member.provider': string;
|
|
98
|
+
'plan.member.model': string;
|
|
99
|
+
'plan.member.reasoning': string;
|
|
100
|
+
'plan.member.reasoningHint': string;
|
|
101
|
+
'plan.model.choose': string;
|
|
102
|
+
'plan.model.currentUnavailable': string;
|
|
103
|
+
'plan.model.route': string;
|
|
104
|
+
'plan.model.defaultReasoning': string;
|
|
105
|
+
'plan.model.providerDefault': string;
|
|
106
|
+
'plan.model.modelDefault': string;
|
|
107
|
+
'plan.model.triggerAria': string;
|
|
108
|
+
'plan.model.back': string;
|
|
109
|
+
'plan.model.loading': string;
|
|
110
|
+
'plan.model.empty': string;
|
|
111
|
+
'plan.model.partialFailure': string;
|
|
112
|
+
'plan.model.retry': string;
|
|
113
|
+
'plan.member.prompt': string;
|
|
114
|
+
'plan.member.roleFallback': string;
|
|
115
|
+
'plan.task.subject': string;
|
|
116
|
+
'plan.task.description': string;
|
|
117
|
+
'plan.task.assignee': string;
|
|
118
|
+
'plan.task.dependencies': string;
|
|
119
|
+
'plan.task.dependenciesHint': string;
|
|
120
|
+
'plan.task.unassigned': string;
|
|
121
|
+
'plan.unsaved': string;
|
|
122
|
+
'plan.save': string;
|
|
123
|
+
'plan.saving': string;
|
|
124
|
+
'plan.remove': string;
|
|
125
|
+
'plan.removed': string;
|
|
126
|
+
'plan.removeConfirm': string;
|
|
127
|
+
'plan.removeWarning': string;
|
|
128
|
+
'plan.cancel': string;
|
|
129
|
+
'plan.addTask': string;
|
|
130
|
+
'plan.adding': string;
|
|
131
|
+
'plan.taskAdded': string;
|
|
132
|
+
'plan.newTask': string;
|
|
133
|
+
'plan.newTaskLabel': string;
|
|
134
|
+
'plan.readySummary': string;
|
|
135
|
+
'plan.flow.aria': string;
|
|
136
|
+
'plan.flow.review': string;
|
|
137
|
+
'plan.flow.spawn': string;
|
|
138
|
+
'plan.flow.run': string;
|
|
139
|
+
'plan.members.title': string;
|
|
140
|
+
'plan.members.count': string;
|
|
141
|
+
'plan.members.empty': string;
|
|
142
|
+
'plan.tasks.title': string;
|
|
143
|
+
'plan.tasks.count': string;
|
|
144
|
+
'plan.tasks.empty': string;
|
|
145
|
+
'plan.dependencies.none': string;
|
|
146
|
+
'plan.dependencies.count': string;
|
|
147
|
+
'plan.approve': string;
|
|
148
|
+
'plan.approving': string;
|
|
149
|
+
'plan.approveTitle': string;
|
|
150
|
+
'plan.approveHint': string;
|
|
151
|
+
'plan.approveConfirmTitle': string;
|
|
152
|
+
'plan.approveWarning': string;
|
|
153
|
+
'plan.approveConfirm': string;
|
|
154
|
+
'plan.continue': string;
|
|
155
|
+
'plan.returnToChat': string;
|
|
156
|
+
'plan.feedbackTitle': string;
|
|
157
|
+
'plan.feedbackHint': string;
|
|
158
|
+
'plan.discard': string;
|
|
159
|
+
'plan.discardConfirmTitle': string;
|
|
160
|
+
'plan.discardWarning': string;
|
|
161
|
+
'plan.discardConfirm': string;
|
|
162
|
+
'plan.discarding': string;
|
|
163
|
+
'plan.pendingEdits': string;
|
|
164
|
+
'plan.saved': string;
|
|
165
|
+
'plan.failed': string;
|
|
67
166
|
'team.stats.members': string;
|
|
68
167
|
'team.stats.completed': string;
|
|
69
168
|
'team.stats.messages': string;
|
|
@@ -71,16 +170,28 @@ export declare const zh: {
|
|
|
71
170
|
'captain.name': string;
|
|
72
171
|
'captain.role': string;
|
|
73
172
|
'captain.summary': string;
|
|
173
|
+
'captain.summary.staged': string;
|
|
174
|
+
'captain.summary.awaitingFeedback': string;
|
|
175
|
+
'captain.summary.discarded': string;
|
|
176
|
+
'captain.summary.withTakeover': string;
|
|
74
177
|
'captain.state.working': string;
|
|
178
|
+
'captain.state.takeover': string;
|
|
75
179
|
'captain.state.collected': string;
|
|
76
180
|
'captain.state.waiting': string;
|
|
181
|
+
'captain.state.staged': string;
|
|
182
|
+
'captain.state.awaitingFeedback': string;
|
|
183
|
+
'captain.state.discarded': string;
|
|
184
|
+
'captain.state.settled': string;
|
|
77
185
|
'members.toggle': string;
|
|
78
186
|
'members.collapse': string;
|
|
79
187
|
'members.expand': string;
|
|
80
188
|
'members.empty': string;
|
|
81
189
|
'assignment.label': string;
|
|
190
|
+
'assignment.staged': string;
|
|
191
|
+
'assignment.discarded': string;
|
|
82
192
|
'assignment.empty': string;
|
|
83
193
|
'archive.label': string;
|
|
194
|
+
'archive.discardedLabel': string;
|
|
84
195
|
};
|
|
85
196
|
/** AgentTeams namespace key union. */
|
|
86
197
|
export type AgentTeamsLocaleKey = keyof typeof zh;
|
|
@@ -96,6 +207,16 @@ export declare const en: {
|
|
|
96
207
|
'activity.dockRight': string;
|
|
97
208
|
'activity.collapse': string;
|
|
98
209
|
'activity.empty': string;
|
|
210
|
+
'team.stop': string;
|
|
211
|
+
'team.stopped': string;
|
|
212
|
+
'team.stopTitle': string;
|
|
213
|
+
'team.stopDescription': string;
|
|
214
|
+
'team.stopCancel': string;
|
|
215
|
+
'team.stopConfirm': string;
|
|
216
|
+
'team.stopping': string;
|
|
217
|
+
'team.stopFailed': string;
|
|
218
|
+
'team.stopRequestFailed': string;
|
|
219
|
+
'team.discarded': string;
|
|
99
220
|
'format.listSeparator': string;
|
|
100
221
|
'task.status.pending': string;
|
|
101
222
|
'task.status.claimed': string;
|
|
@@ -103,6 +224,7 @@ export declare const en: {
|
|
|
103
224
|
'task.status.completed': string;
|
|
104
225
|
'task.status.failed': string;
|
|
105
226
|
'task.status.cancelled': string;
|
|
227
|
+
'task.status.notRun': string;
|
|
106
228
|
'member.state.working': string;
|
|
107
229
|
'member.state.failed': string;
|
|
108
230
|
'member.state.waiting': string;
|
|
@@ -111,7 +233,11 @@ export declare const en: {
|
|
|
111
233
|
'member.state.removed': string;
|
|
112
234
|
'member.state.pending': string;
|
|
113
235
|
'member.state.unassigned': string;
|
|
236
|
+
'member.state.staged': string;
|
|
237
|
+
'member.state.notCreated': string;
|
|
238
|
+
'member.state.stopped': string;
|
|
114
239
|
'member.status.executing': string;
|
|
240
|
+
'member.status.executingModel': string;
|
|
115
241
|
'member.status.working': string;
|
|
116
242
|
'member.status.waitingOn': string;
|
|
117
243
|
'member.status.waitingPrerequisite': string;
|
|
@@ -119,14 +245,22 @@ export declare const en: {
|
|
|
119
245
|
'member.status.delivered': string;
|
|
120
246
|
'member.status.idle': string;
|
|
121
247
|
'member.status.unknown': string;
|
|
248
|
+
'member.status.staged': string;
|
|
249
|
+
'member.status.settled': string;
|
|
250
|
+
'member.status.discarded': string;
|
|
251
|
+
'member.status.stopped': string;
|
|
122
252
|
'task.assignee.unclaimed': string;
|
|
123
253
|
'task.summary.waitingBreakdown': string;
|
|
254
|
+
'task.summary.staged': string;
|
|
255
|
+
'task.summary.discarded': string;
|
|
124
256
|
'task.summary.allDelivered': string;
|
|
257
|
+
'task.summary.ended': string;
|
|
125
258
|
'task.summary.blockedAndRunning': string;
|
|
126
259
|
'task.summary.more': string;
|
|
127
260
|
'task.summary.running': string;
|
|
128
261
|
'task.summary.ready': string;
|
|
129
262
|
'task.summary.blocked': string;
|
|
263
|
+
'task.summary.failedSettled': string;
|
|
130
264
|
'task.summary.waitingSchedule': string;
|
|
131
265
|
'progress.aria': string;
|
|
132
266
|
'progress.title': string;
|
|
@@ -140,13 +274,89 @@ export declare const en: {
|
|
|
140
274
|
'dependency.hint.chain': string;
|
|
141
275
|
'dependency.hint.pinned': string;
|
|
142
276
|
'task.runningAria': string;
|
|
277
|
+
'task.model': string;
|
|
278
|
+
'member.model': string;
|
|
143
279
|
'task.detail.completed': string;
|
|
144
280
|
'task.detail.noPrerequisite': string;
|
|
145
281
|
'task.detail.ready': string;
|
|
146
282
|
'task.detail.waitingOn': string;
|
|
283
|
+
'task.detail.notRun': string;
|
|
147
284
|
'task.detail.noDownstream': string;
|
|
148
285
|
'task.detail.unlocks': string;
|
|
149
286
|
'team.ended': string;
|
|
287
|
+
'plan.badge': string;
|
|
288
|
+
'plan.title': string;
|
|
289
|
+
'plan.description': string;
|
|
290
|
+
'plan.member.role': string;
|
|
291
|
+
'plan.member.provider': string;
|
|
292
|
+
'plan.member.model': string;
|
|
293
|
+
'plan.member.reasoning': string;
|
|
294
|
+
'plan.member.reasoningHint': string;
|
|
295
|
+
'plan.model.choose': string;
|
|
296
|
+
'plan.model.currentUnavailable': string;
|
|
297
|
+
'plan.model.route': string;
|
|
298
|
+
'plan.model.defaultReasoning': string;
|
|
299
|
+
'plan.model.providerDefault': string;
|
|
300
|
+
'plan.model.modelDefault': string;
|
|
301
|
+
'plan.model.triggerAria': string;
|
|
302
|
+
'plan.model.back': string;
|
|
303
|
+
'plan.model.loading': string;
|
|
304
|
+
'plan.model.empty': string;
|
|
305
|
+
'plan.model.partialFailure': string;
|
|
306
|
+
'plan.model.retry': string;
|
|
307
|
+
'plan.member.prompt': string;
|
|
308
|
+
'plan.member.roleFallback': string;
|
|
309
|
+
'plan.task.subject': string;
|
|
310
|
+
'plan.task.description': string;
|
|
311
|
+
'plan.task.assignee': string;
|
|
312
|
+
'plan.task.dependencies': string;
|
|
313
|
+
'plan.task.dependenciesHint': string;
|
|
314
|
+
'plan.task.unassigned': string;
|
|
315
|
+
'plan.unsaved': string;
|
|
316
|
+
'plan.save': string;
|
|
317
|
+
'plan.saving': string;
|
|
318
|
+
'plan.remove': string;
|
|
319
|
+
'plan.removed': string;
|
|
320
|
+
'plan.removeConfirm': string;
|
|
321
|
+
'plan.removeWarning': string;
|
|
322
|
+
'plan.cancel': string;
|
|
323
|
+
'plan.addTask': string;
|
|
324
|
+
'plan.adding': string;
|
|
325
|
+
'plan.taskAdded': string;
|
|
326
|
+
'plan.newTask': string;
|
|
327
|
+
'plan.newTaskLabel': string;
|
|
328
|
+
'plan.readySummary': string;
|
|
329
|
+
'plan.flow.aria': string;
|
|
330
|
+
'plan.flow.review': string;
|
|
331
|
+
'plan.flow.spawn': string;
|
|
332
|
+
'plan.flow.run': string;
|
|
333
|
+
'plan.members.title': string;
|
|
334
|
+
'plan.members.count': string;
|
|
335
|
+
'plan.members.empty': string;
|
|
336
|
+
'plan.tasks.title': string;
|
|
337
|
+
'plan.tasks.count': string;
|
|
338
|
+
'plan.tasks.empty': string;
|
|
339
|
+
'plan.dependencies.none': string;
|
|
340
|
+
'plan.dependencies.count': string;
|
|
341
|
+
'plan.approve': string;
|
|
342
|
+
'plan.approving': string;
|
|
343
|
+
'plan.approveTitle': string;
|
|
344
|
+
'plan.approveHint': string;
|
|
345
|
+
'plan.approveConfirmTitle': string;
|
|
346
|
+
'plan.approveWarning': string;
|
|
347
|
+
'plan.approveConfirm': string;
|
|
348
|
+
'plan.continue': string;
|
|
349
|
+
'plan.returnToChat': string;
|
|
350
|
+
'plan.feedbackTitle': string;
|
|
351
|
+
'plan.feedbackHint': string;
|
|
352
|
+
'plan.discard': string;
|
|
353
|
+
'plan.discardConfirmTitle': string;
|
|
354
|
+
'plan.discardWarning': string;
|
|
355
|
+
'plan.discardConfirm': string;
|
|
356
|
+
'plan.discarding': string;
|
|
357
|
+
'plan.pendingEdits': string;
|
|
358
|
+
'plan.saved': string;
|
|
359
|
+
'plan.failed': string;
|
|
150
360
|
'team.stats.members': string;
|
|
151
361
|
'team.stats.completed': string;
|
|
152
362
|
'team.stats.messages': string;
|
|
@@ -154,16 +364,28 @@ export declare const en: {
|
|
|
154
364
|
'captain.name': string;
|
|
155
365
|
'captain.role': string;
|
|
156
366
|
'captain.summary': string;
|
|
367
|
+
'captain.summary.staged': string;
|
|
368
|
+
'captain.summary.awaitingFeedback': string;
|
|
369
|
+
'captain.summary.discarded': string;
|
|
370
|
+
'captain.summary.withTakeover': string;
|
|
157
371
|
'captain.state.working': string;
|
|
372
|
+
'captain.state.takeover': string;
|
|
158
373
|
'captain.state.collected': string;
|
|
159
374
|
'captain.state.waiting': string;
|
|
375
|
+
'captain.state.staged': string;
|
|
376
|
+
'captain.state.awaitingFeedback': string;
|
|
377
|
+
'captain.state.discarded': string;
|
|
378
|
+
'captain.state.settled': string;
|
|
160
379
|
'members.toggle': string;
|
|
161
380
|
'members.collapse': string;
|
|
162
381
|
'members.expand': string;
|
|
163
382
|
'members.empty': string;
|
|
164
383
|
'assignment.label': string;
|
|
384
|
+
'assignment.staged': string;
|
|
385
|
+
'assignment.discarded': string;
|
|
165
386
|
'assignment.empty': string;
|
|
166
387
|
'archive.label': string;
|
|
388
|
+
'archive.discardedLabel': string;
|
|
167
389
|
};
|
|
168
390
|
/** Translation function consumed by pure view helpers. */
|
|
169
391
|
export type AgentTeamsTranslate = (key: AgentTeamsLocaleKey, params?: Record<string, unknown>) => string;
|
package/lib/types/command.d.ts
CHANGED
|
@@ -1,70 +1,25 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `/agent-teams` slash command and its plain-text gesture boundary.
|
|
3
|
-
*
|
|
4
|
-
* Two deterministic activation paths, mirroring the Harness skill pipeline
|
|
5
|
-
* (`dsh-tool-skill` + the `ui-skill` client source):
|
|
6
|
-
*
|
|
7
|
-
* 1. **Host command** — `ctx.commands.register` publishes the closed-namespace
|
|
8
|
-
* `/agent-teams` command. The web GUI's slash menu (the Harness
|
|
9
|
-
* `ui-commands` client) lists it from the host catalog with the input
|
|
10
|
-
* hint; the argued line is claimed client-side and executed through
|
|
11
|
-
* `command.execute`. The handler replays that exact line as an ordinary
|
|
12
|
-
* user follow-up (`agent.followup`) so it remains visible in the chat; the
|
|
13
|
-
* gesture boundary then adds the deterministic activation message.
|
|
14
|
-
* 2. **Gesture boundary** — a `agent/pre-step` listener recognizes a leading
|
|
15
|
-
* `/agent-teams` token in genuine user messages and injects the same
|
|
16
|
-
* activation message. This covers surfaces with no command adjudication
|
|
17
|
-
* (headless CLI, API, pasted text in plain composers) and also handles the
|
|
18
|
-
* exact user line replayed by the host command. Mid-sentence mentions stay
|
|
19
|
-
* ordinary prose; only `source.kind === 'user'` messages are scanned, so
|
|
20
|
-
* injected or external text cannot forge the gesture.
|
|
21
|
-
*
|
|
22
|
-
* @module dsh-agent-teams/command
|
|
23
|
-
*/
|
|
24
1
|
import type { Context } from '@deepseek-ai/cordis';
|
|
25
2
|
import { type UserMessage } from '@deepseek-ai/dsh-llm';
|
|
26
|
-
|
|
3
|
+
import { type TeamProfileConfig, type AgentTeamsInvocation } from './profiles.ts';
|
|
27
4
|
export declare const AGENT_TEAMS_COMMAND = "agent-teams";
|
|
28
5
|
declare module '@deepseek-ai/dsh-llm' {
|
|
29
6
|
interface MessageSourceMap {
|
|
30
|
-
/**
|
|
31
|
-
* A deterministic `/agent-teams` activation injected after the visible
|
|
32
|
-
* user-authored slash line.
|
|
33
|
-
*/
|
|
34
7
|
'agent-teams-command': {
|
|
35
8
|
readonly kind: 'agent-teams-command';
|
|
36
|
-
/** The user-supplied goal text (absent when the gesture was bare). */
|
|
37
9
|
readonly goal?: string;
|
|
10
|
+
readonly profile?: string;
|
|
38
11
|
};
|
|
39
12
|
}
|
|
40
13
|
}
|
|
41
14
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
|
|
46
|
-
export declare function buildActivationDirective(goal: string): string;
|
|
47
|
-
/**
|
|
48
|
-
* The goal of the latest start-anchored `/agent-teams` gesture in genuine
|
|
49
|
-
* user messages, or `undefined` when no message carries one. `''` means a
|
|
50
|
-
* bare `/agent-teams` token with no goal.
|
|
51
|
-
* @param messages - the step's claimed batch (user messages only scanned).
|
|
15
|
+
* Convert a configured profile key into a stable, closed-namespace command
|
|
16
|
+
* suffix. Only lowercase ASCII letters, digits and dashes are representable;
|
|
17
|
+
* this deliberately prevents accidental command aliases for ambiguous profile
|
|
18
|
+
* names such as `foo bar`, `foo_bar`, or non-ASCII keys.
|
|
52
19
|
*/
|
|
20
|
+
export declare function profileCommandName(profileName: string): string | undefined;
|
|
21
|
+
export declare function invokedAgentTeamsInvocation(messages: readonly UserMessage[], getProfiles?: () => Record<string, TeamProfileConfig>): AgentTeamsInvocation | undefined;
|
|
53
22
|
export declare function invokedAgentTeamsGoal(messages: readonly UserMessage[]): string | undefined;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
* the pre-step gesture boundary injects the activation directive and wakes
|
|
58
|
-
* the captain deterministically. The registration rides the calling
|
|
59
|
-
* context's fiber, so a disposed scope (HMR, plugin removal) unregisters the
|
|
60
|
-
* command.
|
|
61
|
-
* @param ctx - host context providing the `commands` registry.
|
|
62
|
-
*/
|
|
63
|
-
export declare function registerAgentTeamsCommand(ctx: Context): void;
|
|
64
|
-
/**
|
|
65
|
-
* Install the `agent/pre-step` gesture boundary: a claimed user message
|
|
66
|
-
* starting with `/agent-teams` gains the deterministic activation message
|
|
67
|
-
* appended after every other injection, closest to the model's answer.
|
|
68
|
-
* @param ctx - host context providing the `agent/pre-step` waterfall.
|
|
69
|
-
*/
|
|
70
|
-
export declare function installAgentTeamsGestureBoundary(ctx: Context): void;
|
|
23
|
+
export declare function buildActivationDirective(goal: string, profile?: string, taskPlanning?: 'captain' | 'seed'): string;
|
|
24
|
+
export declare function registerAgentTeamsCommand(ctx: Context, getProfiles?: () => Record<string, TeamProfileConfig>): void;
|
|
25
|
+
export declare function installAgentTeamsGestureBoundary(ctx: Context, getProfiles?: () => Record<string, TeamProfileConfig>): void;
|