@team-antioch/sc2-finder-kit 0.0.0-stage → 0.2.0
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 +21 -0
- package/README.md +36 -2
- package/dist/asker.d.ts +91 -0
- package/dist/asker.js +214 -0
- package/dist/cache-dir.d.ts +4 -0
- package/dist/cache-dir.js +17 -0
- package/dist/card.d.ts +35 -0
- package/dist/card.js +4 -0
- package/dist/credentials.d.ts +34 -0
- package/dist/credentials.js +33 -0
- package/dist/embedder.d.ts +39 -0
- package/dist/embedder.js +94 -0
- package/dist/embedding-index.d.ts +26 -0
- package/dist/embedding-index.js +129 -0
- package/dist/finder.d.ts +87 -0
- package/dist/finder.js +162 -0
- package/dist/gateway-translator.d.ts +21 -0
- package/dist/gateway-translator.js +62 -0
- package/dist/is-main.d.ts +6 -0
- package/dist/is-main.js +17 -0
- package/dist/jev-language-detector.d.ts +15 -0
- package/dist/jev-language-detector.js +44 -0
- package/dist/jev-ranker.d.ts +45 -0
- package/dist/jev-ranker.js +93 -0
- package/dist/key-file.d.ts +13 -0
- package/dist/key-file.js +62 -0
- package/dist/language-detector.d.ts +20 -0
- package/dist/language-detector.js +38 -0
- package/dist/load-together.d.ts +26 -0
- package/dist/load-together.js +39 -0
- package/dist/login.d.ts +34 -0
- package/dist/login.js +137 -0
- package/dist/narrow.d.ts +57 -0
- package/dist/narrow.js +74 -0
- package/dist/payload-log.d.ts +5 -0
- package/dist/payload-log.js +12 -0
- package/dist/ranker.d.ts +80 -0
- package/dist/ranker.js +40 -0
- package/dist/server.d.ts +178 -0
- package/dist/server.js +565 -0
- package/dist/settings.d.ts +7 -0
- package/dist/settings.js +20 -0
- package/dist/spend-cap.d.ts +14 -0
- package/dist/spend-cap.js +22 -0
- package/dist/test-asks.d.ts +60 -0
- package/dist/test-asks.js +107 -0
- package/dist/translator.d.ts +48 -0
- package/dist/translator.js +51 -0
- package/dist/tray.d.ts +22 -0
- package/dist/tray.js +12 -0
- package/package.json +45 -4
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { Tag } from "./card.ts";
|
|
2
|
+
export { TICK_LOG_FILE } from "./tray.ts";
|
|
3
|
+
/** One ask and the cards it should find. */
|
|
4
|
+
export type NarrowingCase = {
|
|
5
|
+
/** Where it came from: a test ask's source, or a tick log's line. */
|
|
6
|
+
readonly from: string;
|
|
7
|
+
readonly ask: string;
|
|
8
|
+
/** The object the ask is a part of, when it is one. */
|
|
9
|
+
readonly object?: string;
|
|
10
|
+
readonly tags?: readonly Tag[];
|
|
11
|
+
/** The ids it should find, best first. */
|
|
12
|
+
readonly targets: readonly string[];
|
|
13
|
+
/** Whether its targets were checked by hand: a tick log's always are. */
|
|
14
|
+
readonly reviewed: boolean;
|
|
15
|
+
};
|
|
16
|
+
/** A test asks file's cases, refused naming `shown` and each issue's path when it isn't valid. */
|
|
17
|
+
export declare function parseTestAsks(text: string, shown: string): NarrowingCase[];
|
|
18
|
+
export declare const readTestAsks: (file: string) => Promise<NarrowingCase[]>;
|
|
19
|
+
/** A tick log's line: the ask, its tags, the ids ticked from it so far, best first. The Finder appends one on every tick, so an ask's last line holds all its ticks. */
|
|
20
|
+
export type TickLine = {
|
|
21
|
+
readonly ask: string;
|
|
22
|
+
readonly tags?: readonly Tag[];
|
|
23
|
+
readonly ticked: readonly string[];
|
|
24
|
+
readonly object?: string;
|
|
25
|
+
};
|
|
26
|
+
export type ReadCases = {
|
|
27
|
+
readonly cases: NarrowingCase[];
|
|
28
|
+
readonly skipped: {
|
|
29
|
+
readonly file: string;
|
|
30
|
+
readonly reason: string;
|
|
31
|
+
}[];
|
|
32
|
+
};
|
|
33
|
+
/** A case per ask in each tick log, from the ask's last line. A file that isn't there is skipped quietly, a line that doesn't read with its reason. */
|
|
34
|
+
export declare function tickLogCases(files: readonly string[]): Promise<ReadCases>;
|
|
35
|
+
/** How many of some ids were found: a hit rate's numerator and denominator. */
|
|
36
|
+
export type Hits = {
|
|
37
|
+
readonly found: number;
|
|
38
|
+
readonly of: number;
|
|
39
|
+
};
|
|
40
|
+
export declare const hits: (ids: readonly string[], found: ReadonlySet<string>) => Hits;
|
|
41
|
+
export declare const addHits: (a: Hits, b: Hits) => Hits;
|
|
42
|
+
export declare const formatHits: ({ found, of }: Hits) => string;
|
|
43
|
+
/** The p-th percentile (0-100) of some numbers, by nearest rank. */
|
|
44
|
+
export declare function percentile(values: readonly number[], p: number): number;
|
|
45
|
+
/** How many targets a ranked list has in its top n, out of as many of them as could be there. */
|
|
46
|
+
export declare const topHits: (ranked: readonly string[], targets: readonly string[], n: number) => Hits;
|
|
47
|
+
/** The speed targets a finder's test command fails on. */
|
|
48
|
+
export declare const NARROWING_P95_MS = 50;
|
|
49
|
+
export declare const WARM_START_MS = 3000;
|
|
50
|
+
/** How many of the ranked candidates the mapper sees first. */
|
|
51
|
+
export declare const TOP_RANKED = 10;
|
|
52
|
+
/** A first call's cost, guessed before any ranker has answered: well above what a 200-card ask costs. */
|
|
53
|
+
export declare const FIRST_CALL_GUESS = 0.01;
|
|
54
|
+
/** How long a warm start may take before it is killed: a hung start must not hang the test command. */
|
|
55
|
+
export declare const WARM_START_TIMEOUT_MS = 180000;
|
|
56
|
+
/**
|
|
57
|
+
* A warm start, in a process of its own so nothing is loaded yet: Node starting, the model, the
|
|
58
|
+
* sources, the cards and the cache. `command` is the CLI module that takes `--start-only --model`.
|
|
59
|
+
*/
|
|
60
|
+
export declare function warmStartMs(command: string, model: string): number;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
// A finder's test cases (docs/adr/0001): a test-asks.json, typical mappers' asks each
|
|
2
|
+
// with the cards it should find, and the asks in a tick log (`--tick-log`), each with the cards
|
|
3
|
+
// ticked from it. A test ask is marked `reviewed` once its expected ids have been checked by hand.
|
|
4
|
+
//
|
|
5
|
+
// { "about": "…", "asks": [{ "ask": "press head", "object": "crushing press over a conveyor belt",
|
|
6
|
+
// "expected": ["SpaceDockArch", …], "from": "crushing press search, part name", "reviewed": true }] }
|
|
7
|
+
import { spawnSync } from "node:child_process";
|
|
8
|
+
import { readFile } from "node:fs/promises";
|
|
9
|
+
import { parseJsonFile, TextSchema as Text } from "@team-antioch/sc2-asset-catalog/util/parse-json.js";
|
|
10
|
+
import { z } from "zod";
|
|
11
|
+
export { TICK_LOG_FILE } from "./tray.js";
|
|
12
|
+
const TestAskSchema = z
|
|
13
|
+
.object({
|
|
14
|
+
ask: Text,
|
|
15
|
+
object: Text.optional(),
|
|
16
|
+
tags: z.array(z.object({ facet: Text, value: Text }).strict()).optional(),
|
|
17
|
+
expected: z.array(Text).min(1),
|
|
18
|
+
from: Text.optional(),
|
|
19
|
+
reviewed: z.boolean(),
|
|
20
|
+
})
|
|
21
|
+
.strict();
|
|
22
|
+
const TestAsksSchema = z.object({ about: z.string().optional(), asks: z.array(TestAskSchema) }).strict();
|
|
23
|
+
/** A test asks file's cases, refused naming `shown` and each issue's path when it isn't valid. */
|
|
24
|
+
export function parseTestAsks(text, shown) {
|
|
25
|
+
return parseJsonFile(text, shown, TestAsksSchema, "a valid test asks file").asks.map(({ ask, object, tags, expected, from, reviewed }, i) => ({
|
|
26
|
+
from: from ?? `${shown} ask ${i + 1}`,
|
|
27
|
+
ask,
|
|
28
|
+
...(object !== undefined ? { object } : {}),
|
|
29
|
+
...(tags !== undefined ? { tags: tags } : {}),
|
|
30
|
+
targets: expected,
|
|
31
|
+
reviewed,
|
|
32
|
+
}));
|
|
33
|
+
}
|
|
34
|
+
export const readTestAsks = async (file) => parseTestAsks(await readFile(file, "utf8"), file);
|
|
35
|
+
/** A case per ask in each tick log, from the ask's last line. A file that isn't there is skipped quietly, a line that doesn't read with its reason. */
|
|
36
|
+
export async function tickLogCases(files) {
|
|
37
|
+
const skipped = [];
|
|
38
|
+
const latest = new Map();
|
|
39
|
+
for (const file of files) {
|
|
40
|
+
const text = await readFile(file, "utf8").catch(() => undefined);
|
|
41
|
+
if (text === undefined)
|
|
42
|
+
continue;
|
|
43
|
+
text.split("\n").forEach((line, i) => {
|
|
44
|
+
if (!line.trim())
|
|
45
|
+
return;
|
|
46
|
+
try {
|
|
47
|
+
const tick = JSON.parse(line);
|
|
48
|
+
if (typeof tick.ask !== "string" || !Array.isArray(tick.ticked))
|
|
49
|
+
throw new Error("needs an ask and the ids ticked");
|
|
50
|
+
const object = typeof tick.object === "string" ? tick.object : undefined;
|
|
51
|
+
// A later line for the ask replaces an earlier one, keeping its place.
|
|
52
|
+
latest.set(JSON.stringify([file, object, tick.ask]), {
|
|
53
|
+
from: `tick log line ${i + 1}`,
|
|
54
|
+
ask: tick.ask,
|
|
55
|
+
...(object ? { object } : {}),
|
|
56
|
+
...(tick.tags ? { tags: tick.tags } : {}),
|
|
57
|
+
targets: tick.ticked,
|
|
58
|
+
reviewed: true,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
skipped.push({ file: `${file}:${i + 1}`, reason: error.message });
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
return { cases: [...latest.values()].filter(({ targets }) => targets.length), skipped };
|
|
67
|
+
}
|
|
68
|
+
export const hits = (ids, found) => ({ found: ids.filter((id) => found.has(id)).length, of: ids.length });
|
|
69
|
+
export const addHits = (a, b) => ({ found: a.found + b.found, of: a.of + b.of });
|
|
70
|
+
export const formatHits = ({ found, of }) => (of ? `${found}/${of} (${Math.round((100 * found) / of)}%)` : "none");
|
|
71
|
+
/** The p-th percentile (0-100) of some numbers, by nearest rank. */
|
|
72
|
+
export function percentile(values, p) {
|
|
73
|
+
if (!values.length)
|
|
74
|
+
return Number.NaN;
|
|
75
|
+
const sorted = [...values].sort((a, b) => a - b);
|
|
76
|
+
return sorted[Math.min(sorted.length - 1, Math.max(0, Math.ceil((p / 100) * sorted.length) - 1))];
|
|
77
|
+
}
|
|
78
|
+
/** How many targets a ranked list has in its top n, out of as many of them as could be there. */
|
|
79
|
+
export const topHits = (ranked, targets, n) => {
|
|
80
|
+
const top = new Set(ranked.slice(0, n));
|
|
81
|
+
return { found: targets.filter((id) => top.has(id)).length, of: Math.min(n, targets.length) };
|
|
82
|
+
};
|
|
83
|
+
/** The speed targets a finder's test command fails on. */
|
|
84
|
+
export const NARROWING_P95_MS = 50;
|
|
85
|
+
export const WARM_START_MS = 3000;
|
|
86
|
+
/** How many of the ranked candidates the mapper sees first. */
|
|
87
|
+
export const TOP_RANKED = 10;
|
|
88
|
+
/** A first call's cost, guessed before any ranker has answered: well above what a 200-card ask costs. */
|
|
89
|
+
export const FIRST_CALL_GUESS = 0.01;
|
|
90
|
+
/** How long a warm start may take before it is killed: a hung start must not hang the test command. */
|
|
91
|
+
export const WARM_START_TIMEOUT_MS = 180_000;
|
|
92
|
+
/**
|
|
93
|
+
* A warm start, in a process of its own so nothing is loaded yet: Node starting, the model, the
|
|
94
|
+
* sources, the cards and the cache. `command` is the CLI module that takes `--start-only --model`.
|
|
95
|
+
*/
|
|
96
|
+
export function warmStartMs(command, model) {
|
|
97
|
+
const started = performance.now();
|
|
98
|
+
const run = spawnSync(process.execPath, [command, "--start-only", "--model", model], { encoding: "utf8", timeout: WARM_START_TIMEOUT_MS });
|
|
99
|
+
const ms = performance.now() - started;
|
|
100
|
+
if (run.error || run.signal) {
|
|
101
|
+
const why = run.signal ? `was killed by ${run.signal}${run.error ? ` (${run.error.message})` : ""}` : `could not run: ${run.error.message}`;
|
|
102
|
+
throw new Error(`The warm start ${why} after ${Math.round(ms / 1000)} s (it is given ${WARM_START_TIMEOUT_MS / 1000} s).`);
|
|
103
|
+
}
|
|
104
|
+
if (run.status !== 0)
|
|
105
|
+
throw new Error(`The warm start failed: ${run.stderr.trim()}`);
|
|
106
|
+
return ms;
|
|
107
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type LanguageDetector } from "./language-detector.ts";
|
|
2
|
+
/** Turns an ask into English, keeping the game's own terms (Zerg, doodad, ids) as they are. */
|
|
3
|
+
export interface Translator {
|
|
4
|
+
translate(ask: string, options?: {
|
|
5
|
+
readonly signal?: AbortSignal;
|
|
6
|
+
}): Promise<string>;
|
|
7
|
+
}
|
|
8
|
+
/** Whether the ask has a letter outside the Latin script: Cyrillic, Hangul, Han, Kana, Greek, Arabic... */
|
|
9
|
+
export declare const needsTranslation: (ask: string) => boolean;
|
|
10
|
+
/** How long a translator gets, in milliseconds, before the ask is searched as typed. */
|
|
11
|
+
export declare const TRANSLATE_TIMEOUT_MS = 3000;
|
|
12
|
+
export type Translation = {
|
|
13
|
+
/** The ask as typed. */
|
|
14
|
+
readonly original: string;
|
|
15
|
+
/** The ask the searches ran on: the translation, or the original when it was English or couldn't be translated. */
|
|
16
|
+
readonly english: string;
|
|
17
|
+
/** Whether `english` is a translation: false when the detector called the ask English, or the translator failed. */
|
|
18
|
+
readonly translated: boolean;
|
|
19
|
+
/** Milliseconds the detector and the translator took, including a failed or timed-out call. */
|
|
20
|
+
readonly ms: number;
|
|
21
|
+
/** What the detector said, when it was asked. */
|
|
22
|
+
readonly detection?: {
|
|
23
|
+
readonly english: boolean;
|
|
24
|
+
readonly pEnglish: number;
|
|
25
|
+
readonly cost: number;
|
|
26
|
+
} | {
|
|
27
|
+
readonly error: string;
|
|
28
|
+
};
|
|
29
|
+
/** Why the ask was left as typed, when the translator failed. */
|
|
30
|
+
readonly error?: string;
|
|
31
|
+
};
|
|
32
|
+
export type TranslateOptions = {
|
|
33
|
+
/** How long each of the detector and the translator gets, in milliseconds. */
|
|
34
|
+
readonly timeout?: number;
|
|
35
|
+
/** Decides, for a Latin-script ask the vocabulary doesn't cover, whether it is English. None: such asks aren't translated. */
|
|
36
|
+
readonly detector?: LanguageDetector | undefined;
|
|
37
|
+
/** The catalog's English words: an ask made of them is English with no detector call. */
|
|
38
|
+
readonly vocabulary?: ReadonlySet<string> | undefined;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* The ask in English, when it needs translating and a translator is given; else undefined, with the
|
|
42
|
+
* translator not called. An ask needs translating when it has letters outside the Latin script, or
|
|
43
|
+
* is Latin script the vocabulary doesn't cover and the detector doesn't call English (a detector
|
|
44
|
+
* that fails counts as not English). When the detector was asked and called it English, the result
|
|
45
|
+
* says so and the ask stands. A translator that throws, times out or answers nothing leaves the ask
|
|
46
|
+
* as typed, with the reason in `error`.
|
|
47
|
+
*/
|
|
48
|
+
export declare function translateAsk(ask: string, translator: Translator | undefined, { timeout, detector, vocabulary }?: TranslateOptions): Promise<Translation | undefined>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// The finder kit's translator slot: the catalog's words, and so both searches and the ranker, are
|
|
2
|
+
// English. An ask written in another script (Russian, Korean, Chinese, Arabic...) is translated to
|
|
3
|
+
// English first, by whatever fills the slot, and the English is what narrows and ranks. A caller
|
|
4
|
+
// with no translator, an English ask, and a translator that fails or runs out of time all leave the
|
|
5
|
+
// ask as typed: translating can only help, never stop a search.
|
|
6
|
+
//
|
|
7
|
+
// A different script is known from the ask's letters, which needs no library. Latin-script
|
|
8
|
+
// languages (Spanish, German, French...) look English to every local check, so with a language
|
|
9
|
+
// detector (language-detector.ts) an ask that isn't made of the catalog's own English words is put
|
|
10
|
+
// to it, and translated unless it says English; without one they pass untranslated.
|
|
11
|
+
import { inVocabulary } from "./language-detector.js";
|
|
12
|
+
/** Whether the ask has a letter outside the Latin script: Cyrillic, Hangul, Han, Kana, Greek, Arabic... */
|
|
13
|
+
export const needsTranslation = (ask) => /(?!\p{Script=Latin})\p{L}/u.test(ask);
|
|
14
|
+
/** How long a translator gets, in milliseconds, before the ask is searched as typed. */
|
|
15
|
+
export const TRANSLATE_TIMEOUT_MS = 3000;
|
|
16
|
+
/**
|
|
17
|
+
* The ask in English, when it needs translating and a translator is given; else undefined, with the
|
|
18
|
+
* translator not called. An ask needs translating when it has letters outside the Latin script, or
|
|
19
|
+
* is Latin script the vocabulary doesn't cover and the detector doesn't call English (a detector
|
|
20
|
+
* that fails counts as not English). When the detector was asked and called it English, the result
|
|
21
|
+
* says so and the ask stands. A translator that throws, times out or answers nothing leaves the ask
|
|
22
|
+
* as typed, with the reason in `error`.
|
|
23
|
+
*/
|
|
24
|
+
export async function translateAsk(ask, translator, { timeout = TRANSLATE_TIMEOUT_MS, detector, vocabulary } = {}) {
|
|
25
|
+
if (!translator)
|
|
26
|
+
return undefined;
|
|
27
|
+
const started = performance.now();
|
|
28
|
+
const took = () => performance.now() - started;
|
|
29
|
+
let detection;
|
|
30
|
+
if (!needsTranslation(ask)) {
|
|
31
|
+
if (!detector || /^[^\p{L}]*$/u.test(ask) || (vocabulary && inVocabulary(ask, vocabulary)))
|
|
32
|
+
return undefined;
|
|
33
|
+
try {
|
|
34
|
+
detection = await detector.detect(ask, { signal: AbortSignal.timeout(timeout) });
|
|
35
|
+
if (detection.english)
|
|
36
|
+
return { original: ask, english: ask, translated: false, ms: took(), detection };
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
detection = { error: error instanceof Error ? error.message : String(error) };
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
try {
|
|
43
|
+
const english = (await translator.translate(ask, { signal: AbortSignal.timeout(timeout) })).trim();
|
|
44
|
+
if (!english)
|
|
45
|
+
return { original: ask, english: ask, translated: false, ms: took(), ...(detection ? { detection } : {}), error: "the translator answered nothing" };
|
|
46
|
+
return { original: ask, english, translated: true, ms: took(), ...(detection ? { detection } : {}) };
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
return { original: ask, english: ask, translated: false, ms: took(), ...(detection ? { detection } : {}), error: error instanceof Error ? error.message : String(error) };
|
|
50
|
+
}
|
|
51
|
+
}
|
package/dist/tray.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Tag } from "./card.ts";
|
|
2
|
+
/** A tick log's file name, inside the folder a finder's --tick-log names. */
|
|
3
|
+
export declare const TICK_LOG_FILE = "ticks.jsonl";
|
|
4
|
+
/** A ticked card in the tray. */
|
|
5
|
+
export type TrayItem = {
|
|
6
|
+
readonly id: string;
|
|
7
|
+
readonly name: string;
|
|
8
|
+
/** The ask it was ticked from, and the tags that ask ran with. */
|
|
9
|
+
readonly ask: string;
|
|
10
|
+
readonly tags: readonly Tag[];
|
|
11
|
+
/** The ranker's level for it in that ask, when the ask was ranked. */
|
|
12
|
+
readonly level?: number;
|
|
13
|
+
/** The map dependency it needs, absent when the default brings it in. */
|
|
14
|
+
readonly dependency?: string;
|
|
15
|
+
};
|
|
16
|
+
/** What a finder copies: one card's text, and the whole tray's. */
|
|
17
|
+
export type CopyText = {
|
|
18
|
+
item(item: Pick<TrayItem, "id" | "dependency">): string;
|
|
19
|
+
all(items: readonly Pick<TrayItem, "id" | "dependency">[]): string;
|
|
20
|
+
};
|
|
21
|
+
/** Ticks a card into the tray, or unticks it. A card is in the tray once, under the ask it was last ticked from. */
|
|
22
|
+
export declare function ticked(tray: readonly TrayItem[], item: TrayItem, on: boolean): TrayItem[];
|
package/dist/tray.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// The finder kit's tray: the cards ticked this session, each with the ask it was ticked from.
|
|
2
|
+
// What "copy" puts on the clipboard for a card, or for the whole tray, is the finder's (a doodad's
|
|
3
|
+
// id and the package it needs, say): it hands the server the functions. The page copies with the
|
|
4
|
+
// browser's clipboard during the click, from text the process sent with its state, so the copy
|
|
5
|
+
// counts as the click.
|
|
6
|
+
/** A tick log's file name, inside the folder a finder's --tick-log names. */
|
|
7
|
+
export const TICK_LOG_FILE = "ticks.jsonl";
|
|
8
|
+
/** Ticks a card into the tray, or unticks it. A card is in the tray once, under the ask it was last ticked from. */
|
|
9
|
+
export function ticked(tray, item, on) {
|
|
10
|
+
const rest = tray.filter(({ id }) => id !== item.id);
|
|
11
|
+
return on ? [...rest, item] : rest;
|
|
12
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@team-antioch/sc2-finder-kit",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "What the SC2 asset finders share: a local server and page shell, the embeddings model and its vector cache, the Jev ranker with its key file and spend cap, the ask timing, the tray and the test-ask cases. Built for the Doodad Finder and the Music Finder.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"starcraft",
|
|
7
|
+
"sc2",
|
|
8
|
+
"map-editor",
|
|
9
|
+
"galaxy-editor"
|
|
10
|
+
],
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"type": "module",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/TeamAntioch/sc2-asset-catalog.git",
|
|
16
|
+
"directory": "packages/sc2-finder-kit"
|
|
17
|
+
},
|
|
18
|
+
"homepage": "https://github.com/TeamAntioch/sc2-asset-catalog#readme",
|
|
19
|
+
"bugs": "https://github.com/TeamAntioch/sc2-asset-catalog/issues",
|
|
20
|
+
"exports": {
|
|
21
|
+
"./*": "./dist/*",
|
|
22
|
+
"./package.json": "./package.json"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist",
|
|
26
|
+
"LICENSE",
|
|
27
|
+
"README.md"
|
|
28
|
+
],
|
|
29
|
+
"scripts": {
|
|
30
|
+
"clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
31
|
+
"build": "npm run clean && tsc -p tsconfig.json",
|
|
32
|
+
"lint": "tsc -p tsconfig.json --noEmit",
|
|
33
|
+
"test": "vitest run"
|
|
34
|
+
},
|
|
35
|
+
"engines": {
|
|
36
|
+
"node": ">=22.18"
|
|
37
|
+
},
|
|
38
|
+
"publishConfig": {
|
|
39
|
+
"access": "public"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@huggingface/transformers": "^4.3.2",
|
|
43
|
+
"@team-antioch/sc2-asset-catalog": "0.2.0",
|
|
44
|
+
"@typesafe-ai/sdk": "^0.7.0",
|
|
45
|
+
"zod": "^4.0.0"
|
|
46
|
+
}
|
|
47
|
+
}
|