relay-dsh-plugin-manager 0.2.6 → 0.3.1-rc.2

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/lib/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as PluginSearchRuntime, c as PluginSource, i as PluginSearchRequest, l as inspectPluginSource, n as PluginSearchMatch, o as FetchOptions, r as PluginSearchProvider, s as PluginInspection, t as PluginSearchCandidate } from "./search-runtime-DsmnI673.js";
1
+ import { a as PluginSearchRuntime, c as PluginSource, i as PluginSearchRequest, l as inspectPluginSource, n as PluginSearchMatch, o as FetchOptions, r as PluginSearchProvider, s as PluginInspection, t as PluginSearchCandidate } from "./search-runtime-gzUZ5Yb3.js";
2
2
  import { spawn } from "node:child_process";
3
3
  import { Context } from "@deepseek-ai/cordis";
4
4
 
@@ -16,6 +16,50 @@ interface TelemetryConfig {
16
16
  test?: boolean;
17
17
  }
18
18
  //#endregion
19
+ //#region src/search.d.ts
20
+ interface SearchResultSource {
21
+ inspection: PluginInspection;
22
+ providers: string[];
23
+ evidence: string[];
24
+ }
25
+ interface SearchResult {
26
+ query: string;
27
+ candidates: Array<{
28
+ rank: number;
29
+ identity: string;
30
+ packageName: string;
31
+ description: string | null;
32
+ repository: string | null;
33
+ repositoryOwner: string | null;
34
+ providers: string[];
35
+ matchReasons: string[];
36
+ semanticMatches: Array<{
37
+ directoryVersion: string | null;
38
+ canonicalPathKey: string | null;
39
+ canonicalPath: string[];
40
+ matchedCapabilities: string[];
41
+ retrievalSources: string[];
42
+ }>;
43
+ sources: SearchResultSource[];
44
+ recommendedSource: string;
45
+ }>;
46
+ presentation: {
47
+ order: 'rank_ascending';
48
+ returnedCandidates: number;
49
+ requestedMaximum: number;
50
+ includeEveryDistinctRelevantSolution: true;
51
+ excludeClearlyIrrelevant: true;
52
+ deduplicateEquivalentSources: true;
53
+ padToRequestedMaximum: false;
54
+ silentTopNTruncation: false;
55
+ };
56
+ providerErrors: Array<{
57
+ provider: string;
58
+ error: string;
59
+ }>;
60
+ rejectedCandidates: number;
61
+ }
62
+ //#endregion
19
63
  //#region src/profile.d.ts
20
64
  interface PackageSurface {
21
65
  packageName: string;
@@ -225,6 +269,88 @@ declare class DshRestarter {
225
269
  };
226
270
  }
227
271
  //#endregion
272
+ //#region src/task-solutions.d.ts
273
+ interface TaskRoleInput {
274
+ id: string;
275
+ label: string;
276
+ query: string;
277
+ required?: boolean;
278
+ }
279
+ interface TaskRole {
280
+ id: string;
281
+ label: string;
282
+ query: string;
283
+ required: boolean;
284
+ }
285
+ interface TaskAmbiguityInput {
286
+ id: string;
287
+ question: string;
288
+ options: string[];
289
+ }
290
+ type TaskSolutionCandidate = Omit<SearchResult['candidates'][number], 'sources'>;
291
+ interface TaskRoleSearchGroup extends TaskRole {
292
+ candidates: TaskSolutionCandidate[];
293
+ providerErrors: SearchResult['providerErrors'];
294
+ rejectedCandidates: number;
295
+ }
296
+ interface TaskSolutionDraft {
297
+ schemaVersion: '1.0.0';
298
+ solutionId: string;
299
+ task: string;
300
+ status: 'needs_review' | 'incomplete' | 'ambiguous';
301
+ createdAt: number;
302
+ expiresAt: number;
303
+ roles: TaskRoleSearchGroup[];
304
+ ambiguities: TaskAmbiguityInput[];
305
+ }
306
+ interface TaskRoleSelection {
307
+ roleId: string;
308
+ candidateIdentities: string[];
309
+ }
310
+ interface AssessedTaskRole extends TaskRole {
311
+ status: 'covered' | 'missing_required' | 'missing_optional';
312
+ primaryCandidateIdentity: string | null;
313
+ alternativeCandidateIdentities: string[];
314
+ }
315
+ interface TaskSolutionAssessment {
316
+ schemaVersion: '1.0.0';
317
+ solutionId: string;
318
+ task: string;
319
+ status: 'complete' | 'incomplete' | 'ambiguous';
320
+ roles: AssessedTaskRole[];
321
+ ambiguities: TaskAmbiguityInput[];
322
+ solutions: Array<TaskSolutionCandidate & {
323
+ roleIds: string[];
324
+ }>;
325
+ coverage: {
326
+ requiredRoles: number;
327
+ coveredRequiredRoles: number;
328
+ optionalRoles: number;
329
+ coveredOptionalRoles: number;
330
+ missingRequiredRoleIds: string[];
331
+ complete: boolean;
332
+ };
333
+ }
334
+ interface TaskSolutionStoreOptions {
335
+ now?: () => number;
336
+ id?: () => string;
337
+ ttlMs?: number;
338
+ }
339
+ declare class TaskSolutionStore {
340
+ private readonly now;
341
+ private readonly id;
342
+ private readonly ttlMs;
343
+ private readonly drafts;
344
+ constructor(options?: TaskSolutionStoreOptions);
345
+ create(input: {
346
+ task: string;
347
+ roles: TaskRoleInput[];
348
+ ambiguities?: TaskAmbiguityInput[];
349
+ searches: Record<string, SearchResult>;
350
+ }): TaskSolutionDraft;
351
+ assess(solutionIdValue: string, selectionValues: TaskRoleSelection[]): TaskSolutionAssessment;
352
+ }
353
+ //#endregion
228
354
  //#region src/manager.d.ts
229
355
  interface LoaderEntryLike {
230
356
  id?: string;
@@ -253,13 +379,19 @@ interface PluginManagerDependencies {
253
379
  fetchOptions?: Omit<FetchOptions, 'signal'>;
254
380
  hmrTimeoutMs?: number;
255
381
  telemetry?: Telemetry;
382
+ taskSolutions?: TaskSolutionStore;
256
383
  }
257
384
  interface DiscoverRequest {
258
- action: 'list' | 'search' | 'inspect' | 'status';
385
+ action: 'list' | 'search' | 'search_roles' | 'assess_solution' | 'inspect' | 'status';
259
386
  query?: string;
260
387
  target?: string;
261
388
  operationId?: string;
262
389
  maxResults?: number;
390
+ maxResultsPerRole?: number;
391
+ roles?: TaskRoleInput[];
392
+ ambiguities?: TaskAmbiguityInput[];
393
+ solutionId?: string;
394
+ selections?: TaskRoleSelection[];
263
395
  }
264
396
  interface PlanRequest {
265
397
  operation: PlanAction;
@@ -317,6 +449,7 @@ declare class PluginManager {
317
449
  private readonly fetchOptions;
318
450
  private readonly hmrTimeoutMs;
319
451
  private readonly telemetry;
452
+ private readonly taskSolutions;
320
453
  constructor(dependencies: PluginManagerDependencies);
321
454
  private capture;
322
455
  private loaderEntries;
@@ -352,5 +485,5 @@ interface Config {
352
485
  }
353
486
  declare function apply(ctx: Context, config?: Config): void;
354
487
  //#endregion
355
- export { Config, DEFAULT_REGISTRY_ORIGIN, type DiscoverRequest, type InstallManyItemResult, type InstallManyItemStatus, type InstallManyResult, type MutationResult, type PlanRequest, type PluginInspection, PluginManager, type PluginSearchCandidate, type PluginSearchMatch, type PluginSearchProvider, type PluginSearchRequest, type PluginSource, type TelemetryConfig, apply, inject, name };
488
+ export { Config, DEFAULT_REGISTRY_ORIGIN, type DiscoverRequest, type InstallManyItemResult, type InstallManyItemStatus, type InstallManyResult, type MutationResult, type PlanRequest, type PluginInspection, PluginManager, type PluginSearchCandidate, type PluginSearchMatch, type PluginSearchProvider, type PluginSearchRequest, type PluginSource, type TaskAmbiguityInput, type TaskRoleInput, type TaskRoleSelection, type TaskSolutionAssessment, type TaskSolutionDraft, type TelemetryConfig, apply, inject, name };
356
489
  //# sourceMappingURL=index.d.ts.map