@relyon/kit 0.0.0-stage → 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/AGENTS.md +75 -0
- package/CHANGELOG.md +1053 -0
- package/LICENSE +21 -0
- package/QUICKSTART.md +239 -0
- package/README.md +117 -2
- package/dist/adapters/express.d.ts +39 -0
- package/dist/adapters/express.js +106 -0
- package/dist/adapters/hono.d.ts +16 -0
- package/dist/adapters/hono.js +15 -0
- package/dist/adapters/next.d.ts +29 -0
- package/dist/adapters/next.js +38 -0
- package/dist/agent-card.d.ts +14 -0
- package/dist/agent-card.js +58 -0
- package/dist/agent-docs.d.ts +36 -0
- package/dist/agent-docs.js +78 -0
- package/dist/agent-hooks.d.ts +66 -0
- package/dist/agent-hooks.js +280 -0
- package/dist/agents.d.ts +24 -0
- package/dist/agents.js +120 -0
- package/dist/api-key.d.ts +6 -0
- package/dist/api-key.js +33 -0
- package/dist/cache.d.ts +46 -0
- package/dist/cache.js +86 -0
- package/dist/cart-tokens.d.ts +31 -0
- package/dist/cart-tokens.js +58 -0
- package/dist/cart-transfer.d.ts +95 -0
- package/dist/cart-transfer.js +387 -0
- package/dist/catalog-enrichment.d.ts +6 -0
- package/dist/catalog-enrichment.js +71 -0
- package/dist/catalog-reads.d.ts +126 -0
- package/dist/catalog-reads.js +104 -0
- package/dist/catalog.d.ts +78 -0
- package/dist/catalog.js +288 -0
- package/dist/charge-claims.d.ts +11 -0
- package/dist/charge-claims.js +47 -0
- package/dist/check.d.ts +44 -0
- package/dist/check.js +152 -0
- package/dist/checklist-manifest.d.ts +72 -0
- package/dist/checklist-manifest.js +341 -0
- package/dist/checkout.d.ts +222 -0
- package/dist/checkout.js +353 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +727 -0
- package/dist/confirmation.d.ts +78 -0
- package/dist/confirmation.js +124 -0
- package/dist/context.d.ts +81 -0
- package/dist/context.js +10 -0
- package/dist/discovery.d.ts +151 -0
- package/dist/discovery.js +346 -0
- package/dist/doctor-cart-transfer.d.ts +33 -0
- package/dist/doctor-cart-transfer.js +186 -0
- package/dist/doctor-catalog.d.ts +8 -0
- package/dist/doctor-catalog.js +47 -0
- package/dist/doctor-evidence.d.ts +22 -0
- package/dist/doctor-evidence.js +57 -0
- package/dist/doctor-merchant.d.ts +48 -0
- package/dist/doctor-merchant.js +74 -0
- package/dist/doctor-source.d.ts +5 -0
- package/dist/doctor-source.js +142 -0
- package/dist/doctor-variants.d.ts +70 -0
- package/dist/doctor-variants.js +102 -0
- package/dist/doctor.d.ts +215 -0
- package/dist/doctor.js +1689 -0
- package/dist/events.d.ts +95 -0
- package/dist/events.js +200 -0
- package/dist/feed-mapping.d.ts +114 -0
- package/dist/feed-mapping.js +152 -0
- package/dist/feed-values.d.ts +13 -0
- package/dist/feed-values.js +40 -0
- package/dist/feeds.d.ts +104 -0
- package/dist/feeds.js +366 -0
- package/dist/identify.d.ts +102 -0
- package/dist/identify.js +124 -0
- package/dist/identity.d.ts +37 -0
- package/dist/identity.js +54 -0
- package/dist/index.d.ts +42 -0
- package/dist/index.js +41 -0
- package/dist/init.d.ts +157 -0
- package/dist/init.js +912 -0
- package/dist/kit-config.d.ts +19 -0
- package/dist/kit-config.js +43 -0
- package/dist/kit-environment.d.ts +20 -0
- package/dist/kit-environment.js +32 -0
- package/dist/kit-updates.d.ts +47 -0
- package/dist/kit-updates.js +77 -0
- package/dist/kit-version-project.d.ts +18 -0
- package/dist/kit-version-project.js +214 -0
- package/dist/kit-version.d.ts +37 -0
- package/dist/kit-version.js +162 -0
- package/dist/kit.d.ts +516 -0
- package/dist/kit.js +1309 -0
- package/dist/layers/pages.d.ts +3 -0
- package/dist/layers/pages.js +5 -0
- package/dist/layers/payments.d.ts +7 -0
- package/dist/layers/payments.js +9 -0
- package/dist/layers/products.d.ts +10 -0
- package/dist/layers/products.js +13 -0
- package/dist/live.d.ts +13 -0
- package/dist/live.js +52 -0
- package/dist/mcp.d.ts +270 -0
- package/dist/mcp.js +312 -0
- package/dist/next-steps.d.ts +101 -0
- package/dist/next-steps.js +257 -0
- package/dist/order-pending.d.ts +57 -0
- package/dist/order-pending.js +127 -0
- package/dist/orders.d.ts +12 -0
- package/dist/orders.js +21 -0
- package/dist/payments-init.d.ts +19 -0
- package/dist/payments-init.js +70 -0
- package/dist/payments-routes.d.ts +54 -0
- package/dist/payments-routes.js +123 -0
- package/dist/payments.d.ts +165 -0
- package/dist/payments.js +192 -0
- package/dist/pnpm-workspace.d.ts +58 -0
- package/dist/pnpm-workspace.js +250 -0
- package/dist/policies.d.ts +111 -0
- package/dist/policies.js +317 -0
- package/dist/preview-hosts.d.ts +64 -0
- package/dist/preview-hosts.js +175 -0
- package/dist/private-config.d.ts +169 -0
- package/dist/private-config.js +820 -0
- package/dist/progress.d.ts +54 -0
- package/dist/progress.js +153 -0
- package/dist/protocol-inputs.d.ts +22 -0
- package/dist/protocol-inputs.js +151 -0
- package/dist/public-origin.d.ts +50 -0
- package/dist/public-origin.js +180 -0
- package/dist/refusals.d.ts +86 -0
- package/dist/refusals.js +157 -0
- package/dist/relay.d.ts +107 -0
- package/dist/relay.js +655 -0
- package/dist/release-notes.d.ts +2 -0
- package/dist/release-notes.js +290 -0
- package/dist/relyon-cart-tokens.d.ts +101 -0
- package/dist/relyon-cart-tokens.js +521 -0
- package/dist/relyon.d.ts +141 -0
- package/dist/relyon.js +238 -0
- package/dist/robots.d.ts +27 -0
- package/dist/robots.js +127 -0
- package/dist/rules.d.ts +144 -0
- package/dist/rules.js +347 -0
- package/dist/sdk/generated/public-api.d.ts +4816 -0
- package/dist/sdk/generated/public-api.js +1 -0
- package/dist/sdk/index.d.ts +24 -0
- package/dist/sdk/index.js +34 -0
- package/dist/sdk/signatures.d.ts +17 -0
- package/dist/sdk/signatures.js +33 -0
- package/dist/setup.d.ts +37 -0
- package/dist/setup.js +94 -0
- package/dist/signatures.d.ts +112 -0
- package/dist/signatures.js +443 -0
- package/dist/state.d.ts +185 -0
- package/dist/state.js +96 -0
- package/dist/store-payments.d.ts +48 -0
- package/dist/store-payments.js +143 -0
- package/dist/structured-fields.d.ts +26 -0
- package/dist/structured-fields.js +200 -0
- package/dist/templates.d.ts +19 -0
- package/dist/templates.js +193 -0
- package/dist/test-checkout-command.d.ts +32 -0
- package/dist/test-checkout-command.js +161 -0
- package/dist/test-checkout.d.ts +88 -0
- package/dist/test-checkout.js +292 -0
- package/dist/types.d.ts +103 -0
- package/dist/types.js +18 -0
- package/dist/ucp-versions.d.ts +57 -0
- package/dist/ucp-versions.js +129 -0
- package/dist/util.d.ts +23 -0
- package/dist/util.js +68 -0
- package/dist/variants.d.ts +67 -0
- package/dist/variants.js +146 -0
- package/dist/version.d.ts +9 -0
- package/dist/version.js +10 -0
- package/dist/waiting.d.ts +43 -0
- package/dist/waiting.js +57 -0
- package/dist/webhook-command.d.ts +48 -0
- package/dist/webhook-command.js +367 -0
- package/dist/webhook-registration.d.ts +47 -0
- package/dist/webhook-registration.js +69 -0
- package/dist/webmcp-schema.d.ts +14 -0
- package/dist/webmcp-schema.js +140 -0
- package/dist/webmcp-script.d.ts +3 -0
- package/dist/webmcp-script.js +176 -0
- package/dist/webmcp-store.d.ts +102 -0
- package/dist/webmcp-store.js +116 -0
- package/dist/webmcp.d.ts +242 -0
- package/dist/webmcp.js +866 -0
- package/dist/wire-names.d.ts +85 -0
- package/dist/wire-names.js +109 -0
- package/package.json +118 -4
- package/release-notes.json +290 -0
- package/scripts/install-notice.cjs +7 -0
- package/skills/relyon-agents/SKILL.md +327 -0
- package/skills/relyon-catalog/SKILL.md +499 -0
- package/skills/relyon-catalog/references/example-store.md +218 -0
- package/skills/relyon-checkout/SKILL.md +603 -0
- package/skills/relyon-checkout/references/checkout-flow.md +257 -0
- package/skills/relyon-checkout/references/checkout-page.md +315 -0
- package/skills/relyon-go-live/SKILL.md +344 -0
- package/skills/relyon-orders/SKILL.md +191 -0
- package/skills/relyon-orders/references/webhook-receiver.md +113 -0
- package/skills/relyon-payments/SKILL.md +117 -0
- package/skills/relyon-setup/SKILL.md +1061 -0
- package/skills/relyon-setup/references/QUICKSTART.md +239 -0
- package/skills/relyon-setup/references/durable-state.md +209 -0
- package/skills/relyon-setup/references/express-server.md +388 -0
- package/skills/relyon-setup/references/next-app-router.md +251 -0
- package/templates/common/STORE-README.md +67 -0
- package/templates/common/gitignore +8 -0
- package/templates/common/scripts/check-pricing.ts +22 -0
- package/templates/common/scripts/serve.mjs +13 -0
- package/templates/common/server/catalog.ts +79 -0
- package/templates/common/server/checkout-flow.d.ts +34 -0
- package/templates/common/server/pages.ts +184 -0
- package/templates/common/server/storage.ts +114 -0
- package/templates/common/server/store.ts +67 -0
- package/templates/express/server/express.ts +20 -0
- package/templates/express/tsconfig.build.json +6 -0
- package/templates/express/tsconfig.json +9 -0
- package/templates/next/app/[[...path]]/route.ts +24 -0
- package/templates/next/next.config.mjs +19 -0
- package/templates/next/tsconfig.json +12 -0
- package/templates/payments/express.ts +39 -0
- package/templates/payments/next.ts +38 -0
- package/templates/payments/node.ts +39 -0
package/dist/doctor.d.ts
ADDED
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { type KitLayer } from "./kit-config.js";
|
|
2
|
+
import { type StoreFeedFormat } from "./feeds.js";
|
|
3
|
+
import { type FetchLike } from "./relyon.js";
|
|
4
|
+
import { type KitVersionOptions, type KitVersionResult } from "./kit-version.js";
|
|
5
|
+
/**
|
|
6
|
+
* NOT DONE: Relyon answered and a required step (a completed Test checkout) is
|
|
7
|
+
* not recorded yet. UNVERIFIED: the doctor couldn't ask.
|
|
8
|
+
*/
|
|
9
|
+
export type StoreDoctorStatus = "PASS" | "FAIL" | "WARN" | "PENDING" | "N/A" | "UNVERIFIED" | "NOT DONE";
|
|
10
|
+
export interface StoreDoctorItem {
|
|
11
|
+
name: string;
|
|
12
|
+
status: StoreDoctorStatus;
|
|
13
|
+
detail: string;
|
|
14
|
+
merchantTodo?: string[];
|
|
15
|
+
checkId?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface StoreDoctorItem {
|
|
18
|
+
name: string;
|
|
19
|
+
status: StoreDoctorStatus;
|
|
20
|
+
detail: string;
|
|
21
|
+
merchantTodo?: string[];
|
|
22
|
+
checkId?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface StoreDoctorItem {
|
|
25
|
+
name: string;
|
|
26
|
+
status: StoreDoctorStatus;
|
|
27
|
+
detail: string;
|
|
28
|
+
merchantTodo?: string[];
|
|
29
|
+
checkId?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface StoreDoctorItem {
|
|
32
|
+
name: string;
|
|
33
|
+
status: StoreDoctorStatus;
|
|
34
|
+
detail: string;
|
|
35
|
+
merchantTodo?: string[];
|
|
36
|
+
checkId?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface StoreDoctorItem {
|
|
39
|
+
name: string;
|
|
40
|
+
status: StoreDoctorStatus;
|
|
41
|
+
detail: string;
|
|
42
|
+
merchantTodo?: string[];
|
|
43
|
+
checkId?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface StoreDoctorItem {
|
|
46
|
+
name: string;
|
|
47
|
+
status: StoreDoctorStatus;
|
|
48
|
+
detail: string;
|
|
49
|
+
merchantTodo?: string[];
|
|
50
|
+
checkId?: string;
|
|
51
|
+
}
|
|
52
|
+
export interface StoreDoctorResult {
|
|
53
|
+
items: StoreDoctorItem[];
|
|
54
|
+
ok: boolean;
|
|
55
|
+
/** Advisory registry/installed-package evidence; never part of checklist completion. */
|
|
56
|
+
kitVersion?: KitVersionResult;
|
|
57
|
+
/** Advisory delivery acknowledgement, never a readiness item or exit-code input. */
|
|
58
|
+
kitVersionDelivery?: "accepted" | "rejected" | "unavailable";
|
|
59
|
+
/** Compatibility string derived exclusively from kitVersion. */
|
|
60
|
+
newerKitVersion?: string;
|
|
61
|
+
}
|
|
62
|
+
export interface StoreDoctorOptions {
|
|
63
|
+
/** The store's public origin (`STORE_PUBLIC_URL`), such as `https://shop.example.com`. */
|
|
64
|
+
storeUrl: string;
|
|
65
|
+
/** The store's secret key (`RELYON_API_KEY`). Without it Relyon's doctor is skipped (UNVERIFIED). Never printed. */
|
|
66
|
+
apiKey?: string | undefined;
|
|
67
|
+
/** Explicit Live opt-in, as `relyon.live` in the kit. */
|
|
68
|
+
live?: boolean;
|
|
69
|
+
/** Promote Test merchant-pending items to FAIL. Live always keeps these requirements strict. */
|
|
70
|
+
strict?: boolean;
|
|
71
|
+
/** Relyon's API base URL. Default `https://core.getrelyon.com/api`. */
|
|
72
|
+
baseUrl?: string;
|
|
73
|
+
/** The store's selected feed formats. Default: the feeds its llms.txt advertises. */
|
|
74
|
+
feeds?: readonly StoreFeedFormat[] | undefined;
|
|
75
|
+
/** Timeout for each request, in milliseconds. Default 10000. */
|
|
76
|
+
timeoutMs?: number;
|
|
77
|
+
/** Replaces the global fetch (tests). */
|
|
78
|
+
fetch?: FetchLike;
|
|
79
|
+
/**
|
|
80
|
+
* The store's project folder, for a best-effort source check that WARNs
|
|
81
|
+
* when the kit is created or mounted only when RELYON_API_KEY is set.
|
|
82
|
+
*/
|
|
83
|
+
projectDir?: string;
|
|
84
|
+
/**
|
|
85
|
+
* The app's kit layer. Default: what init recorded in the project's
|
|
86
|
+
* relyon/kit.json, else none (a store kit install from before layers,
|
|
87
|
+
* checked as a full store). /cart is required for layer 3 (pages) and for
|
|
88
|
+
* installs without a layer; layer 2 (products) needs none.
|
|
89
|
+
*/
|
|
90
|
+
layer?: KitLayer;
|
|
91
|
+
/** Independent registry/cache/clock seams; never reuses the Relyon request transport. */
|
|
92
|
+
kitVersionOptions?: KitVersionOptions;
|
|
93
|
+
/**
|
|
94
|
+
* A saved Test key was found but not sent, because the base URL is not
|
|
95
|
+
* Relyon's official https API (the CLI's --allow-saved-key-to-base-url sends it).
|
|
96
|
+
*/
|
|
97
|
+
savedKeyWithheld?: boolean;
|
|
98
|
+
/** The kit's webhook path (`paths.webhook`). Default `/relyon/webhooks`. */
|
|
99
|
+
webhookPath?: string;
|
|
100
|
+
/** The store's checkout page for human shoppers (`paths.checkout`). Default `/checkout`. */
|
|
101
|
+
checkoutPath?: string;
|
|
102
|
+
/**
|
|
103
|
+
* The store's cart-transfer caller key (`RELYON_CART_TRANSFER_KEY`), when
|
|
104
|
+
* the store requires one: Test doctor sends it only to the store's own
|
|
105
|
+
* /ucp/carts to transfer a real item. Never printed.
|
|
106
|
+
*/
|
|
107
|
+
cartTransferKey?: string | undefined;
|
|
108
|
+
/**
|
|
109
|
+
* How long a probe retries an answer that looks like a store still starting
|
|
110
|
+
* (connection refused/reset, a non-kit 502/503/504, a tunnel or proxy error
|
|
111
|
+
* page, or an empty or HTML answer on a kit/discovery path) before judging
|
|
112
|
+
* it, in milliseconds. One shared window per run, so a run never waits
|
|
113
|
+
* longer than this in total. Default 12000.
|
|
114
|
+
*/
|
|
115
|
+
startupGraceMs?: number;
|
|
116
|
+
/** The delay between startup retries, in milliseconds. Default 1500. */
|
|
117
|
+
startupRetryMs?: number;
|
|
118
|
+
/**
|
|
119
|
+
* The store's webhook signing secret (`RELYON_WEBHOOK_SECRET` or the saved
|
|
120
|
+
* Test configuration), when the operator has one: the doctor proves the
|
|
121
|
+
* running store resolves and accepts it with a signed, side-effect-free
|
|
122
|
+
* doctor.challenge. In Test without it, the doctor recovers the registered
|
|
123
|
+
* secret itself (the same replay the receiver's runtime recovery uses).
|
|
124
|
+
* Never printed.
|
|
125
|
+
*/
|
|
126
|
+
webhookSecret?: string | undefined;
|
|
127
|
+
/** Internal report orchestration: read Test confirmation before the one remote doctor call. */
|
|
128
|
+
beforeRelyonDoctor?: (live: boolean) => Promise<StoreDoctorItem>;
|
|
129
|
+
}
|
|
130
|
+
/** The checkout page path doctor checks unless told otherwise (the kit's default `paths.checkout`). */
|
|
131
|
+
export declare const DEFAULT_CHECKOUT_PATH = "/checkout";
|
|
132
|
+
/** Doctor's item for the human checkout page; NOT DONE until it answers 200. */
|
|
133
|
+
export declare const CHECKOUT_PAGE_ITEM = "checkout page";
|
|
134
|
+
export declare const CART_PAGE_ITEM = "cart page";
|
|
135
|
+
/** The cart-page item for a layer-2 app (relyon/kit.json says "products"). */
|
|
136
|
+
export declare const CART_PAGE_NOT_REQUIRED = "Not required for this app: init recorded layer 2 (products and agents) in relyon/kit.json, and a /cart page is required only when the kit builds the shopping pages (layer 3).";
|
|
137
|
+
export declare const CART_PAGE_FIX = "Serve a real /cart page that answers 200, lists the cart's lines and links to checkout (a drawer alone is not enough), then re-run npx @relyon/store-kit doctor.";
|
|
138
|
+
/** Doctor's item for the sampled product pages; NOT DONE until each answers 200. */
|
|
139
|
+
export declare const PRODUCT_PAGES_ITEM = "product pages";
|
|
140
|
+
/** Doctor's item for products with options (NOT DONE as a warning for agents when variants aren't listed). */
|
|
141
|
+
export declare const VARIANTS_ITEM = "product variants";
|
|
142
|
+
/** The checklist row telling agents (and the dashboard) that checkout needs an agent credential. */
|
|
143
|
+
export declare const AI_AGENT_CHECKOUT_ITEM = "AI-agent checkout";
|
|
144
|
+
/** At most this many product pages are fetched per run. */
|
|
145
|
+
export declare const PRODUCT_PAGE_SAMPLE = 3;
|
|
146
|
+
/** A spread sample of product page URLs: the first, the middle and the last. */
|
|
147
|
+
export declare function sampleProductPages(urls: readonly string[]): string[];
|
|
148
|
+
/** Policy pages in Live: https only (Test also accepts http on loopback addresses). */
|
|
149
|
+
export declare const LIVE_POLICY_HTTPS = "Live mode requires https policy URLs on the store's published domain; plain http on localhost, 127.0.0.1 or [::1] is accepted in Test only.";
|
|
150
|
+
/** A kit route answered by the app's own page or another non-kit body. */
|
|
151
|
+
export declare const CATCH_ALL_FIX = "Your server's catch-all route answers this path. Mount storeKitMiddleware before the catch-all.";
|
|
152
|
+
/** A random unknown path answered 200. */
|
|
153
|
+
export declare const UNKNOWN_PATH_FIX = "Your server answers 200 for unknown paths, so agents can't tell what is missing. Return 404 for unknown non-page paths.";
|
|
154
|
+
/** The command a failed run ends with. */
|
|
155
|
+
export declare const RERUN_DOCTOR = "npx @relyon/store-kit doctor";
|
|
156
|
+
export declare const DEFAULT_RELYON_BASE_URL = "https://core.getrelyon.com/api";
|
|
157
|
+
/** The most the doctor reads from one response, and the most a gzip feed may expand to. */
|
|
158
|
+
export declare const DOCTOR_MAX_RESPONSE_BYTES: number;
|
|
159
|
+
/** A store that never became ready inside the startup window: the plain verdict, with no route-order blame. */
|
|
160
|
+
export declare const STORE_STARTING = "The store is still starting or unreachable. Wait a moment and re-run the doctor.";
|
|
161
|
+
/** One catalog-URL message: store-owned callbacks serve URLs without a sync; without them the sitemap reads the synced index. */
|
|
162
|
+
/** Where to look when a feed lists fewer products than the store shows agents. */
|
|
163
|
+
export declare const FEED_RULES = "Feeds list only agent-visible products with feed.exactPrice and feed.condition; a product with options lists each variant in feed.variants. See the feeds section (\"Source-backed discovery and feeds\") of .agents/skills/relyon-catalog/SKILL.md, and log feeds.onDiagnostic in createStoreKit: it names each omitted product and why.";
|
|
164
|
+
export declare const CATALOG_URL_FIX: string;
|
|
165
|
+
/** Removes the given secrets and anything shaped like a Relyon key or webhook secret. */
|
|
166
|
+
export declare function redactSecrets(text: string, secrets?: readonly (string | undefined)[]): string;
|
|
167
|
+
/**
|
|
168
|
+
* Makes server-controlled text safe to print on a terminal: C0 and C1 control
|
|
169
|
+
* characters (escape sequences, carriage returns, line breaks) and Unicode
|
|
170
|
+
* bidirectional overrides become "?", so a remote answer can't rewrite or
|
|
171
|
+
* reorder what the doctor prints.
|
|
172
|
+
*/
|
|
173
|
+
export declare function terminalSafe(text: string): string;
|
|
174
|
+
/**
|
|
175
|
+
* A URL as the doctor prints it: scheme, host and path only. Credentials, the
|
|
176
|
+
* query string and the fragment are dropped (they may carry a token), every
|
|
177
|
+
* path segment that isn't a short plain word is shown as "…" (a sign-in page's
|
|
178
|
+
* path can carry a session or reset token, possibly percent-encoded), and
|
|
179
|
+
* anything shaped like a Relyon key is redacted.
|
|
180
|
+
*/
|
|
181
|
+
export declare function printableUrl(value: string, base?: string): string;
|
|
182
|
+
/**
|
|
183
|
+
* Where a redirect points, as the doctor prints it: only its origin. The
|
|
184
|
+
* Location comes from whatever answered (a sign-in or protection page), and
|
|
185
|
+
* its path can carry a short session or reset token that no heuristic can
|
|
186
|
+
* tell from a word, so no part of the path is printed.
|
|
187
|
+
*/
|
|
188
|
+
export declare function printableOrigin(value: string, base?: string): string;
|
|
189
|
+
/** Options for formatStoreDoctor. */
|
|
190
|
+
export interface StoreDoctorFormatOptions {
|
|
191
|
+
/** false: leave out the "NOT DONE … Next:" failure list (a caller prints its own next steps). Default true. */
|
|
192
|
+
nextSteps?: boolean;
|
|
193
|
+
/** The overall verdict, when the caller has one: "not_done" keeps the footer from reading as finished. */
|
|
194
|
+
verdict?: "done" | "not_done";
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Relyon's store-first `check_unavailable` text repeats every legacy probe and
|
|
198
|
+
* evidence rule; the kit shows only the required conditions (at most 3) and a
|
|
199
|
+
* short fix, so the step stays a few lines.
|
|
200
|
+
*/
|
|
201
|
+
export declare function shortCheckUnavailable(failure: {
|
|
202
|
+
code: string;
|
|
203
|
+
explanation: string;
|
|
204
|
+
fix: string;
|
|
205
|
+
}): string;
|
|
206
|
+
/** One line per item: `PASS name detail`. */
|
|
207
|
+
export declare function formatStoreDoctor(result: StoreDoctorResult, secrets?: readonly (string | undefined)[], options?: StoreDoctorFormatOptions): string;
|
|
208
|
+
/** Runs every check and returns the items; `ok` is false only when an item FAILs. */
|
|
209
|
+
export declare function runStoreDoctor(options: StoreDoctorOptions): Promise<StoreDoctorResult>;
|
|
210
|
+
/** Doctor's item for policy links whose pages don't exist (an owner to-do in Test). */
|
|
211
|
+
export declare const POLICY_PAGES_ITEM = "policy pages";
|
|
212
|
+
/** The exact fix for each missing project-space policy field, by its PUT policies path. */
|
|
213
|
+
export declare const STORE_POLICY_FIELD_FIXES: Record<string, string>;
|
|
214
|
+
/** The AI discovery crawlers a robots.txt keeps out of any of `paths` (most specific group; longest match wins, Allow on ties). */
|
|
215
|
+
export declare function blockedCrawlers(text: string, paths: readonly string[]): string[];
|