dsh-hs-classify 0.0.0-stage → 0.2.1
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/CHANGELOG.md +20 -0
- package/LICENSE +15 -0
- package/README-es.md +94 -0
- package/README-hi.md +94 -0
- package/README-pt.md +94 -0
- package/README-zh.md +94 -0
- package/README.md +136 -2
- package/SECURITY.md +39 -0
- package/cordis.patch.yml +8 -0
- package/icon.svg +6 -0
- package/lib/index.d.mts +52 -0
- package/lib/index.mjs +2705 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +89 -4
- package/rules/citations-baseline.json +4 -0
- package/rules/hs-classify.yaml +169 -0
package/lib/index.d.mts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import Schema from "@deepseek-ai/schemastery";
|
|
2
|
+
import { Context } from "@deepseek-ai/cordis";
|
|
3
|
+
//#region src/config.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Every tunable lives here so an operator can change behaviour from
|
|
6
|
+
* `cordis.yml` without editing code (the family's "no hard-coded tunables"
|
|
7
|
+
* redline). The rule pack itself is data as well and can be pointed elsewhere.
|
|
8
|
+
*/
|
|
9
|
+
interface Config {
|
|
10
|
+
/** Rule-pack path relative to the plugin package root. */
|
|
11
|
+
rulesFile: string;
|
|
12
|
+
/** Rule ids disabled for this deployment. */
|
|
13
|
+
disabledRules: string[];
|
|
14
|
+
/** When non-empty, only these rule ids run. */
|
|
15
|
+
onlyRules: string[];
|
|
16
|
+
/** Extra note appended to every `skipped` reason. */
|
|
17
|
+
skipNotes: string;
|
|
18
|
+
/** Tool timeout budget in milliseconds. */
|
|
19
|
+
timeoutMs: number;
|
|
20
|
+
}
|
|
21
|
+
declare const Config: Schema<Config>;
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/index.d.ts
|
|
24
|
+
declare const name = "dsh-hs-classify";
|
|
25
|
+
declare const inject: string[];
|
|
26
|
+
/** Tool id exposed to the model, and the row id in `cordis.patch.yml`. */
|
|
27
|
+
declare const TOOL_NAME = "hs_classify";
|
|
28
|
+
/**
|
|
29
|
+
* Locate a package-owned file such as the rule pack.
|
|
30
|
+
*
|
|
31
|
+
* Resolution order: absolute path, then every ancestor of the module directory,
|
|
32
|
+
* then the process working directory. A wrong silent fallback would build a
|
|
33
|
+
* report from the wrong rule pack, so a miss throws with the paths tried.
|
|
34
|
+
*
|
|
35
|
+
* @param relative - configured path, relative to the plugin package root.
|
|
36
|
+
* @returns the resolved absolute path.
|
|
37
|
+
* @throws Error naming every location tried, when the file is absent.
|
|
38
|
+
*/
|
|
39
|
+
declare function resolvePackageFile(relative: string): string;
|
|
40
|
+
/**
|
|
41
|
+
* Register the checker tool.
|
|
42
|
+
*
|
|
43
|
+
* Registration is an effect: `ctx.tools.register` returns the disposer that
|
|
44
|
+
* removes the tool when this plugin unloads, which is what keeps the plugin
|
|
45
|
+
* hot-reloadable.
|
|
46
|
+
*
|
|
47
|
+
* @param ctx - plugin context, with `tools` already available.
|
|
48
|
+
* @param config - validated configuration.
|
|
49
|
+
*/
|
|
50
|
+
declare function apply(ctx: Context, config: Config): () => void;
|
|
51
|
+
//#endregion
|
|
52
|
+
export { Config, TOOL_NAME, apply, inject, name, resolvePackageFile };
|