@open330/oac-discovery 2026.2.17

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Open330
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,115 @@
1
+ import { TaskSource, Task, TaskComplexity } from '@open330/oac-core';
2
+ import { ResolvedRepo } from '@open330/oac-repo';
3
+
4
+ /**
5
+ * Shared options passed to each scanner invocation.
6
+ */
7
+ interface ScanOptions {
8
+ /**
9
+ * Glob-like patterns to skip while scanning.
10
+ */
11
+ exclude?: string[];
12
+ /**
13
+ * Maximum runtime for a single scanner process.
14
+ */
15
+ timeoutMs?: number;
16
+ /**
17
+ * Optional hard cap on discovered tasks.
18
+ */
19
+ maxTasks?: number;
20
+ /**
21
+ * Include hidden files/directories when scanner tooling supports it.
22
+ */
23
+ includeHidden?: boolean;
24
+ /**
25
+ * Optional external abort signal.
26
+ */
27
+ signal?: AbortSignal;
28
+ /**
29
+ * Optional resolved repository metadata for scanners that need it.
30
+ */
31
+ repo?: ResolvedRepo;
32
+ }
33
+ /**
34
+ * A scanner discovers actionable tasks from a local repository path.
35
+ */
36
+ interface Scanner {
37
+ id: TaskSource | string;
38
+ name: string;
39
+ scan(repoPath: string, options?: ScanOptions): Promise<Task[]>;
40
+ }
41
+ /**
42
+ * Priority factor values; total score should add up to 0-100.
43
+ */
44
+ interface PriorityWeights {
45
+ impactScore: number;
46
+ feasibilityScore: number;
47
+ freshnessScore: number;
48
+ issueSignals: number;
49
+ tokenEfficiency: number;
50
+ }
51
+ /**
52
+ * Lightweight scanner-derived hints used before ranking.
53
+ */
54
+ interface ScannerTaskContext {
55
+ source: TaskSource;
56
+ complexity: TaskComplexity;
57
+ }
58
+
59
+ /**
60
+ * Scanner that converts TODO-like markers into actionable tasks.
61
+ */
62
+ declare class TodoScanner implements Scanner {
63
+ readonly id = "todo";
64
+ readonly name = "TODO Scanner";
65
+ scan(repoPath: string, options?: ScanOptions): Promise<Task[]>;
66
+ private findTodoMatches;
67
+ }
68
+
69
+ /**
70
+ * Scanner that runs repo-native lint tooling and maps findings to tasks.
71
+ */
72
+ declare class LintScanner implements Scanner {
73
+ readonly id = "lint";
74
+ readonly name = "Lint Scanner";
75
+ scan(repoPath: string, options?: ScanOptions): Promise<Task[]>;
76
+ }
77
+
78
+ /**
79
+ * Scanner that identifies source files lacking corresponding test files.
80
+ */
81
+ declare class TestGapScanner implements Scanner {
82
+ readonly id: TaskSource | string;
83
+ readonly name = "Test Gap Scanner";
84
+ scan(repoPath: string, options?: ScanOptions): Promise<Task[]>;
85
+ }
86
+
87
+ /**
88
+ * Scanner that maps open GitHub issues into contribution tasks.
89
+ */
90
+ declare class GitHubIssuesScanner implements Scanner {
91
+ private readonly token?;
92
+ readonly id: TaskSource | string;
93
+ readonly name = "GitHub Issues Scanner";
94
+ constructor(token?: string | undefined);
95
+ scan(repoPath: string, options?: ScanOptions): Promise<Task[]>;
96
+ }
97
+
98
+ /**
99
+ * Runs multiple scanners in parallel and returns a deduplicated task list.
100
+ */
101
+ declare class CompositeScanner implements Scanner {
102
+ readonly id = "composite";
103
+ readonly name = "Composite Scanner";
104
+ private readonly scanners;
105
+ constructor(scanners?: Scanner[]);
106
+ scan(repoPath: string, options?: ScanOptions): Promise<Task[]>;
107
+ }
108
+ declare function createDefaultCompositeScanner(): CompositeScanner;
109
+
110
+ /**
111
+ * Rank tasks by computed priority (0-100) and return descending order.
112
+ */
113
+ declare function rankTasks(tasks: Task[]): Task[];
114
+
115
+ export { CompositeScanner, GitHubIssuesScanner, LintScanner, type PriorityWeights, type ScanOptions, type Scanner, type ScannerTaskContext, TestGapScanner, TodoScanner, createDefaultCompositeScanner, rankTasks };