@oxygen-agent/cli 1.1011.1091 → 1.1013.15
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 +1 -1
- package/dist/command-manifest.d.ts +3 -1
- package/dist/command-manifest.js +11 -0
- package/dist/customer-operation-commands.js +7 -3
- package/dist/diagnostic-upload-main.d.ts +1 -0
- package/dist/diagnostic-upload-main.js +2 -0
- package/dist/diagnostic-uploader.d.ts +3 -0
- package/dist/diagnostic-uploader.js +68 -0
- package/dist/diagnostics.d.ts +22 -0
- package/dist/diagnostics.js +219 -0
- package/dist/http-client.d.ts +7 -0
- package/dist/http-client.js +12 -2
- package/dist/index.js +72 -34
- package/dist/transcript.js +1 -1
- package/node_modules/@oxygen/formula/dist/expression.js +16 -0
- package/node_modules/@oxygen/shared/dist/attempt-provenance.d.ts +8 -0
- package/node_modules/@oxygen/shared/dist/attempt-provenance.js +15 -0
- package/node_modules/@oxygen/shared/dist/byok-connect.js +2 -0
- package/node_modules/@oxygen/shared/dist/capability-discovery.d.ts +2 -1
- package/node_modules/@oxygen/shared/dist/capability-discovery.js +28 -4
- package/node_modules/@oxygen/shared/dist/contracts/browser-operations.js +3 -3
- package/node_modules/@oxygen/shared/dist/contracts/customer-operations.js +3 -3
- package/node_modules/@oxygen/shared/dist/contracts/geo.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/contracts/geo.js +160 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations.d.ts +1 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations.js +4 -3
- package/node_modules/@oxygen/shared/dist/contracts/table-row-removal.d.ts +8 -0
- package/node_modules/@oxygen/shared/dist/contracts/table-row-removal.js +10 -4
- package/node_modules/@oxygen/shared/dist/cost-estimate.d.ts +6 -0
- package/node_modules/@oxygen/shared/dist/cost-estimate.js +23 -8
- package/node_modules/@oxygen/shared/dist/diagnostic-context.d.ts +3 -0
- package/node_modules/@oxygen/shared/dist/diagnostic-context.js +17 -0
- package/node_modules/@oxygen/shared/dist/diagnostic-credentials.d.ts +4 -0
- package/node_modules/@oxygen/shared/dist/diagnostic-credentials.js +12 -0
- package/node_modules/@oxygen/shared/dist/diagnostic-lock.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/diagnostic-lock.js +60 -0
- package/node_modules/@oxygen/shared/dist/diagnostic-receipt.d.ts +6 -0
- package/node_modules/@oxygen/shared/dist/diagnostic-receipt.js +22 -0
- package/node_modules/@oxygen/shared/dist/diagnostic-storage-lock.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/diagnostic-storage-lock.js +39 -0
- package/node_modules/@oxygen/shared/dist/diagnostic-storage.d.ts +31 -0
- package/node_modules/@oxygen/shared/dist/diagnostic-storage.js +233 -0
- package/node_modules/@oxygen/shared/dist/diagnostics.d.ts +49 -0
- package/node_modules/@oxygen/shared/dist/diagnostics.js +253 -0
- package/node_modules/@oxygen/shared/dist/enrichment-intents.js +2 -1
- package/node_modules/@oxygen/shared/dist/external-effect-arming.d.ts +54 -0
- package/node_modules/@oxygen/shared/dist/external-effect-arming.js +90 -0
- package/node_modules/@oxygen/shared/dist/geo.d.ts +264 -0
- package/node_modules/@oxygen/shared/dist/geo.js +342 -0
- package/node_modules/@oxygen/shared/dist/linkedin-countries.d.ts +9 -0
- package/node_modules/@oxygen/shared/dist/linkedin-countries.js +1 -1
- package/node_modules/@oxygen/shared/dist/managed-email-branding.d.ts +15 -0
- package/node_modules/@oxygen/shared/dist/managed-email-branding.js +81 -0
- package/node_modules/@oxygen/shared/dist/onboarding-first-leads.d.ts +19 -0
- package/node_modules/@oxygen/shared/dist/onboarding-first-leads.js +25 -0
- package/node_modules/@oxygen/shared/dist/otlp-log-sink.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/otlp-log-sink.js +4 -0
- package/node_modules/@oxygen/shared/dist/pricing-sheet.d.ts +20 -24
- package/node_modules/@oxygen/shared/dist/pricing-sheet.js +15 -16
- package/node_modules/@oxygen/shared/dist/pricing-snapshot.generated.d.ts +3 -3
- package/node_modules/@oxygen/shared/dist/pricing-snapshot.generated.js +3 -3
- package/node_modules/@oxygen/shared/dist/product-analytics-events.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/product-analytics-events.js +2 -0
- package/node_modules/@oxygen/shared/dist/product-doctrine.js +6 -5
- package/node_modules/@oxygen/shared/dist/recipes.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/recipes.js +1 -0
- package/node_modules/@oxygen/shared/dist/repricing.d.ts +4 -14
- package/node_modules/@oxygen/shared/dist/repricing.js +25 -64
- package/node_modules/@oxygen/shared/dist/research-depth.d.ts +11 -0
- package/node_modules/@oxygen/shared/dist/research-depth.js +7 -0
- package/node_modules/@oxygen/shared/dist/version.d.ts +2 -1
- package/node_modules/@oxygen/shared/dist/version.generated.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/version.generated.js +1 -1
- package/node_modules/@oxygen/shared/dist/version.js +4 -1
- package/node_modules/@oxygen/shared/dist/whatsapp-sender-limits.d.ts +46 -0
- package/node_modules/@oxygen/shared/dist/whatsapp-sender-limits.js +51 -1
- package/node_modules/@oxygen/shared/package.json +10 -0
- package/package.json +1 -1
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { type DeployTier } from "./deploy-env.js";
|
|
2
|
+
/**
|
|
3
|
+
* Which background EXTERNAL EFFECTS each deployment is armed to dispatch, declared
|
|
4
|
+
* here per environment rather than implied by whichever credentials a box holds.
|
|
5
|
+
*
|
|
6
|
+
* OXP-1.6.190 (classify-A P-05). Three background families write outside OXYGEN with
|
|
7
|
+
* no human in the loop: the off-session Stripe writes of `inbox_billing_reconcile`,
|
|
8
|
+
* the Zapmail writes of `mailbox_connection_repair`, and the dedicated-egress vendor
|
|
9
|
+
* release (IPRoyal `toggle-auto-extend`) of the egress order reconcile and lifecycle.
|
|
10
|
+
* Before this table their arming was implicit: present credentials meant armed.
|
|
11
|
+
*
|
|
12
|
+
* Chosen design (coordinator, 2026-10-07, "option 2"): every CURRENT default is kept, so
|
|
13
|
+
* dev billing reconcile, Zapmail repair and egress releases keep working for dev flows,
|
|
14
|
+
* but the state is now explicit, reviewable and read back, and two mismatches fail
|
|
15
|
+
* closed outside production-data environments: a LIVE Stripe key, and a vendor release
|
|
16
|
+
* whose family is not armed here. Production stays armed; nothing here changes a
|
|
17
|
+
* production default or touches a secret. A default-off posture outside production
|
|
18
|
+
* was considered and not chosen, because other dev workflows depend on these effects.
|
|
19
|
+
*
|
|
20
|
+
* Changing an entry is a reviewed code change. `OXYGEN_WORKER_MAILBOX_CONNECTION_REPAIR`
|
|
21
|
+
* remains the existing runtime kill switch for the repair family (`false` disarms it).
|
|
22
|
+
*/
|
|
23
|
+
export declare const EXTERNAL_EFFECT_FAMILIES: readonly ["inbox_billing_stripe", "mailbox_connection_repair", "egress_vendor_release"];
|
|
24
|
+
export type ExternalEffectFamily = typeof EXTERNAL_EFFECT_FAMILIES[number];
|
|
25
|
+
export type ExternalEffectArmingState = "armed" | "disarmed";
|
|
26
|
+
/** The checked-in declaration, per deploy tier (see `resolveDeployEnv`). */
|
|
27
|
+
export declare const EXTERNAL_EFFECT_ARMING: Readonly<Record<ExternalEffectFamily, Readonly<Record<DeployTier, ExternalEffectArmingState>>>>;
|
|
28
|
+
export type ExternalEffectArming = {
|
|
29
|
+
family: ExternalEffectFamily;
|
|
30
|
+
armed: boolean;
|
|
31
|
+
declared: ExternalEffectArmingState;
|
|
32
|
+
/** `declaration` = the table above; `env` = the family's kill switch disarmed it. */
|
|
33
|
+
source: "declaration" | "env";
|
|
34
|
+
tier: DeployTier;
|
|
35
|
+
deploy_env: string;
|
|
36
|
+
production_data: boolean;
|
|
37
|
+
};
|
|
38
|
+
export declare function resolveExternalEffectArming(family: ExternalEffectFamily, env?: NodeJS.ProcessEnv): ExternalEffectArming;
|
|
39
|
+
/** The readback: every family's effective gate for this process. */
|
|
40
|
+
export declare function describeExternalEffectArming(env?: NodeJS.ProcessEnv): ExternalEffectArming[];
|
|
41
|
+
/**
|
|
42
|
+
* Throw before an effect is dispatched when this process is not armed for it.
|
|
43
|
+
* Production-data environments keep their declared state; the refusal names the
|
|
44
|
+
* family and environment so a skipped effect is never silent.
|
|
45
|
+
*/
|
|
46
|
+
export declare function assertExternalEffectArmed(family: ExternalEffectFamily, env?: NodeJS.ProcessEnv): ExternalEffectArming;
|
|
47
|
+
/** Live-mode Stripe secret or restricted key. Test keys (`sk_test_`/`rk_test_`) never match. */
|
|
48
|
+
export declare function isLiveStripeKey(key: string | null | undefined): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Fail closed when a process that does NOT hold production data is about to write to
|
|
51
|
+
* Stripe with a LIVE key: that is a dev or local box pointed at real money. The key is
|
|
52
|
+
* never echoed; only its mode is named.
|
|
53
|
+
*/
|
|
54
|
+
export declare function assertStripeKeyMatchesEnvironment(key: string | null | undefined, env?: NodeJS.ProcessEnv): void;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { OxygenError } from "./cli-result.js";
|
|
2
|
+
import { isProductionData, resolveDeployEnv } from "./deploy-env.js";
|
|
3
|
+
/**
|
|
4
|
+
* Which background EXTERNAL EFFECTS each deployment is armed to dispatch, declared
|
|
5
|
+
* here per environment rather than implied by whichever credentials a box holds.
|
|
6
|
+
*
|
|
7
|
+
* OXP-1.6.190 (classify-A P-05). Three background families write outside OXYGEN with
|
|
8
|
+
* no human in the loop: the off-session Stripe writes of `inbox_billing_reconcile`,
|
|
9
|
+
* the Zapmail writes of `mailbox_connection_repair`, and the dedicated-egress vendor
|
|
10
|
+
* release (IPRoyal `toggle-auto-extend`) of the egress order reconcile and lifecycle.
|
|
11
|
+
* Before this table their arming was implicit: present credentials meant armed.
|
|
12
|
+
*
|
|
13
|
+
* Chosen design (coordinator, 2026-10-07, "option 2"): every CURRENT default is kept, so
|
|
14
|
+
* dev billing reconcile, Zapmail repair and egress releases keep working for dev flows,
|
|
15
|
+
* but the state is now explicit, reviewable and read back, and two mismatches fail
|
|
16
|
+
* closed outside production-data environments: a LIVE Stripe key, and a vendor release
|
|
17
|
+
* whose family is not armed here. Production stays armed; nothing here changes a
|
|
18
|
+
* production default or touches a secret. A default-off posture outside production
|
|
19
|
+
* was considered and not chosen, because other dev workflows depend on these effects.
|
|
20
|
+
*
|
|
21
|
+
* Changing an entry is a reviewed code change. `OXYGEN_WORKER_MAILBOX_CONNECTION_REPAIR`
|
|
22
|
+
* remains the existing runtime kill switch for the repair family (`false` disarms it).
|
|
23
|
+
*/
|
|
24
|
+
export const EXTERNAL_EFFECT_FAMILIES = [
|
|
25
|
+
"inbox_billing_stripe",
|
|
26
|
+
"mailbox_connection_repair",
|
|
27
|
+
"egress_vendor_release",
|
|
28
|
+
];
|
|
29
|
+
/** The checked-in declaration, per deploy tier (see `resolveDeployEnv`). */
|
|
30
|
+
export const EXTERNAL_EFFECT_ARMING = {
|
|
31
|
+
inbox_billing_stripe: { prod: "armed", shadow: "armed", dev: "armed", local: "armed" },
|
|
32
|
+
mailbox_connection_repair: { prod: "armed", shadow: "armed", dev: "armed", local: "armed" },
|
|
33
|
+
egress_vendor_release: { prod: "armed", shadow: "armed", dev: "armed", local: "armed" },
|
|
34
|
+
};
|
|
35
|
+
/** Per-family runtime kill switch: an explicit false disarms, nothing arms beyond the declaration. */
|
|
36
|
+
const KILL_SWITCH_ENV = {
|
|
37
|
+
mailbox_connection_repair: "OXYGEN_WORKER_MAILBOX_CONNECTION_REPAIR",
|
|
38
|
+
};
|
|
39
|
+
function killSwitchDisarms(family, env) {
|
|
40
|
+
const name = KILL_SWITCH_ENV[family];
|
|
41
|
+
const raw = name ? env[name]?.trim().toLowerCase() : undefined;
|
|
42
|
+
// Exactly the worker's readBooleanEnv falsy set, so the readback and the gate agree.
|
|
43
|
+
return raw === "false" || raw === "0" || raw === "no";
|
|
44
|
+
}
|
|
45
|
+
export function resolveExternalEffectArming(family, env = process.env) {
|
|
46
|
+
const deploy = resolveDeployEnv(env);
|
|
47
|
+
const declared = EXTERNAL_EFFECT_ARMING[family][deploy.tier];
|
|
48
|
+
const disarmedByEnv = declared === "armed" && killSwitchDisarms(family, env);
|
|
49
|
+
return {
|
|
50
|
+
family,
|
|
51
|
+
armed: declared === "armed" && !disarmedByEnv,
|
|
52
|
+
declared,
|
|
53
|
+
source: disarmedByEnv ? "env" : "declaration",
|
|
54
|
+
tier: deploy.tier,
|
|
55
|
+
deploy_env: deploy.label,
|
|
56
|
+
production_data: isProductionData(env),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
/** The readback: every family's effective gate for this process. */
|
|
60
|
+
export function describeExternalEffectArming(env = process.env) {
|
|
61
|
+
return EXTERNAL_EFFECT_FAMILIES.map((family) => resolveExternalEffectArming(family, env));
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Throw before an effect is dispatched when this process is not armed for it.
|
|
65
|
+
* Production-data environments keep their declared state; the refusal names the
|
|
66
|
+
* family and environment so a skipped effect is never silent.
|
|
67
|
+
*/
|
|
68
|
+
export function assertExternalEffectArmed(family, env = process.env) {
|
|
69
|
+
const arming = resolveExternalEffectArming(family, env);
|
|
70
|
+
if (!arming.armed) {
|
|
71
|
+
throw new OxygenError("external_effect_not_armed", `${family} is not armed in ${arming.deploy_env} (${arming.source === "env" ? "disarmed by its kill switch" : "declared disarmed"}), so this external effect was not dispatched.`, { details: { family, deploy_env: arming.deploy_env, source: arming.source }, exitCode: 1 });
|
|
72
|
+
}
|
|
73
|
+
return arming;
|
|
74
|
+
}
|
|
75
|
+
/** Live-mode Stripe secret or restricted key. Test keys (`sk_test_`/`rk_test_`) never match. */
|
|
76
|
+
export function isLiveStripeKey(key) {
|
|
77
|
+
const value = key?.trim() ?? "";
|
|
78
|
+
return value.startsWith("sk_live_") || value.startsWith("rk_live_");
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Fail closed when a process that does NOT hold production data is about to write to
|
|
82
|
+
* Stripe with a LIVE key: that is a dev or local box pointed at real money. The key is
|
|
83
|
+
* never echoed; only its mode is named.
|
|
84
|
+
*/
|
|
85
|
+
export function assertStripeKeyMatchesEnvironment(key, env = process.env) {
|
|
86
|
+
if (!isLiveStripeKey(key) || isProductionData(env))
|
|
87
|
+
return;
|
|
88
|
+
const deploy = resolveDeployEnv(env);
|
|
89
|
+
throw new OxygenError("external_effect_environment_mismatch", `A live-mode Stripe key is configured in ${deploy.label}, which does not hold production data; refusing the Stripe write. Use a test-mode key outside production.`, { details: { family: "inbox_billing_stripe", deploy_env: deploy.label, key_mode: "live" }, exitCode: 1 });
|
|
90
|
+
}
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
export declare const GEO_ENGINES: readonly ["chatgpt", "gemini", "google-ai-mode", "google-ai-overview", "perplexity", "copilot", "claude"];
|
|
2
|
+
export type GeoEngine = (typeof GEO_ENGINES)[number];
|
|
3
|
+
export type GeoMarket = {
|
|
4
|
+
country: string;
|
|
5
|
+
language: string;
|
|
6
|
+
};
|
|
7
|
+
export type GeoCompetitor = {
|
|
8
|
+
name: string;
|
|
9
|
+
aliases: string[];
|
|
10
|
+
domains: string[];
|
|
11
|
+
};
|
|
12
|
+
export type GeoProject = GeoCompetitor & {
|
|
13
|
+
id: string;
|
|
14
|
+
icp: string;
|
|
15
|
+
engines: GeoEngine[];
|
|
16
|
+
markets: GeoMarket[];
|
|
17
|
+
repetitions: number;
|
|
18
|
+
schedule: "paused" | "daily" | "weekly";
|
|
19
|
+
next_run_at: string | null;
|
|
20
|
+
archived: boolean;
|
|
21
|
+
};
|
|
22
|
+
export type GeoPrompt = {
|
|
23
|
+
id: string;
|
|
24
|
+
text: string;
|
|
25
|
+
topic: string;
|
|
26
|
+
persona: string;
|
|
27
|
+
stage: string;
|
|
28
|
+
source: "hypothesis" | "research" | "customer";
|
|
29
|
+
evidence_id?: string;
|
|
30
|
+
enabled: boolean;
|
|
31
|
+
revision: number;
|
|
32
|
+
};
|
|
33
|
+
export type GeoCitation = {
|
|
34
|
+
url: string;
|
|
35
|
+
domain: string;
|
|
36
|
+
position: number;
|
|
37
|
+
category: "owned" | "competitor" | "community" | "review" | "editorial" | "other";
|
|
38
|
+
};
|
|
39
|
+
export type GeoMention = {
|
|
40
|
+
brand: string;
|
|
41
|
+
present: boolean;
|
|
42
|
+
evidence: string | null;
|
|
43
|
+
recommendation_rank: number | null;
|
|
44
|
+
};
|
|
45
|
+
export type GeoMeasurement = {
|
|
46
|
+
brand: GeoCompetitor;
|
|
47
|
+
competitors: GeoCompetitor[];
|
|
48
|
+
};
|
|
49
|
+
export type GeoAnswer = {
|
|
50
|
+
id: string;
|
|
51
|
+
run_id: string | null;
|
|
52
|
+
prompt_id: string | null;
|
|
53
|
+
prompt: string;
|
|
54
|
+
engine: GeoEngine;
|
|
55
|
+
provider: string;
|
|
56
|
+
collection: "consumer" | "import";
|
|
57
|
+
market: GeoMarket | null;
|
|
58
|
+
reported_market: GeoMarket | null;
|
|
59
|
+
captured_at: string;
|
|
60
|
+
text: string;
|
|
61
|
+
citations: GeoCitation[];
|
|
62
|
+
mentions: GeoMention[];
|
|
63
|
+
fan_out: string[];
|
|
64
|
+
outcome: "answer" | "no_overview";
|
|
65
|
+
cost_micros: number;
|
|
66
|
+
raw: unknown;
|
|
67
|
+
extraction_version: number;
|
|
68
|
+
measurement?: GeoMeasurement;
|
|
69
|
+
cost_basis?: "reported" | "reserved_estimate";
|
|
70
|
+
prompt_revision?: number;
|
|
71
|
+
topic?: string;
|
|
72
|
+
};
|
|
73
|
+
export type GeoExportPagination = {
|
|
74
|
+
returned: number;
|
|
75
|
+
total: number;
|
|
76
|
+
next_cursor: string | null;
|
|
77
|
+
summary_scope: "all_filtered_answers";
|
|
78
|
+
};
|
|
79
|
+
/** Binary exports carry this metadata to web, CLI and MCP, even for CSV/PDF. */
|
|
80
|
+
export declare function readGeoExportPagination(headers: Pick<Headers, "get">): GeoExportPagination | undefined;
|
|
81
|
+
export type GeoDocumentKind = "prompt" | "competitor" | "answer" | "evidence" | "opportunity" | "experiment" | "audit";
|
|
82
|
+
export type GeoDocument = {
|
|
83
|
+
id: string;
|
|
84
|
+
project_id: string;
|
|
85
|
+
kind: GeoDocumentKind;
|
|
86
|
+
data: Record<string, unknown>;
|
|
87
|
+
created_at: string;
|
|
88
|
+
updated_at: string;
|
|
89
|
+
};
|
|
90
|
+
export type GeoRunItem = {
|
|
91
|
+
id: string;
|
|
92
|
+
run_id: string;
|
|
93
|
+
project_id: string;
|
|
94
|
+
prompt: GeoPrompt;
|
|
95
|
+
brand: GeoCompetitor;
|
|
96
|
+
competitors: GeoCompetitor[];
|
|
97
|
+
engine: GeoEngine;
|
|
98
|
+
market: GeoMarket;
|
|
99
|
+
state: "queued" | "submitting" | "collecting" | "succeeded" | "failed" | "uncertain" | "cancelled";
|
|
100
|
+
provider_task_id: string | null;
|
|
101
|
+
provider: string;
|
|
102
|
+
reserved_micros: number;
|
|
103
|
+
cost_micros: number;
|
|
104
|
+
error: string | null;
|
|
105
|
+
attempt: number;
|
|
106
|
+
terminal_before_dispatch?: boolean;
|
|
107
|
+
submission_rejected?: boolean;
|
|
108
|
+
submission_cost_micros?: number | null;
|
|
109
|
+
};
|
|
110
|
+
export declare const GEO_PILOT_CAP_MICROS = 10000000;
|
|
111
|
+
/** The initial release gate is independent of NODE_ENV and protects shadow data. */
|
|
112
|
+
export declare function isGeoEnabled(env?: NodeJS.ProcessEnv): boolean;
|
|
113
|
+
export declare function assertGeoEnabled(env?: NodeJS.ProcessEnv): void;
|
|
114
|
+
export declare function geoDomain(value: string): string | null;
|
|
115
|
+
export declare function analyzeGeoAnswer(text: string, brand: GeoCompetitor, competitors: GeoCompetitor[], urls: string[]): {
|
|
116
|
+
mentions: GeoMention[];
|
|
117
|
+
citations: GeoCitation[];
|
|
118
|
+
measurement: GeoMeasurement;
|
|
119
|
+
};
|
|
120
|
+
/** Exact capture-time configuration, canonicalized for matched comparisons. */
|
|
121
|
+
export declare function geoMeasurementKey(answer: Pick<GeoAnswer, "measurement">): string;
|
|
122
|
+
/** A scraper's question heading is not answer prose, including old stored captures. */
|
|
123
|
+
export declare function isGeoPromptEcho(text: string, prompt: string): boolean;
|
|
124
|
+
export declare function isGeoControlledAnswer(answer: GeoAnswer): boolean;
|
|
125
|
+
export declare function summarizeGeoAnswers(answers: GeoAnswer[], brand: string, failedSamples?: number): {
|
|
126
|
+
successful_samples: number;
|
|
127
|
+
measurement_contexts: number;
|
|
128
|
+
failed_samples: number;
|
|
129
|
+
invalid_answer_samples: number;
|
|
130
|
+
imported_samples: number;
|
|
131
|
+
no_overview_samples: number;
|
|
132
|
+
mentioned_samples: number;
|
|
133
|
+
visibility: number | null;
|
|
134
|
+
cited_samples: number;
|
|
135
|
+
citation_coverage: number | null;
|
|
136
|
+
share_of_voice: number | null;
|
|
137
|
+
competitors: {
|
|
138
|
+
name: string;
|
|
139
|
+
mentioned_samples: number;
|
|
140
|
+
share_of_voice: number | null;
|
|
141
|
+
}[];
|
|
142
|
+
sources: {
|
|
143
|
+
domain: string;
|
|
144
|
+
count: number;
|
|
145
|
+
category: string;
|
|
146
|
+
urls: string[];
|
|
147
|
+
}[];
|
|
148
|
+
};
|
|
149
|
+
/** No fetching or execution: customer wording and citations are evidence only. */
|
|
150
|
+
export declare function parseGeoTranscript(input: string, redactions?: string[]): {
|
|
151
|
+
messages: {
|
|
152
|
+
role: "user" | "assistant";
|
|
153
|
+
text: string;
|
|
154
|
+
}[];
|
|
155
|
+
prompts: string[];
|
|
156
|
+
sources: string[];
|
|
157
|
+
redacted_text: string;
|
|
158
|
+
};
|
|
159
|
+
/** Compare only common collection cohorts; imports and missing AIOs are excluded. */
|
|
160
|
+
export declare function compareGeoExperiment(before: GeoAnswer[], after: GeoAnswer[], brand: string): {
|
|
161
|
+
before: {
|
|
162
|
+
successful_samples: number;
|
|
163
|
+
measurement_contexts: number;
|
|
164
|
+
failed_samples: number;
|
|
165
|
+
invalid_answer_samples: number;
|
|
166
|
+
imported_samples: number;
|
|
167
|
+
no_overview_samples: number;
|
|
168
|
+
mentioned_samples: number;
|
|
169
|
+
visibility: number | null;
|
|
170
|
+
cited_samples: number;
|
|
171
|
+
citation_coverage: number | null;
|
|
172
|
+
share_of_voice: number | null;
|
|
173
|
+
competitors: {
|
|
174
|
+
name: string;
|
|
175
|
+
mentioned_samples: number;
|
|
176
|
+
share_of_voice: number | null;
|
|
177
|
+
}[];
|
|
178
|
+
sources: {
|
|
179
|
+
domain: string;
|
|
180
|
+
count: number;
|
|
181
|
+
category: string;
|
|
182
|
+
urls: string[];
|
|
183
|
+
}[];
|
|
184
|
+
};
|
|
185
|
+
after: {
|
|
186
|
+
successful_samples: number;
|
|
187
|
+
measurement_contexts: number;
|
|
188
|
+
failed_samples: number;
|
|
189
|
+
invalid_answer_samples: number;
|
|
190
|
+
imported_samples: number;
|
|
191
|
+
no_overview_samples: number;
|
|
192
|
+
mentioned_samples: number;
|
|
193
|
+
visibility: number | null;
|
|
194
|
+
cited_samples: number;
|
|
195
|
+
citation_coverage: number | null;
|
|
196
|
+
share_of_voice: number | null;
|
|
197
|
+
competitors: {
|
|
198
|
+
name: string;
|
|
199
|
+
mentioned_samples: number;
|
|
200
|
+
share_of_voice: number | null;
|
|
201
|
+
}[];
|
|
202
|
+
sources: {
|
|
203
|
+
domain: string;
|
|
204
|
+
count: number;
|
|
205
|
+
category: string;
|
|
206
|
+
urls: string[];
|
|
207
|
+
}[];
|
|
208
|
+
};
|
|
209
|
+
comparable_cohorts: number;
|
|
210
|
+
excluded_before: number;
|
|
211
|
+
excluded_after: number;
|
|
212
|
+
cohorts: {
|
|
213
|
+
cohort: any;
|
|
214
|
+
before: {
|
|
215
|
+
successful_samples: number;
|
|
216
|
+
measurement_contexts: number;
|
|
217
|
+
failed_samples: number;
|
|
218
|
+
invalid_answer_samples: number;
|
|
219
|
+
imported_samples: number;
|
|
220
|
+
no_overview_samples: number;
|
|
221
|
+
mentioned_samples: number;
|
|
222
|
+
visibility: number | null;
|
|
223
|
+
cited_samples: number;
|
|
224
|
+
citation_coverage: number | null;
|
|
225
|
+
share_of_voice: number | null;
|
|
226
|
+
competitors: {
|
|
227
|
+
name: string;
|
|
228
|
+
mentioned_samples: number;
|
|
229
|
+
share_of_voice: number | null;
|
|
230
|
+
}[];
|
|
231
|
+
sources: {
|
|
232
|
+
domain: string;
|
|
233
|
+
count: number;
|
|
234
|
+
category: string;
|
|
235
|
+
urls: string[];
|
|
236
|
+
}[];
|
|
237
|
+
};
|
|
238
|
+
after: {
|
|
239
|
+
successful_samples: number;
|
|
240
|
+
measurement_contexts: number;
|
|
241
|
+
failed_samples: number;
|
|
242
|
+
invalid_answer_samples: number;
|
|
243
|
+
imported_samples: number;
|
|
244
|
+
no_overview_samples: number;
|
|
245
|
+
mentioned_samples: number;
|
|
246
|
+
visibility: number | null;
|
|
247
|
+
cited_samples: number;
|
|
248
|
+
citation_coverage: number | null;
|
|
249
|
+
share_of_voice: number | null;
|
|
250
|
+
competitors: {
|
|
251
|
+
name: string;
|
|
252
|
+
mentioned_samples: number;
|
|
253
|
+
share_of_voice: number | null;
|
|
254
|
+
}[];
|
|
255
|
+
sources: {
|
|
256
|
+
domain: string;
|
|
257
|
+
count: number;
|
|
258
|
+
category: string;
|
|
259
|
+
urls: string[];
|
|
260
|
+
}[];
|
|
261
|
+
};
|
|
262
|
+
}[];
|
|
263
|
+
interpretation: string;
|
|
264
|
+
};
|