@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.
Files changed (225) hide show
  1. package/AGENTS.md +75 -0
  2. package/CHANGELOG.md +1053 -0
  3. package/LICENSE +21 -0
  4. package/QUICKSTART.md +239 -0
  5. package/README.md +117 -2
  6. package/dist/adapters/express.d.ts +39 -0
  7. package/dist/adapters/express.js +106 -0
  8. package/dist/adapters/hono.d.ts +16 -0
  9. package/dist/adapters/hono.js +15 -0
  10. package/dist/adapters/next.d.ts +29 -0
  11. package/dist/adapters/next.js +38 -0
  12. package/dist/agent-card.d.ts +14 -0
  13. package/dist/agent-card.js +58 -0
  14. package/dist/agent-docs.d.ts +36 -0
  15. package/dist/agent-docs.js +78 -0
  16. package/dist/agent-hooks.d.ts +66 -0
  17. package/dist/agent-hooks.js +280 -0
  18. package/dist/agents.d.ts +24 -0
  19. package/dist/agents.js +120 -0
  20. package/dist/api-key.d.ts +6 -0
  21. package/dist/api-key.js +33 -0
  22. package/dist/cache.d.ts +46 -0
  23. package/dist/cache.js +86 -0
  24. package/dist/cart-tokens.d.ts +31 -0
  25. package/dist/cart-tokens.js +58 -0
  26. package/dist/cart-transfer.d.ts +95 -0
  27. package/dist/cart-transfer.js +387 -0
  28. package/dist/catalog-enrichment.d.ts +6 -0
  29. package/dist/catalog-enrichment.js +71 -0
  30. package/dist/catalog-reads.d.ts +126 -0
  31. package/dist/catalog-reads.js +104 -0
  32. package/dist/catalog.d.ts +78 -0
  33. package/dist/catalog.js +288 -0
  34. package/dist/charge-claims.d.ts +11 -0
  35. package/dist/charge-claims.js +47 -0
  36. package/dist/check.d.ts +44 -0
  37. package/dist/check.js +152 -0
  38. package/dist/checklist-manifest.d.ts +72 -0
  39. package/dist/checklist-manifest.js +341 -0
  40. package/dist/checkout.d.ts +222 -0
  41. package/dist/checkout.js +353 -0
  42. package/dist/cli.d.ts +2 -0
  43. package/dist/cli.js +727 -0
  44. package/dist/confirmation.d.ts +78 -0
  45. package/dist/confirmation.js +124 -0
  46. package/dist/context.d.ts +81 -0
  47. package/dist/context.js +10 -0
  48. package/dist/discovery.d.ts +151 -0
  49. package/dist/discovery.js +346 -0
  50. package/dist/doctor-cart-transfer.d.ts +33 -0
  51. package/dist/doctor-cart-transfer.js +186 -0
  52. package/dist/doctor-catalog.d.ts +8 -0
  53. package/dist/doctor-catalog.js +47 -0
  54. package/dist/doctor-evidence.d.ts +22 -0
  55. package/dist/doctor-evidence.js +57 -0
  56. package/dist/doctor-merchant.d.ts +48 -0
  57. package/dist/doctor-merchant.js +74 -0
  58. package/dist/doctor-source.d.ts +5 -0
  59. package/dist/doctor-source.js +142 -0
  60. package/dist/doctor-variants.d.ts +70 -0
  61. package/dist/doctor-variants.js +102 -0
  62. package/dist/doctor.d.ts +215 -0
  63. package/dist/doctor.js +1689 -0
  64. package/dist/events.d.ts +95 -0
  65. package/dist/events.js +200 -0
  66. package/dist/feed-mapping.d.ts +114 -0
  67. package/dist/feed-mapping.js +152 -0
  68. package/dist/feed-values.d.ts +13 -0
  69. package/dist/feed-values.js +40 -0
  70. package/dist/feeds.d.ts +104 -0
  71. package/dist/feeds.js +366 -0
  72. package/dist/identify.d.ts +102 -0
  73. package/dist/identify.js +124 -0
  74. package/dist/identity.d.ts +37 -0
  75. package/dist/identity.js +54 -0
  76. package/dist/index.d.ts +42 -0
  77. package/dist/index.js +41 -0
  78. package/dist/init.d.ts +157 -0
  79. package/dist/init.js +912 -0
  80. package/dist/kit-config.d.ts +19 -0
  81. package/dist/kit-config.js +43 -0
  82. package/dist/kit-environment.d.ts +20 -0
  83. package/dist/kit-environment.js +32 -0
  84. package/dist/kit-updates.d.ts +47 -0
  85. package/dist/kit-updates.js +77 -0
  86. package/dist/kit-version-project.d.ts +18 -0
  87. package/dist/kit-version-project.js +214 -0
  88. package/dist/kit-version.d.ts +37 -0
  89. package/dist/kit-version.js +162 -0
  90. package/dist/kit.d.ts +516 -0
  91. package/dist/kit.js +1309 -0
  92. package/dist/layers/pages.d.ts +3 -0
  93. package/dist/layers/pages.js +5 -0
  94. package/dist/layers/payments.d.ts +7 -0
  95. package/dist/layers/payments.js +9 -0
  96. package/dist/layers/products.d.ts +10 -0
  97. package/dist/layers/products.js +13 -0
  98. package/dist/live.d.ts +13 -0
  99. package/dist/live.js +52 -0
  100. package/dist/mcp.d.ts +270 -0
  101. package/dist/mcp.js +312 -0
  102. package/dist/next-steps.d.ts +101 -0
  103. package/dist/next-steps.js +257 -0
  104. package/dist/order-pending.d.ts +57 -0
  105. package/dist/order-pending.js +127 -0
  106. package/dist/orders.d.ts +12 -0
  107. package/dist/orders.js +21 -0
  108. package/dist/payments-init.d.ts +19 -0
  109. package/dist/payments-init.js +70 -0
  110. package/dist/payments-routes.d.ts +54 -0
  111. package/dist/payments-routes.js +123 -0
  112. package/dist/payments.d.ts +165 -0
  113. package/dist/payments.js +192 -0
  114. package/dist/pnpm-workspace.d.ts +58 -0
  115. package/dist/pnpm-workspace.js +250 -0
  116. package/dist/policies.d.ts +111 -0
  117. package/dist/policies.js +317 -0
  118. package/dist/preview-hosts.d.ts +64 -0
  119. package/dist/preview-hosts.js +175 -0
  120. package/dist/private-config.d.ts +169 -0
  121. package/dist/private-config.js +820 -0
  122. package/dist/progress.d.ts +54 -0
  123. package/dist/progress.js +153 -0
  124. package/dist/protocol-inputs.d.ts +22 -0
  125. package/dist/protocol-inputs.js +151 -0
  126. package/dist/public-origin.d.ts +50 -0
  127. package/dist/public-origin.js +180 -0
  128. package/dist/refusals.d.ts +86 -0
  129. package/dist/refusals.js +157 -0
  130. package/dist/relay.d.ts +107 -0
  131. package/dist/relay.js +655 -0
  132. package/dist/release-notes.d.ts +2 -0
  133. package/dist/release-notes.js +290 -0
  134. package/dist/relyon-cart-tokens.d.ts +101 -0
  135. package/dist/relyon-cart-tokens.js +521 -0
  136. package/dist/relyon.d.ts +141 -0
  137. package/dist/relyon.js +238 -0
  138. package/dist/robots.d.ts +27 -0
  139. package/dist/robots.js +127 -0
  140. package/dist/rules.d.ts +144 -0
  141. package/dist/rules.js +347 -0
  142. package/dist/sdk/generated/public-api.d.ts +4816 -0
  143. package/dist/sdk/generated/public-api.js +1 -0
  144. package/dist/sdk/index.d.ts +24 -0
  145. package/dist/sdk/index.js +34 -0
  146. package/dist/sdk/signatures.d.ts +17 -0
  147. package/dist/sdk/signatures.js +33 -0
  148. package/dist/setup.d.ts +37 -0
  149. package/dist/setup.js +94 -0
  150. package/dist/signatures.d.ts +112 -0
  151. package/dist/signatures.js +443 -0
  152. package/dist/state.d.ts +185 -0
  153. package/dist/state.js +96 -0
  154. package/dist/store-payments.d.ts +48 -0
  155. package/dist/store-payments.js +143 -0
  156. package/dist/structured-fields.d.ts +26 -0
  157. package/dist/structured-fields.js +200 -0
  158. package/dist/templates.d.ts +19 -0
  159. package/dist/templates.js +193 -0
  160. package/dist/test-checkout-command.d.ts +32 -0
  161. package/dist/test-checkout-command.js +161 -0
  162. package/dist/test-checkout.d.ts +88 -0
  163. package/dist/test-checkout.js +292 -0
  164. package/dist/types.d.ts +103 -0
  165. package/dist/types.js +18 -0
  166. package/dist/ucp-versions.d.ts +57 -0
  167. package/dist/ucp-versions.js +129 -0
  168. package/dist/util.d.ts +23 -0
  169. package/dist/util.js +68 -0
  170. package/dist/variants.d.ts +67 -0
  171. package/dist/variants.js +146 -0
  172. package/dist/version.d.ts +9 -0
  173. package/dist/version.js +10 -0
  174. package/dist/waiting.d.ts +43 -0
  175. package/dist/waiting.js +57 -0
  176. package/dist/webhook-command.d.ts +48 -0
  177. package/dist/webhook-command.js +367 -0
  178. package/dist/webhook-registration.d.ts +47 -0
  179. package/dist/webhook-registration.js +69 -0
  180. package/dist/webmcp-schema.d.ts +14 -0
  181. package/dist/webmcp-schema.js +140 -0
  182. package/dist/webmcp-script.d.ts +3 -0
  183. package/dist/webmcp-script.js +176 -0
  184. package/dist/webmcp-store.d.ts +102 -0
  185. package/dist/webmcp-store.js +116 -0
  186. package/dist/webmcp.d.ts +242 -0
  187. package/dist/webmcp.js +866 -0
  188. package/dist/wire-names.d.ts +85 -0
  189. package/dist/wire-names.js +109 -0
  190. package/package.json +118 -4
  191. package/release-notes.json +290 -0
  192. package/scripts/install-notice.cjs +7 -0
  193. package/skills/relyon-agents/SKILL.md +327 -0
  194. package/skills/relyon-catalog/SKILL.md +499 -0
  195. package/skills/relyon-catalog/references/example-store.md +218 -0
  196. package/skills/relyon-checkout/SKILL.md +603 -0
  197. package/skills/relyon-checkout/references/checkout-flow.md +257 -0
  198. package/skills/relyon-checkout/references/checkout-page.md +315 -0
  199. package/skills/relyon-go-live/SKILL.md +344 -0
  200. package/skills/relyon-orders/SKILL.md +191 -0
  201. package/skills/relyon-orders/references/webhook-receiver.md +113 -0
  202. package/skills/relyon-payments/SKILL.md +117 -0
  203. package/skills/relyon-setup/SKILL.md +1061 -0
  204. package/skills/relyon-setup/references/QUICKSTART.md +239 -0
  205. package/skills/relyon-setup/references/durable-state.md +209 -0
  206. package/skills/relyon-setup/references/express-server.md +388 -0
  207. package/skills/relyon-setup/references/next-app-router.md +251 -0
  208. package/templates/common/STORE-README.md +67 -0
  209. package/templates/common/gitignore +8 -0
  210. package/templates/common/scripts/check-pricing.ts +22 -0
  211. package/templates/common/scripts/serve.mjs +13 -0
  212. package/templates/common/server/catalog.ts +79 -0
  213. package/templates/common/server/checkout-flow.d.ts +34 -0
  214. package/templates/common/server/pages.ts +184 -0
  215. package/templates/common/server/storage.ts +114 -0
  216. package/templates/common/server/store.ts +67 -0
  217. package/templates/express/server/express.ts +20 -0
  218. package/templates/express/tsconfig.build.json +6 -0
  219. package/templates/express/tsconfig.json +9 -0
  220. package/templates/next/app/[[...path]]/route.ts +24 -0
  221. package/templates/next/next.config.mjs +19 -0
  222. package/templates/next/tsconfig.json +12 -0
  223. package/templates/payments/express.ts +39 -0
  224. package/templates/payments/next.ts +38 -0
  225. package/templates/payments/node.ts +39 -0
@@ -0,0 +1,85 @@
1
+ /** Names the project space a request acts on, by its ID (`prj_…`), from RELYON_PROJECT_SPACE. */
2
+ export declare const PROJECT_SPACE_ID_HEADER = "Relyon-Project-Space";
3
+ /** Names the project space a request acts on, by one of its verified public hostnames. */
4
+ export declare const PROJECT_SPACE_HOSTNAME_HEADER = "Relyon-Project-Space-Hostname";
5
+ /** The deprecated name of PROJECT_SPACE_HOSTNAME_HEADER, accepted by the API during the window; the kit never sends it. */
6
+ export declare const LEGACY_PROJECT_SPACE_HOSTNAME_HEADER = "Relyon-Store-Hostname";
7
+ /** The project space's display name on a catalog answer (this header was not renamed). */
8
+ export declare const PROJECT_SPACE_NAME_HEADER = "Relyon-Store-Name";
9
+ /** The environment variable that names the project space (its `prj_…` ID). */
10
+ export declare const PROJECT_SPACE_ENV = "RELYON_PROJECT_SPACE";
11
+ /** The project space's policies (returns, shipping, support). */
12
+ export declare const PROJECT_SPACE_POLICIES_PATH = "/v1/project_space_policies";
13
+ /** The `object` of a policies answer. */
14
+ export declare const PROJECT_SPACE_POLICIES_OBJECT = "project_space_policies";
15
+ /** The deprecated alias path (still answered during the window, and still named in some doctor prose); setup calls it only when an older API answers the new path with 404 not_found. */
16
+ export declare const LEGACY_PROJECT_SPACE_POLICIES_PATH = "/v1/store_policies";
17
+ /** The `object` the deprecated alias path answers with; accepted when read. */
18
+ export declare const LEGACY_PROJECT_SPACE_POLICIES_OBJECT = "store_policies";
19
+ /** Refusal codes about the project space. */
20
+ export declare const PROJECT_SPACE_POLICY_INCOMPLETE = "project_space_policy_incomplete";
21
+ export declare const PROJECT_SPACE_ARCHIVED = "project_space_archived";
22
+ /** The workspace has more than one active project space and the request named none. */
23
+ export declare const PROJECT_SPACE_REQUIRED = "project_space_required";
24
+ /** The old codes of the same refusals, read as their new names. */
25
+ export declare const LEGACY_PROJECT_SPACE_CODES: Readonly<Record<string, string>>;
26
+ /** Payment sessions: the card fields' client token. */
27
+ export declare const PAYMENT_SESSIONS_PATH = "/v1/payment_sessions";
28
+ export declare const PAYMENT_SESSION_OBJECT = "payment_session";
29
+ /** Payments: the charge. */
30
+ export declare const PAYMENTS_PATH = "/v1/payments";
31
+ export declare const PAYMENT_OBJECT = "payment";
32
+ /** Refunds of a settled payment (`{id}` is the payment's ID). */
33
+ export declare const PAYMENT_REFUND_PATH = "/v1/payments/{id}/refund";
34
+ export declare const REFUND_OBJECT = "refund";
35
+ /** Webhook signatures on event deliveries. */
36
+ export declare const WEBHOOK_SIGNATURE_HEADER = "Relyon-Signature";
37
+ /** What Relyon's webhook sender sends today; verifiers accept both, the canonical name first. */
38
+ export declare const LEGACY_WEBHOOK_SIGNATURE_HEADER = "X-Relyon-Signature";
39
+ /** The doctor's diagnostic headers. */
40
+ export declare const KIT_VERSION_DIAGNOSTIC_HEADER = "Relyon-Kit-Version";
41
+ export declare const KIT_MANIFEST_VERSION_HEADER = "Relyon-Kit-Manifest-Version";
42
+ export declare const KIT_DIAGNOSTIC_STATUS_HEADER = "Relyon-Kit-Diagnostic-Status";
43
+ /** The headers that name a project space on a request (the ID wins on the server when both are sent). */
44
+ export declare function projectSpaceHeaders(input: {
45
+ hostname?: string | undefined;
46
+ id?: string | undefined;
47
+ }): Record<string, string>;
48
+ /** True when a request already names its project space (by ID, hostname or the old hostname header). */
49
+ export declare function namesProjectSpace(headers: Headers): boolean;
50
+ /** A policies answer's `object`, under its new or its deprecated name. */
51
+ export declare function isProjectSpacePoliciesObject(value: unknown): boolean;
52
+ /** A refusal code under its project-space name (old codes are mapped; others are unchanged). */
53
+ export declare function projectSpaceProblemCode(code: string): string;
54
+ /** What a developer does about a project_space_required refusal. */
55
+ export declare const PROJECT_SPACE_REQUIRED_GUIDANCE = "This workspace has more than one project space, so Relyon needs to know which one this app uses: set RELYON_PROJECT_SPACE to the project space's ID (prj_\u2026) in the host's environment settings, then restart the app.";
56
+ /** Every other operation the kit calls, by its contract path. */
57
+ export declare const PRODUCTS_PATH = "/v1/products";
58
+ export declare const PRODUCTS_BATCH_PATH = "/v1/products/batch";
59
+ export declare const UCP_AGENT_PROFILE_PATH = "/v1/agent_profiles/ucp";
60
+ export declare const DOMAINS_PATH = "/v1/domains";
61
+ export declare const DOMAIN_VERIFY_PATH = "/v1/domains/{id}/verify";
62
+ export declare const WEBHOOK_ENDPOINTS_PATH = "/v1/webhook_endpoints";
63
+ export declare const DOCTOR_PATH = "/v1/doctor";
64
+ export declare const AGENT_EVENTS_PATH = "/v1/agent_events";
65
+ export declare const CHANNEL_PATH = "/v1/channels/{name}";
66
+ export declare const ORDER_FULFILLMENT_PATH = "/v1/orders/{id}/fulfillment";
67
+ export declare const AGENT_CHECKOUT_OPERATION_PATH = "/v1/agent_checkouts/{protocol}/{operation}";
68
+ export declare const AGENT_RULES_PATH = "/v1/agent_rules";
69
+ /** Not in the typed contract: hosted sandbox progress (read with plain fetch). */
70
+ export declare const SANDBOX_PROGRESS_PATH = "/v1/sandboxes/progress";
71
+ /** The `object` of each answer the kit checks. */
72
+ export declare const LIST_OBJECT = "list";
73
+ export declare const CATALOG_SYNC_OBJECT = "catalog_sync";
74
+ export declare const DOCTOR_OBJECT = "integration_doctor";
75
+ export declare const DOCTOR_CHALLENGE_OBJECT = "doctor_challenge";
76
+ export declare const AGENT_EVENT_BATCH_OBJECT = "agent_event_batch";
77
+ export declare const AGENT_RULES_OBJECT = "agent_rules";
78
+ export declare const ORDER_OBJECT = "order";
79
+ export declare const DOMAIN_OBJECT = "domain";
80
+ export declare const WEBHOOK_ENDPOINT_OBJECT = "webhook_endpoint";
81
+ export declare const SANDBOX_OBJECT = "sandbox";
82
+ export declare const TEST_KEY_OBJECT = "test_key";
83
+ /** Kit evidence headers on the doctor's request to Relyon. */
84
+ export declare const KIT_OUTCOMES_HEADER = "Relyon-Kit-Outcomes";
85
+ export declare const KIT_VERSION_EVIDENCE_HEADER = "Relyon-Kit-Diagnostic";
@@ -0,0 +1,109 @@
1
+ // Every Relyon wire name the kit sends or checks: header names, endpoint paths
2
+ // and the `object` names of Relyon's answers. The kit's own vocabulary is the
3
+ // project space (`createKit`, `projectSpace`, `PUBLIC_URL`,
4
+ // `RELYON_PROJECT_SPACE`), and so is the public API's since Relyon-Version
5
+ // 2026-11-21: this module is the one place that spells those names.
6
+ //
7
+ // The kit sends only the project-space names. The API still accepts the old
8
+ // "store" names for a short deprecation window, and the kit still understands
9
+ // answers that carry them (the `store_policies` object and the
10
+ // `store_policy_incomplete` / `store_archived` codes) so an answer shaped the
11
+ // old way never reads as an outage.
12
+ /** Names the project space a request acts on, by its ID (`prj_…`), from RELYON_PROJECT_SPACE. */
13
+ export const PROJECT_SPACE_ID_HEADER = "Relyon-Project-Space";
14
+ /** Names the project space a request acts on, by one of its verified public hostnames. */
15
+ export const PROJECT_SPACE_HOSTNAME_HEADER = "Relyon-Project-Space-Hostname";
16
+ /** The deprecated name of PROJECT_SPACE_HOSTNAME_HEADER, accepted by the API during the window; the kit never sends it. */
17
+ export const LEGACY_PROJECT_SPACE_HOSTNAME_HEADER = "Relyon-Store-Hostname";
18
+ /** The project space's display name on a catalog answer (this header was not renamed). */
19
+ export const PROJECT_SPACE_NAME_HEADER = "Relyon-Store-Name";
20
+ /** The environment variable that names the project space (its `prj_…` ID). */
21
+ export const PROJECT_SPACE_ENV = "RELYON_PROJECT_SPACE";
22
+ /** The project space's policies (returns, shipping, support). */
23
+ export const PROJECT_SPACE_POLICIES_PATH = "/v1/project_space_policies";
24
+ /** The `object` of a policies answer. */
25
+ export const PROJECT_SPACE_POLICIES_OBJECT = "project_space_policies";
26
+ /** The deprecated alias path (still answered during the window, and still named in some doctor prose); setup calls it only when an older API answers the new path with 404 not_found. */
27
+ export const LEGACY_PROJECT_SPACE_POLICIES_PATH = "/v1/store_policies";
28
+ /** The `object` the deprecated alias path answers with; accepted when read. */
29
+ export const LEGACY_PROJECT_SPACE_POLICIES_OBJECT = "store_policies";
30
+ /** Refusal codes about the project space. */
31
+ export const PROJECT_SPACE_POLICY_INCOMPLETE = "project_space_policy_incomplete";
32
+ export const PROJECT_SPACE_ARCHIVED = "project_space_archived";
33
+ /** The workspace has more than one active project space and the request named none. */
34
+ export const PROJECT_SPACE_REQUIRED = "project_space_required";
35
+ /** The old codes of the same refusals, read as their new names. */
36
+ export const LEGACY_PROJECT_SPACE_CODES = Object.freeze({
37
+ store_policy_incomplete: PROJECT_SPACE_POLICY_INCOMPLETE,
38
+ store_archived: PROJECT_SPACE_ARCHIVED,
39
+ });
40
+ /** Payment sessions: the card fields' client token. */
41
+ export const PAYMENT_SESSIONS_PATH = "/v1/payment_sessions";
42
+ export const PAYMENT_SESSION_OBJECT = "payment_session";
43
+ /** Payments: the charge. */
44
+ export const PAYMENTS_PATH = "/v1/payments";
45
+ export const PAYMENT_OBJECT = "payment";
46
+ /** Refunds of a settled payment (`{id}` is the payment's ID). */
47
+ export const PAYMENT_REFUND_PATH = "/v1/payments/{id}/refund";
48
+ export const REFUND_OBJECT = "refund";
49
+ /** Webhook signatures on event deliveries. */
50
+ export const WEBHOOK_SIGNATURE_HEADER = "Relyon-Signature";
51
+ /** What Relyon's webhook sender sends today; verifiers accept both, the canonical name first. */
52
+ export const LEGACY_WEBHOOK_SIGNATURE_HEADER = "X-Relyon-Signature";
53
+ /** The doctor's diagnostic headers. */
54
+ export const KIT_VERSION_DIAGNOSTIC_HEADER = "Relyon-Kit-Version";
55
+ export const KIT_MANIFEST_VERSION_HEADER = "Relyon-Kit-Manifest-Version";
56
+ export const KIT_DIAGNOSTIC_STATUS_HEADER = "Relyon-Kit-Diagnostic-Status";
57
+ /** The headers that name a project space on a request (the ID wins on the server when both are sent). */
58
+ export function projectSpaceHeaders(input) {
59
+ const headers = {};
60
+ if (input.id)
61
+ headers[PROJECT_SPACE_ID_HEADER] = input.id;
62
+ if (input.hostname)
63
+ headers[PROJECT_SPACE_HOSTNAME_HEADER] = input.hostname;
64
+ return headers;
65
+ }
66
+ /** True when a request already names its project space (by ID, hostname or the old hostname header). */
67
+ export function namesProjectSpace(headers) {
68
+ return headers.has(PROJECT_SPACE_ID_HEADER) || headers.has(PROJECT_SPACE_HOSTNAME_HEADER) || headers.has(LEGACY_PROJECT_SPACE_HOSTNAME_HEADER);
69
+ }
70
+ /** A policies answer's `object`, under its new or its deprecated name. */
71
+ export function isProjectSpacePoliciesObject(value) {
72
+ return value === PROJECT_SPACE_POLICIES_OBJECT || value === LEGACY_PROJECT_SPACE_POLICIES_OBJECT;
73
+ }
74
+ /** A refusal code under its project-space name (old codes are mapped; others are unchanged). */
75
+ export function projectSpaceProblemCode(code) {
76
+ return Object.hasOwn(LEGACY_PROJECT_SPACE_CODES, code) ? LEGACY_PROJECT_SPACE_CODES[code] : code;
77
+ }
78
+ /** What a developer does about a project_space_required refusal. */
79
+ export const PROJECT_SPACE_REQUIRED_GUIDANCE = `This workspace has more than one project space, so Relyon needs to know which one this app uses: set ${PROJECT_SPACE_ENV} to the project space's ID (prj_…) in the host's environment settings, then restart the app.`;
80
+ /** Every other operation the kit calls, by its contract path. */
81
+ export const PRODUCTS_PATH = "/v1/products";
82
+ export const PRODUCTS_BATCH_PATH = "/v1/products/batch";
83
+ export const UCP_AGENT_PROFILE_PATH = "/v1/agent_profiles/ucp";
84
+ export const DOMAINS_PATH = "/v1/domains";
85
+ export const DOMAIN_VERIFY_PATH = "/v1/domains/{id}/verify";
86
+ export const WEBHOOK_ENDPOINTS_PATH = "/v1/webhook_endpoints";
87
+ export const DOCTOR_PATH = "/v1/doctor";
88
+ export const AGENT_EVENTS_PATH = "/v1/agent_events";
89
+ export const CHANNEL_PATH = "/v1/channels/{name}";
90
+ export const ORDER_FULFILLMENT_PATH = "/v1/orders/{id}/fulfillment";
91
+ export const AGENT_CHECKOUT_OPERATION_PATH = "/v1/agent_checkouts/{protocol}/{operation}";
92
+ export const AGENT_RULES_PATH = "/v1/agent_rules";
93
+ /** Not in the typed contract: hosted sandbox progress (read with plain fetch). */
94
+ export const SANDBOX_PROGRESS_PATH = "/v1/sandboxes/progress";
95
+ /** The `object` of each answer the kit checks. */
96
+ export const LIST_OBJECT = "list";
97
+ export const CATALOG_SYNC_OBJECT = "catalog_sync";
98
+ export const DOCTOR_OBJECT = "integration_doctor";
99
+ export const DOCTOR_CHALLENGE_OBJECT = "doctor_challenge";
100
+ export const AGENT_EVENT_BATCH_OBJECT = "agent_event_batch";
101
+ export const AGENT_RULES_OBJECT = "agent_rules";
102
+ export const ORDER_OBJECT = "order";
103
+ export const DOMAIN_OBJECT = "domain";
104
+ export const WEBHOOK_ENDPOINT_OBJECT = "webhook_endpoint";
105
+ export const SANDBOX_OBJECT = "sandbox";
106
+ export const TEST_KEY_OBJECT = "test_key";
107
+ /** Kit evidence headers on the doctor's request to Relyon. */
108
+ export const KIT_OUTCOMES_HEADER = "Relyon-Kit-Outcomes";
109
+ export const KIT_VERSION_EVIDENCE_HEADER = "Relyon-Kit-Diagnostic";
package/package.json CHANGED
@@ -1,6 +1,120 @@
1
1
  {
2
2
  "name": "@relyon/kit",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0",
4
+ "description": "Relyon kit: accept card payments in your own app, list products for AI shopping agents, or have Relyon build the shopping pages. Run npx @relyon/kit init, then npx @relyon/kit check (payments) or npx @relyon/kit doctor.",
5
+ "keywords": [
6
+ "relyon-core",
7
+ "relyon core",
8
+ "ecommerce",
9
+ "online-store",
10
+ "storefront",
11
+ "shop",
12
+ "ai-shopping",
13
+ "chatgpt",
14
+ "ap2",
15
+ "product-feed",
16
+ "agents-md",
17
+ "coding-agent",
18
+ "relyon",
19
+ "payments",
20
+ "checkout",
21
+ "ai-agents",
22
+ "agentic-commerce",
23
+ "ucp",
24
+ "acp",
25
+ "mcp",
26
+ "express",
27
+ "nextjs",
28
+ "hono",
29
+ "ai-shopping-agents"
30
+ ],
31
+ "author": {
32
+ "name": "Relyon"
33
+ },
34
+ "homepage": "https://github.com/relyon-payments/relyon-core",
35
+ "repository": {
36
+ "type": "git",
37
+ "url": "git+https://github.com/relyon-payments/relyon-core.git"
38
+ },
39
+ "bugs": {
40
+ "url": "https://github.com/relyon-payments/relyon-core/issues"
41
+ },
42
+ "license": "MIT",
43
+ "type": "module",
44
+ "bin": {
45
+ "relyon-kit": "./dist/cli.js"
46
+ },
47
+ "exports": {
48
+ "./updates": {
49
+ "types": "./dist/kit-updates.d.ts",
50
+ "import": "./dist/kit-updates.js"
51
+ },
52
+ "./release-notes": {
53
+ "types": "./dist/release-notes.d.ts",
54
+ "import": "./dist/release-notes.js"
55
+ },
56
+ ".": {
57
+ "types": "./dist/index.d.ts",
58
+ "import": "./dist/index.js"
59
+ },
60
+ "./server-config": {
61
+ "types": "./dist/private-config.d.ts",
62
+ "import": "./dist/private-config.js"
63
+ },
64
+ "./express": {
65
+ "types": "./dist/adapters/express.d.ts",
66
+ "import": "./dist/adapters/express.js"
67
+ },
68
+ "./next": {
69
+ "types": "./dist/adapters/next.d.ts",
70
+ "import": "./dist/adapters/next.js"
71
+ },
72
+ "./hono": {
73
+ "types": "./dist/adapters/hono.d.ts",
74
+ "import": "./dist/adapters/hono.js"
75
+ },
76
+ "./doctor": {
77
+ "types": "./dist/doctor.d.ts",
78
+ "import": "./dist/doctor.js"
79
+ },
80
+ "./payments": {
81
+ "types": "./dist/layers/payments.d.ts",
82
+ "import": "./dist/layers/payments.js"
83
+ },
84
+ "./products": {
85
+ "types": "./dist/layers/products.d.ts",
86
+ "import": "./dist/layers/products.js"
87
+ },
88
+ "./pages": {
89
+ "types": "./dist/layers/pages.d.ts",
90
+ "import": "./dist/layers/pages.js"
91
+ },
92
+ "./cli": {
93
+ "import": "./dist/cli.js"
94
+ }
95
+ },
96
+ "files": [
97
+ "dist",
98
+ "skills",
99
+ "templates",
100
+ "AGENTS.md",
101
+ "QUICKSTART.md",
102
+ "scripts/install-notice.cjs",
103
+ "CHANGELOG.md",
104
+ "release-notes.json"
105
+ ],
106
+ "scripts": {
107
+ "postinstall": "node -e \"try { require('./scripts/install-notice.cjs') } catch {}\""
108
+ },
109
+ "engines": {
110
+ "node": ">=20"
111
+ },
112
+ "dependencies": {
113
+ "openapi-fetch": "0.17.0",
114
+ "semver": "^7.8.5",
115
+ "yaml": "^2.8.2"
116
+ },
117
+ "publishConfig": {
118
+ "access": "public"
119
+ }
120
+ }