literally-aeo 0.4.1 → 0.4.3
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.md +16 -0
- package/dist/cli.mjs +1505 -549
- package/dist/lib/agents/copy-validation.js +3 -1
- package/dist/lib/agents/methodology.js +3 -3
- package/dist/lib/agents/verifier.js +2 -2
- package/dist/lib/bundle/contracts.js +1 -1
- package/dist/lib/bundle/export.js +13 -13
- package/dist/lib/bundle/journal.js +2 -2
- package/dist/lib/bundle/project-journal.js +5 -5
- package/dist/lib/bundle/project.js +11 -11
- package/dist/lib/bundle/read.js +14 -14
- package/dist/lib/bundle/recorder.js +3 -3
- package/dist/lib/bundle/redact.js +2 -2
- package/dist/lib/bundle/trace-coverage.js +2 -2
- package/dist/lib/bundle/verify-integrity.js +4 -4
- package/dist/lib/bundle/verify-measurement.js +2 -2
- package/dist/lib/bundle/verify-report.js +3 -3
- package/dist/lib/bundle/verify.js +8 -8
- package/dist/lib/checks/run-checks.js +4 -4
- package/dist/lib/chunks/{chunk-4KF5EVLI.js → chunk-2ANSPIUT.js} +2 -2
- package/dist/lib/chunks/{chunk-G22MXBBM.js → chunk-54GMIPWV.js} +1 -1
- package/dist/lib/chunks/{chunk-PI7PZKHP.js → chunk-65OIYOUH.js} +2 -2
- package/dist/lib/chunks/{chunk-2XMVEGQG.js → chunk-6MGXILUJ.js} +1 -1
- package/dist/lib/chunks/chunk-6OURIXQZ.js +472 -0
- package/dist/lib/chunks/{chunk-OBSW2WKF.js → chunk-746643QV.js} +1 -1
- package/dist/lib/chunks/{chunk-7DR2X7SF.js → chunk-74K4E3ZS.js} +1 -1
- package/dist/lib/chunks/{chunk-JVIOWZPG.js → chunk-7HCVSLVG.js} +1 -1
- package/dist/lib/chunks/{chunk-XX2TK6FI.js → chunk-7K2XT3WI.js} +5 -5
- package/dist/lib/chunks/{chunk-ABS5TK73.js → chunk-7K6CXSTL.js} +3 -1
- package/dist/lib/chunks/{chunk-CBOETT4C.js → chunk-7L4Y6N3V.js} +1 -1
- package/dist/lib/chunks/{chunk-FDCM7554.js → chunk-7QWT7LFM.js} +2 -2
- package/dist/lib/chunks/{chunk-4UN3YD5Z.js → chunk-7SA2CRSS.js} +1 -1
- package/dist/lib/chunks/{chunk-P7LGJGDL.js → chunk-ARKZ5PJN.js} +1 -1
- package/dist/lib/chunks/{chunk-4WPG2O2S.js → chunk-B6XGNJUU.js} +1 -1
- package/dist/lib/chunks/{chunk-5OL67GMN.js → chunk-BNX7S4GK.js} +4 -4
- package/dist/lib/chunks/chunk-BWBPEXEU.js +83 -0
- package/dist/lib/chunks/{chunk-U53GT2R7.js → chunk-BZAPAGXM.js} +1 -1
- package/dist/lib/chunks/{chunk-BNPWAQQG.js → chunk-C2Q7YE7Y.js} +6 -6
- package/dist/lib/chunks/{chunk-LYOCWN3R.js → chunk-D2LJMNH3.js} +2 -2
- package/dist/lib/chunks/{chunk-32HYNVPR.js → chunk-EVEJ3MFU.js} +3 -3
- package/dist/lib/chunks/{chunk-DGOFCRZM.js → chunk-GC7DISQO.js} +1 -1
- package/dist/lib/chunks/{chunk-BTRBLG6S.js → chunk-I6PQUKKF.js} +1 -1
- package/dist/lib/chunks/{chunk-6FGVCN4H.js → chunk-J5RYDPGP.js} +1 -1
- package/dist/lib/chunks/{chunk-JIUBLXR7.js → chunk-JHUI2K5X.js} +3 -3
- package/dist/lib/chunks/chunk-JQFLWUCA.js +123 -0
- package/dist/lib/chunks/{chunk-4RB3AOPT.js → chunk-JREYIUNG.js} +5 -5
- package/dist/lib/chunks/{chunk-42QARLUQ.js → chunk-JXQOWHWB.js} +3 -3
- package/dist/lib/chunks/{chunk-66BTHIL3.js → chunk-KFJ5O5CL.js} +2 -2
- package/dist/lib/chunks/{chunk-6P7EZJI7.js → chunk-KSJ3NZIJ.js} +4 -2
- package/dist/lib/chunks/{chunk-3RGUIUKU.js → chunk-L5HFTFFG.js} +2 -2
- package/dist/lib/chunks/{chunk-WBSJVDS2.js → chunk-LJD37WAV.js} +2 -2
- package/dist/lib/chunks/{chunk-QT5GTQGD.js → chunk-MKA2EP7M.js} +1 -1
- package/dist/lib/chunks/{chunk-CZMQ2DVJ.js → chunk-MMJ5UR2E.js} +1 -1
- package/dist/lib/chunks/{chunk-BWUOUP4J.js → chunk-MQFFMD4Q.js} +1 -1
- package/dist/lib/chunks/{chunk-7D7EOET3.js → chunk-NM2LUMQT.js} +4 -4
- package/dist/lib/chunks/{chunk-IJQEQL5Q.js → chunk-P5VVHTZU.js} +1 -1
- package/dist/lib/chunks/{chunk-OJQ66533.js → chunk-PFG3ESJE.js} +9 -9
- package/dist/lib/chunks/{chunk-WSATQQJI.js → chunk-Q7CWM6LZ.js} +6 -6
- package/dist/lib/chunks/{chunk-F6CC4WLO.js → chunk-R4HYBSQB.js} +1 -1
- package/dist/lib/chunks/{chunk-FWH3LYHG.js → chunk-R5NLULQW.js} +1 -1
- package/dist/lib/chunks/{chunk-WUDXMAJS.js → chunk-RM7U5M5L.js} +1 -1
- package/dist/lib/chunks/{chunk-3G6COT6E.js → chunk-RQ6GUJI5.js} +1 -1
- package/dist/lib/chunks/{chunk-TNTTIT2R.js → chunk-RUSMX6JH.js} +16 -7
- package/dist/lib/chunks/{chunk-G4GAGKSG.js → chunk-UNNRLD2U.js} +4 -4
- package/dist/lib/chunks/chunk-VFN2J4Z3.js +626 -0
- package/dist/lib/chunks/{chunk-BLDOQAEW.js → chunk-VPJN2GNC.js} +1 -1
- package/dist/lib/chunks/{chunk-3GDCPD5P.js → chunk-XSOTCSD3.js} +3 -3
- package/dist/lib/chunks/{chunk-WHW3NOG5.js → chunk-YX4EH6FR.js} +1 -1
- package/dist/lib/chunks/{chunk-TXGVQ6CN.js → chunk-ZC4MKS3J.js} +12 -12
- package/dist/lib/chunks/{chunk-VXO5RAR4.js → chunk-ZM4RHMBI.js} +1 -1
- package/dist/lib/cli/bundle-commands.js +60 -35
- package/dist/lib/cli/guide-command.js +1 -1
- package/dist/lib/cli/run-commands.js +40 -40
- package/dist/lib/cli/status-command.js +21 -21
- package/dist/lib/codex-workflow/aggregate.js +2 -2
- package/dist/lib/codex-workflow/author.js +5 -5
- package/dist/lib/codex-workflow/capture.js +5 -5
- package/dist/lib/codex-workflow/copy-editor.js +5 -5
- package/dist/lib/codex-workflow/copy.js +4 -4
- package/dist/lib/codex-workflow/finish.js +5 -5
- package/dist/lib/codex-workflow/loop.js +15 -15
- package/dist/lib/codex-workflow/run-source.js +5 -5
- package/dist/lib/codex-workflow/stage.js +6 -6
- package/dist/lib/engine/audit-file.js +3 -3
- package/dist/lib/engine/author.js +12 -12
- package/dist/lib/engine/cost-estimate.js +3 -3
- package/dist/lib/engine/local-run.js +20 -20
- package/dist/lib/engine/preflight.js +3 -3
- package/dist/lib/engine/rejudge.js +27 -27
- package/dist/lib/engine/resources.js +1 -1
- package/dist/lib/engine/run-bindings.js +3 -3
- package/dist/lib/engine/run-method.js +3 -3
- package/dist/lib/engine/run-models.js +4 -4
- package/dist/lib/engine/run-status.js +21 -21
- package/dist/lib/engine/templates.js +4 -4
- package/dist/lib/grounding/grounding-runtime.js +5 -5
- package/dist/lib/grounding/recorded-tools.js +4 -4
- package/dist/lib/pipeline.js +4 -4
- package/dist/lib/probes/bindings.js +2 -2
- package/dist/lib/probes/charged-trace.js +3 -3
- package/dist/lib/probes/probes.js +3 -3
- package/dist/lib/stores/files.js +3 -3
- package/dist/lib/stores/memory.js +2 -2
- package/dist/lib/stores/publication.js +2 -2
- package/dist/lib/viewer/alternatives.js +8 -0
- package/dist/lib/viewer/cited-domains.js +8 -0
- package/dist/lib/viewer/page.js +3 -1
- package/dist/lib/viewer/presentation.js +41 -0
- package/dist/lib/viewer/server.js +15 -10
- package/dist/types/agents/copy-validation.d.ts +2 -1
- package/dist/types/bundle/contracts.d.ts +1 -1
- package/dist/types/engine/resources.d.ts +2 -0
- package/dist/types/viewer/alternatives.d.ts +16 -0
- package/dist/types/viewer/cited-domains.d.ts +22 -0
- package/dist/types/viewer/page.d.ts +9 -2
- package/dist/types/viewer/presentation.d.ts +112 -0
- package/dist/types/viewer/server.d.ts +7 -3
- package/package.json +2 -1
- package/resources/fonts/Mulish-OFL.txt +93 -0
- package/resources/fonts/Mulish-VariableFont_wght.ttf +0 -0
- package/resources/fonts/SourceCodePro-OFL.txt +93 -0
- package/resources/fonts/SourceCodePro-VariableFont_wght.ttf +0 -0
- package/src/agents/copy-validation.ts +8 -2
- package/src/bundle/contracts.ts +1 -1
- package/src/cli/bundle-commands.ts +21 -0
- package/src/engine/resources.ts +9 -5
- package/src/report/core/rate-interval.ts +1 -2
- package/src/viewer/alternatives.ts +202 -0
- package/src/viewer/cited-domains.ts +127 -0
- package/src/viewer/page.ts +549 -236
- package/src/viewer/presentation.ts +759 -0
- package/src/viewer/server.ts +25 -4
- package/dist/lib/chunks/chunk-3TF4JGQA.js +0 -323
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isGroundingRedirectUrl
|
|
3
|
+
} from "./chunk-UGCT46PC.js";
|
|
4
|
+
import {
|
|
5
|
+
normalizeDomain
|
|
6
|
+
} from "./chunk-QTXOW5XC.js";
|
|
7
|
+
|
|
8
|
+
// src/viewer/cited-domains.ts
|
|
9
|
+
var groupCitedDomains = (visibility, brandDomain) => {
|
|
10
|
+
const brand = normalizeDomain(brandDomain);
|
|
11
|
+
const urlsByDomain = /* @__PURE__ */ new Map();
|
|
12
|
+
const brandHostCounts = /* @__PURE__ */ new Map();
|
|
13
|
+
for (const row of visibility.matrix) {
|
|
14
|
+
for (const url of row.citedUrls ?? []) {
|
|
15
|
+
const host = isGroundingRedirectUrl(url) ? void 0 : hostOf(url);
|
|
16
|
+
if (host === void 0) {
|
|
17
|
+
continue;
|
|
18
|
+
}
|
|
19
|
+
const isBrandHost = host === brand || host.endsWith(`.${brand}`);
|
|
20
|
+
const domain = isBrandHost ? brand : apexOf(host);
|
|
21
|
+
const urls = urlsByDomain.get(domain) ?? /* @__PURE__ */ new Map();
|
|
22
|
+
const cited = urls.get(url) ?? {
|
|
23
|
+
url,
|
|
24
|
+
count: 0,
|
|
25
|
+
surfaces: [],
|
|
26
|
+
prompts: []
|
|
27
|
+
};
|
|
28
|
+
const promptText = visibility.prompts[row.promptIdx]?.text;
|
|
29
|
+
cited.count += 1;
|
|
30
|
+
if (!cited.surfaces.includes(row.surface)) {
|
|
31
|
+
cited.surfaces.push(row.surface);
|
|
32
|
+
}
|
|
33
|
+
if (promptText !== void 0 && !cited.prompts.includes(promptText)) {
|
|
34
|
+
cited.prompts.push(promptText);
|
|
35
|
+
}
|
|
36
|
+
urls.set(url, cited);
|
|
37
|
+
urlsByDomain.set(domain, urls);
|
|
38
|
+
if (isBrandHost) {
|
|
39
|
+
const label = brandHostLabel(host, brand);
|
|
40
|
+
brandHostCounts.set(label, (brandHostCounts.get(label) ?? 0) + 1);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
const domainOf = (domain) => {
|
|
45
|
+
const urls = [...urlsByDomain.get(domain)?.values() ?? []].sort(
|
|
46
|
+
(a, b) => b.count - a.count || a.url.localeCompare(b.url)
|
|
47
|
+
);
|
|
48
|
+
const cited = {
|
|
49
|
+
domain,
|
|
50
|
+
count: urls.reduce((sum, url) => sum + url.count, 0),
|
|
51
|
+
isBrand: domain === brand,
|
|
52
|
+
urls
|
|
53
|
+
};
|
|
54
|
+
return cited;
|
|
55
|
+
};
|
|
56
|
+
const brandRow = {
|
|
57
|
+
...domainOf(brand),
|
|
58
|
+
...brandHostCounts.size > 0 && {
|
|
59
|
+
hosts: [...brandHostCounts].map(([label, count]) => ({ label, count })).sort((a, b) => b.count - a.count)
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
const others = [...urlsByDomain.keys()].filter((domain) => domain !== brand).map(domainOf).sort((a, b) => b.count - a.count || a.domain.localeCompare(b.domain));
|
|
63
|
+
const domains = [brandRow, ...others];
|
|
64
|
+
return domains;
|
|
65
|
+
};
|
|
66
|
+
var hostOf = (url) => {
|
|
67
|
+
try {
|
|
68
|
+
return normalizeDomain(new URL(url).hostname);
|
|
69
|
+
} catch {
|
|
70
|
+
return void 0;
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
var apexOf = (host) => {
|
|
74
|
+
const labels = host.split(".");
|
|
75
|
+
return labels.length <= 2 ? host : labels.slice(-2).join(".");
|
|
76
|
+
};
|
|
77
|
+
var brandHostLabel = (host, brand) => {
|
|
78
|
+
return host === brand ? "site" : host.slice(0, -(brand.length + 1));
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export {
|
|
82
|
+
groupCitedDomains
|
|
83
|
+
};
|
|
@@ -7,20 +7,20 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
projectWorkdir,
|
|
9
9
|
recordedRunMethod
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-Q7CWM6LZ.js";
|
|
11
11
|
import {
|
|
12
12
|
exportBeforeFreezeMessage
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-2ANSPIUT.js";
|
|
14
14
|
import {
|
|
15
15
|
redactBundle
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-GC7DISQO.js";
|
|
17
17
|
import {
|
|
18
18
|
runJournalDir
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-D2LJMNH3.js";
|
|
20
20
|
import {
|
|
21
21
|
openJournal,
|
|
22
22
|
readJournal
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-MQFFMD4Q.js";
|
|
24
24
|
import {
|
|
25
25
|
mintRunId
|
|
26
26
|
} from "./chunk-W46Y7KBR.js";
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
toolId,
|
|
37
37
|
toolVersion,
|
|
38
38
|
traceSchemaVersion
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-6MGXILUJ.js";
|
|
40
40
|
import {
|
|
41
41
|
encodeBundleJson,
|
|
42
42
|
parseBundleJson,
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
openJournal,
|
|
6
6
|
putObject,
|
|
7
7
|
readJournal
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-MQFFMD4Q.js";
|
|
9
9
|
import {
|
|
10
10
|
mintRunId
|
|
11
11
|
} from "./chunk-W46Y7KBR.js";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
operationKinds,
|
|
17
17
|
toolId,
|
|
18
18
|
toolVersion
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-6MGXILUJ.js";
|
|
20
20
|
|
|
21
21
|
// src/bundle/recorder.ts
|
|
22
22
|
import { readFile, rename, stat } from "node:fs/promises";
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-SREGO3PU.js";
|
|
4
4
|
import {
|
|
5
5
|
assessTraceCoverage
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7L4Y6N3V.js";
|
|
7
7
|
import {
|
|
8
8
|
readJournal
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MQFFMD4Q.js";
|
|
10
10
|
import {
|
|
11
11
|
CheckOutcome,
|
|
12
12
|
checkFrom,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
bundlePaths,
|
|
17
17
|
digestManifest,
|
|
18
18
|
objectPathPrefix
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-6MGXILUJ.js";
|
|
20
20
|
import {
|
|
21
21
|
sha256Hex
|
|
22
22
|
} from "./chunk-E6NQQU6V.js";
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
} from "./chunk-D7N5OLYL.js";
|
|
4
4
|
import {
|
|
5
5
|
engineResources
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KSJ3NZIJ.js";
|
|
7
7
|
import {
|
|
8
8
|
stagePrompts
|
|
9
9
|
} from "./chunk-6FRZN5SA.js";
|
|
10
10
|
import {
|
|
11
11
|
createRecommendationVerifier
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-R4HYBSQB.js";
|
|
13
13
|
import {
|
|
14
14
|
generateStructured,
|
|
15
15
|
structuredCallReservation
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from "./chunk-PO2J5OQ3.js";
|
|
20
20
|
import {
|
|
21
21
|
validateAgentCopy
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-7K6CXSTL.js";
|
|
23
23
|
import {
|
|
24
24
|
isRecord
|
|
25
25
|
} from "./chunk-7PLK6VGC.js";
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import {
|
|
2
|
+
qualifiedCompetitorsForRow
|
|
3
|
+
} from "./chunk-GMGKKE5N.js";
|
|
4
|
+
import {
|
|
5
|
+
normalizeDomain
|
|
6
|
+
} from "./chunk-QTXOW5XC.js";
|
|
7
|
+
|
|
8
|
+
// src/viewer/alternatives.ts
|
|
9
|
+
var rankAlternatives = (matrix, prospect) => {
|
|
10
|
+
const isProspect = matchesProspect(prospect);
|
|
11
|
+
const ranked = [...foldNameOnlySightings(collectSightings(matrix)).values()].filter((sighting) => !isProspect(sighting)).map((sighting) => ({
|
|
12
|
+
name: displayName(sighting),
|
|
13
|
+
...sighting.domain !== void 0 && { domain: sighting.domain },
|
|
14
|
+
mentioning: sighting.rowIndices.size,
|
|
15
|
+
captured: matrix.length
|
|
16
|
+
})).sort(
|
|
17
|
+
(a, b) => b.mentioning - a.mentioning || a.name.localeCompare(b.name)
|
|
18
|
+
);
|
|
19
|
+
return ranked;
|
|
20
|
+
};
|
|
21
|
+
var collectSightings = (matrix) => {
|
|
22
|
+
const sightings = /* @__PURE__ */ new Map();
|
|
23
|
+
matrix.forEach((row, rowIndex) => {
|
|
24
|
+
for (const brand of qualifiedCompetitorsForRow(row)) {
|
|
25
|
+
const name = brand.name.trim();
|
|
26
|
+
const domain = brand.domain ? normalizeDomain(brand.domain) : void 0;
|
|
27
|
+
const key = domain ?? name.toLowerCase();
|
|
28
|
+
const sighting = sightings.get(key) ?? {
|
|
29
|
+
key,
|
|
30
|
+
names: /* @__PURE__ */ new Map(),
|
|
31
|
+
rowIndices: /* @__PURE__ */ new Set()
|
|
32
|
+
};
|
|
33
|
+
const nameRows = sighting.names.get(name) ?? /* @__PURE__ */ new Set();
|
|
34
|
+
sighting.domain ??= domain;
|
|
35
|
+
nameRows.add(rowIndex);
|
|
36
|
+
sighting.names.set(name, nameRows);
|
|
37
|
+
sighting.rowIndices.add(rowIndex);
|
|
38
|
+
sightings.set(key, sighting);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
return sightings;
|
|
42
|
+
};
|
|
43
|
+
var foldNameOnlySightings = (sightings) => {
|
|
44
|
+
const domainKeysByName = /* @__PURE__ */ new Map();
|
|
45
|
+
for (const sighting of sightings.values()) {
|
|
46
|
+
if (sighting.domain === void 0) {
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
for (const name of sighting.names.keys()) {
|
|
50
|
+
const lowered = name.toLowerCase();
|
|
51
|
+
const keys = domainKeysByName.get(lowered) ?? /* @__PURE__ */ new Set();
|
|
52
|
+
keys.add(sighting.key);
|
|
53
|
+
domainKeysByName.set(lowered, keys);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
const folded = new Map(sightings);
|
|
57
|
+
for (const sighting of sightings.values()) {
|
|
58
|
+
if (sighting.domain !== void 0) {
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
const [ownerKey, ...otherKeys] = [
|
|
62
|
+
...domainKeysByName.get(sighting.key) ?? []
|
|
63
|
+
];
|
|
64
|
+
const owner = ownerKey === void 0 ? void 0 : folded.get(ownerKey);
|
|
65
|
+
if (!owner || otherKeys.length > 0) {
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
folded.set(owner.key, mergeSightings(owner, sighting));
|
|
69
|
+
folded.delete(sighting.key);
|
|
70
|
+
}
|
|
71
|
+
return folded;
|
|
72
|
+
};
|
|
73
|
+
var mergeSightings = (owner, nameOnly) => {
|
|
74
|
+
const names = new Map(
|
|
75
|
+
[...owner.names].map(([name, rows]) => [name, new Set(rows)])
|
|
76
|
+
);
|
|
77
|
+
for (const [name, rows] of nameOnly.names) {
|
|
78
|
+
names.set(name, /* @__PURE__ */ new Set([...names.get(name) ?? [], ...rows]));
|
|
79
|
+
}
|
|
80
|
+
const merged = {
|
|
81
|
+
...owner,
|
|
82
|
+
names,
|
|
83
|
+
rowIndices: /* @__PURE__ */ new Set([...owner.rowIndices, ...nameOnly.rowIndices])
|
|
84
|
+
};
|
|
85
|
+
return merged;
|
|
86
|
+
};
|
|
87
|
+
var displayName = (sighting) => {
|
|
88
|
+
const spellings = [...sighting.names].map(([name, rows]) => ({
|
|
89
|
+
name,
|
|
90
|
+
words: name.toLowerCase().split(/\s+/),
|
|
91
|
+
answers: rows.size
|
|
92
|
+
}));
|
|
93
|
+
const [base] = [...spellings].sort(
|
|
94
|
+
(a, b) => a.words.length - b.words.length || b.answers - a.answers || a.name.localeCompare(b.name)
|
|
95
|
+
);
|
|
96
|
+
if (!base) {
|
|
97
|
+
throw new Error(`Alternative has no recorded name: ${sighting.key}.`);
|
|
98
|
+
}
|
|
99
|
+
const isSharedBase = spellings.every(
|
|
100
|
+
(spelling) => base.words.every((word, index) => spelling.words[index] === word)
|
|
101
|
+
);
|
|
102
|
+
if (!isSharedBase && sighting.domain !== void 0) {
|
|
103
|
+
return sighting.domain;
|
|
104
|
+
}
|
|
105
|
+
const [label] = spellings.filter((spelling) => spelling.words.length === base.words.length).sort((a, b) => b.answers - a.answers || a.name.localeCompare(b.name));
|
|
106
|
+
return (label ?? base).name;
|
|
107
|
+
};
|
|
108
|
+
var matchesProspect = (prospect) => {
|
|
109
|
+
const prospectName = prospect.name.trim().toLowerCase();
|
|
110
|
+
const prospectDomain = normalizeDomain(prospect.domain);
|
|
111
|
+
return (sighting) => {
|
|
112
|
+
const identity = sighting.domain ?? sighting.key;
|
|
113
|
+
const isProspectDomain = identity === prospectDomain || identity.endsWith(`.${prospectDomain}`);
|
|
114
|
+
const isProspectName = [...sighting.names.keys()].some(
|
|
115
|
+
(name) => name.toLowerCase() === prospectName
|
|
116
|
+
);
|
|
117
|
+
return isProspectDomain || isProspectName;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
export {
|
|
122
|
+
rankAlternatives
|
|
123
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runDirectoryState
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZC4MKS3J.js";
|
|
4
4
|
import {
|
|
5
5
|
FileProbeStore
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-J5RYDPGP.js";
|
|
7
7
|
import {
|
|
8
8
|
localReportKey,
|
|
9
9
|
measuredSurfaces,
|
|
10
10
|
readAuditFile,
|
|
11
11
|
toAuditConfig
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-54GMIPWV.js";
|
|
13
13
|
import {
|
|
14
14
|
readWriterLock
|
|
15
15
|
} from "./chunk-6GOBBNDU.js";
|
|
@@ -25,10 +25,10 @@ import {
|
|
|
25
25
|
} from "./chunk-M3WZCV65.js";
|
|
26
26
|
import {
|
|
27
27
|
runJournalDir
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-D2LJMNH3.js";
|
|
29
29
|
import {
|
|
30
30
|
readJournal
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-MQFFMD4Q.js";
|
|
32
32
|
import {
|
|
33
33
|
hasErrorCode
|
|
34
34
|
} from "./chunk-2QLAFBCG.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
copywriterFiles
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JHUI2K5X.js";
|
|
4
4
|
import {
|
|
5
5
|
writePendingJson
|
|
6
6
|
} from "./chunk-MX6Y4RD2.js";
|
|
@@ -9,14 +9,14 @@ import {
|
|
|
9
9
|
} from "./chunk-JHOLYLI4.js";
|
|
10
10
|
import {
|
|
11
11
|
premiseVerifierInstructions
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-R4HYBSQB.js";
|
|
13
13
|
import {
|
|
14
14
|
generateStructured,
|
|
15
15
|
structuredCallReservation
|
|
16
16
|
} from "./chunk-BECSPYFC.js";
|
|
17
17
|
import {
|
|
18
18
|
narrativeContextFactIds
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-7K6CXSTL.js";
|
|
20
20
|
import {
|
|
21
21
|
buildFactCatalog,
|
|
22
22
|
projectWriterFactCatalog
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
aggregateJudgments,
|
|
3
3
|
metricsView
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RM7U5M5L.js";
|
|
5
5
|
import {
|
|
6
6
|
CheckOutcome,
|
|
7
7
|
checkFrom,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
bundlePaths,
|
|
13
13
|
isReadableCalculationVersion,
|
|
14
14
|
readableCalculationVersions
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-6MGXILUJ.js";
|
|
16
16
|
import {
|
|
17
17
|
canonicalDigest
|
|
18
18
|
} from "./chunk-E6NQQU6V.js";
|
|
@@ -19,14 +19,16 @@ var engineResources = async () => {
|
|
|
19
19
|
root,
|
|
20
20
|
author: path.join(packed, "author"),
|
|
21
21
|
editorial: path.join(packed, "editorial"),
|
|
22
|
-
guide: path.join(packed, "guide", "OPERATOR.md")
|
|
22
|
+
guide: path.join(packed, "guide", "OPERATOR.md"),
|
|
23
|
+
fonts: path.join(packed, "fonts")
|
|
23
24
|
};
|
|
24
25
|
}
|
|
25
26
|
return {
|
|
26
27
|
root,
|
|
27
28
|
author: path.join(root, "src", "author"),
|
|
28
29
|
editorial: path.join(root, "src", "engine", "editorial"),
|
|
29
|
-
guide: path.join(root, "src", "engine", "guide", "OPERATOR.md")
|
|
30
|
+
guide: path.join(root, "src", "engine", "guide", "OPERATOR.md"),
|
|
31
|
+
fonts: path.join(root, "src", "viewer", "fonts")
|
|
30
32
|
};
|
|
31
33
|
};
|
|
32
34
|
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-YLS4XX7B.js";
|
|
4
4
|
import {
|
|
5
5
|
captureSectionProbes
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-65OIYOUH.js";
|
|
7
7
|
import {
|
|
8
8
|
captureCoverageIssues
|
|
9
9
|
} from "./chunk-SCZ7PA4T.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
RunBindingsError,
|
|
15
15
|
bankBindingMismatches,
|
|
16
16
|
bindingOf
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-7HCVSLVG.js";
|
|
18
18
|
import {
|
|
19
19
|
unitRecordKey
|
|
20
20
|
} from "./chunk-DHQKAIOP.js";
|
|
@@ -17,10 +17,10 @@ import {
|
|
|
17
17
|
authorFiles,
|
|
18
18
|
authorPacket,
|
|
19
19
|
authorSessionInputs
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-MKA2EP7M.js";
|
|
21
21
|
import {
|
|
22
22
|
copyDir
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-JHUI2K5X.js";
|
|
24
24
|
import {
|
|
25
25
|
batchInput
|
|
26
26
|
} from "./chunk-VHDVKEWO.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runStage
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LJD37WAV.js";
|
|
4
4
|
import {
|
|
5
5
|
authorBrand,
|
|
6
6
|
materializeAuthorWorkdir,
|
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
readAuthorResearch,
|
|
9
9
|
researchServerConfig,
|
|
10
10
|
validateAuthorStage
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-MKA2EP7M.js";
|
|
12
12
|
import {
|
|
13
13
|
auditFileSchema,
|
|
14
14
|
auditFileVersion,
|
|
15
15
|
authorRecordFile
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-54GMIPWV.js";
|
|
17
17
|
import {
|
|
18
18
|
localStageModel
|
|
19
19
|
} from "./chunk-ZI3BGXQI.js";
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
} from "./chunk-6GOBBNDU.js";
|
|
26
26
|
import {
|
|
27
27
|
openRecorder
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-D2LJMNH3.js";
|
|
29
29
|
import {
|
|
30
30
|
mintRunId
|
|
31
31
|
} from "./chunk-W46Y7KBR.js";
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
partition,
|
|
5
5
|
runStage,
|
|
6
6
|
stageInputsDigest
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LJD37WAV.js";
|
|
8
8
|
import {
|
|
9
9
|
copyEditHistory,
|
|
10
10
|
editCopyDraft,
|
|
11
11
|
readCopyEdits
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JXQOWHWB.js";
|
|
13
13
|
import {
|
|
14
14
|
CopyVerificationUnavailableError
|
|
15
15
|
} from "./chunk-YTEUQEJE.js";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
import {
|
|
21
21
|
finishRun,
|
|
22
22
|
writeFinished
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-XSOTCSD3.js";
|
|
24
24
|
import {
|
|
25
25
|
copywriterFiles,
|
|
26
26
|
draftCopy,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
readCopyDocuments,
|
|
29
29
|
readSnapshot,
|
|
30
30
|
validateCopyDraft
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-JHUI2K5X.js";
|
|
32
32
|
import {
|
|
33
33
|
hostModels,
|
|
34
34
|
pinnedProfileOf
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
} from "./chunk-M3WZCV65.js";
|
|
48
48
|
import {
|
|
49
49
|
aggregateWorkdir
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-RM7U5M5L.js";
|
|
51
51
|
import {
|
|
52
52
|
validateStage
|
|
53
53
|
} from "./chunk-77EQ3RT6.js";
|
|
@@ -57,20 +57,20 @@ import {
|
|
|
57
57
|
import {
|
|
58
58
|
openRecorder,
|
|
59
59
|
recordingAccounting
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-D2LJMNH3.js";
|
|
61
61
|
import {
|
|
62
62
|
capturePlan
|
|
63
63
|
} from "./chunk-2WS6RC35.js";
|
|
64
64
|
import {
|
|
65
65
|
RunOrigin,
|
|
66
66
|
measurementDigest
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-6MGXILUJ.js";
|
|
68
68
|
import {
|
|
69
69
|
verdictSchemaFor
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-R4HYBSQB.js";
|
|
71
71
|
import {
|
|
72
72
|
classifyVerifierFailure
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-7K6CXSTL.js";
|
|
74
74
|
import {
|
|
75
75
|
structuredFailureDiagnostic
|
|
76
76
|
} from "./chunk-NANJGMEJ.js";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-XDG6NPJB.js";
|
|
4
4
|
import {
|
|
5
5
|
readFrozenBindings
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MMJ5UR2E.js";
|
|
7
7
|
import {
|
|
8
8
|
auditCopyFile,
|
|
9
9
|
authorEvidenceFile,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "./chunk-N4PQ6RPQ.js";
|
|
13
13
|
import {
|
|
14
14
|
readRunMethod
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-2ANSPIUT.js";
|
|
16
16
|
import {
|
|
17
17
|
readFrozenBudget
|
|
18
18
|
} from "./chunk-JFUWSJZT.js";
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
} from "./chunk-M3WZCV65.js";
|
|
25
25
|
import {
|
|
26
26
|
recordedCalculationVersion
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-RM7U5M5L.js";
|
|
28
28
|
import {
|
|
29
29
|
stageVersions
|
|
30
30
|
} from "./chunk-JHOLYLI4.js";
|
|
@@ -37,10 +37,10 @@ import {
|
|
|
37
37
|
} from "./chunk-SREGO3PU.js";
|
|
38
38
|
import {
|
|
39
39
|
projectJournal
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-UNNRLD2U.js";
|
|
41
41
|
import {
|
|
42
42
|
capturedAnswerOf
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-7L4Y6N3V.js";
|
|
44
44
|
import {
|
|
45
45
|
isolationLimitations
|
|
46
46
|
} from "./chunk-744YWRX7.js";
|
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
measurementDigest,
|
|
57
57
|
predecessorPrefix,
|
|
58
58
|
readableCalculationVersions
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-6MGXILUJ.js";
|
|
60
60
|
import {
|
|
61
61
|
canonicalDigest,
|
|
62
62
|
encodeBundleJson
|