@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
package/dist/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- import { S as Schemas, c as components } from './_spec-l_596ZwW.js';
2
- import { F as FetchOptions, c as StorageMode, B as BoardRequest, A as Awaitable, L as Logger, d as BoardClient, a as SearchSuggestQuery } from './search-DZrq-k76.js';
3
- export { e as ACCESS_TOKEN_KEY, f as BOARD_ACCESS_GRANT_KEY, C as CompanySuggestion, g as CustomStorage, R as REFRESH_TOKEN_KEY, b as SuggestResult, S as SuggestionItem, T as TermSuggestion } from './search-DZrq-k76.js';
4
- export { C as CustomFieldDefinition, a as CustomFieldOption, b as CustomFieldType, P as PublicBoard, c as PublicBoardAnalytics, d as PublicBoardFeatures, e as PublicBoardTheme } from './board-BzK5j73O.js';
5
- import { R as RemoteOption, E as EmploymentType, S as Seniority, L as ListEnvelope, b as JobsListQuery, c as JobCardListEnvelope, d as JobsSearchBody, e as JobCardSearchEnvelope, f as JobsSimilarQuery, g as SearchEnvelope } from './jobs-CXudz1Y4.js';
6
- export { h as CustomFieldValue, C as CustomFieldValues, i as EducationRequirement, j as JobCatalogPagination, k as JobCompany, J as JobSort, O as OfficeLocation, l as OffsetPagination, P as PublicJob, a as PublicJobCard, m as RelatedSearch, n as RemotePermit, o as RemoteTimezone, p as StorefrontPagination } from './jobs-CXudz1Y4.js';
7
- import { b as CompaniesListQuery, c as CompanyListEnvelope, d as CompaniesSearchBody, e as CompanyJobsListQuery, f as CompanySimilarQuery, g as CompanyMarketsListQuery, h as SalaryDetailQuery, i as BlogPostsListQuery, j as BlogSimilarQuery, k as BlogSearchBody } from './salaries-ByBuHCLH.js';
8
- export { B as BlogAuthorEmbed, l as BlogTagEmbed, C as CompanyCategorySalary, m as CompanyMarket, n as CompanyMarketRef, a as CompanySalary, L as LocationSalaryDetail, o as LocationSkillsIndex, p as LocationTitlesIndex, q as PublicBlogAdjacentPosts, r as PublicBlogAuthor, s as PublicBlogPost, P as PublicBlogPostSummary, t as PublicBlogTag, u as PublicCompany, v as PublicCompanyDetail, w as SalaryCompany, x as SalaryLocation, y as SalarySkill, z as SalaryTitle, A as SkillLocationSalary, D as SkillLocationsIndex, S as SkillSalaryDetail, E as TitleLocationSalary, F as TitleLocationsIndex, T as TitleSalaryDetail } from './salaries-ByBuHCLH.js';
1
+ import { S as Schemas, c as components } from './_spec-DQ2GR9lq.js';
2
+ import { F as FetchOptions, c as StorageMode, B as BoardRequest, A as Awaitable, L as Logger, d as BoardClient, a as SearchSuggestQuery } from './search-B1GtdfAm.js';
3
+ export { e as ACCESS_TOKEN_KEY, f as BOARD_ACCESS_GRANT_KEY, C as CompanySuggestion, g as CustomStorage, R as REFRESH_TOKEN_KEY, b as SuggestResult, S as SuggestionItem, T as TermSuggestion } from './search-B1GtdfAm.js';
4
+ export { C as CustomFieldDefinition, a as CustomFieldOption, b as CustomFieldType, P as PublicBoard, c as PublicBoardAnalytics, d as PublicBoardFeatures, e as PublicBoardTheme } from './board-DpBlk05S.js';
5
+ import { R as RemoteOption, E as EmploymentType, S as Seniority, L as ListEnvelope, b as JobsListQuery, c as JobCardListEnvelope, d as JobsSearchBody, e as JobCardSearchEnvelope, f as JobsSimilarQuery, g as SearchEnvelope } from './jobs-BlnV6hmC.js';
6
+ export { h as CustomFieldValue, C as CustomFieldValues, i as EducationRequirement, j as JobCatalogPagination, k as JobCompany, J as JobSort, O as OfficeLocation, l as OffsetPagination, P as PublicJob, a as PublicJobCard, m as RelatedSearch, n as RemotePermit, o as RemoteTimezone, p as StorefrontPagination } from './jobs-BlnV6hmC.js';
7
+ import { b as CompaniesListQuery, c as CompanyListEnvelope, d as CompaniesSearchBody, e as CompanyJobsListQuery, f as CompanySimilarQuery, g as CompanyMarketsListQuery, h as SalaryDetailQuery, i as BlogPostsListQuery, j as BlogSimilarQuery, k as BlogSearchBody } from './salaries-DzM7rbXp.js';
8
+ export { B as BlogAuthorEmbed, l as BlogTagEmbed, C as CompanyCategorySalary, m as CompanyMarket, n as CompanyMarketRef, a as CompanySalary, L as LocationSalaryDetail, o as LocationSkillsIndex, p as LocationTitlesIndex, q as PublicBlogAdjacentPosts, r as PublicBlogAuthor, s as PublicBlogPost, P as PublicBlogPostSummary, t as PublicBlogTag, u as PublicCompany, v as PublicCompanyDetail, w as SalaryCompany, x as SalaryLocation, y as SalarySkill, z as SalaryTitle, A as SkillLocationSalary, D as SkillLocationsIndex, S as SkillSalaryDetail, E as TitleLocationSalary, F as TitleLocationsIndex, T as TitleSalaryDetail } from './salaries-DzM7rbXp.js';
9
9
 
10
10
  /**
11
11
  * Well-known `<domain>_<snake_reason>` codes the Board API sends, grouped by
@@ -141,7 +141,7 @@ declare function paginate<Q extends Record<string, unknown>, P extends PageShape
141
141
  * constant because the package is platform-neutral and cannot read
142
142
  * package.json at runtime.
143
143
  */
144
- declare const SDK_VERSION = "1.41.0";
144
+ declare const SDK_VERSION = "1.43.0";
145
145
 
146
146
  type SavedJob = Schemas['SavedJob'];
147
147
  type SavedJobsListQuery = {
package/dist/index.js CHANGED
@@ -312,7 +312,7 @@ async function clearSession(storage) {
312
312
  }
313
313
 
314
314
  // src/version.ts
315
- var SDK_VERSION = "1.41.0";
315
+ var SDK_VERSION = "1.43.0";
316
316
 
317
317
  // src/client.ts
318
318
  function isRawBody(body) {
package/dist/index.mjs CHANGED
@@ -265,7 +265,7 @@ async function clearSession(storage) {
265
265
  }
266
266
 
267
267
  // src/version.ts
268
- var SDK_VERSION = "1.41.0";
268
+ var SDK_VERSION = "1.43.0";
269
269
 
270
270
  // src/client.ts
271
271
  function isRawBody(body) {
@@ -1,4 +1,4 @@
1
- import { S as Schemas } from './_spec-l_596ZwW.js';
1
+ import { S as Schemas } from './_spec-DQ2GR9lq.js';
2
2
 
3
3
  /**
4
4
  * Stripe-shaped success envelopes (`01-conventions.md` §5.1). The
@@ -1,4 +1,4 @@
1
- import { S as Schemas } from './_spec-l_596ZwW.mjs';
1
+ import { S as Schemas } from './_spec-DQ2GR9lq.mjs';
2
2
 
3
3
  /**
4
4
  * Stripe-shaped success envelopes (`01-conventions.md` §5.1). The
package/dist/paths.d.mts CHANGED
@@ -62,11 +62,35 @@ declare const BOARD_PATHS: {
62
62
  readonly impressum: "/impressum";
63
63
  readonly talent: "/talent";
64
64
  readonly employers: "/employers";
65
+ /**
66
+ * Alert-email surfaces (ADR-0090 D1/D4). Promoted out of raw literals in
67
+ * the job-alerts composer so /go indirection and email composition share
68
+ * one definition.
69
+ */
70
+ readonly alertsManage: "/alerts/manage";
71
+ readonly alertsConfirm: "/alerts/confirm";
65
72
  };
73
+ /**
74
+ * Email `/go` indirection paths (ADR-0090 D4 / LNK-05). Pure builders so
75
+ * Convex email composers can emit structure-independent links without
76
+ * importing `@cavuno/board/go` (handler code is not safe in that runtime).
77
+ *
78
+ * Shapes match the hosted handler + SDK `createGoHandler` contracts:
79
+ * /go/job/<immutableId>
80
+ * /go/alerts-manage
81
+ * /go/alerts-confirm
82
+ *
83
+ * No encoding — callers pass opaque Convex ids / static role segments that
84
+ * are already URL-safe path segments. Query strings are composed by the
85
+ * caller (tokens must ride through verbatim).
86
+ */
87
+ declare function goJobPath(jobId: string): string;
88
+ declare function goAlertsManagePath(): string;
89
+ declare function goAlertsConfirmPath(): string;
66
90
  /**
67
91
  * Prefix a board-relative path with the board origin. A trailing slash on
68
92
  * the origin is tolerated (stripped) so callers need not normalise first.
69
93
  */
70
94
  declare function boardUrl(origin: string, path: string): string;
71
95
 
72
- export { BOARD_PATHS, blogAuthorPath, blogPostPath, blogTagPath, boardUrl, companyMarketPath, companyPath, companySalaryPath, jobDetailPath, jobsCategoryPath, jobsLocationPath, jobsSkillPath, salaryLocationPath, salarySkillPath, salaryTitlePath };
96
+ export { BOARD_PATHS, blogAuthorPath, blogPostPath, blogTagPath, boardUrl, companyMarketPath, companyPath, companySalaryPath, goAlertsConfirmPath, goAlertsManagePath, goJobPath, jobDetailPath, jobsCategoryPath, jobsLocationPath, jobsSkillPath, salaryLocationPath, salarySkillPath, salaryTitlePath };
package/dist/paths.d.ts CHANGED
@@ -62,11 +62,35 @@ declare const BOARD_PATHS: {
62
62
  readonly impressum: "/impressum";
63
63
  readonly talent: "/talent";
64
64
  readonly employers: "/employers";
65
+ /**
66
+ * Alert-email surfaces (ADR-0090 D1/D4). Promoted out of raw literals in
67
+ * the job-alerts composer so /go indirection and email composition share
68
+ * one definition.
69
+ */
70
+ readonly alertsManage: "/alerts/manage";
71
+ readonly alertsConfirm: "/alerts/confirm";
65
72
  };
73
+ /**
74
+ * Email `/go` indirection paths (ADR-0090 D4 / LNK-05). Pure builders so
75
+ * Convex email composers can emit structure-independent links without
76
+ * importing `@cavuno/board/go` (handler code is not safe in that runtime).
77
+ *
78
+ * Shapes match the hosted handler + SDK `createGoHandler` contracts:
79
+ * /go/job/<immutableId>
80
+ * /go/alerts-manage
81
+ * /go/alerts-confirm
82
+ *
83
+ * No encoding — callers pass opaque Convex ids / static role segments that
84
+ * are already URL-safe path segments. Query strings are composed by the
85
+ * caller (tokens must ride through verbatim).
86
+ */
87
+ declare function goJobPath(jobId: string): string;
88
+ declare function goAlertsManagePath(): string;
89
+ declare function goAlertsConfirmPath(): string;
66
90
  /**
67
91
  * Prefix a board-relative path with the board origin. A trailing slash on
68
92
  * the origin is tolerated (stripped) so callers need not normalise first.
69
93
  */
70
94
  declare function boardUrl(origin: string, path: string): string;
71
95
 
72
- export { BOARD_PATHS, blogAuthorPath, blogPostPath, blogTagPath, boardUrl, companyMarketPath, companyPath, companySalaryPath, jobDetailPath, jobsCategoryPath, jobsLocationPath, jobsSkillPath, salaryLocationPath, salarySkillPath, salaryTitlePath };
96
+ export { BOARD_PATHS, blogAuthorPath, blogPostPath, blogTagPath, boardUrl, companyMarketPath, companyPath, companySalaryPath, goAlertsConfirmPath, goAlertsManagePath, goJobPath, jobDetailPath, jobsCategoryPath, jobsLocationPath, jobsSkillPath, salaryLocationPath, salarySkillPath, salaryTitlePath };
package/dist/paths.js CHANGED
@@ -28,6 +28,9 @@ __export(paths_exports, {
28
28
  companyMarketPath: () => companyMarketPath,
29
29
  companyPath: () => companyPath,
30
30
  companySalaryPath: () => companySalaryPath,
31
+ goAlertsConfirmPath: () => goAlertsConfirmPath,
32
+ goAlertsManagePath: () => goAlertsManagePath,
33
+ goJobPath: () => goJobPath,
31
34
  jobDetailPath: () => jobDetailPath,
32
35
  jobsCategoryPath: () => jobsCategoryPath,
33
36
  jobsLocationPath: () => jobsLocationPath,
@@ -92,8 +95,24 @@ var BOARD_PATHS = {
92
95
  cookiePolicy: "/cookie-policy",
93
96
  impressum: "/impressum",
94
97
  talent: "/talent",
95
- employers: "/employers"
98
+ employers: "/employers",
99
+ /**
100
+ * Alert-email surfaces (ADR-0090 D1/D4). Promoted out of raw literals in
101
+ * the job-alerts composer so /go indirection and email composition share
102
+ * one definition.
103
+ */
104
+ alertsManage: "/alerts/manage",
105
+ alertsConfirm: "/alerts/confirm"
96
106
  };
107
+ function goJobPath(jobId) {
108
+ return `/go/job/${jobId}`;
109
+ }
110
+ function goAlertsManagePath() {
111
+ return "/go/alerts-manage";
112
+ }
113
+ function goAlertsConfirmPath() {
114
+ return "/go/alerts-confirm";
115
+ }
97
116
  function boardUrl(origin, path) {
98
117
  return `${origin.replace(/\/+$/, "")}${path}`;
99
118
  }
package/dist/paths.mjs CHANGED
@@ -54,8 +54,24 @@ var BOARD_PATHS = {
54
54
  cookiePolicy: "/cookie-policy",
55
55
  impressum: "/impressum",
56
56
  talent: "/talent",
57
- employers: "/employers"
57
+ employers: "/employers",
58
+ /**
59
+ * Alert-email surfaces (ADR-0090 D1/D4). Promoted out of raw literals in
60
+ * the job-alerts composer so /go indirection and email composition share
61
+ * one definition.
62
+ */
63
+ alertsManage: "/alerts/manage",
64
+ alertsConfirm: "/alerts/confirm"
58
65
  };
66
+ function goJobPath(jobId) {
67
+ return `/go/job/${jobId}`;
68
+ }
69
+ function goAlertsManagePath() {
70
+ return "/go/alerts-manage";
71
+ }
72
+ function goAlertsConfirmPath() {
73
+ return "/go/alerts-confirm";
74
+ }
59
75
  function boardUrl(origin, path) {
60
76
  return `${origin.replace(/\/+$/, "")}${path}`;
61
77
  }
@@ -68,6 +84,9 @@ export {
68
84
  companyMarketPath,
69
85
  companyPath,
70
86
  companySalaryPath,
87
+ goAlertsConfirmPath,
88
+ goAlertsManagePath,
89
+ goJobPath,
71
90
  jobDetailPath,
72
91
  jobsCategoryPath,
73
92
  jobsLocationPath,
@@ -0,0 +1,82 @@
1
+ /**
2
+ * One discovered route. `template` uses URLPattern `:param` syntax
3
+ * (e.g. `/companies/:companySlug/jobs/:jobSlug`). Callers on other
4
+ * runtimes instantiate matchers; this module only emits strings.
5
+ */
6
+ type RouteEntry = {
7
+ template: string;
8
+ /** Absolute or project-relative source path — keys the marker map. */
9
+ sourcePath?: string;
10
+ };
11
+ /** Versioned role → template map. Additive schema evolution only. */
12
+ type ManifestV1 = {
13
+ version: 1;
14
+ roles: Partial<Record<RouteRole, string>>;
15
+ };
16
+ type Ambiguity = {
17
+ role: RouteRole;
18
+ candidates: RouteEntry[];
19
+ };
20
+ type ClassifyResult = {
21
+ assignments: Partial<Record<RouteRole, RouteEntry>>;
22
+ ambiguities: Ambiguity[];
23
+ missingRequired: RouteRole[];
24
+ };
25
+ type CompileResult = {
26
+ manifest: ManifestV1;
27
+ blockingMissing: RouteRole[];
28
+ warnings: string[];
29
+ ambiguities: Ambiguity[];
30
+ };
31
+ type ValidateManifestError = {
32
+ code: 'invalid_shape' | 'invalid_version' | 'unknown_role' | 'unregistered_param' | 'missing_entity_param' | 'static_has_params' | 'invalid_template'
33
+ /** Protocol-relative or double-slash path (open redirect / SSRF shape). */
34
+ | 'template_double_slash'
35
+ /** '.' or '..' path segments. */
36
+ | 'template_dot_segment'
37
+ /** Query string or fragment in a path template. */
38
+ | 'template_query_or_fragment'
39
+ /** Characters outside the allowed path/token charset. */
40
+ | 'template_illegal_charset';
41
+ message: string;
42
+ role?: string;
43
+ token?: string;
44
+ };
45
+ type ValidateManifestResult = {
46
+ ok: true;
47
+ manifest: ManifestV1;
48
+ } | {
49
+ ok: false;
50
+ errors: ValidateManifestError[];
51
+ };
52
+
53
+ /**
54
+ * Role vocabulary for the per-board route manifest (ADR-0090 D1).
55
+ *
56
+ * Parameterized roles mirror the helpers in `../paths`; static roles mirror
57
+ * `BOARD_PATHS` keys; `alertsManage` / `alertsConfirm` are promoted out of
58
+ * raw literals in the job-alerts composer.
59
+ *
60
+ * Pure + isomorphic — imports only the sibling paths module.
61
+ */
62
+
63
+ /** Every role the compiler can assign. */
64
+ type RouteRole = 'jobDetail' | 'jobsCategory' | 'jobsSkill' | 'jobsLocation' | 'company' | 'companyMarket' | 'companySalary' | 'salaryTitle' | 'salarySkill' | 'salaryLocation' | 'blogPost' | 'blogTag' | 'blogAuthor' | 'home' | 'jobs' | 'companies' | 'salaries' | 'salaryCompanies' | 'salaryTitles' | 'salarySkills' | 'salaryLocations' | 'blog' | 'about' | 'privacyPolicy' | 'termsOfService' | 'cookiePolicy' | 'impressum' | 'talent' | 'employers' | 'alertsManage' | 'alertsConfirm';
65
+ /**
66
+ * Exact param-name set per role, derived from each helper's signature.
67
+ * Empty arrays = static / zero-param roles (never inferred by signature).
68
+ */
69
+ declare const ROLE_PARAM_REGISTRY: Record<RouteRole, readonly string[]>;
70
+ /** Email-emitting roles — a missing one blocks publish (ADR-0090 D1/D6). */
71
+ declare const REQUIRED_ROLES: readonly RouteRole[];
72
+ /** All known roles (stable iteration order = registry key order). */
73
+ declare const ALL_ROLES: readonly RouteRole[];
74
+ declare function isRouteRole(value: string): value is RouteRole;
75
+ /**
76
+ * Identity manifest reproducing the current canonical structure from the
77
+ * paths module. Built by calling helpers with `:param` placeholders so the
78
+ * templates stay locked to the helpers (ADR-0070 / ADR-0090).
79
+ */
80
+ declare const CANONICAL_MANIFEST: ManifestV1;
81
+
82
+ export { ALL_ROLES as A, type ClassifyResult as C, type ManifestV1 as M, type RouteEntry as R, type ValidateManifestError as V, type RouteRole as a, type CompileResult as b, type ValidateManifestResult as c, type Ambiguity as d, CANONICAL_MANIFEST as e, REQUIRED_ROLES as f, ROLE_PARAM_REGISTRY as g, isRouteRole as i };
@@ -0,0 +1,82 @@
1
+ /**
2
+ * One discovered route. `template` uses URLPattern `:param` syntax
3
+ * (e.g. `/companies/:companySlug/jobs/:jobSlug`). Callers on other
4
+ * runtimes instantiate matchers; this module only emits strings.
5
+ */
6
+ type RouteEntry = {
7
+ template: string;
8
+ /** Absolute or project-relative source path — keys the marker map. */
9
+ sourcePath?: string;
10
+ };
11
+ /** Versioned role → template map. Additive schema evolution only. */
12
+ type ManifestV1 = {
13
+ version: 1;
14
+ roles: Partial<Record<RouteRole, string>>;
15
+ };
16
+ type Ambiguity = {
17
+ role: RouteRole;
18
+ candidates: RouteEntry[];
19
+ };
20
+ type ClassifyResult = {
21
+ assignments: Partial<Record<RouteRole, RouteEntry>>;
22
+ ambiguities: Ambiguity[];
23
+ missingRequired: RouteRole[];
24
+ };
25
+ type CompileResult = {
26
+ manifest: ManifestV1;
27
+ blockingMissing: RouteRole[];
28
+ warnings: string[];
29
+ ambiguities: Ambiguity[];
30
+ };
31
+ type ValidateManifestError = {
32
+ code: 'invalid_shape' | 'invalid_version' | 'unknown_role' | 'unregistered_param' | 'missing_entity_param' | 'static_has_params' | 'invalid_template'
33
+ /** Protocol-relative or double-slash path (open redirect / SSRF shape). */
34
+ | 'template_double_slash'
35
+ /** '.' or '..' path segments. */
36
+ | 'template_dot_segment'
37
+ /** Query string or fragment in a path template. */
38
+ | 'template_query_or_fragment'
39
+ /** Characters outside the allowed path/token charset. */
40
+ | 'template_illegal_charset';
41
+ message: string;
42
+ role?: string;
43
+ token?: string;
44
+ };
45
+ type ValidateManifestResult = {
46
+ ok: true;
47
+ manifest: ManifestV1;
48
+ } | {
49
+ ok: false;
50
+ errors: ValidateManifestError[];
51
+ };
52
+
53
+ /**
54
+ * Role vocabulary for the per-board route manifest (ADR-0090 D1).
55
+ *
56
+ * Parameterized roles mirror the helpers in `../paths`; static roles mirror
57
+ * `BOARD_PATHS` keys; `alertsManage` / `alertsConfirm` are promoted out of
58
+ * raw literals in the job-alerts composer.
59
+ *
60
+ * Pure + isomorphic — imports only the sibling paths module.
61
+ */
62
+
63
+ /** Every role the compiler can assign. */
64
+ type RouteRole = 'jobDetail' | 'jobsCategory' | 'jobsSkill' | 'jobsLocation' | 'company' | 'companyMarket' | 'companySalary' | 'salaryTitle' | 'salarySkill' | 'salaryLocation' | 'blogPost' | 'blogTag' | 'blogAuthor' | 'home' | 'jobs' | 'companies' | 'salaries' | 'salaryCompanies' | 'salaryTitles' | 'salarySkills' | 'salaryLocations' | 'blog' | 'about' | 'privacyPolicy' | 'termsOfService' | 'cookiePolicy' | 'impressum' | 'talent' | 'employers' | 'alertsManage' | 'alertsConfirm';
65
+ /**
66
+ * Exact param-name set per role, derived from each helper's signature.
67
+ * Empty arrays = static / zero-param roles (never inferred by signature).
68
+ */
69
+ declare const ROLE_PARAM_REGISTRY: Record<RouteRole, readonly string[]>;
70
+ /** Email-emitting roles — a missing one blocks publish (ADR-0090 D1/D6). */
71
+ declare const REQUIRED_ROLES: readonly RouteRole[];
72
+ /** All known roles (stable iteration order = registry key order). */
73
+ declare const ALL_ROLES: readonly RouteRole[];
74
+ declare function isRouteRole(value: string): value is RouteRole;
75
+ /**
76
+ * Identity manifest reproducing the current canonical structure from the
77
+ * paths module. Built by calling helpers with `:param` placeholders so the
78
+ * templates stay locked to the helpers (ADR-0070 / ADR-0090).
79
+ */
80
+ declare const CANONICAL_MANIFEST: ManifestV1;
81
+
82
+ export { ALL_ROLES as A, type ClassifyResult as C, type ManifestV1 as M, type RouteEntry as R, type ValidateManifestError as V, type RouteRole as a, type CompileResult as b, type ValidateManifestResult as c, type Ambiguity as d, CANONICAL_MANIFEST as e, REQUIRED_ROLES as f, ROLE_PARAM_REGISTRY as g, isRouteRole as i };
@@ -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.mjs';
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.mjs';
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 };