pagegraph 0.12.0 → 0.14.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 (160) hide show
  1. package/README.md +325 -66
  2. package/dist/anthropic-messages-TqKpKmfW.js +1067 -0
  3. package/dist/anthropic-messages-TqKpKmfW.js.map +1 -0
  4. package/dist/audit.d.ts +4 -2
  5. package/dist/audit.js +5 -5
  6. package/dist/audit.js.map +1 -1
  7. package/dist/azure-openai-responses-DJjBLwoI.js +231 -0
  8. package/dist/azure-openai-responses-DJjBLwoI.js.map +1 -0
  9. package/dist/build-only/audit.js +1 -1
  10. package/dist/build-only/claims.d.ts +1 -0
  11. package/dist/build-only/claims.js +6 -0
  12. package/dist/build-only/claims.js.map +1 -0
  13. package/dist/build-only/config.js +1 -1
  14. package/dist/build-only/oxlint.d.ts +1 -0
  15. package/dist/build-only/oxlint.js +6 -0
  16. package/dist/build-only/oxlint.js.map +1 -0
  17. package/dist/build-only/tanstack-start.js +1 -1
  18. package/dist/build-only/vite.js +1 -1
  19. package/dist/{checks-uZk5Em9A.js → checks-BS-aDXB_.js} +2 -2
  20. package/dist/checks-BS-aDXB_.js.map +1 -0
  21. package/dist/claims-Bch7Lxlo.d.ts +92 -0
  22. package/dist/claims-Bv7voeEV.js +431 -0
  23. package/dist/claims-Bv7voeEV.js.map +1 -0
  24. package/dist/claims.d.ts +94 -0
  25. package/dist/claims.js +2 -0
  26. package/dist/cli.js +17607 -43387
  27. package/dist/cli.js.map +1 -1
  28. package/dist/cloudflare-workers-ai-system-one-f3ZrvNYZ.js +41 -0
  29. package/dist/cloudflare-workers-ai-system-one-f3ZrvNYZ.js.map +1 -0
  30. package/dist/config.d.ts +9 -29
  31. package/dist/config.js +2 -2
  32. package/dist/config.js.map +1 -1
  33. package/dist/{content-kcEnQdfi.js → content-CHd0X4s6.js} +2 -2
  34. package/dist/{content-kcEnQdfi.js.map → content-CHd0X4s6.js.map} +1 -1
  35. package/dist/{content-B1cPtL8b.d.ts → content-DgNr7apS.d.ts} +4 -5
  36. package/dist/declare-D5o7hwmv.js.map +1 -1
  37. package/dist/diagnostics-Wt5faNDM.js +108 -0
  38. package/dist/diagnostics-Wt5faNDM.js.map +1 -0
  39. package/dist/dist-B6zg_Z3Z.js +4794 -0
  40. package/dist/dist-B6zg_Z3Z.js.map +1 -0
  41. package/dist/document-CztEu3Vd.d.ts +109 -0
  42. package/dist/document-Dvemcv7V.js +379 -0
  43. package/dist/document-Dvemcv7V.js.map +1 -0
  44. package/dist/env-api-keys-C-OA0yM-.js +124 -0
  45. package/dist/env-api-keys-C-OA0yM-.js.map +1 -0
  46. package/dist/error-body-CyiejW4b.js +103 -0
  47. package/dist/error-body-CyiejW4b.js.map +1 -0
  48. package/dist/facts-1OKclPOk.js +115 -0
  49. package/dist/facts-1OKclPOk.js.map +1 -0
  50. package/dist/github-copilot-headers-CEpMOpQF.js +24 -0
  51. package/dist/github-copilot-headers-CEpMOpQF.js.map +1 -0
  52. package/dist/google-generative-ai-BxABKIKO.js +330 -0
  53. package/dist/google-generative-ai-BxABKIKO.js.map +1 -0
  54. package/dist/google-shared-0gpM2jFi.js +19471 -0
  55. package/dist/google-shared-0gpM2jFi.js.map +1 -0
  56. package/dist/google-vertex-D8Eb5cbu.js +376 -0
  57. package/dist/google-vertex-D8Eb5cbu.js.map +1 -0
  58. package/dist/{declare-DVgdEdOL.d.ts → graph-D1PIndsC.d.ts} +117 -6
  59. package/dist/{graph-Bcsourlv.js → graph-DMNOLXLu.js} +23 -13
  60. package/dist/graph-DMNOLXLu.js.map +1 -0
  61. package/dist/hash-Dp7EzZUo.js +18 -0
  62. package/dist/hash-Dp7EzZUo.js.map +1 -0
  63. package/dist/headers-BRNMVpzu.js +19 -0
  64. package/dist/headers-BRNMVpzu.js.map +1 -0
  65. package/dist/index-C5w9ripz.d.ts +204 -0
  66. package/dist/index.d.ts +6 -160
  67. package/dist/index.js +37 -5
  68. package/dist/index.js.map +1 -1
  69. package/dist/inline-BbS93GAT.js +682 -0
  70. package/dist/inline-BbS93GAT.js.map +1 -0
  71. package/dist/json-parse-C10znB7l.js +383 -0
  72. package/dist/json-parse-C10znB7l.js.map +1 -0
  73. package/dist/llms-Dhr_5u2O.js +19 -0
  74. package/dist/llms-Dhr_5u2O.js.map +1 -0
  75. package/dist/markdown-C6dRE9zD.js +168 -0
  76. package/dist/markdown-C6dRE9zD.js.map +1 -0
  77. package/dist/markdown-path-lJB9BAVZ.js +6 -0
  78. package/dist/markdown-path-lJB9BAVZ.js.map +1 -0
  79. package/dist/{message-DT_CjUdt.js → message-CuBjgZ74.js} +2 -2
  80. package/dist/{message-DT_CjUdt.js.map → message-CuBjgZ74.js.map} +1 -1
  81. package/dist/mistral-conversations-CvaqBWjR.js +690 -0
  82. package/dist/mistral-conversations-CvaqBWjR.js.map +1 -0
  83. package/dist/models-DcT5qOEL.js +1203 -0
  84. package/dist/models-DcT5qOEL.js.map +1 -0
  85. package/dist/node-Ccvru9GE.js +26 -0
  86. package/dist/node-Ccvru9GE.js.map +1 -0
  87. package/dist/node-MEosBOF2.js +2403 -0
  88. package/dist/node-MEosBOF2.js.map +1 -0
  89. package/dist/openai-BCBEd2eO.js +17350 -0
  90. package/dist/openai-BCBEd2eO.js.map +1 -0
  91. package/dist/openai-codex-responses-vJqxeeRC.js +1268 -0
  92. package/dist/openai-codex-responses-vJqxeeRC.js.map +1 -0
  93. package/dist/openai-completions-Cb_fRAbI.js +989 -0
  94. package/dist/openai-completions-Cb_fRAbI.js.map +1 -0
  95. package/dist/openai-prompt-cache-Bc6qNWt0.js +10 -0
  96. package/dist/openai-prompt-cache-Bc6qNWt0.js.map +1 -0
  97. package/dist/openai-responses-sDuh82G5.js +268 -0
  98. package/dist/openai-responses-sDuh82G5.js.map +1 -0
  99. package/dist/openai-responses-shared-mhuo1Jov.js +599 -0
  100. package/dist/openai-responses-shared-mhuo1Jov.js.map +1 -0
  101. package/dist/openrouter-images-CRmBkzpX.js +127 -0
  102. package/dist/openrouter-images-CRmBkzpX.js.map +1 -0
  103. package/dist/oxlint.d.ts +58 -0
  104. package/dist/oxlint.js +202 -0
  105. package/dist/oxlint.js.map +1 -0
  106. package/dist/page-heads-BfjWQvau.d.ts +108 -0
  107. package/dist/{page-heads-6y-CARRQ.js → page-heads-BgbaIjj9.js} +3 -3
  108. package/dist/page-heads-BgbaIjj9.js.map +1 -0
  109. package/dist/pi-Bvw6J0gh.js +56795 -0
  110. package/dist/pi-Bvw6J0gh.js.map +1 -0
  111. package/dist/pi-messages-CejiVYvO.js +308 -0
  112. package/dist/pi-messages-CejiVYvO.js.map +1 -0
  113. package/dist/{projections-DeEFe7XT.d.ts → projections-Bk-qOOsR.d.ts} +2 -2
  114. package/dist/provider-env-t38GK5FF.js +39 -0
  115. package/dist/provider-env-t38GK5FF.js.map +1 -0
  116. package/dist/provider-retry-DzKoh1X7.js +80 -0
  117. package/dist/provider-retry-DzKoh1X7.js.map +1 -0
  118. package/dist/react.d.ts +3 -2
  119. package/dist/react.js +2 -1
  120. package/dist/react.js.map +1 -1
  121. package/dist/rolldown-runtime-B-lAHAz2.js +37 -0
  122. package/dist/sanitize-unicode-Ds14l9Om.js +28 -0
  123. package/dist/sanitize-unicode-Ds14l9Om.js.map +1 -0
  124. package/dist/sdk-C9_wiO6w.js +12503 -0
  125. package/dist/sdk-C9_wiO6w.js.map +1 -0
  126. package/dist/state-BuJP_3Lr.js +28102 -0
  127. package/dist/state-BuJP_3Lr.js.map +1 -0
  128. package/dist/system-one-shared-Dl10ZF7Z.js +167 -0
  129. package/dist/system-one-shared-Dl10ZF7Z.js.map +1 -0
  130. package/dist/tanstack-start/index.d.ts +29 -13
  131. package/dist/tanstack-start/index.js +391 -42
  132. package/dist/tanstack-start/index.js.map +1 -1
  133. package/dist/tanstack-start/markdown.d.ts +12 -0
  134. package/dist/tanstack-start/markdown.js +149 -0
  135. package/dist/tanstack-start/markdown.js.map +1 -0
  136. package/dist/tanstack-start/prerender-worker.d.ts +2 -0
  137. package/dist/tanstack-start/prerender-worker.js +7 -0
  138. package/dist/tanstack-start/prerender-worker.js.map +1 -0
  139. package/dist/tanstack-start/react.d.ts +7 -0
  140. package/dist/tanstack-start/react.js +12 -0
  141. package/dist/tanstack-start/react.js.map +1 -0
  142. package/dist/tanstack-start/server.d.ts +9 -3
  143. package/dist/tanstack-start/server.js +26 -2
  144. package/dist/tanstack-start/server.js.map +1 -1
  145. package/dist/transform-messages-BLJ8EfK6.js +468 -0
  146. package/dist/transform-messages-BLJ8EfK6.js.map +1 -0
  147. package/dist/typesafe-system-one-CwEWMV8P.js +25 -0
  148. package/dist/typesafe-system-one-CwEWMV8P.js.map +1 -0
  149. package/dist/{vite-graph-loader-01p1WxEq.js → vite-graph-loader-CsGiYNWE.js} +6 -5
  150. package/dist/vite-graph-loader-CsGiYNWE.js.map +1 -0
  151. package/dist/vite-graph-loader-DZCwejuJ.d.ts +133 -0
  152. package/package.json +47 -10
  153. package/dist/checks-uZk5Em9A.js.map +0 -1
  154. package/dist/graph-Bcsourlv.js.map +0 -1
  155. package/dist/graph-BxCY90vq.d.ts +0 -104
  156. package/dist/graph-CBIY71w6.d.ts +0 -57
  157. package/dist/page-heads-6y-CARRQ.js.map +0 -1
  158. package/dist/page-heads-DNkjMUEN.d.ts +0 -21
  159. package/dist/vite-graph-loader-01p1WxEq.js.map +0 -1
  160. package/dist/vite-graph-loader-Btgjz5RH.d.ts +0 -56
@@ -0,0 +1,231 @@
1
+ import { t as getProviderEnvValue } from "./provider-env-t38GK5FF.js";
2
+ import { a as AssistantMessageEventStream } from "./diagnostics-Wt5faNDM.js";
3
+ import { f as getDeclaredTools, n as clampThinkingLevel, v as resolveTranscript, y as resolveTranscriptTools } from "./models-DcT5qOEL.js";
4
+ import { t as headersToRecord } from "./headers-BRNMVpzu.js";
5
+ import { c as createGrammarToolInputProperties, p as getPiUserAgent, r as buildBaseOptions } from "./transform-messages-BLJ8EfK6.js";
6
+ import { t as retryProviderRequest } from "./provider-retry-DzKoh1X7.js";
7
+ import { t as AzureOpenAI } from "./openai-BCBEd2eO.js";
8
+ import { n as normalizeProviderError, t as formatProviderError } from "./error-body-CyiejW4b.js";
9
+ import { t as clampOpenAIPromptCacheKey } from "./openai-prompt-cache-Bc6qNWt0.js";
10
+ import { n as convertResponsesTools, r as processResponsesStream, t as convertResponsesMessages } from "./openai-responses-shared-mhuo1Jov.js";
11
+ //#region node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js
12
+ const DEFAULT_AZURE_API_VERSION = "v1";
13
+ const AZURE_TOOL_CALL_PROVIDERS = /* @__PURE__ */ new Set([
14
+ "openai",
15
+ "openai-codex",
16
+ "opencode",
17
+ "azure-openai-responses"
18
+ ]);
19
+ const OPENAI_RESPONSES_MIN_OUTPUT_TOKENS = 16;
20
+ function parseDeploymentNameMap(value) {
21
+ const map = /* @__PURE__ */ new Map();
22
+ if (!value) return map;
23
+ for (const entry of value.split(",")) {
24
+ const trimmed = entry.trim();
25
+ if (!trimmed) continue;
26
+ const [modelId, deploymentName] = trimmed.split("=", 2);
27
+ if (!modelId || !deploymentName) continue;
28
+ map.set(modelId.trim(), deploymentName.trim());
29
+ }
30
+ return map;
31
+ }
32
+ function resolveDeploymentName(model, options) {
33
+ if (options?.azureDeploymentName) return options.azureDeploymentName;
34
+ return parseDeploymentNameMap(getProviderEnvValue("AZURE_OPENAI_DEPLOYMENT_NAME_MAP", options?.env)).get(model.id) || model.id;
35
+ }
36
+ function formatAzureOpenAIError(error) {
37
+ return formatProviderError(normalizeProviderError(error), "Azure OpenAI API error");
38
+ }
39
+ /**
40
+ * Generate function for Azure OpenAI Responses API
41
+ */
42
+ const stream = (model, context, options) => {
43
+ const stream = new AssistantMessageEventStream();
44
+ const normalizedContext = resolveTranscript(context, model.compat?.supportsMidConvoSystemMessages);
45
+ (async () => {
46
+ const deploymentName = resolveDeploymentName(model, options);
47
+ const output = {
48
+ role: "assistant",
49
+ content: [],
50
+ api: "azure-openai-responses",
51
+ provider: model.provider,
52
+ model: model.id,
53
+ usage: {
54
+ input: 0,
55
+ output: 0,
56
+ cacheRead: 0,
57
+ cacheWrite: 0,
58
+ totalTokens: 0,
59
+ cost: {
60
+ input: 0,
61
+ output: 0,
62
+ cacheRead: 0,
63
+ cacheWrite: 0,
64
+ total: 0
65
+ }
66
+ },
67
+ stopReason: "pending",
68
+ timestamp: Date.now()
69
+ };
70
+ try {
71
+ const apiKey = options?.apiKey;
72
+ if (!apiKey) throw new Error(`No API key for provider: ${model.provider}`);
73
+ const client = createClient(model, apiKey, options);
74
+ const grammarToolInputProperties = createGrammarToolInputProperties(getDeclaredTools(normalizedContext.messages), model.compat?.supportsOpenAIGrammarTools ?? false);
75
+ let params = buildParams(model, normalizedContext, options, deploymentName, grammarToolInputProperties);
76
+ const nextParams = await options?.onPayload?.(params, model);
77
+ if (nextParams !== void 0) params = nextParams;
78
+ const requestOptions = {
79
+ ...options?.signal ? { signal: options.signal } : {},
80
+ ...options?.timeoutMs !== void 0 ? { timeout: options.timeoutMs } : {},
81
+ maxRetries: 0
82
+ };
83
+ const { data: openaiStream, response } = await retryProviderRequest(() => client.responses.create(params, requestOptions).withResponse(), {
84
+ maxRetries: options?.maxRetries,
85
+ maxRetryDelayMs: options?.maxRetryDelayMs,
86
+ signal: options?.signal
87
+ });
88
+ await options?.onResponse?.({
89
+ status: response.status,
90
+ headers: headersToRecord(response.headers)
91
+ }, model);
92
+ stream.push({
93
+ type: "start",
94
+ partial: output
95
+ });
96
+ await processResponsesStream(openaiStream, output, stream, model, {
97
+ onProviderStreamEvent: options?.onProviderStreamEvent,
98
+ grammarToolInputProperties
99
+ });
100
+ if (options?.signal?.aborted) throw new Error("Request was aborted");
101
+ if (output.stopReason === "pending") throw new Error("Azure OpenAI Responses stream ended without a stop reason");
102
+ if (output.stopReason === "aborted" || output.stopReason === "error") throw new Error(output.errorMessage || "An unknown error occurred");
103
+ stream.push({
104
+ type: "done",
105
+ reason: output.stopReason,
106
+ message: output
107
+ });
108
+ stream.end();
109
+ } catch (error) {
110
+ for (const block of output.content) {
111
+ delete block.index;
112
+ delete block.partialJson;
113
+ delete block.customInput;
114
+ }
115
+ output.stopReason = options?.signal?.aborted ? "aborted" : "error";
116
+ output.errorMessage = formatAzureOpenAIError(error);
117
+ stream.push({
118
+ type: "error",
119
+ reason: output.stopReason,
120
+ error: output
121
+ });
122
+ stream.end();
123
+ }
124
+ })();
125
+ return stream;
126
+ };
127
+ const streamSimple = (model, context, options) => {
128
+ const apiKey = options?.apiKey;
129
+ if (!apiKey) throw new Error(`No API key for provider: ${model.provider}`);
130
+ const base = {
131
+ ...buildBaseOptions(model, context, options, apiKey),
132
+ toolChoice: options?.toolChoice
133
+ };
134
+ const clampedReasoning = options?.reasoning ? clampThinkingLevel(model, options.reasoning) : void 0;
135
+ const reasoningEffort = clampedReasoning === "off" ? void 0 : clampedReasoning;
136
+ return stream(model, context, {
137
+ ...base,
138
+ reasoningEffort
139
+ });
140
+ };
141
+ function normalizeAzureBaseUrl(baseUrl) {
142
+ const trimmed = baseUrl.trim().replace(/\/+$/, "");
143
+ let url;
144
+ try {
145
+ url = new URL(trimmed);
146
+ } catch {
147
+ throw new Error(`Invalid Azure OpenAI base URL: ${baseUrl}`);
148
+ }
149
+ const isAzureHost = url.hostname.endsWith(".openai.azure.com") || url.hostname.endsWith(".cognitiveservices.azure.com") || url.hostname.endsWith(".ai.azure.com");
150
+ const normalizedPath = url.pathname.replace(/\/+$/, "");
151
+ if (isAzureHost && (normalizedPath === "" || normalizedPath === "/" || normalizedPath === "/openai" || normalizedPath === "/openai/v1/responses")) {
152
+ url.pathname = "/openai/v1";
153
+ url.search = "";
154
+ }
155
+ return url.toString().replace(/\/+$/, "");
156
+ }
157
+ function buildDefaultBaseUrl(resourceName) {
158
+ return `https://${resourceName}.openai.azure.com/openai/v1`;
159
+ }
160
+ function resolveAzureConfig(model, options) {
161
+ const apiVersion = options?.azureApiVersion || getProviderEnvValue("AZURE_OPENAI_API_VERSION", options?.env) || DEFAULT_AZURE_API_VERSION;
162
+ const baseUrl = options?.azureBaseUrl?.trim() || getProviderEnvValue("AZURE_OPENAI_BASE_URL", options?.env)?.trim() || void 0;
163
+ const resourceName = options?.azureResourceName || getProviderEnvValue("AZURE_OPENAI_RESOURCE_NAME", options?.env);
164
+ let resolvedBaseUrl = baseUrl;
165
+ if (!resolvedBaseUrl && resourceName) resolvedBaseUrl = buildDefaultBaseUrl(resourceName);
166
+ if (!resolvedBaseUrl && model.baseUrl) resolvedBaseUrl = model.baseUrl;
167
+ if (!resolvedBaseUrl) throw new Error("Azure OpenAI base URL is required. Set AZURE_OPENAI_BASE_URL or AZURE_OPENAI_RESOURCE_NAME, or pass azureBaseUrl, azureResourceName, or model.baseUrl.");
168
+ return {
169
+ baseUrl: normalizeAzureBaseUrl(resolvedBaseUrl),
170
+ apiVersion
171
+ };
172
+ }
173
+ function createClient(model, apiKey, options) {
174
+ const headers = {
175
+ "User-Agent": getPiUserAgent(),
176
+ ...model.headers
177
+ };
178
+ if (options?.headers) Object.assign(headers, options.headers);
179
+ const { baseUrl, apiVersion } = resolveAzureConfig(model, options);
180
+ return new AzureOpenAI({
181
+ apiKey,
182
+ apiVersion,
183
+ dangerouslyAllowBrowser: true,
184
+ fetch: options?.fetch,
185
+ defaultHeaders: headers,
186
+ baseURL: baseUrl
187
+ });
188
+ }
189
+ function buildParams(model, context, options, deploymentName, grammarToolInputProperties = createGrammarToolInputProperties(getDeclaredTools(context.messages), model.compat?.supportsOpenAIGrammarTools ?? false)) {
190
+ const supportsAdditionalTools = model.compat?.supportsAdditionalTools ?? false;
191
+ const supportsToolSearch = model.compat?.supportsToolSearch ?? false;
192
+ const transcriptTools = resolveTranscriptTools(context.messages, supportsAdditionalTools || supportsToolSearch);
193
+ const params = {
194
+ model: deploymentName,
195
+ input: convertResponsesMessages(model, context, AZURE_TOOL_CALL_PROVIDERS, {
196
+ grammarToolInputProperties,
197
+ supportsMidConvoSystemMessages: model.compat?.supportsMidConvoSystemMessages ?? false,
198
+ supportsAdditionalTools,
199
+ supportsToolSearch,
200
+ toolOptions: {
201
+ supportsStrictMode: model.compat?.supportsStrictMode ?? true,
202
+ supportsOpenAIGrammarTools: model.compat?.supportsOpenAIGrammarTools ?? false
203
+ }
204
+ }),
205
+ stream: true,
206
+ prompt_cache_key: clampOpenAIPromptCacheKey(options?.sessionId),
207
+ store: false
208
+ };
209
+ if (options?.maxTokens) params.max_output_tokens = Math.max(options.maxTokens, OPENAI_RESPONSES_MIN_OUTPUT_TOKENS);
210
+ if (options?.temperature !== void 0) params.temperature = options?.temperature;
211
+ if (transcriptTools.requestTools.length > 0) params.tools = convertResponsesTools(transcriptTools.requestTools, {
212
+ supportsStrictMode: model.compat?.supportsStrictMode ?? true,
213
+ supportsOpenAIGrammarTools: model.compat?.supportsOpenAIGrammarTools ?? false
214
+ });
215
+ if (options?.toolChoice !== void 0) params.tool_choice = options.toolChoice;
216
+ if (model.reasoning) {
217
+ if (options?.reasoningEffort || options?.reasoningSummary) {
218
+ params.reasoning = {
219
+ effort: options?.reasoningEffort ? model.thinkingLevelMap?.[options.reasoningEffort] ?? options.reasoningEffort : "medium",
220
+ summary: options?.reasoningSummary || "auto"
221
+ };
222
+ params.include = ["reasoning.encrypted_content"];
223
+ } else if (model.thinkingLevelMap?.off !== null) params.reasoning = { effort: model.thinkingLevelMap?.off ?? "none" };
224
+ }
225
+ Object.assign(params, model.samplingParams, options?.samplingParams);
226
+ return params;
227
+ }
228
+ //#endregion
229
+ export { stream, streamSimple };
230
+
231
+ //# sourceMappingURL=azure-openai-responses-DJjBLwoI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"azure-openai-responses-DJjBLwoI.js","names":[],"sources":["../node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js"],"sourcesContent":["import { AzureOpenAI } from \"openai\";\nimport { clampThinkingLevel } from \"../models.js\";\nimport { formatProviderError, normalizeProviderError } from \"../utils/error-body.js\";\nimport { AssistantMessageEventStream } from \"../utils/event-stream.js\";\nimport { headersToRecord } from \"../utils/headers.js\";\nimport { getPiUserAgent } from \"../utils/pi-user-agent.js\";\nimport { getProviderEnvValue } from \"../utils/provider-env.js\";\nimport { retryProviderRequest } from \"../utils/provider-retry.js\";\nimport { getDeclaredTools, resolveTranscript, resolveTranscriptTools } from \"../utils/transcript.js\";\nimport { createGrammarToolInputProperties } from \"./constrained-sampling.js\";\nimport { clampOpenAIPromptCacheKey } from \"./openai-prompt-cache.js\";\nimport { convertResponsesMessages, convertResponsesTools, processResponsesStream } from \"./openai-responses-shared.js\";\nimport { buildBaseOptions } from \"./simple-options.js\";\nconst DEFAULT_AZURE_API_VERSION = \"v1\";\nconst AZURE_TOOL_CALL_PROVIDERS = new Set([\"openai\", \"openai-codex\", \"opencode\", \"azure-openai-responses\"]);\n// OpenAI Responses rejects max_output_tokens below 16: https://github.com/earendil-works/pi/issues/6265\nconst OPENAI_RESPONSES_MIN_OUTPUT_TOKENS = 16;\nfunction parseDeploymentNameMap(value) {\n const map = new Map();\n if (!value)\n return map;\n for (const entry of value.split(\",\")) {\n const trimmed = entry.trim();\n if (!trimmed)\n continue;\n const [modelId, deploymentName] = trimmed.split(\"=\", 2);\n if (!modelId || !deploymentName)\n continue;\n map.set(modelId.trim(), deploymentName.trim());\n }\n return map;\n}\nfunction resolveDeploymentName(model, options) {\n if (options?.azureDeploymentName) {\n return options.azureDeploymentName;\n }\n const mappedDeployment = parseDeploymentNameMap(getProviderEnvValue(\"AZURE_OPENAI_DEPLOYMENT_NAME_MAP\", options?.env)).get(model.id);\n return mappedDeployment || model.id;\n}\nfunction formatAzureOpenAIError(error) {\n return formatProviderError(normalizeProviderError(error), \"Azure OpenAI API error\");\n}\n/**\n * Generate function for Azure OpenAI Responses API\n */\nexport const stream = (model, context, options) => {\n const stream = new AssistantMessageEventStream();\n const normalizedContext = resolveTranscript(context, model.compat?.supportsMidConvoSystemMessages);\n // Start async processing\n (async () => {\n const deploymentName = resolveDeploymentName(model, options);\n const output = {\n role: \"assistant\",\n content: [],\n api: \"azure-openai-responses\",\n provider: model.provider,\n model: model.id,\n usage: {\n input: 0,\n output: 0,\n cacheRead: 0,\n cacheWrite: 0,\n totalTokens: 0,\n cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0 },\n },\n stopReason: \"pending\",\n timestamp: Date.now(),\n };\n try {\n // Create Azure OpenAI client\n const apiKey = options?.apiKey;\n if (!apiKey) {\n throw new Error(`No API key for provider: ${model.provider}`);\n }\n const client = createClient(model, apiKey, options);\n const grammarToolInputProperties = createGrammarToolInputProperties(getDeclaredTools(normalizedContext.messages), model.compat?.supportsOpenAIGrammarTools ?? false);\n let params = buildParams(model, normalizedContext, options, deploymentName, grammarToolInputProperties);\n const nextParams = await options?.onPayload?.(params, model);\n if (nextParams !== undefined) {\n params = nextParams;\n }\n const requestOptions = {\n ...(options?.signal ? { signal: options.signal } : {}),\n ...(options?.timeoutMs !== undefined ? { timeout: options.timeoutMs } : {}),\n maxRetries: 0,\n };\n const { data: openaiStream, response } = await retryProviderRequest(() => client.responses.create(params, requestOptions).withResponse(), {\n maxRetries: options?.maxRetries,\n maxRetryDelayMs: options?.maxRetryDelayMs,\n signal: options?.signal,\n });\n await options?.onResponse?.({ status: response.status, headers: headersToRecord(response.headers) }, model);\n stream.push({ type: \"start\", partial: output });\n await processResponsesStream(openaiStream, output, stream, model, {\n onProviderStreamEvent: options?.onProviderStreamEvent,\n grammarToolInputProperties,\n });\n if (options?.signal?.aborted) {\n throw new Error(\"Request was aborted\");\n }\n if (output.stopReason === \"pending\") {\n throw new Error(\"Azure OpenAI Responses stream ended without a stop reason\");\n }\n if (output.stopReason === \"aborted\" || output.stopReason === \"error\") {\n throw new Error(output.errorMessage || \"An unknown error occurred\");\n }\n stream.push({ type: \"done\", reason: output.stopReason, message: output });\n stream.end();\n }\n catch (error) {\n for (const block of output.content) {\n delete block.index;\n // Streaming scratch buffers are only used during parsing; never persist them.\n delete block.partialJson;\n delete block.customInput;\n }\n output.stopReason = options?.signal?.aborted ? \"aborted\" : \"error\";\n output.errorMessage = formatAzureOpenAIError(error);\n stream.push({ type: \"error\", reason: output.stopReason, error: output });\n stream.end();\n }\n })();\n return stream;\n};\nexport const streamSimple = (model, context, options) => {\n const apiKey = options?.apiKey;\n if (!apiKey) {\n throw new Error(`No API key for provider: ${model.provider}`);\n }\n const base = {\n ...buildBaseOptions(model, context, options, apiKey),\n toolChoice: options?.toolChoice,\n };\n const clampedReasoning = options?.reasoning ? clampThinkingLevel(model, options.reasoning) : undefined;\n const reasoningEffort = clampedReasoning === \"off\" ? undefined : clampedReasoning;\n return stream(model, context, {\n ...base,\n reasoningEffort,\n });\n};\nfunction normalizeAzureBaseUrl(baseUrl) {\n const trimmed = baseUrl.trim().replace(/\\/+$/, \"\");\n let url;\n try {\n url = new URL(trimmed);\n }\n catch {\n throw new Error(`Invalid Azure OpenAI base URL: ${baseUrl}`);\n }\n const isAzureHost = url.hostname.endsWith(\".openai.azure.com\") ||\n url.hostname.endsWith(\".cognitiveservices.azure.com\") ||\n url.hostname.endsWith(\".ai.azure.com\");\n const normalizedPath = url.pathname.replace(/\\/+$/, \"\");\n // Ensure Azure hosts have /openai/v1 as base path so the AzureOpenAI SDK\n // can append /deployments/<model>/... and ?api-version=v1 correctly.\n if (isAzureHost &&\n (normalizedPath === \"\" ||\n normalizedPath === \"/\" ||\n normalizedPath === \"/openai\" ||\n normalizedPath === \"/openai/v1/responses\")) {\n url.pathname = \"/openai/v1\";\n url.search = \"\";\n }\n return url.toString().replace(/\\/+$/, \"\");\n}\nfunction buildDefaultBaseUrl(resourceName) {\n return `https://${resourceName}.openai.azure.com/openai/v1`;\n}\nfunction resolveAzureConfig(model, options) {\n const apiVersion = options?.azureApiVersion ||\n getProviderEnvValue(\"AZURE_OPENAI_API_VERSION\", options?.env) ||\n DEFAULT_AZURE_API_VERSION;\n const baseUrl = options?.azureBaseUrl?.trim() || getProviderEnvValue(\"AZURE_OPENAI_BASE_URL\", options?.env)?.trim() || undefined;\n const resourceName = options?.azureResourceName || getProviderEnvValue(\"AZURE_OPENAI_RESOURCE_NAME\", options?.env);\n let resolvedBaseUrl = baseUrl;\n if (!resolvedBaseUrl && resourceName) {\n resolvedBaseUrl = buildDefaultBaseUrl(resourceName);\n }\n if (!resolvedBaseUrl && model.baseUrl) {\n resolvedBaseUrl = model.baseUrl;\n }\n if (!resolvedBaseUrl) {\n throw new Error(\"Azure OpenAI base URL is required. Set AZURE_OPENAI_BASE_URL or AZURE_OPENAI_RESOURCE_NAME, or pass azureBaseUrl, azureResourceName, or model.baseUrl.\");\n }\n return {\n baseUrl: normalizeAzureBaseUrl(resolvedBaseUrl),\n apiVersion,\n };\n}\nfunction createClient(model, apiKey, options) {\n const headers = { \"User-Agent\": getPiUserAgent(), ...model.headers };\n if (options?.headers) {\n Object.assign(headers, options.headers);\n }\n const { baseUrl, apiVersion } = resolveAzureConfig(model, options);\n return new AzureOpenAI({\n apiKey,\n apiVersion,\n dangerouslyAllowBrowser: true,\n fetch: options?.fetch,\n defaultHeaders: headers,\n baseURL: baseUrl,\n });\n}\nfunction buildParams(model, context, options, deploymentName, grammarToolInputProperties = createGrammarToolInputProperties(getDeclaredTools(context.messages), model.compat?.supportsOpenAIGrammarTools ?? false)) {\n const supportsAdditionalTools = model.compat?.supportsAdditionalTools ?? false;\n const supportsToolSearch = model.compat?.supportsToolSearch ?? false;\n const transcriptTools = resolveTranscriptTools(context.messages, supportsAdditionalTools || supportsToolSearch);\n const messages = convertResponsesMessages(model, context, AZURE_TOOL_CALL_PROVIDERS, {\n grammarToolInputProperties,\n supportsMidConvoSystemMessages: model.compat?.supportsMidConvoSystemMessages ?? false,\n supportsAdditionalTools,\n supportsToolSearch,\n toolOptions: {\n supportsStrictMode: model.compat?.supportsStrictMode ?? true,\n supportsOpenAIGrammarTools: model.compat?.supportsOpenAIGrammarTools ?? false,\n },\n });\n const params = {\n model: deploymentName,\n input: messages,\n stream: true,\n prompt_cache_key: clampOpenAIPromptCacheKey(options?.sessionId),\n store: false,\n };\n if (options?.maxTokens) {\n params.max_output_tokens = Math.max(options.maxTokens, OPENAI_RESPONSES_MIN_OUTPUT_TOKENS);\n }\n if (options?.temperature !== undefined) {\n params.temperature = options?.temperature;\n }\n if (transcriptTools.requestTools.length > 0) {\n params.tools = convertResponsesTools(transcriptTools.requestTools, {\n supportsStrictMode: model.compat?.supportsStrictMode ?? true,\n supportsOpenAIGrammarTools: model.compat?.supportsOpenAIGrammarTools ?? false,\n });\n }\n if (options?.toolChoice !== undefined) {\n params.tool_choice = options.toolChoice;\n }\n if (model.reasoning) {\n if (options?.reasoningEffort || options?.reasoningSummary) {\n const effort = options?.reasoningEffort\n ? (model.thinkingLevelMap?.[options.reasoningEffort] ?? options.reasoningEffort)\n : \"medium\";\n params.reasoning = {\n effort: effort,\n summary: options?.reasoningSummary || \"auto\",\n };\n params.include = [\"reasoning.encrypted_content\"];\n }\n else if (model.thinkingLevelMap?.off !== null) {\n params.reasoning = {\n effort: (model.thinkingLevelMap?.off ?? \"none\"),\n };\n }\n }\n // Last so custom keys override the named request fields. Per-request keys override model defaults.\n Object.assign(params, model.samplingParams, options?.samplingParams);\n return params;\n}\n//# sourceMappingURL=azure-openai-responses.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;AAaA,MAAM,4BAA4B;AAClC,MAAM,4CAA4B,IAAI,IAAI;CAAC;CAAU;CAAgB;CAAY;AAAwB,CAAC;AAE1G,MAAM,qCAAqC;AAC3C,SAAS,uBAAuB,OAAO;CACnC,MAAM,sBAAM,IAAI,IAAI;CACpB,IAAI,CAAC,OACD,OAAO;CACX,KAAK,MAAM,SAAS,MAAM,MAAM,GAAG,GAAG;EAClC,MAAM,UAAU,MAAM,KAAK;EAC3B,IAAI,CAAC,SACD;EACJ,MAAM,CAAC,SAAS,kBAAkB,QAAQ,MAAM,KAAK,CAAC;EACtD,IAAI,CAAC,WAAW,CAAC,gBACb;EACJ,IAAI,IAAI,QAAQ,KAAK,GAAG,eAAe,KAAK,C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sB;EACxD,4BAA4B,MAAM,QAAQ,8BAA8B;CAC5E,CAAC;CAEL,IAAI,SAAS,eAAe,KAAA,GACxB,OAAO,cAAc,QAAQ;CAEjC,IAAI,MAAM,WACF;MAAA,SAAS,mBAAmB,SAAS,kBAAkB;GAIvD,OAAO,YAAY;IACf,QAJW,SAAS,kBACjB,MAAM,mBAAmB,QAAQ,oBAAoB,QAAQ,kBAC9D;IAGF,SAAS,SAAS,oBAAoB;GAC1C;GACA,OAAO,UAAU,CAAC,6BAA6B;EACnD,OACK,IAAI,MAAM,kBAAkB,QAAQ,MACrC,OAAO,YAAY,EACf,QAAS,MAAM,kBAAkB,OAAO,OAC5C;CAAA;CAIR,OAAO,OAAO,QAAQ,MAAM,gBAAgB,SAAS,cAAc;CACnE,OAAO;AACX"}
@@ -1,4 +1,4 @@
1
- import { t as buildOnlyError } from "../message-DT_CjUdt.js";
1
+ import { t as buildOnlyError } from "../message-CuBjgZ74.js";
2
2
  //#region src/build-only/audit.ts
3
3
  throw buildOnlyError("pagegraph/audit");
4
4
  //#endregion
@@ -0,0 +1 @@
1
+ export {}
@@ -0,0 +1,6 @@
1
+ import { t as buildOnlyError } from "../message-CuBjgZ74.js";
2
+ //#region src/build-only/claims.ts
3
+ throw buildOnlyError("pagegraph/claims");
4
+ //#endregion
5
+
6
+ //# sourceMappingURL=claims.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claims.js","names":[],"sources":["../../src/build-only/claims.ts"],"sourcesContent":["import { buildOnlyError } from \"./message\";\n\nthrow buildOnlyError(\"pagegraph/claims\");\n"],"mappings":";;AAEA,MAAM,eAAe,kBAAkB"}
@@ -1,4 +1,4 @@
1
- import { t as buildOnlyError } from "../message-DT_CjUdt.js";
1
+ import { t as buildOnlyError } from "../message-CuBjgZ74.js";
2
2
  //#region src/build-only/config.ts
3
3
  throw buildOnlyError("pagegraph/config");
4
4
  //#endregion
@@ -0,0 +1 @@
1
+ export {}
@@ -0,0 +1,6 @@
1
+ import { t as buildOnlyError } from "../message-CuBjgZ74.js";
2
+ //#region src/build-only/oxlint.ts
3
+ throw buildOnlyError("pagegraph/oxlint");
4
+ //#endregion
5
+
6
+ //# sourceMappingURL=oxlint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oxlint.js","names":[],"sources":["../../src/build-only/oxlint.ts"],"sourcesContent":["import { buildOnlyError } from \"./message\";\n\nthrow buildOnlyError(\"pagegraph/oxlint\");\n"],"mappings":";;AAEA,MAAM,eAAe,kBAAkB"}
@@ -1,4 +1,4 @@
1
- import { t as buildOnlyError } from "../message-DT_CjUdt.js";
1
+ import { t as buildOnlyError } from "../message-CuBjgZ74.js";
2
2
  //#region src/build-only/tanstack-start.ts
3
3
  throw buildOnlyError("pagegraph/tanstack-start");
4
4
  //#endregion
@@ -1,4 +1,4 @@
1
- import { t as buildOnlyError } from "../message-DT_CjUdt.js";
1
+ import { t as buildOnlyError } from "../message-CuBjgZ74.js";
2
2
  //#region src/build-only/vite.ts
3
3
  throw buildOnlyError("pagegraph/vite");
4
4
  //#endregion
@@ -328,7 +328,7 @@ function checkCoverage(graph, rules) {
328
328
  * distinction the declared pass draws by counting `related` edges alone.
329
329
  *
330
330
  * The target universe is the declared graph's sitemap-eligible pages: the globs
331
- * in `seo.config.ts` are written against declared paths, and the crawl is what
331
+ * in `pagegraph.config.ts` are written against declared paths, and the crawl is what
332
332
  * supplies the served edges. Pass the crawl's `internalEdges` (each edge carries
333
333
  * its `region`).
334
334
  */
@@ -349,4 +349,4 @@ const hasStructuralViolations = (violations) => violations.some((violation) => v
349
349
  //#endregion
350
350
  export { globToRegExp as a, checkRenderedCoverage as i, checkFreshness as n, hasStructuralViolations as o, checkGraph as r, freshnessReport as s, checkCoverage as t };
351
351
 
352
- //# sourceMappingURL=checks-uZk5Em9A.js.map
352
+ //# sourceMappingURL=checks-BS-aDXB_.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checks-BS-aDXB_.js","names":[],"sources":["../src/core/freshness.ts","../src/core/checks.ts"],"sourcesContent":["/**\n * Freshness: how long ago each indexable page last changed, by the dates its\n * declaration carries ({@link lastModified}). Pure — the caller injects `now`,\n * so a test and the CLI read the same verdict from the same graph.\n *\n * Only sitemap-eligible pages are judged: a noindex or redirect page is not a\n * refresh candidate. A page with no date is reported as `undated` rather than\n * stale, because age cannot be inferred; the sitemap omits its `<lastmod>` too.\n */\n\nimport type { SeoKind } from \"./declare\";\nimport type { SeoGraph, SeoSource } from \"./graph\";\nimport { isSitemapEligible, lastModified, parseDeclaredDate } from \"./projections\";\n\n/** Project policy: pages whose last change is older than this are stale. */\nexport interface FreshnessPolicy {\n readonly maxAgeDays: number;\n}\n\nexport interface FreshnessEntry {\n readonly path: string;\n readonly kind: SeoKind;\n readonly source: SeoSource;\n /** The declared date, normalized to ISO 8601. */\n readonly lastModified: string;\n /** Whole days between `lastModified` and the report's `asOf`. */\n readonly ageDays: number;\n}\n\nexport interface FreshnessReport {\n readonly asOf: string;\n readonly maxAgeDays: number;\n /** Pages older than `maxAgeDays`, oldest first: the refresh queue. */\n readonly stale: ReadonlyArray<FreshnessEntry>;\n /** Dated pages within `maxAgeDays`, newest first. */\n readonly fresh: ReadonlyArray<FreshnessEntry>;\n /** Sitemap-eligible pages that declare no date, in graph order. */\n readonly undated: ReadonlyArray<string>;\n /** Sitemap-eligible pages whose date does not parse; `check` fails on each. */\n readonly invalid: ReadonlyArray<string>;\n}\n\nconst DAY_MS = 86_400_000;\n\n/**\n * Split the graph's sitemap-eligible pages into stale, fresh, undated, and\n * invalid. An invalid date cannot be aged, but it is listed so a report never\n * reads as complete while it skipped a page.\n */\nexport function freshnessReport(\n graph: SeoGraph,\n policy: FreshnessPolicy,\n now: Date,\n): FreshnessReport {\n const stale: Array<FreshnessEntry> = [];\n const fresh: Array<FreshnessEntry> = [];\n const undated: Array<string> = [];\n const invalid: Array<string> = [];\n\n for (const node of graph.nodes.values()) {\n if (!isSitemapEligible(node)) continue;\n const declared = lastModified(node);\n if (declared === undefined) {\n undated.push(node.path);\n continue;\n }\n const time = parseDeclaredDate(declared);\n if (time === undefined) {\n invalid.push(node.path);\n continue;\n }\n const entry: FreshnessEntry = {\n path: node.path,\n kind: node.kind,\n source: node.source,\n lastModified: new Date(time).toISOString(),\n ageDays: Math.max(0, Math.floor((now.getTime() - time) / DAY_MS)),\n };\n (entry.ageDays > policy.maxAgeDays ? stale : fresh).push(entry);\n }\n\n stale.sort((a, b) => b.ageDays - a.ageDays || (a.path < b.path ? -1 : 1));\n fresh.sort((a, b) => a.ageDays - b.ageDays || (a.path < b.path ? -1 : 1));\n return {\n asOf: now.toISOString(),\n maxAgeDays: policy.maxAgeDays,\n stale,\n fresh,\n undated,\n invalid,\n };\n}\n","/**\n * The SEO check engine: a set of rules run against the derived {@link SeoGraph}.\n * Pure — no I/O, no `clientEnv`, no React. The CLI's `pagegraph check` command and the\n * vitest suite both call {@link checkGraph}; nothing else derives correctness.\n *\n * Two severities, mapped to the CLI's exit contract:\n * - `structural` — a declaration is internally broken (a link points nowhere, a\n * card would render empty, a page contradicts its own robots/sitemap intent).\n * Any structural violation fails `pagegraph check` (exit 1); these must not ship.\n * - `editorial` — a quality smell (duplicate or mis-sized titles/descriptions).\n * Reported as warnings; `pagegraph check` still exits 0 when only these are present.\n *\n * The graph only knows what declarations and frontmatter carry, so the rules are\n * scoped to that: per-node title/description live only on collection *instances*,\n * never on structural route nodes (whose head tags are composed at render time and\n * are not in the graph). Rules are data-driven and listed once in\n * {@link CHECK_RULES}.\n */\n\nimport type { SitemapPolicy } from \"./declare\";\nimport { freshnessReport, type FreshnessPolicy } from \"./freshness\";\nimport type { SeoGraph, SeoNode } from \"./graph\";\nimport type { LinkEdge } from \"./links\";\nimport { isSitemapEligible, parseDeclaredDate } from \"./projections\";\n\nexport type Severity = \"structural\" | \"editorial\";\n\nexport interface Violation {\n severity: Severity;\n rule: string;\n path?: string | undefined;\n message: string;\n fix?: string | undefined;\n}\n\n/**\n * A contextual-link coverage rule: every sitemap-eligible page matching the\n * `path` glob must have at least `minInbound` incoming contextual links. Unlike\n * the static rules, these come from project policy (a CLI flag or\n * `pagegraph.config.ts`), because \"which pages are money pages\" is app knowledge.\n *\n * The same rule shape is evaluated twice: `checkCoverage` counts declared\n * `related` edges, and `checkRenderedCoverage` counts the contextual anchors a\n * crawl actually served. The target universe is always the declared graph's\n * sitemap-eligible pages — the rendered pass only swaps the edge source.\n */\nexport interface CoverageRule {\n /** Path glob: `*` matches within a segment, `**` matches across segments. */\n readonly path: string;\n /** Minimum incoming contextual links the matched page needs. */\n readonly minInbound: number;\n}\n\n/** A single finding before its rule's `severity`/`rule` name are attached. */\ninterface RawViolation {\n path?: string | undefined;\n message: string;\n fix?: string | undefined;\n}\n\ninterface CheckRule {\n readonly name: string;\n readonly severity: Severity;\n readonly evaluate: (graph: SeoGraph) => ReadonlyArray<RawViolation>;\n}\n\n/** A positive sitemap policy — the author asked for this page to be indexed. */\nconst hasPositiveSitemap = (sitemap: SitemapPolicy | false | undefined): sitemap is SitemapPolicy =>\n sitemap !== undefined && sitemap !== false;\n\n/** Content and manifest instances carry page-level title/description. */\nconst isInstance = (node: SeoNode): boolean => node.source !== \"route\";\n\n/** Group instance nodes by a present, non-empty string field for duplicate detection. */\nconst groupInstancesBy = (\n graph: SeoGraph,\n field: (node: SeoNode) => string | undefined,\n): Map<string, Array<SeoNode>> => {\n const groups = new Map<string, Array<SeoNode>>();\n for (const node of graph.nodes.values()) {\n if (!isInstance(node)) continue;\n const value = field(node)?.trim();\n if (!value) continue;\n const bucket = groups.get(value);\n if (bucket) bucket.push(node);\n else groups.set(value, [node]);\n }\n return groups;\n};\n\nconst DESCRIPTION_MAX = 160;\nconst DESCRIPTION_MIN = 50;\n\n/**\n * Every check, in one place. `checkGraph` runs them in order and stamps each\n * finding with its rule name and severity, so the output is grouped by rule and\n * deterministic (nodes iterate in graph insertion order, edges in array order).\n */\nconst CHECK_RULES: ReadonlyArray<CheckRule> = [\n {\n name: \"path-owner-collision\",\n severity: \"structural\",\n evaluate: (graph) =>\n (graph.collisions ?? []).map((collision) => ({\n path: collision.path,\n message: `Canonical path \"${collision.path}\" is owned by multiple sources: ${collision.sources.join(\", \")}.`,\n fix: \"Give every concrete page one canonical path and one graph owner.\",\n })),\n },\n {\n name: \"canonical-path-collision\",\n severity: \"structural\",\n evaluate: (graph) => {\n const groups = new Map<string, Array<string>>();\n for (const path of graph.nodes.keys()) {\n const canonical = path.toLowerCase().replace(/\\/$/, \"\") || \"/\";\n const paths = groups.get(canonical);\n if (paths) paths.push(path);\n else groups.set(canonical, [path]);\n }\n return [...groups.values()]\n .filter((paths) => paths.length > 1)\n .flatMap((paths) =>\n paths.map((path) => ({\n path,\n message: `Canonical path collides with ${paths.filter((candidate) => candidate !== path).join(\", \")}.`,\n fix: \"Use one lowercase, trailing-slash-normalized canonical path.\",\n })),\n );\n },\n },\n {\n name: \"self-edge\",\n severity: \"structural\",\n evaluate: (graph) =>\n graph.edges\n .filter((edge) => edge.from === edge.to)\n .map((edge) => ({\n path: edge.from,\n message: `${edge.type} edge points back to its own source node.`,\n fix: \"Remove the self-reference from the canonical manifest or route declaration.\",\n })),\n },\n {\n name: \"duplicate-edge\",\n severity: \"structural\",\n evaluate: (graph) => {\n const seen = new Set<string>();\n const duplicates: Array<RawViolation> = [];\n for (const edge of graph.edges) {\n const key = `${edge.from}\\u0000${edge.to}\\u0000${edge.type}`;\n if (seen.has(key)) {\n duplicates.push({\n path: edge.from,\n message: `Duplicate ${edge.type} edge from \"${edge.from}\" to \"${edge.to}\".`,\n fix: \"Declare each graph relationship exactly once.\",\n });\n } else {\n seen.add(key);\n }\n }\n return duplicates;\n },\n },\n {\n // A `related` or `redirect` edge points at a path with no node — the target\n // route/page was renamed or deleted and the declaration wasn't updated.\n name: \"dead-edge\",\n severity: \"structural\",\n evaluate: (graph) =>\n graph.edges\n .filter((edge) => edge.type !== \"crumb-parent\" && !graph.nodes.has(edge.to))\n .map((edge) => ({\n path: edge.from,\n message: `${edge.type} edge from \"${edge.from}\" points at \"${edge.to}\", which is not a node in the graph.`,\n fix: `Update the ${edge.type === \"redirect\" ? \"redirectTo\" : \"related\"} target on the \"${edge.from}\" route, or restore \"${edge.to}\".`,\n })),\n },\n {\n // A content instance with no usable title can't render a legible <title> or card.\n name: \"instance-missing-title\",\n severity: \"structural\",\n evaluate: (graph) =>\n [...graph.nodes.values()]\n .filter((node) => isInstance(node) && !node.instance?.title.trim())\n .map((node) => ({\n path: node.path,\n message: `Content page \"${node.path}\" has no title.`,\n fix: \"Add a `title` to the page frontmatter.\",\n })),\n },\n {\n // The declaration asks for the page to be in the sitemap yet also marks it\n // noindex — contradictory intent. The projection resolves it (noindex wins,\n // excluded), but the declaration should say one thing.\n name: \"sitemap-noindex-contradiction\",\n severity: \"structural\",\n evaluate: (graph) =>\n [...graph.nodes.values()]\n .filter(\n (node) =>\n hasPositiveSitemap(node.policy.sitemap) &&\n node.policy.robots?.toLowerCase().includes(\"noindex\"),\n )\n .map((node) => ({\n path: node.path,\n message: `\"${node.path}\" declares a sitemap policy but its robots value is \"${node.policy.robots}\".`,\n fix: \"Drop the sitemap policy (or set `sitemap: false`) on a noindex page, or remove the noindex robots value.\",\n })),\n },\n {\n // Robots declarations are house-convention lowercase: the sitemap projection\n // matches `includes(\"noindex\")` literally, so a miscased value (\"Noindex\")\n // would silently stay sitemap-eligible. This gate makes that unrepresentable.\n name: \"robots-not-lowercase\",\n severity: \"structural\",\n evaluate: (graph) =>\n [...graph.nodes.values()]\n .filter(\n (node) =>\n node.policy.robots !== undefined &&\n node.policy.robots !== node.policy.robots.toLowerCase(),\n )\n .map((node) => ({\n path: node.path,\n message: `\"${node.path}\" declares robots \"${node.policy.robots}\" — robots values must be lowercase.`,\n fix: 'Lowercase the robots declaration (e.g. \"noindex, follow\").',\n })),\n },\n {\n // A `related` card for a route target renders from that route's `link`\n // metadata; without it the card has no title/description and renders empty.\n // (Content-instance targets render from their frontmatter, so they're exempt.)\n name: \"related-target-missing-link\",\n severity: \"structural\",\n evaluate: (graph) => {\n const linklessTargets = new Set<string>();\n for (const edge of graph.edges) {\n if (edge.type !== \"related\") continue;\n const target = graph.nodes.get(edge.to);\n if (target && target.source === \"route\" && target.policy.link === undefined) {\n linklessTargets.add(edge.to);\n }\n }\n return [...linklessTargets].map((path) => ({\n path,\n message: `Route \"${path}\" is a related-link target but declares no link metadata; its card would render empty.`,\n fix: `Add \\`link: { title, description }\\` to the \"${path}\" route's staticData.seo.`,\n }));\n },\n },\n {\n // A redirect/alias node should never advertise itself in the sitemap.\n name: \"redirect-in-sitemap\",\n severity: \"structural\",\n evaluate: (graph) =>\n [...graph.nodes.values()]\n .filter(\n (node) => node.policy.redirectTo !== undefined && hasPositiveSitemap(node.policy.sitemap),\n )\n .map((node) => ({\n path: node.path,\n message: `Redirect \"${node.path}\" (→ \"${node.policy.redirectTo}\") also declares a sitemap policy.`,\n fix: \"Remove the sitemap policy from the redirect route; only its target belongs in the sitemap.\",\n })),\n },\n {\n // Every declared date feeds the sitemap's `<lastmod>`, and the sitemap\n // projection refuses a date it cannot parse. Catch it here, at the\n // declaration, instead of as a failed sitemap request.\n name: \"invalid-date\",\n severity: \"structural\",\n evaluate: (graph) =>\n [...graph.nodes.values()].flatMap((node) => {\n const dates: Array<[string, string | undefined]> = node.instance\n ? [\n [\"publishedAt\", node.instance.publishedAt],\n [\"modifiedAt\", node.instance.modifiedAt],\n ]\n : [[\"modifiedAt\", node.policy.modifiedAt]];\n return dates.flatMap(([field, value]) =>\n value !== undefined && parseDeclaredDate(value) === undefined\n ? [\n {\n path: node.path,\n message: `${field} \"${value}\" is not an ISO 8601 date on a real calendar day.`,\n fix: `Write ${field} as an ISO 8601 date, e.g. \"2026-09-29\".`,\n },\n ]\n : [],\n );\n }),\n },\n {\n name: \"duplicate-title\",\n severity: \"editorial\",\n evaluate: (graph) =>\n [...groupInstancesBy(graph, (node) => node.instance?.title).entries()]\n .filter(([, nodes]) => nodes.length > 1)\n .flatMap(([title, nodes]) =>\n nodes.map((node) => ({\n path: node.path,\n message: `Title \"${title}\" is shared by ${nodes.length} pages.`,\n fix: \"Give each page a distinct title.\",\n })),\n ),\n },\n {\n name: \"duplicate-description\",\n severity: \"editorial\",\n evaluate: (graph) =>\n [...groupInstancesBy(graph, (node) => node.instance?.description).entries()]\n .filter(([, nodes]) => nodes.length > 1)\n .flatMap(([, nodes]) =>\n nodes.map((node) => ({\n path: node.path,\n message: `Description is shared by ${nodes.length} pages.`,\n fix: \"Write a distinct meta description for each page.\",\n })),\n ),\n },\n {\n // Meta descriptions outside ~50–160 chars either get truncated in SERPs or\n // read as too thin.\n name: \"description-length\",\n severity: \"editorial\",\n evaluate: (graph) =>\n [...graph.nodes.values()].flatMap((node) => {\n if (!isInstance(node)) return [];\n const description = node.instance?.description?.trim();\n if (!description) return [];\n if (description.length > DESCRIPTION_MAX) {\n return [\n {\n path: node.path,\n message: `Description is ${description.length} chars (max ${DESCRIPTION_MAX}); it will be truncated in results.`,\n fix: `Trim the description to ${DESCRIPTION_MAX} characters or fewer.`,\n },\n ];\n }\n if (description.length < DESCRIPTION_MIN) {\n return [\n {\n path: node.path,\n message: `Description is ${description.length} chars (min ${DESCRIPTION_MIN}); it reads as thin.`,\n fix: `Expand the description to at least ${DESCRIPTION_MIN} characters.`,\n },\n ];\n }\n return [];\n }),\n },\n];\n\n/**\n * Options for {@link checkGraph}. Freshness needs a clock, and the engine stays\n * pure, so a freshness policy is only accepted together with the `now` it is\n * judged against.\n */\nexport type CheckGraphOptions = {\n readonly coverage?: ReadonlyArray<CoverageRule> | undefined;\n} & (\n | { readonly freshness: FreshnessPolicy; readonly now: Date }\n | { readonly freshness?: undefined; readonly now?: undefined }\n);\n\n/**\n * Run every static rule against the graph, then any caller-supplied\n * {@link CoverageRule}s and freshness policy, and return the flat list of\n * violations. With no options the result is exactly the static rule set.\n */\nexport function checkGraph(graph: SeoGraph, options: CheckGraphOptions = {}): Array<Violation> {\n const violations: Array<Violation> = CHECK_RULES.flatMap((rule) =>\n rule.evaluate(graph).map((raw): Violation => ({\n severity: rule.severity,\n rule: rule.name,\n path: raw.path,\n message: raw.message,\n fix: raw.fix,\n })),\n );\n const coverage = options.coverage;\n if (coverage !== undefined && coverage.length > 0) {\n violations.push(...checkCoverage(graph, coverage));\n }\n if (options.freshness !== undefined) {\n violations.push(...checkFreshness(graph, options.freshness, options.now));\n }\n return violations;\n}\n\n/**\n * One editorial `stale-page` violation per sitemap-eligible page whose last\n * declared change is older than the policy allows. Undated pages are not\n * violations: see {@link freshnessReport} for the full picture.\n */\nexport function checkFreshness(\n graph: SeoGraph,\n policy: FreshnessPolicy,\n now: Date,\n): Array<Violation> {\n return freshnessReport(graph, policy, now).stale.map((entry) => ({\n severity: \"editorial\",\n rule: \"stale-page\",\n path: entry.path,\n message: `Last changed ${entry.lastModified.slice(0, 10)}, ${entry.ageDays} days ago (limit ${policy.maxAgeDays}).`,\n fix: \"Review the page; when its content changes, update its modifiedAt.\",\n }));\n}\n\n/** Escape a glob for `RegExp`, then expand `**`, `*`, and `?` to path-aware forms. */\nexport const globToRegExp = (glob: string): RegExp => {\n const escaped = glob.replace(/[.+^${}()|[\\]\\\\]/g, \"\\\\$&\");\n const source = escaped\n .replace(/\\*\\*/g, \"\\u0000\")\n .replace(/\\*/g, \"[^/]*\")\n .replace(/\\?/g, \"[^/]\")\n .replace(/\\u0000/g, \".*\");\n return new RegExp(`^${source}$`);\n};\n\n/**\n * The minimal view a coverage rule needs: which paths exist (for the glob), which\n * of them are sitemap-eligible (the enforced set), and how many contextual links\n * each receives. Declared and rendered coverage differ only in how this surface\n * is built, so the rule engine itself stays single-sourced.\n */\ninterface CoverageSurface {\n readonly paths: ReadonlyArray<string>;\n readonly eligiblePaths: ReadonlyArray<string>;\n readonly inbound: (path: string) => number;\n}\n\n/**\n * Enforce contextual-link coverage rules over an explicit surface.\n *\n * A rule that matches no sitemap-eligible page is itself a violation: a typo or\n * a rule aimed at a noindex page would otherwise pass silently forever.\n */\nconst checkCoverageRules = (\n surface: CoverageSurface,\n rules: ReadonlyArray<CoverageRule>,\n): Array<Violation> => {\n const violations: Array<Violation> = [];\n for (const rule of rules) {\n const matcher = globToRegExp(rule.path);\n const matched = surface.paths.filter((path) => matcher.test(path));\n const eligible = surface.eligiblePaths.filter((path) => matcher.test(path));\n\n if (eligible.length === 0) {\n violations.push({\n severity: \"structural\",\n rule: \"coverage-rule-unmatched\",\n message:\n matched.length === 0\n ? `Coverage rule \"${rule.path}\" matches no page in the graph.`\n : `Coverage rule \"${rule.path}\" matches only pages that are not sitemap-eligible.`,\n fix: \"Point the rule at a sitemap-eligible path, or drop it.\",\n });\n continue;\n }\n\n for (const path of eligible) {\n const inbound = surface.inbound(path);\n if (inbound >= rule.minInbound) continue;\n violations.push({\n severity: \"structural\",\n rule: \"inbound-link-coverage\",\n path,\n message: `\"${path}\" has ${inbound} incoming contextual link(s); the coverage rule requires ${rule.minInbound}.`,\n fix: `Add ${rule.minInbound - inbound} contextual link(s) pointing at \"${path}\".`,\n });\n }\n }\n return violations;\n};\n\n/** The sitemap-eligible path set of a declared graph, in graph insertion order. */\nconst eligiblePathsOf = (graph: SeoGraph): ReadonlyArray<string> =>\n [...graph.nodes.values()].filter(isSitemapEligible).map((node) => node.path);\n\n/**\n * Enforce contextual-link coverage against the *declared* graph: only `related`\n * edges count — breadcrumb ancestry is navigation, not context.\n */\nexport function checkCoverage(\n graph: SeoGraph,\n rules: ReadonlyArray<CoverageRule>,\n): Array<Violation> {\n return checkCoverageRules(\n {\n paths: [...graph.nodes.keys()],\n eligiblePaths: eligiblePathsOf(graph),\n inbound: (path) =>\n graph.edges.filter((edge) => edge.type === \"related\" && edge.to === path).length,\n },\n rules,\n );\n}\n\n/**\n * Enforce contextual-link coverage against the *rendered* graph: only same-origin\n * body-region anchors count. Nav, header, and footer anchors are site chrome, so\n * a page linked solely from them has no contextual inbound link — the same\n * distinction the declared pass draws by counting `related` edges alone.\n *\n * The target universe is the declared graph's sitemap-eligible pages: the globs\n * in `pagegraph.config.ts` are written against declared paths, and the crawl is what\n * supplies the served edges. Pass the crawl's `internalEdges` (each edge carries\n * its `region`).\n */\nexport function checkRenderedCoverage(\n graph: SeoGraph,\n renderedEdges: ReadonlyArray<LinkEdge>,\n rules: ReadonlyArray<CoverageRule>,\n): Array<Violation> {\n const inbound = new Map<string, number>();\n for (const edge of renderedEdges) {\n if (edge.region !== \"body\") continue;\n inbound.set(edge.to, (inbound.get(edge.to) ?? 0) + 1);\n }\n return checkCoverageRules(\n {\n paths: [...graph.nodes.keys()],\n eligiblePaths: eligiblePathsOf(graph),\n inbound: (path) => inbound.get(path) ?? 0,\n },\n rules,\n );\n}\n\n/** Structural violations fail `pagegraph check`; editorial-only stays green. */\nexport const hasStructuralViolations = (violations: ReadonlyArray<Violation>): boolean =>\n violations.some((violation) => violation.severity === \"structural\");\n"],"mappings":";;AA0CA,MAAM,SAAS;;;;;;AAOf,SAAgB,gBACd,OACA,QACA,KACiB;CACjB,MAAM,QAA+B,CAAC;CACtC,MAAM,QAA+B,CAAC;CACtC,MAAM,UAAyB,CAAC;CAChC,MAAM,UAAyB,CAAC;CAEhC,KAAK,MAAM,QAAQ,MAAM,MAAM,OAAO,GAAG;EACvC,IAAI,CAAC,kBAAkB,IAAI,GAAG;EAC9B,MAAM,WAAW,aAAa,IAAI;EAClC,IAAI,aAAa,KAAA,GAAW;GAC1B,QAAQ,KAAK,KAAK,IAAI;GACtB;EACF;EACA,MAAM,OAAO,kBAAkB,QAAQ;EACvC,IAAI,SAAS,KAAA,GAAW;GACtB,QAAQ,KAAK,KAAK,IAAI;GACtB;EACF;EACA,MAAM,QAAwB;GAC5B,MAAM,KAAK;GACX,MAAM,KAAK;GACX,QAAQ,KAAK;GACb,cAAc,IAAI,KAAK,IAAI,CAAC,CAAC,YAAY;GACzC,SAAS,KAAK,IAAI,GAAG,KAAK,OAAO,IAAI,QAAQ,IAAI,QAAQ,MAAM,CAAC;EAClE;EACA,CAAC,MAAM,UAAU,OAAO,aAAa,QAAQ,MA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AK,QAAQ,QAAQ,2DAA2D,KAAK,WAAW;IAC7G,KAAK,OAAO,KAAK,aAAa,QAAQ,mCAAmC,KAAK;GAChF,CAAC;EACH;CACF;CACA,OAAO;AACT;;AAGA,MAAM,mBAAmB,UACvB,CAAC,GAAG,MAAM,MAAM,OAAO,CAAC,CAAC,CAAC,OAAO,iBAAiB,CAAC,CAAC,KAAK,SAAS,KAAK,IAAI;;;;;AAM7E,SAAgB,cACd,OACA,OACkB;CAClB,OAAO,mBACL;EACE,OAAO,CAAC,GAAG,MAAM,MAAM,KAAK,CAAC;EAC7B,eAAe,gBAAgB,KAAK;EACpC,UAAU,SACR,MAAM,MAAM,QAAQ,SAAS,KAAK,SAAS,aAAa,KAAK,OAAO,IAAI,CAAC,CAAC;CAC9E,GACA,KACF;AACF;;;;;;;;;;;;AAaA,SAAgB,sBACd,OACA,eACA,OACkB;CAClB,MAAM,0BAAU,IAAI,IAAoB;CACxC,KAAK,MAAM,QAAQ,eAAe;EAChC,IAAI,KAAK,WAAW,QAAQ;EAC5B,QAAQ,IAAI,KAAK,KAAK,QAAQ,IAAI,KAAK,EAAE,KAAK,KAAK,CAAC;CACtD;CACA,OAAO,mBACL;EACE,OAAO,CAAC,GAAG,MAAM,MAAM,KAAK,CAAC;EAC7B,eAAe,gBAAgB,KAAK;EACpC,UAAU,SAAS,QAAQ,IAAI,IAAI,KAAK;CAC1C,GACA,KACF;AACF;;AAGA,MAAa,2BAA2B,eACtC,WAAW,MAAM,cAAc,UAAU,aAAa,YAAY"}
@@ -0,0 +1,92 @@
1
+ import { o as Facts, p as PageDocument, t as PageHead } from "./page-heads-BfjWQvau.js";
2
+ import "effect/Effect";
3
+ import * as Schema from "effect/Schema";
4
+ import { DecisionModel } from "effect/ai";
5
+ import "effect/ai/AiError";
6
+ import * as Decision from "effect/ai/Decision";
7
+ //#region src/decide/cache.d.ts
8
+ declare const DecisionCacheInvalid_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
9
+ readonly _tag: "DecisionCacheInvalid";
10
+ } & Readonly<A>;
11
+ /** A committed answer that exists but cannot be trusted. */
12
+ declare class DecisionCacheInvalid extends DecisionCacheInvalid_base<{
13
+ readonly file: string;
14
+ readonly message: string;
15
+ }> {}
16
+ //#endregion
17
+ //#region src/decide/run.d.ts
18
+ /**
19
+ * One decision family. `answers` in `evaluate` is erased because each family
20
+ * reads its own `Decision.Answers` shape; the family is the only place that
21
+ * shape is known, and a `DecisionModel` validates it before it arrives.
22
+ */
23
+ interface DecisionFamily<Input> {
24
+ readonly name: string;
25
+ readonly input: Schema.ConstraintDecoder<Input>;
26
+ /** Build the definition for one input; dynamic-label families build per input. */
27
+ readonly definitionFor: (input: Input) => Decision.Definition<any, any>;
28
+ /** Stable human reference for the input in a report. */
29
+ readonly inputRef: (input: Input) => string;
30
+ /** Map validated answers to a verdict; `"review"` means a human decides. */
31
+ readonly evaluate: (input: Input, answers: any, threshold: number) => string;
32
+ /**
33
+ * Optional input-level guard for constraints a schema cannot express, such as
34
+ * "dynamic-label families need at least two candidates". Returns a message to
35
+ * fail the run, or `undefined` when the input is usable.
36
+ */
37
+ readonly validate?: (input: Input) => string | undefined;
38
+ }
39
+ declare const DecisionCacheMiss_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
40
+ readonly _tag: "DecisionCacheMiss";
41
+ } & Readonly<A>;
42
+ /** Replay found no committed answer for an input. */
43
+ declare class DecisionCacheMiss extends DecisionCacheMiss_base<{
44
+ readonly family: string;
45
+ readonly inputRef: string;
46
+ readonly key: string;
47
+ readonly message: string;
48
+ }> {}
49
+ //#endregion
50
+ //#region src/decide/families/claims.d.ts
51
+ /** Authored prose, code-owned facts, and evidence supplied to adopter rules. */
52
+ declare const claimsInput: Schema.Struct<{
53
+ readonly path: Schema.String;
54
+ readonly evidence: Schema.optionalKey<Schema.String>;
55
+ readonly section: Schema.Struct<{
56
+ readonly id: Schema.String;
57
+ readonly kind: Schema.String;
58
+ readonly markdown: Schema.String;
59
+ readonly messages: Schema.$Array<Schema.Struct<{
60
+ readonly hash: Schema.String;
61
+ readonly text: Schema.String;
62
+ readonly facts: Schema.$Array<Schema.String>;
63
+ }>>;
64
+ }>;
65
+ readonly facts: Schema.$Record<Schema.String, Schema.Struct<{
66
+ readonly kind: Schema.Literals<readonly ["number", "money", "list", "text"]>;
67
+ readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
68
+ readonly text: Schema.String;
69
+ readonly items: Schema.optionalKey<Schema.$Array<Schema.String>>;
70
+ }>>;
71
+ readonly context: Schema.optionalKey<Schema.String>;
72
+ }>;
73
+ type ClaimsInput = typeof claimsInput.Type;
74
+ type ClaimsRules = Decision.Definition<typeof claimsInput, Record<string, Decision.Probability>>;
75
+ interface ClaimsOptions {
76
+ readonly rules: ClaimsRules;
77
+ readonly model: string;
78
+ readonly cutoff?: number;
79
+ readonly context?: string;
80
+ /** Exclude metadata by path glob; captured sections remain in the gate. */
81
+ readonly excludeHeads?: ReadonlyArray<string>;
82
+ }
83
+ type ClaimsVerdict = "pass" | "violation";
84
+ /** Claims use a single upper cutoff; probabilities below it pass without a review band. */
85
+ declare function claimsFamily(rules: ClaimsRules): DecisionFamily<ClaimsInput>;
86
+ /** Heads describe only pages outside capture; duplicate ownership fails before evaluation. */
87
+ declare function resolveClaimsDocuments(documents: ReadonlyArray<PageDocument>, heads: ReadonlyArray<PageHead>, excludeHeads?: ReadonlyArray<string>): ReadonlyArray<PageDocument>;
88
+ /** Source locations do not enter model input or answer identity. */
89
+ declare function claimsInputs(documents: ReadonlyArray<PageDocument>, heads: ReadonlyArray<PageHead>, facts: Facts, options?: Pick<ClaimsOptions, "context" | "excludeHeads">): ReadonlyArray<ClaimsInput>;
90
+ //#endregion
91
+ export { claimsFamily as a, resolveClaimsDocuments as c, DecisionCacheInvalid as d, ClaimsVerdict as i, DecisionCacheMiss as l, ClaimsOptions as n, claimsInput as o, ClaimsRules as r, claimsInputs as s, ClaimsInput as t, DecisionFamily as u };
92
+ //# sourceMappingURL=claims-Bch7Lxlo.d.ts.map