@cavuno/board 1.41.0 → 1.43.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 (48) hide show
  1. package/dist/{_spec-l_596ZwW.d.mts → _spec-DQ2GR9lq.d.mts} +48 -1
  2. package/dist/{_spec-l_596ZwW.d.ts → _spec-DQ2GR9lq.d.ts} +48 -1
  3. package/dist/{board-CyHA6rRP.d.mts → board-ComPm8FD.d.mts} +1 -1
  4. package/dist/{board-BzK5j73O.d.ts → board-DpBlk05S.d.ts} +1 -1
  5. package/dist/filters.d.mts +2 -2
  6. package/dist/filters.d.ts +2 -2
  7. package/dist/format.d.mts +3 -3
  8. package/dist/format.d.ts +3 -3
  9. package/dist/go.d.mts +65 -0
  10. package/dist/go.d.ts +65 -0
  11. package/dist/go.js +130 -0
  12. package/dist/go.mjs +107 -0
  13. package/dist/index.d.mts +9 -9
  14. package/dist/index.d.ts +9 -9
  15. package/dist/index.js +1 -1
  16. package/dist/index.mjs +1 -1
  17. package/dist/{jobs-CXudz1Y4.d.ts → jobs-BlnV6hmC.d.ts} +1 -1
  18. package/dist/{jobs-BhthvMkA.d.mts → jobs-DqujLqGk.d.mts} +1 -1
  19. package/dist/paths.d.mts +25 -1
  20. package/dist/paths.d.ts +25 -1
  21. package/dist/paths.js +20 -1
  22. package/dist/paths.mjs +20 -1
  23. package/dist/roles-vY0AXhoc.d.mts +82 -0
  24. package/dist/roles-vY0AXhoc.d.ts +82 -0
  25. package/dist/route-contract.d.mts +257 -0
  26. package/dist/route-contract.d.ts +257 -0
  27. package/dist/route-contract.js +1131 -0
  28. package/dist/route-contract.mjs +1108 -0
  29. package/dist/{salaries-Dr_Zugal.d.mts → salaries-CNJVapW5.d.mts} +2 -2
  30. package/dist/{salaries-ByBuHCLH.d.ts → salaries-DzM7rbXp.d.ts} +2 -2
  31. package/dist/{search-DZrq-k76.d.ts → search-B1GtdfAm.d.ts} +1 -1
  32. package/dist/{search-CrIlXSJP.d.mts → search-CnRMApws.d.mts} +1 -1
  33. package/dist/seo.d.mts +4 -4
  34. package/dist/seo.d.ts +4 -4
  35. package/dist/server.d.mts +5 -5
  36. package/dist/server.d.ts +5 -5
  37. package/dist/sitemap.d.mts +5 -5
  38. package/dist/sitemap.d.ts +5 -5
  39. package/dist/sitemap.js +8 -1
  40. package/dist/sitemap.mjs +8 -1
  41. package/dist/suggest.d.mts +2 -2
  42. package/dist/suggest.d.ts +2 -2
  43. package/dist/well-known.d.mts +113 -0
  44. package/dist/well-known.d.ts +113 -0
  45. package/dist/well-known.js +561 -0
  46. package/dist/well-known.mjs +538 -0
  47. package/package.json +31 -1
  48. package/skills/manifest.json +1 -1
@@ -0,0 +1,257 @@
1
+ import { R as RouteEntry, a as RouteRole, C as ClassifyResult, b as CompileResult, V as ValidateManifestError, c as ValidateManifestResult, M as ManifestV1 } from './roles-vY0AXhoc.js';
2
+ export { A as ALL_ROLES, d as Ambiguity, e as CANONICAL_MANIFEST, f as REQUIRED_ROLES, g as ROLE_PARAM_REGISTRY, i as isRouteRole } from './roles-vY0AXhoc.js';
3
+
4
+ /**
5
+ * Classify routes into role assignments. Markers (keyed by `sourcePath`)
6
+ * always win and remove the route from inference. Two markers claiming the
7
+ * same role is an ambiguity (never silent first-wins). Ambiguities never
8
+ * guess.
9
+ */
10
+ declare function classifyRoutes(routes: RouteEntry[], markers?: ReadonlyMap<string, RouteRole>): ClassifyResult;
11
+
12
+ /**
13
+ * Classify routes and emit a ManifestV1 plus publish-gate signals.
14
+ * Assigned templates are self-validated via checkRoleTemplate (F1);
15
+ * failing required roles land in blockingMissing; failing optionals warn.
16
+ */
17
+ declare function compileManifest(routes: RouteEntry[], markers?: ReadonlyMap<string, RouteRole>): CompileResult;
18
+
19
+ /**
20
+ * LNK-06 — compile a ManifestV1 from a workspace file tree already in
21
+ * memory (candidate verification). Pure: no IO.
22
+ */
23
+
24
+ type TreeFile = {
25
+ path: string;
26
+ contents: string;
27
+ };
28
+ /**
29
+ * Enumerate routes from file paths, harvest cavunoPage markers from every
30
+ * file body, run compileManifest. Marker harvest is intentionally broad
31
+ * (all files, not just ambiguous) — cheap string scan, correct for renames.
32
+ */
33
+ declare function compileManifestFromTree(files: ReadonlyArray<TreeFile>): CompileResult;
34
+
35
+ /**
36
+ * Tolerant parse of `export const cavunoPage = '<role>'` (single or double
37
+ * quotes; optional `as const`). Accepts camelCase roles and their kebab-case
38
+ * aliases (`job-detail` → `jobDetail`). Returns null when absent or when the
39
+ * string is not a known RouteRole (ADR-0090 D6 escape hatch).
40
+ */
41
+ declare function extractCavunoPageMarker(contents: string): RouteRole | null;
42
+
43
+ /**
44
+ * Extract `:param` token names from a URLPattern-style template string.
45
+ * Order-insensitive consumers should sort / set-compare the result.
46
+ */
47
+ declare function extractParamNames(template: string): string[];
48
+ /** Order-insensitive equality of two param-name lists. */
49
+ declare function sameParamSet(a: readonly string[], b: readonly string[]): boolean;
50
+
51
+ /**
52
+ * Per-role template checks shared by validateManifest and compileManifest.
53
+ * Never throws — returns zero or more typed errors.
54
+ *
55
+ * Rules (v1):
56
+ * - non-empty string
57
+ * - must start with '/' but NOT '//'; no '//' anywhere
58
+ * - no '.' or '..' path segments
59
+ * - no '?', '#', or whitespace
60
+ * - charset limited to [A-Za-z0-9\-_/:.]
61
+ * - params referenced by a template must be in ROLE_PARAM_REGISTRY[role]
62
+ * - static / empty-registry roles must have zero `:` tokens
63
+ * - parameterized roles must retain at least one registry param
64
+ */
65
+ declare function checkRoleTemplate(role: RouteRole, template: string): ValidateManifestError[];
66
+ /**
67
+ * Structural + registry validation of an unknown value as ManifestV1.
68
+ * Never throws — returns typed errors.
69
+ */
70
+ declare function validateManifest(value: unknown): ValidateManifestResult;
71
+
72
+ /**
73
+ * Platform resolution overlay (ADR-0090 D3 / LNK-07).
74
+ *
75
+ * Pure + isomorphic: role + params + precedence layers → board path.
76
+ * Imports only sibling route-contract / paths modules.
77
+ */
78
+
79
+ /** One precedence layer supplied by the caller (declared / wellKnown / inferred). */
80
+ type ManifestLayer = {
81
+ source: 'declared' | 'wellKnown' | 'inferred';
82
+ manifest: ManifestV1;
83
+ };
84
+ type ResolvedBoardPath = {
85
+ path: string;
86
+ source: 'declared' | 'wellKnown' | 'inferred' | 'canonical';
87
+ /** Set when the winning path came from falling through a broken template. */
88
+ fallback?: 'missing-param';
89
+ };
90
+ declare function createBoardLinkResolver(layers: readonly ManifestLayer[]): {
91
+ pathFor(role: RouteRole, params?: Record<string, string>): ResolvedBoardPath;
92
+ };
93
+
94
+ /**
95
+ * LNK-10 — pure history path matching for hosted rename 301s (ADR-0090 D7).
96
+ *
97
+ * Segment-wise matcher (no RegExp construction from templates). Templates
98
+ * are validated at write time but stay defensive here: any segment that
99
+ * does not start with ':' is a literal.
100
+ */
101
+
102
+ /**
103
+ * Degrade target per role when captured params no longer resolve against
104
+ * the current template (302-class temporary redirect, never 404-from-history).
105
+ */
106
+ declare const ROLE_INDEX_PATHS: Record<RouteRole, string>;
107
+ /**
108
+ * Segment-wise match of `pathname` against a URLPattern-style `:param` template.
109
+ * Returns captured params or null.
110
+ *
111
+ * Contract: path segments arrive ALREADY decoded (Next.js `params.rest`,
112
+ * URL routers). This function does NOT call decodeURIComponent — a second
113
+ * decode would turn a once-decoded `%2F` into a literal `/` and enable
114
+ * open-redirect targets when substituted into param-leading templates.
115
+ *
116
+ * Defense in depth: any capture containing `/` or `\` is rejected (null).
117
+ */
118
+ declare function matchPathToTemplate(template: string, pathname: string): Record<string, string> | null;
119
+ type HistoryMatchEntry = {
120
+ role: RouteRole;
121
+ template: string;
122
+ };
123
+ type HistoryMatchResult = {
124
+ role: RouteRole;
125
+ template: string;
126
+ params: Record<string, string>;
127
+ };
128
+ /**
129
+ * First match wins — caller orders entries newest-first.
130
+ */
131
+ declare function matchPathAgainstHistory(entries: readonly HistoryMatchEntry[], pathname: string): HistoryMatchResult | null;
132
+
133
+ /**
134
+ * LNK-02 — shared types for the route-derivation adapter registry.
135
+ */
136
+ type DerivedRoute = {
137
+ path: string;
138
+ navigable: boolean;
139
+ /**
140
+ * Originating file when the parser tracked it (worker compile path).
141
+ * Omitted from the navigator public contract via deriveRoutes strip.
142
+ */
143
+ sourcePath?: string;
144
+ };
145
+ type FrameworkId = 'tanstack' | 'next' | 'astro' | 'sveltekit' | 'nuxt' | 'react-router';
146
+
147
+ /**
148
+ * Marker-file framework detection. Specificity order (first match wins):
149
+ * Explicit TanStack markers → Next → Astro → SvelteKit → Nuxt →
150
+ * marker-less TanStack fallback → react-router candidates → null.
151
+ *
152
+ * The marker-less TanStack heuristic (any src/routes/*.tsx|jsx) runs LAST
153
+ * among framework checks so a Next/Astro/SvelteKit/Nuxt repo with a stray
154
+ * src/routes helper is never misclassified (F1).
155
+ */
156
+
157
+ declare function detectFramework(paths: string[]): FrameworkId | null;
158
+
159
+ /**
160
+ * react-router pure parsers over provided FILE CONTENTS.
161
+ *
162
+ * Content-fetch is intentionally NOT wired into the navigator UI —
163
+ * LNK-02 only exposes these functions; UI wiring is a later ticket.
164
+ */
165
+
166
+ /**
167
+ * Candidate source files that typically declare react-router routes.
168
+ * Matches App.* / *routes*.* / router.* (basename-based).
169
+ */
170
+ declare function getReactRouterCandidatePaths(paths: string[]): string[];
171
+ /**
172
+ * Extract routes from react-router source contents via tolerant regex.
173
+ * Supports `<Route path="...">` and `{ path: "..." }` object entries
174
+ * (createBrowserRouter form). Skips `*`. Dynamic segments → navigable false.
175
+ */
176
+ declare function parseReactRouterRoutes(contents: string[]): DerivedRoute[];
177
+
178
+ /**
179
+ * TanStack Start / TanStack Router file-based route conventions under
180
+ * `src/routes/`. Behavior preserved exactly from the CHR-03 parser.
181
+ *
182
+ * - `index` → parent path (`src/routes/index.tsx` → `/`)
183
+ * - dots nest (`jobs.index.tsx` → `/jobs`)
184
+ * - `$param` → dynamic segment (`jobs.$jobId.tsx` → `/jobs/:jobId`)
185
+ * - `__root` is layout only (skipped)
186
+ * - `-` prefix excludes the file/folder
187
+ * - `_` prefix is a pathless layout segment (stripped from the URL)
188
+ *
189
+ * Dynamic patterns are listed but not navigable in v1.
190
+ */
191
+
192
+ declare function parseTanStackRoutes(paths: string[]): DerivedRoute[];
193
+
194
+ /**
195
+ * Next.js app router + pages router parsers over a path listing.
196
+ *
197
+ * App: app/.../page.* (+ src/app), strip (group) and @slot,
198
+ * [param]→:param, [...slug]→*, skip app/api/... and _private.
199
+ *
200
+ * Pages: pages/... (+ src/pages), skip api + _app/_document/_error,
201
+ * index collapses, [param]→:param.
202
+ */
203
+
204
+ declare function parseNextRoutes(paths: string[]): DerivedRoute[];
205
+
206
+ /**
207
+ * Astro file-based routing under src/pages/ (default) or pages/
208
+ * when the tree has astro.config.* and no src/pages/ (srcDir-customized).
209
+ * Page extensions: .astro / .md / .mdx / .html.
210
+ * Skip _-prefixed and .../api/. Index collapses.
211
+ * [param]→:param, [...slug]→*, [[...slug]]→* (F5).
212
+ */
213
+
214
+ declare function parseAstroRoutes(paths: string[]): DerivedRoute[];
215
+
216
+ /**
217
+ * SvelteKit file-based routing: src/routes/.../+page.svelte
218
+ * and layout-reset +page@*.svelte only.
219
+ * (group) stripped, [param]→:param, [[...rest]]→*, dynamic ⇒ navigable false.
220
+ * +page.ts / +page.server.ts are load modules and derive nothing (F4).
221
+ */
222
+
223
+ declare function parseSvelteKitRoutes(paths: string[]): DerivedRoute[];
224
+
225
+ /**
226
+ * Nuxt file-based routing under pages/ (and src/pages/).
227
+ * [param]→:param, [[...slug]]→*, [[slug]]→:slug, index collapses.
228
+ * Dynamic ⇒ navigable false.
229
+ */
230
+
231
+ declare function parseNuxtRoutes(paths: string[]): DerivedRoute[];
232
+
233
+ /**
234
+ * LNK-02 — framework adapter registry entry.
235
+ *
236
+ * Detects the framework from a path listing, dispatches to the matching
237
+ * pure parser, returns DerivedRoute[] (path + navigable). Unknown → [].
238
+ *
239
+ * react-router content parsers are exported for later UI wiring; the
240
+ * path-only deriveRoutes entry returns [] for react-router-only trees.
241
+ *
242
+ * LNK-06: enumerateRouteEntries keeps sourcePath for marker harvest +
243
+ * compileManifest; deriveRoutes strips it so the navigator contract is
244
+ * unchanged (path + navigable only).
245
+ */
246
+
247
+ /**
248
+ * Navigator contract: path + navigable only (CHR-03 / LNK-02 stable).
249
+ * sourcePath is intentionally stripped so existing equality fixtures hold.
250
+ */
251
+ declare function deriveRoutes(paths: string[]): DerivedRoute[];
252
+ /**
253
+ * LNK-06 compile path: URL template + sourcePath for marker harvest.
254
+ */
255
+ declare function enumerateRouteEntries(paths: string[]): RouteEntry[];
256
+
257
+ export { ClassifyResult, CompileResult, type DerivedRoute, type FrameworkId, type HistoryMatchEntry, type HistoryMatchResult, type ManifestLayer, ManifestV1, ROLE_INDEX_PATHS, type ResolvedBoardPath, RouteEntry, RouteRole, type TreeFile, ValidateManifestError, ValidateManifestResult, checkRoleTemplate, classifyRoutes, compileManifest, compileManifestFromTree, createBoardLinkResolver, deriveRoutes, detectFramework, enumerateRouteEntries, extractCavunoPageMarker, extractParamNames, getReactRouterCandidatePaths, matchPathAgainstHistory, matchPathToTemplate, parseAstroRoutes, parseNextRoutes, parseNuxtRoutes, parseReactRouterRoutes, parseSvelteKitRoutes, parseTanStackRoutes, sameParamSet, validateManifest };