dsh-advisor-group 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +226 -153
- package/README.md +276 -207
- package/lib/client.js +1520 -890
- package/lib/index.d.mts +51 -1
- package/lib/index.mjs +1568 -150
- package/package.json +103 -100
package/lib/index.d.mts
CHANGED
|
@@ -153,6 +153,12 @@ interface SwarmConfig {
|
|
|
153
153
|
defaultWaitMs: number;
|
|
154
154
|
/** How long detached ask results are kept on disk, in hours (clamped to 1–720). */
|
|
155
155
|
resultTtlHours: number;
|
|
156
|
+
/**
|
|
157
|
+
* Copy a settled answer back into the asking session automatically
|
|
158
|
+
* (`state: done` only; timeout/error are never delivered back). On by
|
|
159
|
+
* default; off leaves results readable only through `ask_result`.
|
|
160
|
+
*/
|
|
161
|
+
deliverBack?: boolean;
|
|
156
162
|
/** Whether the session roster lists subagent sessions. */
|
|
157
163
|
rosterIncludeSubagents: boolean;
|
|
158
164
|
/**
|
|
@@ -199,6 +205,25 @@ interface Config {
|
|
|
199
205
|
}
|
|
200
206
|
declare const Config: Schema<Config>;
|
|
201
207
|
//#endregion
|
|
208
|
+
//#region src/session-roster.d.ts
|
|
209
|
+
/** The minimal session shape this module reads (structurally compatible with the host row). */
|
|
210
|
+
interface RosterSource {
|
|
211
|
+
sessionId: string;
|
|
212
|
+
updatedAt: number;
|
|
213
|
+
running: boolean;
|
|
214
|
+
cwd?: string;
|
|
215
|
+
origin?: 'subagent';
|
|
216
|
+
/** The host marks a freshly created, never-used session as blank. */
|
|
217
|
+
blank?: boolean;
|
|
218
|
+
/** Byte size of the session's own log, when the caller already looked it up. */
|
|
219
|
+
sizeBytes?: number;
|
|
220
|
+
projections?: {
|
|
221
|
+
values?: {
|
|
222
|
+
title?: unknown;
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
//#endregion
|
|
202
227
|
//#region src/types.d.ts
|
|
203
228
|
interface DriverSource {
|
|
204
229
|
provider: string;
|
|
@@ -281,6 +306,15 @@ interface ConsultSummary {
|
|
|
281
306
|
stopped?: boolean;
|
|
282
307
|
}
|
|
283
308
|
//#endregion
|
|
309
|
+
//#region src/session-router.d.ts
|
|
310
|
+
/** One routed session: a choice handed to the user, never an auto-pick. */
|
|
311
|
+
interface RouteCandidate {
|
|
312
|
+
sessionId: string;
|
|
313
|
+
name: string;
|
|
314
|
+
score: number;
|
|
315
|
+
reason: string;
|
|
316
|
+
}
|
|
317
|
+
//#endregion
|
|
284
318
|
//#region src/events.d.ts
|
|
285
319
|
declare module '@deepseek-ai/cordis' {
|
|
286
320
|
interface Events {
|
|
@@ -312,6 +346,22 @@ declare module '@deepseek-ai/cordis' {
|
|
|
312
346
|
//#region src/index.d.ts
|
|
313
347
|
declare const name = "dsh-advisor-group";
|
|
314
348
|
declare const inject: string[];
|
|
349
|
+
/**
|
|
350
|
+
* Recall candidates for the background hint, restricted to the sessions the
|
|
351
|
+
* host actually shows: the registered set (workspace `sessionIds` minus
|
|
352
|
+
* archived). `registered === undefined` means "this host has no workspace
|
|
353
|
+
* registry" and filters nothing; a session no workspace registers must never be
|
|
354
|
+
* suggested by a hint. Pure except for the bounded log-size probe inside the
|
|
355
|
+
* router.
|
|
356
|
+
*/
|
|
357
|
+
declare function recallHintCandidates(input: {
|
|
358
|
+
sessions: readonly RosterSource[];
|
|
359
|
+
registered?: ReadonlySet<string>;
|
|
360
|
+
text: string;
|
|
361
|
+
topN?: number;
|
|
362
|
+
currentSessionId: string;
|
|
363
|
+
exclude?: readonly string[];
|
|
364
|
+
}): RouteCandidate[];
|
|
315
365
|
declare function apply(ctx: Context, config: Config): void;
|
|
316
366
|
//#endregion
|
|
317
|
-
export { Config, apply, inject, name };
|
|
367
|
+
export { Config, apply, inject, name, recallHintCandidates };
|