@agentsean/surfaces 1.0.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 +661 -0
- package/dist/bing-ai.d.ts +10 -0
- package/dist/bing-ai.d.ts.map +1 -0
- package/dist/bing-ai.js +56 -0
- package/dist/bing-ai.js.map +1 -0
- package/dist/engine.d.ts +40 -0
- package/dist/engine.d.ts.map +1 -0
- package/dist/engine.js +187 -0
- package/dist/engine.js.map +1 -0
- package/dist/gbp.d.ts +51 -0
- package/dist/gbp.d.ts.map +1 -0
- package/dist/gbp.js +114 -0
- package/dist/gbp.js.map +1 -0
- package/dist/honest.d.ts +17 -0
- package/dist/honest.d.ts.map +1 -0
- package/dist/honest.js +31 -0
- package/dist/honest.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/offpage.d.ts +69 -0
- package/dist/offpage.d.ts.map +1 -0
- package/dist/offpage.js +139 -0
- package/dist/offpage.js.map +1 -0
- package/dist/panel.d.ts +32 -0
- package/dist/panel.d.ts.map +1 -0
- package/dist/panel.js +110 -0
- package/dist/panel.js.map +1 -0
- package/dist/verticals.d.ts +66 -0
- package/dist/verticals.d.ts.map +1 -0
- package/dist/verticals.js +173 -0
- package/dist/verticals.js.map +1 -0
- package/package.json +54 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"offpage.d.ts","sourceRoot":"","sources":["../src/offpage.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,eAAe,CAAC;AAEvB,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,UAAU,GAAG,aAAa,GAAG,UAAU,GAAG,SAAS,CAAC;CAC5D,CAAC;A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ACjB,GAAG,OAAa,GACf,MAAM,CAiBR;AAED,wBAAgB,kBAAkB,IAAI,KAAK,CAI1C;AAED,wBAAgB,gCAAgC,IAAI,KAAK,CAIxD;AAED,wBAAgB,YAAY,CAAC,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM;;;;;;;;;IAE9D;AAED,wBAAgB,YAAY,CAAC,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM;;;;;;;;;IAM9D;AAED,wBAAgB,eAAe,CAAC,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM;;;;;;;IAEjE;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAE1D"}
|
package/dist/offpage.js
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { eq } from "drizzle-orm";
|
|
3
|
+
import { inbound404s, mentions, outreachDrafts, } from "@agentsean/db";
|
|
4
|
+
export function scoreProspect(opts) {
|
|
5
|
+
const mention = opts.branded ? 0.68 : 0.2;
|
|
6
|
+
const dr = Math.min(1, (opts.domainRating ?? 20) / 100) * 0.3;
|
|
7
|
+
const unlinkBonus = opts.linked ? 0 : 0.25;
|
|
8
|
+
return Math.round((mention + dr + unlinkBonus) * 1000) / 1000;
|
|
9
|
+
}
|
|
10
|
+
export function discoverMentions(opts) {
|
|
11
|
+
const brand = opts.brand.toLowerCase();
|
|
12
|
+
const host = opts.originHost.replace(/^www\./, "");
|
|
13
|
+
const out = [];
|
|
14
|
+
for (const p of opts.pages) {
|
|
15
|
+
const text = p.text.toLowerCase();
|
|
16
|
+
if (!text.includes(brand))
|
|
17
|
+
continue;
|
|
18
|
+
const linked = p.links.some((l) => {
|
|
19
|
+
try {
|
|
20
|
+
return new URL(l).hostname.replace(/^www\./, "") === host;
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
const idx = text.indexOf(brand);
|
|
27
|
+
const snippet = p.text.slice(Math.max(0, idx - 40), idx + brand.length + 40);
|
|
28
|
+
out.push({
|
|
29
|
+
url: p.url,
|
|
30
|
+
snippet,
|
|
31
|
+
linked,
|
|
32
|
+
kind: linked ? "prospect" : "unlinked",
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
return out;
|
|
36
|
+
}
|
|
37
|
+
export function findInbound404s(crawled) {
|
|
38
|
+
const out = [];
|
|
39
|
+
for (const p of crawled) {
|
|
40
|
+
if (p.statusCode !== 404 && p.statusCode !== 410)
|
|
41
|
+
continue;
|
|
42
|
+
for (const src of p.inlinks) {
|
|
43
|
+
out.push({ sourceUrl: src, targetUrl: p.url, status: p.statusCode });
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return out;
|
|
47
|
+
}
|
|
48
|
+
export function saveMentions(db, siteId, rows, now = new Date()) {
|
|
49
|
+
let n = 0;
|
|
50
|
+
const ts = now.toISOString();
|
|
51
|
+
for (const row of rows) {
|
|
52
|
+
const kind = row.kind ?? (row.linked ? "prospect" : "unlinked");
|
|
53
|
+
const existing = db
|
|
54
|
+
.select()
|
|
55
|
+
.from(mentions)
|
|
56
|
+
.where(eq(mentions.siteId, siteId))
|
|
57
|
+
.all()
|
|
58
|
+
.find((m) => m.url === row.url && m.kind === kind);
|
|
59
|
+
const score = scoreProspect({ linked: row.linked, branded: true });
|
|
60
|
+
if (existing) {
|
|
61
|
+
db.update(mentions)
|
|
62
|
+
.set({ snippet: row.snippet, linked: row.linked ? 1 : 0, score })
|
|
63
|
+
.where(eq(mentions.id, existing.id))
|
|
64
|
+
.run();
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
db.insert(mentions)
|
|
68
|
+
.values({
|
|
69
|
+
id: randomUUID(),
|
|
70
|
+
siteId,
|
|
71
|
+
url: row.url,
|
|
72
|
+
snippet: row.snippet,
|
|
73
|
+
linked: row.linked ? 1 : 0,
|
|
74
|
+
score,
|
|
75
|
+
kind,
|
|
76
|
+
createdAt: ts,
|
|
77
|
+
})
|
|
78
|
+
.run();
|
|
79
|
+
n++;
|
|
80
|
+
}
|
|
81
|
+
return n;
|
|
82
|
+
}
|
|
83
|
+
export function saveInbound404s(db, siteId, rows, now = new Date()) {
|
|
84
|
+
const ts = now.toISOString();
|
|
85
|
+
for (const row of rows) {
|
|
86
|
+
db.insert(inbound404s)
|
|
87
|
+
.values({
|
|
88
|
+
id: randomUUID(),
|
|
89
|
+
siteId,
|
|
90
|
+
sourceUrl: row.sourceUrl,
|
|
91
|
+
targetUrl: row.targetUrl,
|
|
92
|
+
status: row.status,
|
|
93
|
+
createdAt: ts,
|
|
94
|
+
})
|
|
95
|
+
.run();
|
|
96
|
+
}
|
|
97
|
+
return rows.length;
|
|
98
|
+
}
|
|
99
|
+
export function draftOutreach(db, siteId, mentionId, now = new Date()) {
|
|
100
|
+
const mention = db.select().from(mentions).where(eq(mentions.id, mentionId)).get();
|
|
101
|
+
const id = randomUUID();
|
|
102
|
+
const brand = "your brand";
|
|
103
|
+
db.insert(outreachDrafts)
|
|
104
|
+
.values({
|
|
105
|
+
id,
|
|
106
|
+
siteId,
|
|
107
|
+
mentionId,
|
|
108
|
+
toEmail: null,
|
|
109
|
+
subject: `Unlinked mention of ${brand}`,
|
|
110
|
+
body: `Hi — we noticed ${mention?.url ?? "a page"} mentions us without a link. Happy to share a corrected URL if useful.`,
|
|
111
|
+
state: "draft",
|
|
112
|
+
createdAt: now.toISOString(),
|
|
113
|
+
})
|
|
114
|
+
.run();
|
|
115
|
+
return id;
|
|
116
|
+
}
|
|
117
|
+
export function refuseUnauthedSend() {
|
|
118
|
+
throw new Error("Outreach send is T3 permanently. Per-message approval is required. No auto-send setting exists.");
|
|
119
|
+
}
|
|
120
|
+
export function refuseDisavowWithoutManualAction() {
|
|
121
|
+
throw new Error("Disavow is locked unless a Search Console manual action exists. GSC has no disavow API.");
|
|
122
|
+
}
|
|
123
|
+
export function listMentions(db, siteId) {
|
|
124
|
+
return db.select().from(mentions).where(eq(mentions.siteId, siteId)).all();
|
|
125
|
+
}
|
|
126
|
+
export function listOutreach(db, siteId) {
|
|
127
|
+
return db
|
|
128
|
+
.select()
|
|
129
|
+
.from(outreachDrafts)
|
|
130
|
+
.where(eq(outreachDrafts.siteId, siteId))
|
|
131
|
+
.all();
|
|
132
|
+
}
|
|
133
|
+
export function listInbound404s(db, siteId) {
|
|
134
|
+
return db.select().from(inbound404s).where(eq(inbound404s.siteId, siteId)).all();
|
|
135
|
+
}
|
|
136
|
+
export function brandHostFromOrigin(origin) {
|
|
137
|
+
return new URL(origin).hostname.replace(/^www\./, "");
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=offpage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"offpage.js","sourceRoot":"","sources":["../src/offpage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EACL,WAAW,EACX,QAAQ,EACR,cAAc,GAEf,MAAM,eAAe,CAAC;AASvB,MAAM,UAAU,aAAa,CAAC,IAI7B;IACC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;IAC1C,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;IAC9D,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC3C,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,GAAG,EAAE,GAAG,WAAW,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,gBAAgB,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ACN,MAAM,EAAE;SACR,IAAI,CAAC,cAAc,CAAC;SACpB,KAAK,CAAC,EAAE,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;SACxC,GAAG,EAAE,CAAC;AACX,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,EAAkB,EAAE,MAAc;IAChE,OAAO,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;AACnF,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,MAAc;IAChD,OAAO,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;AACxD,CAAC"}
|
package/dist/panel.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { PANEL_ENGINES } from "./honest.js";
|
|
2
|
+
import type { GenerateFn } from "@agentsean/llm";
|
|
3
|
+
export type PanelEngine = (typeof PANEL_ENGINES)[number];
|
|
4
|
+
export type CitationHit = {
|
|
5
|
+
engine: PanelEngine;
|
|
6
|
+
prompt: string;
|
|
7
|
+
citedUrl: string | null;
|
|
8
|
+
citedDomain: string | null;
|
|
9
|
+
isOurs: boolean;
|
|
10
|
+
answer: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function defaultPrompts(brand: string, category: string): string[];
|
|
13
|
+
export declare function parseCitations(answer: string, originHost: string): {
|
|
14
|
+
url: string;
|
|
15
|
+
domain: string;
|
|
16
|
+
isOurs: boolean;
|
|
17
|
+
}[];
|
|
18
|
+
export declare function citationShare(hits: CitationHit[]): number;
|
|
19
|
+
export declare function shareOfVoice(hits: CitationHit[]): number;
|
|
20
|
+
export declare function runPromptPanel(opts: {
|
|
21
|
+
origin: string;
|
|
22
|
+
brand: string;
|
|
23
|
+
category?: string | undefined;
|
|
24
|
+
generate: GenerateFn;
|
|
25
|
+
engines?: readonly PanelEngine[] | undefined;
|
|
26
|
+
}): Promise<{
|
|
27
|
+
hits: CitationHit[];
|
|
28
|
+
citationShare: number;
|
|
29
|
+
shareOfVoice: number;
|
|
30
|
+
estimatedUsd: number;
|
|
31
|
+
}>;
|
|
32
|
+
//# sourceMappingURL=panel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../src/panel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,aAAa,EAAiB,MAAM,aAAa,CAAC;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAyBxE;AAID,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,GACjB;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,EAAE,CAsBpD;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,MAAM,CAKzD;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,MAAM,CAGxD;AAED,wBAAsB,cAAc,CAAC,IAAI,EAAE;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,QAAQ,EAAE,UAAU,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,WAAW,EAAE,GAAG,SAAS,CAAC;CAC9C,GAAG,OAAO,CAAC;IACV,IAAI,EAAE,WAAW,EAAE,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC,CA2CD"}
|
package/dist/panel.js
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { PANEL_COST_USD, PANEL_ENGINES, PANEL_PROMPTS } from "./honest.js";
|
|
2
|
+
export function defaultPrompts(brand, category) {
|
|
3
|
+
const b = brand.trim() || "the brand";
|
|
4
|
+
const c = category.trim() || "this category";
|
|
5
|
+
return [
|
|
6
|
+
`What is ${b}?`,
|
|
7
|
+
`Who makes the best ${c}?`,
|
|
8
|
+
`${b} vs competitors`,
|
|
9
|
+
`How does ${b} work?`,
|
|
10
|
+
`Is ${b} worth it?`,
|
|
11
|
+
`${c} pricing comparison`,
|
|
12
|
+
`Best ${c} for small teams`,
|
|
13
|
+
`${b} alternatives`,
|
|
14
|
+
`How to get started with ${c}`,
|
|
15
|
+
`${b} reviews`,
|
|
16
|
+
`What is the definition of ${c}?`,
|
|
17
|
+
`${c} implementation steps`,
|
|
18
|
+
`${b} numeric benchmarks`,
|
|
19
|
+
`Compare ${b} to the market`,
|
|
20
|
+
`${c} procedure checklist`,
|
|
21
|
+
`Who cites ${b} as a source?`,
|
|
22
|
+
`${c} facts and figures`,
|
|
23
|
+
`${b} integrations`,
|
|
24
|
+
`Common ${c} mistakes`,
|
|
25
|
+
`${b} documentation`,
|
|
26
|
+
].slice(0, PANEL_PROMPTS);
|
|
27
|
+
}
|
|
28
|
+
const URL_RE = /https?:\/\/[^\s)\]>'"]+/gi;
|
|
29
|
+
export function parseCitations(answer, originHost) {
|
|
30
|
+
const seen = new Set();
|
|
31
|
+
const out = [];
|
|
32
|
+
const matches = answer.match(URL_RE) ?? [];
|
|
33
|
+
for (const raw of matches) {
|
|
34
|
+
let url;
|
|
35
|
+
try {
|
|
36
|
+
url = new URL(raw.replace(/[.,;]+$/, ""));
|
|
37
|
+
}
|
|
38
|
+
catch {
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
if (seen.has(url.href))
|
|
42
|
+
continue;
|
|
43
|
+
seen.add(url.href);
|
|
44
|
+
const domain = url.hostname.replace(/^www\./, "");
|
|
45
|
+
const ours = originHost.replace(/^www\./, "");
|
|
46
|
+
out.push({
|
|
47
|
+
url: url.href,
|
|
48
|
+
domain,
|
|
49
|
+
isOurs: domain === ours || domain.endsWith(`.${ours}`),
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
return out;
|
|
53
|
+
}
|
|
54
|
+
export function citationShare(hits) {
|
|
55
|
+
if (hits.length === 0)
|
|
56
|
+
return 0;
|
|
57
|
+
const cited = hits.filter((h) => h.citedUrl);
|
|
58
|
+
if (cited.length === 0)
|
|
59
|
+
return 0;
|
|
60
|
+
return cited.filter((h) => h.isOurs).length / cited.length;
|
|
61
|
+
}
|
|
62
|
+
export function shareOfVoice(hits) {
|
|
63
|
+
if (hits.length === 0)
|
|
64
|
+
return 0;
|
|
65
|
+
return hits.filter((h) => h.isOurs).length / hits.length;
|
|
66
|
+
}
|
|
67
|
+
export async function runPromptPanel(opts) {
|
|
68
|
+
const host = new URL(opts.origin).hostname;
|
|
69
|
+
const prompts = defaultPrompts(opts.brand, opts.category ?? "");
|
|
70
|
+
const engines = opts.engines ?? PANEL_ENGINES;
|
|
71
|
+
const hits = [];
|
|
72
|
+
for (const engine of engines) {
|
|
73
|
+
for (const prompt of prompts) {
|
|
74
|
+
const result = await opts.generate({
|
|
75
|
+
class: "cheap",
|
|
76
|
+
system: "Answer with sources as absolute http(s) URLs when you cite the web. Do not invent URLs.",
|
|
77
|
+
prompt: `${prompt}\nBrand origin: ${opts.origin}`,
|
|
78
|
+
});
|
|
79
|
+
const parsed = parseCitations(result.text, host);
|
|
80
|
+
if (parsed.length === 0) {
|
|
81
|
+
hits.push({
|
|
82
|
+
engine,
|
|
83
|
+
prompt,
|
|
84
|
+
citedUrl: null,
|
|
85
|
+
citedDomain: null,
|
|
86
|
+
isOurs: false,
|
|
87
|
+
answer: result.text,
|
|
88
|
+
});
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
for (const p of parsed) {
|
|
92
|
+
hits.push({
|
|
93
|
+
engine,
|
|
94
|
+
prompt,
|
|
95
|
+
citedUrl: p.url,
|
|
96
|
+
citedDomain: p.domain,
|
|
97
|
+
isOurs: p.isOurs,
|
|
98
|
+
answer: result.text,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return {
|
|
104
|
+
hits,
|
|
105
|
+
citationShare: citationShare(hits),
|
|
106
|
+
shareOfVoice: shareOfVoice(hits),
|
|
107
|
+
estimatedUsd: PANEL_COST_USD,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel.js","sourceRoot":"","sources":["../src/panel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAc3E,MAAM,UAAU,cAAc,CAAC,KAAa,EAAE,QAAgB;IAC5D,MAAM,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE,IAAI,WAAW,CAAC;IACtC,MAAM,CAAC,GAAG,QAAQ,CAAC,IAAI,EAAE,IAAI,eAAe,CAAC;IAC7C,OAAO;QACL,WAAW,CAAC,GAAG;QACf,sBAAsB,CAAC,GAAG;QAC1B,GAAG,CAAC,iBAAiB;QACrB,YAAY,CAAC,QAAQ;QACrB,MAAM,CAAC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ugc", "affiliate_review", "multi_location", "jobs_classifieds", "ymyl"];
|
|
2
|
+
export type VerticalPreset = (typeof VERTICAL_PRESETS)[number];
|
|
3
|
+
export type VerticalSignal = {
|
|
4
|
+
id: string;
|
|
5
|
+
hit: boolean;
|
|
6
|
+
pointsTo: VerticalPreset;
|
|
7
|
+
weight: number;
|
|
8
|
+
};
|
|
9
|
+
export type VerticalInput = {
|
|
10
|
+
urls: string[];
|
|
11
|
+
titles: string[];
|
|
12
|
+
jsonLdTypes: string[];
|
|
13
|
+
outboundSponsoredShare: number;
|
|
14
|
+
telLinkShare: number;
|
|
15
|
+
gscNewsRows: number;
|
|
16
|
+
gscDiscoverShare: number;
|
|
17
|
+
newsSitemap: boolean;
|
|
18
|
+
publishVelocity30d: number;
|
|
19
|
+
jobPostingCount: number;
|
|
20
|
+
sitemapUrlCount: number;
|
|
21
|
+
productSellerVaries: boolean;
|
|
22
|
+
profileUrlCount: number;
|
|
23
|
+
localityCount: number;
|
|
24
|
+
eeaTrafficShare: number;
|
|
25
|
+
hasPricing: boolean;
|
|
26
|
+
hasDemoOrSignup: boolean;
|
|
27
|
+
hasComparePaths: boolean;
|
|
28
|
+
medicalLexiconShare: number;
|
|
29
|
+
};
|
|
30
|
+
export declare const ONBOARDING_QUESTIONS: readonly [{
|
|
31
|
+
readonly id: "win";
|
|
32
|
+
readonly prompt: "What does a win look like?";
|
|
33
|
+
readonly options: readonly ["signups/trials", "demo requests or quote forms", "phone calls or bookings", "ad revenue / pageviews", "subscriptions", "listings posted or applications", "affiliate clicks/commissions", "transactions on the platform"];
|
|
34
|
+
}, {
|
|
35
|
+
readonly id: "indexable";
|
|
36
|
+
readonly prompt: "Roughly how many pages should be in Google?";
|
|
37
|
+
readonly options: readonly ["<100", "100–2k", "2k–50k", "50k–1M", ">1M"];
|
|
38
|
+
}, {
|
|
39
|
+
readonly id: "velocity";
|
|
40
|
+
readonly prompt: "Do you publish new content more than 3× per week?";
|
|
41
|
+
readonly options: readonly ["yes", "no"];
|
|
42
|
+
}, {
|
|
43
|
+
readonly id: "third_party";
|
|
44
|
+
readonly prompt: "Is any of your content written by people who don't work for you?";
|
|
45
|
+
readonly options: readonly ["yes", "no", "some"];
|
|
46
|
+
}, {
|
|
47
|
+
readonly id: "regulated";
|
|
48
|
+
readonly prompt: "Are you in a regulated space?";
|
|
49
|
+
readonly options: readonly ["health/medical", "finance/insurance", "legal", "none"];
|
|
50
|
+
}, {
|
|
51
|
+
readonly id: "geo";
|
|
52
|
+
readonly prompt: "Where do you serve customers?";
|
|
53
|
+
readonly options: readonly ["one location", "multiple named locations", "a region/country", "globally, online only"];
|
|
54
|
+
}];
|
|
55
|
+
export declare function scoreSignals(input: VerticalInput): VerticalSignal[];
|
|
56
|
+
export declare function detectVertical(input: VerticalInput): {
|
|
57
|
+
preset: VerticalPreset;
|
|
58
|
+
confidence: number;
|
|
59
|
+
signals: VerticalSignal[];
|
|
60
|
+
suppressedChecks: number;
|
|
61
|
+
v1: boolean;
|
|
62
|
+
};
|
|
63
|
+
export declare function contentGenerationBlocked(preset: VerticalPreset): boolean;
|
|
64
|
+
export declare function ymylCategoryFor(preset: VerticalPreset): string | null;
|
|
65
|
+
export declare function verticalRules(preset: VerticalPreset): string[];
|
|
66
|
+
//# sourceMappingURL=verticals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verticals.d.ts","sourceRoot":"","sources":["../src/verticals.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,8IASnB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,OAAO,CAAC;IACb,QAAQ,EAAE,cAAc,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EA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
|
|
2
|
+
"b2b_saas",
|
|
3
|
+
"b2b_lead_gen",
|
|
4
|
+
"publisher_news",
|
|
5
|
+
"marketplace_ugc",
|
|
6
|
+
"affiliate_review",
|
|
7
|
+
"multi_location",
|
|
8
|
+
"jobs_classifieds",
|
|
9
|
+
"ymyl",
|
|
10
|
+
];
|
|
11
|
+
export const ONBOARDING_QUESTIONS = [
|
|
12
|
+
{
|
|
13
|
+
id: "win",
|
|
14
|
+
prompt: "What does a win look like?",
|
|
15
|
+
options: [
|
|
16
|
+
"signups/trials",
|
|
17
|
+
"demo requests or quote forms",
|
|
18
|
+
"phone calls or bookings",
|
|
19
|
+
"ad revenue / pageviews",
|
|
20
|
+
"subscriptions",
|
|
21
|
+
"listings posted or applications",
|
|
22
|
+
"affiliate clicks/commissions",
|
|
23
|
+
"transactions on the platform",
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: "indexable",
|
|
28
|
+
prompt: "Roughly how many pages should be in Google?",
|
|
29
|
+
options: ["<100", "100–2k", "2k–50k", "50k–1M", ">1M"],
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: "velocity",
|
|
33
|
+
prompt: "Do you publish new content more than 3× per week?",
|
|
34
|
+
options: ["yes", "no"],
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
id: "third_party",
|
|
38
|
+
prompt: "Is any of your content written by people who don't work for you?",
|
|
39
|
+
options: ["yes", "no", "some"],
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: "regulated",
|
|
43
|
+
prompt: "Are you in a regulated space?",
|
|
44
|
+
options: ["health/medical", "finance/insurance", "legal", "none"],
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: "geo",
|
|
48
|
+
prompt: "Where do you serve customers?",
|
|
49
|
+
options: [
|
|
50
|
+
"one location",
|
|
51
|
+
"multiple named locations",
|
|
52
|
+
"a region/country",
|
|
53
|
+
"globally, online only",
|
|
54
|
+
],
|
|
55
|
+
},
|
|
56
|
+
];
|
|
57
|
+
const SAAS_SUPPRESS = 41;
|
|
58
|
+
function signal(id, hit, pointsTo, weight = 1) {
|
|
59
|
+
return { id, hit, pointsTo, weight };
|
|
60
|
+
}
|
|
61
|
+
export function scoreSignals(input) {
|
|
62
|
+
const urls = input.urls.map((u) => u.toLowerCase());
|
|
63
|
+
return [
|
|
64
|
+
signal("S1", input.gscNewsRows > 0, "publisher_news", 3),
|
|
65
|
+
signal("S2", input.gscDiscoverShare > 0.3, "publisher_news", 2),
|
|
66
|
+
signal("S3", input.newsSitemap, "publisher_news", 2),
|
|
67
|
+
signal("S4", input.jsonLdTypes.filter((t) => /NewsArticle/i.test(t)).length > 0, "publisher_news"),
|
|
68
|
+
signal("S5", input.publishVelocity30d > 30, "publisher_news"),
|
|
69
|
+
signal("S6", input.jobPostingCount > 50, "jobs_classifieds", 3),
|
|
70
|
+
signal("S7", input.sitemapUrlCount > 100_000, "marketplace_ugc", 2),
|
|
71
|
+
signal("S8", input.productSellerVaries, "marketplace_ugc", 2),
|
|
72
|
+
signal("S9", input.profileUrlCount > 1000, "marketplace_ugc"),
|
|
73
|
+
signal("S10", input.jsonLdTypes.some((t) => /DiscussionForumPosting|QAPage/i.test(t)), "marketplace_ugc"),
|
|
74
|
+
signal("S11", input.hasPricing && input.hasDemoOrSignup, "b2b_saas", 3),
|
|
75
|
+
signal("S12", urls.some((u) => /\/(vs|alternatives|compare|integrations)\b/.test(u)), "b2b_saas", 2),
|
|
76
|
+
signal("S13", input.urls.length < 2000 && input.hasPricing && !input.productSellerVaries, "b2b_saas", 2),
|
|
77
|
+
signal("S14", input.telLinkShare > 0.6 && !input.hasPricing, "b2b_lead_gen", 2),
|
|
78
|
+
signal("S15", urls.some((u) => /\/(locations|store-locator|branches|find-a)\b/.test(u)), "multi_location", 3),
|
|
79
|
+
signal("S16", input.localityCount >= 5, "multi_location", 2),
|
|
80
|
+
signal("S17", input.outboundSponsoredShare > 0.15, "affiliate_review", 3),
|
|
81
|
+
signal("S18", input.titles.filter((t) => /\bbest |\breview\b|\b vs \b|\btop \d/i.test(t))
|
|
82
|
+
.length /
|
|
83
|
+
Math.max(input.titles.length, 1) >
|
|
84
|
+
0.3, "affiliate_review", 2),
|
|
85
|
+
signal("S19", input.jsonLdTypes.some((t) => t === "Paywalled"), "publisher_news"),
|
|
86
|
+
signal("S20", input.jsonLdTypes.some((t) => /MedicalWebPage|Physician|MedicalClinic/i.test(t)) || input.medicalLexiconShare > 0.1, "ymyl", 3),
|
|
87
|
+
signal("S21", urls.filter((u) => /\/(homes|property|for-sale)\b/.test(u)).length > 1000, "jobs_classifieds"),
|
|
88
|
+
signal("S22", input.jsonLdTypes.some((t) => /Vehicle|Car/i.test(t)), "jobs_classifieds"),
|
|
89
|
+
signal("S23", input.medicalLexiconShare > 0.2, "ymyl", 2),
|
|
90
|
+
signal("S24", input.eeaTrafficShare > 0.5, "publisher_news", 0.2),
|
|
91
|
+
];
|
|
92
|
+
}
|
|
93
|
+
export function detectVertical(input) {
|
|
94
|
+
const signals = scoreSignals(input);
|
|
95
|
+
const scores = new Map();
|
|
96
|
+
for (const p of VERTICAL_PRESETS)
|
|
97
|
+
scores.set(p, 0);
|
|
98
|
+
let total = 0;
|
|
99
|
+
for (const s of signals) {
|
|
100
|
+
if (!s.hit)
|
|
101
|
+
continue;
|
|
102
|
+
scores.set(s.pointsTo, (scores.get(s.pointsTo) ?? 0) + s.weight);
|
|
103
|
+
total += s.weight;
|
|
104
|
+
}
|
|
105
|
+
let preset = "b2b_saas";
|
|
106
|
+
let best = -1;
|
|
107
|
+
for (const p of VERTICAL_PRESETS) {
|
|
108
|
+
const v = scores.get(p) ?? 0;
|
|
109
|
+
if (v > best) {
|
|
110
|
+
best = v;
|
|
111
|
+
preset = p;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
if (best <= 0)
|
|
115
|
+
preset = "b2b_saas";
|
|
116
|
+
const confidence = total === 0 ? 0.4 : Math.min(1, best / Math.max(total, 1));
|
|
117
|
+
return {
|
|
118
|
+
preset,
|
|
119
|
+
confidence,
|
|
120
|
+
signals: signals.filter((s) => s.hit),
|
|
121
|
+
suppressedChecks: preset === "b2b_saas" ? SAAS_SUPPRESS : 12,
|
|
122
|
+
v1: preset === "b2b_saas" || preset === "multi_location",
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
export function contentGenerationBlocked(preset) {
|
|
126
|
+
return preset === "affiliate_review" || preset === "ymyl";
|
|
127
|
+
}
|
|
128
|
+
export function ymylCategoryFor(preset) {
|
|
129
|
+
if (preset === "ymyl")
|
|
130
|
+
return "ymyl";
|
|
131
|
+
if (preset === "affiliate_review")
|
|
132
|
+
return "affiliate";
|
|
133
|
+
return null;
|
|
134
|
+
}
|
|
135
|
+
export function verticalRules(preset) {
|
|
136
|
+
switch (preset) {
|
|
137
|
+
case "b2b_saas":
|
|
138
|
+
return [
|
|
139
|
+
"Add bottom-funnel pages (/vs, /alternatives, /integrations).",
|
|
140
|
+
"Refresh decaying blog posts before minting URLs.",
|
|
141
|
+
"Git-backed execution as a PR.",
|
|
142
|
+
];
|
|
143
|
+
case "marketplace_ugc":
|
|
144
|
+
return [
|
|
145
|
+
"Stop indexing thin template pages.",
|
|
146
|
+
"Faceted nav: robots.txt disallow is preferred (Google 2025-12-18).",
|
|
147
|
+
];
|
|
148
|
+
case "publisher_news":
|
|
149
|
+
return ["Split Discover vs web alerts.", "Do not generate scaled news URLs."];
|
|
150
|
+
case "affiliate_review":
|
|
151
|
+
return [
|
|
152
|
+
"Content generation is T4 hard-blocked.",
|
|
153
|
+
"Thin affiliation is a spam policy.",
|
|
154
|
+
];
|
|
155
|
+
case "ymyl":
|
|
156
|
+
return [
|
|
157
|
+
"Content generation is T4 hard-blocked.",
|
|
158
|
+
"Human review required for any medical/finance/legal claim.",
|
|
159
|
+
];
|
|
160
|
+
case "multi_location":
|
|
161
|
+
return [
|
|
162
|
+
"City×service pages are T4 unless unique data per URL.",
|
|
163
|
+
"GBP hours/categories are the safe writes.",
|
|
164
|
+
];
|
|
165
|
+
case "b2b_lead_gen":
|
|
166
|
+
return ["Prioritize NAP, quote forms, and call tracking over blog volume."];
|
|
167
|
+
case "jobs_classifieds":
|
|
168
|
+
return ["Indexation control first; expired listings must 404/410."];
|
|
169
|
+
default:
|
|
170
|
+
return [];
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
//# sourceMappingURL=verticals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verticals.js","sourceRoot":"","sources":["../src/verticals.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,UAAU;IACV,cAAc;IACd,gBAAgB;IAChB,iBAAiB;IACjB,kBAAkB;IAClB,gBAAgB;IAChB,kBAAkB;IAClB,MAAM;CACE,CAAC;AAiCX,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC;QACE,EAAE,EAAE,KAAK;QACT,MAAM,EAAE,4BAA4B;QACpC,OAAO,EAAE;YACP,gBAAgB;YAChB,8BAA8B;YAC9B,yBAAyB;YACzB,wBAAwB;YACxB,eAAe;YACf,iCAAiC;YACjC,8BAA8B;YAC9B,8BAA8B;SAC/B;KACF;IACD;QACE,EAAE,EAAE,WAAW;QACf,MAAM,EAAE,6CAA6C;QACrD,OAAO,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,CAAC;KACvD;IACD;QACE,EAAE,EAAE,UAAU;QACd,MAAM,EAAE,mDAAmD;QAC3D,OAAO,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC;KACvB;IACD;QACE,EAAE,EAAE,aAAa;QACjB,MAAM,EAAE,kEAAkE;QAC1E,OAAO,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC;KAC/B;IACD;QACE,EAAE,EAAE,WAAW;QACf,MAAM,EAAE,+BAA+B;QACvC,OAAO,EAAE,CAAC,gBAAgB,EAAE,m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|
|
2
|
+
"name": "@agentsean/surfaces",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"license": "AGPL-3.0-only",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"import": "./dist/index.js"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist"
|
|
14
|
+
],
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=22.19.0"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"drizzle-orm": "0.45.2",
|
|
20
|
+
"@agentsean/analyzers": "1.0.0",
|
|
21
|
+
"@agentsean/actions": "1.0.0",
|
|
22
|
+
"@agentsean/db": "1.0.0",
|
|
23
|
+
"@agentsean/llm": "1.0.0"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"typescript": "~5.9.3",
|
|
27
|
+
"vitest": "^4.1.11"
|
|
28
|
+
},
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
},
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "git+https://github.com/seziro-team/agentsean.git",
|
|
35
|
+
"directory": "packages/surfaces"
|
|
36
|
+
},
|
|
37
|
+
"homepage": "https://github.com/seziro-team/agentsean#readme",
|
|
38
|
+
"bugs": {
|
|
39
|
+
"url": "https://github.com/seziro-team/agentsean/issues"
|
|
40
|
+
},
|
|
41
|
+
"author": "Seziro (https://seziro.com)",
|
|
42
|
+
"description": "Agent Sean — surfaces module",
|
|
43
|
+
"keywords": [
|
|
44
|
+
"seo",
|
|
45
|
+
"agent",
|
|
46
|
+
"agentsean",
|
|
47
|
+
"seo-automation"
|
|
48
|
+
],
|
|
49
|
+
"scripts": {
|
|
50
|
+
"build": "tsc -p tsconfig.json",
|
|
51
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
52
|
+
"test": "vitest run --config ../../vitest.config.ts"
|
|
53
|
+
}
|
|
54
|
+
}
|