@mossbear/protocol 0.1.0-alpha.100

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 (143) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +7 -0
  3. package/dist/agentGuidancePaths.d.ts +101 -0
  4. package/dist/agentGuidancePaths.d.ts.map +1 -0
  5. package/dist/agentGuidancePaths.js +185 -0
  6. package/dist/agentGuidancePaths.js.map +1 -0
  7. package/dist/agentGuidancePaths.test.d.ts +2 -0
  8. package/dist/agentGuidancePaths.test.d.ts.map +1 -0
  9. package/dist/agentGuidancePaths.test.js +91 -0
  10. package/dist/agentGuidancePaths.test.js.map +1 -0
  11. package/dist/aliasPaths.d.ts +100 -0
  12. package/dist/aliasPaths.d.ts.map +1 -0
  13. package/dist/aliasPaths.js +148 -0
  14. package/dist/aliasPaths.js.map +1 -0
  15. package/dist/aliasPaths.test.d.ts +2 -0
  16. package/dist/aliasPaths.test.d.ts.map +1 -0
  17. package/dist/aliasPaths.test.js +80 -0
  18. package/dist/aliasPaths.test.js.map +1 -0
  19. package/dist/artifact.test.d.ts +2 -0
  20. package/dist/artifact.test.d.ts.map +1 -0
  21. package/dist/artifact.test.js +374 -0
  22. package/dist/artifact.test.js.map +1 -0
  23. package/dist/bundleSlug.d.ts +177 -0
  24. package/dist/bundleSlug.d.ts.map +1 -0
  25. package/dist/bundleSlug.js +233 -0
  26. package/dist/bundleSlug.js.map +1 -0
  27. package/dist/bundleSlug.test.d.ts +2 -0
  28. package/dist/bundleSlug.test.d.ts.map +1 -0
  29. package/dist/bundleSlug.test.js +197 -0
  30. package/dist/bundleSlug.test.js.map +1 -0
  31. package/dist/commentAnchor.d.ts +34 -0
  32. package/dist/commentAnchor.d.ts.map +1 -0
  33. package/dist/commentAnchor.js +122 -0
  34. package/dist/commentAnchor.js.map +1 -0
  35. package/dist/commentAnchor.test.d.ts +2 -0
  36. package/dist/commentAnchor.test.d.ts.map +1 -0
  37. package/dist/commentAnchor.test.js +48 -0
  38. package/dist/commentAnchor.test.js.map +1 -0
  39. package/dist/contextKinds.d.ts +165 -0
  40. package/dist/contextKinds.d.ts.map +1 -0
  41. package/dist/contextKinds.js +148 -0
  42. package/dist/contextKinds.js.map +1 -0
  43. package/dist/contextKinds.test.d.ts +2 -0
  44. package/dist/contextKinds.test.d.ts.map +1 -0
  45. package/dist/contextKinds.test.js +137 -0
  46. package/dist/contextKinds.test.js.map +1 -0
  47. package/dist/frameDocument.d.ts +71 -0
  48. package/dist/frameDocument.d.ts.map +1 -0
  49. package/dist/frameDocument.js +140 -0
  50. package/dist/frameDocument.js.map +1 -0
  51. package/dist/frameDocument.test.d.ts +2 -0
  52. package/dist/frameDocument.test.d.ts.map +1 -0
  53. package/dist/frameDocument.test.js +84 -0
  54. package/dist/frameDocument.test.js.map +1 -0
  55. package/dist/frameProtocol.d.ts +11 -0
  56. package/dist/frameProtocol.d.ts.map +1 -0
  57. package/dist/frameProtocol.js +11 -0
  58. package/dist/frameProtocol.js.map +1 -0
  59. package/dist/index.d.ts +24 -0
  60. package/dist/index.d.ts.map +1 -0
  61. package/dist/index.js +24 -0
  62. package/dist/index.js.map +1 -0
  63. package/dist/limits.d.ts +19 -0
  64. package/dist/limits.d.ts.map +1 -0
  65. package/dist/limits.js +19 -0
  66. package/dist/limits.js.map +1 -0
  67. package/dist/markdownSections.d.ts +58 -0
  68. package/dist/markdownSections.d.ts.map +1 -0
  69. package/dist/markdownSections.js +102 -0
  70. package/dist/markdownSections.js.map +1 -0
  71. package/dist/markdownSections.test.d.ts +2 -0
  72. package/dist/markdownSections.test.d.ts.map +1 -0
  73. package/dist/markdownSections.test.js +95 -0
  74. package/dist/markdownSections.test.js.map +1 -0
  75. package/dist/pairing.d.ts +183 -0
  76. package/dist/pairing.d.ts.map +1 -0
  77. package/dist/pairing.js +175 -0
  78. package/dist/pairing.js.map +1 -0
  79. package/dist/pairing.test.d.ts +2 -0
  80. package/dist/pairing.test.d.ts.map +1 -0
  81. package/dist/pairing.test.js +105 -0
  82. package/dist/pairing.test.js.map +1 -0
  83. package/dist/photos.d.ts +146 -0
  84. package/dist/photos.d.ts.map +1 -0
  85. package/dist/photos.js +127 -0
  86. package/dist/photos.js.map +1 -0
  87. package/dist/publicModelCatalog.d.ts +19 -0
  88. package/dist/publicModelCatalog.d.ts.map +1 -0
  89. package/dist/publicModelCatalog.generated.d.ts +2 -0
  90. package/dist/publicModelCatalog.generated.d.ts.map +1 -0
  91. package/dist/publicModelCatalog.generated.js +489 -0
  92. package/dist/publicModelCatalog.generated.js.map +1 -0
  93. package/dist/publicModelCatalog.js +68 -0
  94. package/dist/publicModelCatalog.js.map +1 -0
  95. package/dist/publicModelCatalog.test.d.ts +2 -0
  96. package/dist/publicModelCatalog.test.d.ts.map +1 -0
  97. package/dist/publicModelCatalog.test.js +88 -0
  98. package/dist/publicModelCatalog.test.js.map +1 -0
  99. package/dist/publicModelNativeAliases.d.ts +5 -0
  100. package/dist/publicModelNativeAliases.d.ts.map +1 -0
  101. package/dist/publicModelNativeAliases.js +8 -0
  102. package/dist/publicModelNativeAliases.js.map +1 -0
  103. package/dist/schemas.d.ts +10745 -0
  104. package/dist/schemas.d.ts.map +1 -0
  105. package/dist/schemas.js +4572 -0
  106. package/dist/schemas.js.map +1 -0
  107. package/dist/schemas.test.d.ts +2 -0
  108. package/dist/schemas.test.d.ts.map +1 -0
  109. package/dist/schemas.test.js +1617 -0
  110. package/dist/schemas.test.js.map +1 -0
  111. package/dist/steeringOverTime.d.ts +30 -0
  112. package/dist/steeringOverTime.d.ts.map +1 -0
  113. package/dist/steeringOverTime.js +19 -0
  114. package/dist/steeringOverTime.js.map +1 -0
  115. package/dist/types.d.ts +109 -0
  116. package/dist/types.d.ts.map +1 -0
  117. package/dist/types.js +12 -0
  118. package/dist/types.js.map +1 -0
  119. package/dist/usageOnly.d.ts +190 -0
  120. package/dist/usageOnly.d.ts.map +1 -0
  121. package/dist/usageOnly.js +53 -0
  122. package/dist/usageOnly.js.map +1 -0
  123. package/dist/usageOnly.test.d.ts +2 -0
  124. package/dist/usageOnly.test.d.ts.map +1 -0
  125. package/dist/usageOnly.test.js +203 -0
  126. package/dist/usageOnly.test.js.map +1 -0
  127. package/dist/version.d.ts +47 -0
  128. package/dist/version.d.ts.map +1 -0
  129. package/dist/version.js +125 -0
  130. package/dist/version.js.map +1 -0
  131. package/dist/version.test.d.ts +2 -0
  132. package/dist/version.test.d.ts.map +1 -0
  133. package/dist/version.test.js +86 -0
  134. package/dist/version.test.js.map +1 -0
  135. package/dist/whatSyncs.d.ts +62 -0
  136. package/dist/whatSyncs.d.ts.map +1 -0
  137. package/dist/whatSyncs.js +228 -0
  138. package/dist/whatSyncs.js.map +1 -0
  139. package/dist/whatSyncs.test.d.ts +2 -0
  140. package/dist/whatSyncs.test.d.ts.map +1 -0
  141. package/dist/whatSyncs.test.js +113 -0
  142. package/dist/whatSyncs.test.js.map +1 -0
  143. package/package.json +52 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifact.test.js","sourceRoot":"","sources":["../src/artifact.test.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,EAC1B,6BAA6B,EAC7B,+BAA+B,EAC/B,cAAc,EACd,uBAAuB,EACvB,6BAA6B,EAC7B,cAAc,EACd,6BAA6B,EAC7B,2BAA2B,EAC3B,wBAAwB,EACxB,2BAA2B,EAC3B,uBAAuB,EACvB,0BAA0B,EAC1B,6BAA6B,EAC7B,8BAA8B,EAC9B,2BAA2B,EAC3B,gCAAgC,GACjC,MAAM,cAAc,CAAA;AAErB,MAAM,QAAQ,GAAG;IACf,EAAE,EAAE,QAAQ;IACZ,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,UAAU;IAClB,O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AE,CAAC,QAAQ,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAC9E,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACZ,MAAM,CAAC,EAAE,CAAC,2BAA2B,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAC/E,IAAI,CACL,CAAA;IACH,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -0,0 +1,177 @@
1
+ /**
2
+ * Bundle slug derivation — shared because every client that can create a bundle
3
+ * must produce a slug the server's `BundleSlugSchema` accepts, and there is one
4
+ * such rule. The dashboard's create row and the MCP `create_bundle` tool both
5
+ * call this; the server's unique index stays the authority on collisions.
6
+ */
7
+ /**
8
+ * The per-user bundle every imported guide is enrolled in
9
+ * (`unified-item-sync-plan.md` → Slice 0). Delivery is about to become
10
+ * bundle-members-only, and an imported guide starts with zero memberships, so
11
+ * without a default every existing guide would stop reaching every repo.
12
+ *
13
+ * **Well-known, and as of `inbox-as-view` slice 5 there is no other kind.** No
14
+ * slug is reserved any more: `inbox` was the last one, held open only while
15
+ * slice 3b's `unfiled` carve-out keyed on it, and both are gone. This bundle
16
+ * needs no lifecycle of its own either — it is an ordinary user bundle that
17
+ * happens to be pre-populated, and a user who renames it, prunes it or
18
+ * unsubscribes from it is expressing a real preference rather than corrupting
19
+ * an invariant.
20
+ *
21
+ * The consequence of not reserving it: a user who already owns a bundle at this
22
+ * slug has it adopted as their default rather than getting a second one at
23
+ * `my-guides-2`. That is the better outcome — a bundle the user already calls
24
+ * "my guides" is the bundle their guides belong in.
25
+ *
26
+ * Shared because both sides need it: the server materializes it, and the CLI
27
+ * discovers it by slug in the bundle listing to learn its **id**, which is what
28
+ * a committed subscription stores (plan → "A subscription names a bundle id,
29
+ * not a slug").
30
+ *
31
+ * **The account's *personal* bundle, since Decision 17** — a workspace's is
32
+ * named after its workspace. {@link defaultGuidesBundleFor} is the rule; these
33
+ * two constants are its personal branch and are read nowhere else.
34
+ */
35
+ export declare const DEFAULT_GUIDES_SLUG = "my-guides";
36
+ /** Display name minted alongside {@link DEFAULT_GUIDES_SLUG}. */
37
+ export declare const DEFAULT_GUIDES_NAME = "My guides";
38
+ /** Longest bundle slug the server accepts. */
39
+ export declare const BUNDLE_SLUG_MAX_LENGTH = 64;
40
+ /** Lowercase alphanumerics and hyphens, starting alphanumeric. */
41
+ export declare const BUNDLE_SLUG_PATTERN: RegExp;
42
+ /**
43
+ * Whether `value` is a bundle slug the server accepts. `BundleSlugSchema`
44
+ * (`schemas.ts`) is built on this, so there is one rule. It is a plain function
45
+ * with no imports, so a build-time script can call it without installing the
46
+ * package.
47
+ */
48
+ export declare function isBundleSlug(value: string): boolean;
49
+ /**
50
+ * Derive a URL-safe bundle slug from a user-typed name, suffixing `-2`, `-3`…
51
+ * until it stops colliding with `taken`. No slug is reserved — `inbox-as-view`
52
+ * slice 5 retired the last one along with the carve-out that needed it — so
53
+ * `taken` is the whole rule. The server's unique index is still the authority;
54
+ * this only picks a candidate the common case won't bounce.
55
+ */
56
+ export declare function deriveBundleSlug(name: string, taken: ReadonlySet<string>): string;
57
+ /**
58
+ * The slug and name of the account's default guides bundle **in one workspace**
59
+ * (Decision 17 of the workspace-declaration design, founder 2026-09-04).
60
+ *
61
+ * Decision 13 gave an account one capture bundle per workspace, and the mint
62
+ * gave every one of them {@link DEFAULT_GUIDES_SLUG}. So the first import from a
63
+ * repo that declares a shared workspace left the account holding two bundles at
64
+ * one slug, and the CLI's directory disambiguation suffixes *every* member of a
65
+ * colliding group — renaming the user's existing `.mossbear/context/my-guides/`
66
+ * on their next sync and turning `mossbear pull my-guides` into a named
67
+ * refusal. Neither is wrong on its own: two bundles that genuinely collide
68
+ * should be disambiguated. These two should never have collided.
69
+ *
70
+ * So the personal workspace's bundle keeps `my-guides` — it is the one
71
+ * `users.default_bundle_id` names, and the one every existing repo's
72
+ * `.mossbear/context/my-guides/` came from — and every other workspace's is
73
+ * named after its workspace. The fix is here rather than in the CLI because
74
+ * this is where the two names are chosen.
75
+ *
76
+ * **`isPersonal` is the caller's answer, not a lookup.** It is
77
+ * `users.default_workspace_id === workspaceId`, and both server callers — the
78
+ * bundle resolver and the unlink route — already read that column for other
79
+ * reasons. Passing it keeps this function total: the same inputs always give
80
+ * the same pair, which is what lets a data migration reuse the rule without a
81
+ * database handle.
82
+ *
83
+ * Workspace slugs are url-safe by construction — the column is written only by
84
+ * the two creators, both of which normalize — and set at creation, with no
85
+ * route that renames one. So on the slug side the only rule left to respect is
86
+ * `BundleSlugSchema`'s 64-character cap.
87
+ *
88
+ * **The name side is different, and is why `displayable` exists.** A workspace
89
+ * *name* is free text typed by whoever created the workspace, and this is the
90
+ * first thing that turns one person's text into *another* person's bundle name:
91
+ * a member who imports from a repo declaring a shared workspace gets a bundle
92
+ * of their own named after it. Bundle names are printed straight into a
93
+ * terminal by the CLI — `unlink` renders each still-delivering bundle by name —
94
+ * so a carriage return or an ANSI escape in the workspace name would let its
95
+ * author rewrite the line a *teammate* reads about what is still reaching their
96
+ * agents. Stripped here because this is the point where the two meet.
97
+ *
98
+ * **The boundary refuses these now too, and this strip still stays.** The
99
+ * create-workspace body schema, `CreateBundleRequestSchema` and
100
+ * `UpdateBundleRequestSchema` each run a user-typed display name through
101
+ * {@link displayNameSchema} (`schemas.ts`), which *rejects* every character in
102
+ * {@link DISPLAY_NAME_REFUSED_CHARACTERS} rather than stripping it — a user
103
+ * typing a name is present and can be told, which a derivation cannot do. This
104
+ * one keeps stripping for the two reasons that survive that boundary: it has
105
+ * no user to report to, and a workspace row stored before the boundary existed
106
+ * can still carry one.
107
+ */
108
+ export declare function defaultGuidesBundleFor(workspace: {
109
+ slug: string;
110
+ name: string;
111
+ isPersonal: boolean;
112
+ }): {
113
+ slug: string;
114
+ name: string;
115
+ };
116
+ /**
117
+ * What a display name refuses — the one definition of "a character a reader
118
+ * cannot be shown", read by `displayNameSchema` (`schemas.ts`) to refuse and by
119
+ * {@link displayable} to strip, so the boundary and the derivation agree.
120
+ *
121
+ * - `\p{Cc}`: the control characters. ESC arms an ANSI sequence; CR rewinds
122
+ * the cursor, so the line a user reads can be made to say something other
123
+ * than what happened.
124
+ * - U+202A–U+202E: the explicit bidi embeddings and overrides (LRE, RLE, PDF,
125
+ * LRO, RLO), which reorder a rendered line without changing a byte of it.
126
+ * - U+2066–U+2069: the bidi isolates (LRI, RLI, FSI, PDI), the same power in
127
+ * its newer spelling.
128
+ *
129
+ * **Deliberately not the rest of `\p{Cf}`** (Decision 18, founder 2026-09-05).
130
+ * The first version of this rule refused the whole category, which kept the
131
+ * bidi controls out at the cost of refusing U+200C/U+200D — the zero-width
132
+ * joiners Persian, Hindi and Bengali need to render at all, and the join that
133
+ * makes a multi-person emoji one glyph — along with the soft hyphen and every
134
+ * other format character that moves no cursor. Those are admitted now. What a
135
+ * name made *only* of them looks like is the schema's concern, not this
136
+ * class's: it separately requires one character outside `\p{Cf}`.
137
+ */
138
+ export declare const DISPLAY_NAME_REFUSED_CHARACTERS: RegExp;
139
+ /**
140
+ * A name safe to print into a terminal line: every character in
141
+ * {@link DISPLAY_NAME_REFUSED_CHARACTERS} removed, whitespace runs collapsed,
142
+ * ends trimmed. A zero-width joiner survives — it is part of how the name is
143
+ * spelled, not a way to redraw the line.
144
+ *
145
+ * Removed rather than escaped or refused: the caller is a derivation with no
146
+ * user to report to, and a workspace whose name carries an ANSI escape is,
147
+ * as far as a bundle name is concerned, a workspace named without it.
148
+ *
149
+ * Exported because a second derivation reads it: a guide title comes from the
150
+ * user's markdown at import, where nobody is present to be refused either.
151
+ */
152
+ export declare function displayable(name: string): string;
153
+ /**
154
+ * A *body* safe to print into a terminal: every character in
155
+ * {@link DISPLAY_NAME_REFUSED_CHARACTERS} removed **except `\n` and `\t`**, and
156
+ * nothing else touched — no whitespace collapsed, no ends trimmed.
157
+ *
158
+ * **Why this exists next to {@link displayable} rather than reusing it.** The
159
+ * two answer the same threat and disagree about one thing: what the rest of the
160
+ * string is worth. A name is one line, so collapsing whitespace runs and
161
+ * trimming the ends is a repair. A guide body is markdown, where a run of
162
+ * spaces is an indented code block, a tab is indentation and a newline is the
163
+ * document — collapsing them would corrupt what the user wrote in order to
164
+ * print it, which is a worse outcome than the escape it was defending against.
165
+ * So this one removes exactly the characters that can redraw a terminal line
166
+ * and returns every other byte unchanged.
167
+ *
168
+ * `\n` and `\t` are the two the class refuses that move a cursor **only
169
+ * forward**: neither can rewind the line already printed or arm a sequence. CR
170
+ * is not among them and is removed, along with ESC and the bidi overrides.
171
+ *
172
+ * A render-site strip, never a store-side one: the body is served byte for byte
173
+ * by design, and the guide title printed above it is already cleaned where the
174
+ * server derives it.
175
+ */
176
+ export declare function printable(body: string): string;
177
+ //# sourceMappingURL=bundleSlug.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundleSlug.d.ts","sourceRoot":"","sources":["../src/bundleSlug.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,mBAAmB,cAAc,CAAA;AAE9C,iEAAiE;AACjE,eAAO,MAAM,mBAAmB,cAAc,CAAA;AAE9C,8CAA8C;AAC9C,eAAO,MAAM,sBAAsB,KAAK,CAAA;AAExC,kEAAkE;AAClE,eAAO,MAAM,mBAAmB,QAAyB,CAAA;AAEzD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAMnD;AAgBD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,CAUjF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE;IAChD,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,OAAO,CAAA;CACpB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAuBjC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,+BAA+B,QAAwC,CAAA;AAKpF;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEhD;AAaD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9C"}
@@ -0,0 +1,233 @@
1
+ /**
2
+ * Bundle slug derivation — shared because every client that can create a bundle
3
+ * must produce a slug the server's `BundleSlugSchema` accepts, and there is one
4
+ * such rule. The dashboard's create row and the MCP `create_bundle` tool both
5
+ * call this; the server's unique index stays the authority on collisions.
6
+ */
7
+ /**
8
+ * The per-user bundle every imported guide is enrolled in
9
+ * (`unified-item-sync-plan.md` → Slice 0). Delivery is about to become
10
+ * bundle-members-only, and an imported guide starts with zero memberships, so
11
+ * without a default every existing guide would stop reaching every repo.
12
+ *
13
+ * **Well-known, and as of `inbox-as-view` slice 5 there is no other kind.** No
14
+ * slug is reserved any more: `inbox` was the last one, held open only while
15
+ * slice 3b's `unfiled` carve-out keyed on it, and both are gone. This bundle
16
+ * needs no lifecycle of its own either — it is an ordinary user bundle that
17
+ * happens to be pre-populated, and a user who renames it, prunes it or
18
+ * unsubscribes from it is expressing a real preference rather than corrupting
19
+ * an invariant.
20
+ *
21
+ * The consequence of not reserving it: a user who already owns a bundle at this
22
+ * slug has it adopted as their default rather than getting a second one at
23
+ * `my-guides-2`. That is the better outcome — a bundle the user already calls
24
+ * "my guides" is the bundle their guides belong in.
25
+ *
26
+ * Shared because both sides need it: the server materializes it, and the CLI
27
+ * discovers it by slug in the bundle listing to learn its **id**, which is what
28
+ * a committed subscription stores (plan → "A subscription names a bundle id,
29
+ * not a slug").
30
+ *
31
+ * **The account's *personal* bundle, since Decision 17** — a workspace's is
32
+ * named after its workspace. {@link defaultGuidesBundleFor} is the rule; these
33
+ * two constants are its personal branch and are read nowhere else.
34
+ */
35
+ export const DEFAULT_GUIDES_SLUG = 'my-guides';
36
+ /** Display name minted alongside {@link DEFAULT_GUIDES_SLUG}. */
37
+ export const DEFAULT_GUIDES_NAME = 'My guides';
38
+ /** Longest bundle slug the server accepts. */
39
+ export const BUNDLE_SLUG_MAX_LENGTH = 64;
40
+ /** Lowercase alphanumerics and hyphens, starting alphanumeric. */
41
+ export const BUNDLE_SLUG_PATTERN = /^[a-z0-9][a-z0-9-]*$/;
42
+ /**
43
+ * Whether `value` is a bundle slug the server accepts. `BundleSlugSchema`
44
+ * (`schemas.ts`) is built on this, so there is one rule. It is a plain function
45
+ * with no imports, so a build-time script can call it without installing the
46
+ * package.
47
+ */
48
+ export function isBundleSlug(value) {
49
+ return (value.length >= 1 &&
50
+ value.length <= BUNDLE_SLUG_MAX_LENGTH &&
51
+ BUNDLE_SLUG_PATTERN.test(value));
52
+ }
53
+ /** What {@link defaultGuidesBundleFor} appends to a workspace's own slug. */
54
+ const GUIDES_SUFFIX = '-guides';
55
+ function normalize(name) {
56
+ return name
57
+ .normalize('NFKD')
58
+ .replace(/[̀-ͯ]/g, '')
59
+ .toLowerCase()
60
+ .replace(/[^a-z0-9]+/g, '-')
61
+ .replace(/^-+|-+$/g, '')
62
+ .slice(0, BUNDLE_SLUG_MAX_LENGTH)
63
+ .replace(/-+$/g, '');
64
+ }
65
+ /**
66
+ * Derive a URL-safe bundle slug from a user-typed name, suffixing `-2`, `-3`…
67
+ * until it stops colliding with `taken`. No slug is reserved — `inbox-as-view`
68
+ * slice 5 retired the last one along with the carve-out that needed it — so
69
+ * `taken` is the whole rule. The server's unique index is still the authority;
70
+ * this only picks a candidate the common case won't bounce.
71
+ */
72
+ export function deriveBundleSlug(name, taken) {
73
+ const base = normalize(name) || 'bundle';
74
+ const isFree = (slug) => !taken.has(slug);
75
+ if (isFree(base))
76
+ return base;
77
+ for (let n = 2;; n++) {
78
+ const suffix = `-${n}`;
79
+ const candidate = base.slice(0, BUNDLE_SLUG_MAX_LENGTH - suffix.length) + suffix;
80
+ if (isFree(candidate))
81
+ return candidate;
82
+ }
83
+ }
84
+ /**
85
+ * The slug and name of the account's default guides bundle **in one workspace**
86
+ * (Decision 17 of the workspace-declaration design, founder 2026-09-04).
87
+ *
88
+ * Decision 13 gave an account one capture bundle per workspace, and the mint
89
+ * gave every one of them {@link DEFAULT_GUIDES_SLUG}. So the first import from a
90
+ * repo that declares a shared workspace left the account holding two bundles at
91
+ * one slug, and the CLI's directory disambiguation suffixes *every* member of a
92
+ * colliding group — renaming the user's existing `.mossbear/context/my-guides/`
93
+ * on their next sync and turning `mossbear pull my-guides` into a named
94
+ * refusal. Neither is wrong on its own: two bundles that genuinely collide
95
+ * should be disambiguated. These two should never have collided.
96
+ *
97
+ * So the personal workspace's bundle keeps `my-guides` — it is the one
98
+ * `users.default_bundle_id` names, and the one every existing repo's
99
+ * `.mossbear/context/my-guides/` came from — and every other workspace's is
100
+ * named after its workspace. The fix is here rather than in the CLI because
101
+ * this is where the two names are chosen.
102
+ *
103
+ * **`isPersonal` is the caller's answer, not a lookup.** It is
104
+ * `users.default_workspace_id === workspaceId`, and both server callers — the
105
+ * bundle resolver and the unlink route — already read that column for other
106
+ * reasons. Passing it keeps this function total: the same inputs always give
107
+ * the same pair, which is what lets a data migration reuse the rule without a
108
+ * database handle.
109
+ *
110
+ * Workspace slugs are url-safe by construction — the column is written only by
111
+ * the two creators, both of which normalize — and set at creation, with no
112
+ * route that renames one. So on the slug side the only rule left to respect is
113
+ * `BundleSlugSchema`'s 64-character cap.
114
+ *
115
+ * **The name side is different, and is why `displayable` exists.** A workspace
116
+ * *name* is free text typed by whoever created the workspace, and this is the
117
+ * first thing that turns one person's text into *another* person's bundle name:
118
+ * a member who imports from a repo declaring a shared workspace gets a bundle
119
+ * of their own named after it. Bundle names are printed straight into a
120
+ * terminal by the CLI — `unlink` renders each still-delivering bundle by name —
121
+ * so a carriage return or an ANSI escape in the workspace name would let its
122
+ * author rewrite the line a *teammate* reads about what is still reaching their
123
+ * agents. Stripped here because this is the point where the two meet.
124
+ *
125
+ * **The boundary refuses these now too, and this strip still stays.** The
126
+ * create-workspace body schema, `CreateBundleRequestSchema` and
127
+ * `UpdateBundleRequestSchema` each run a user-typed display name through
128
+ * {@link displayNameSchema} (`schemas.ts`), which *rejects* every character in
129
+ * {@link DISPLAY_NAME_REFUSED_CHARACTERS} rather than stripping it — a user
130
+ * typing a name is present and can be told, which a derivation cannot do. This
131
+ * one keeps stripping for the two reasons that survive that boundary: it has
132
+ * no user to report to, and a workspace row stored before the boundary existed
133
+ * can still carry one.
134
+ */
135
+ export function defaultGuidesBundleFor(workspace) {
136
+ if (workspace.isPersonal) {
137
+ return { slug: DEFAULT_GUIDES_SLUG, name: DEFAULT_GUIDES_NAME };
138
+ }
139
+ // Truncate the workspace's half rather than the whole result, so the suffix
140
+ // that says what this bundle *is* survives a long workspace slug. Trailing
141
+ // hyphens go for the reason `deriveBundleSlug` strips them: a cut can land
142
+ // mid-word and `foo--guides` is uglier than it needs to be.
143
+ const base = workspace.slug
144
+ .slice(0, BUNDLE_SLUG_MAX_LENGTH - GUIDES_SUFFIX.length)
145
+ .replace(/-+$/g, '');
146
+ // A workspace slug is never empty in practice — the column is NOT NULL and
147
+ // both creators derive a non-empty value — but a bare `-guides` would fail
148
+ // `BundleSlugSchema`'s "starts alphanumeric" rule, so the fallback is one
149
+ // token rather than an invariant every caller has to trust.
150
+ return {
151
+ slug: `${base || 'workspace'}${GUIDES_SUFFIX}`,
152
+ // `|| 'Workspace'` for the same reason the slug has a fallback: a workspace
153
+ // row stored before the boundary refused these can be named with nothing
154
+ // but control characters, and stripping them would leave a bundle called
155
+ // " guides".
156
+ name: `${displayable(workspace.name) || 'Workspace'} guides`,
157
+ };
158
+ }
159
+ /**
160
+ * What a display name refuses — the one definition of "a character a reader
161
+ * cannot be shown", read by `displayNameSchema` (`schemas.ts`) to refuse and by
162
+ * {@link displayable} to strip, so the boundary and the derivation agree.
163
+ *
164
+ * - `\p{Cc}`: the control characters. ESC arms an ANSI sequence; CR rewinds
165
+ * the cursor, so the line a user reads can be made to say something other
166
+ * than what happened.
167
+ * - U+202A–U+202E: the explicit bidi embeddings and overrides (LRE, RLE, PDF,
168
+ * LRO, RLO), which reorder a rendered line without changing a byte of it.
169
+ * - U+2066–U+2069: the bidi isolates (LRI, RLI, FSI, PDI), the same power in
170
+ * its newer spelling.
171
+ *
172
+ * **Deliberately not the rest of `\p{Cf}`** (Decision 18, founder 2026-09-05).
173
+ * The first version of this rule refused the whole category, which kept the
174
+ * bidi controls out at the cost of refusing U+200C/U+200D — the zero-width
175
+ * joiners Persian, Hindi and Bengali need to render at all, and the join that
176
+ * makes a multi-person emoji one glyph — along with the soft hyphen and every
177
+ * other format character that moves no cursor. Those are admitted now. What a
178
+ * name made *only* of them looks like is the schema's concern, not this
179
+ * class's: it separately requires one character outside `\p{Cf}`.
180
+ */
181
+ export const DISPLAY_NAME_REFUSED_CHARACTERS = /[\p{Cc}\u202A-\u202E\u2066-\u2069]/u;
182
+ /** {@link DISPLAY_NAME_REFUSED_CHARACTERS} as a global matcher, for stripping. */
183
+ const STRIP_REFUSED_CHARACTERS = new RegExp(DISPLAY_NAME_REFUSED_CHARACTERS.source, 'gu');
184
+ /**
185
+ * A name safe to print into a terminal line: every character in
186
+ * {@link DISPLAY_NAME_REFUSED_CHARACTERS} removed, whitespace runs collapsed,
187
+ * ends trimmed. A zero-width joiner survives — it is part of how the name is
188
+ * spelled, not a way to redraw the line.
189
+ *
190
+ * Removed rather than escaped or refused: the caller is a derivation with no
191
+ * user to report to, and a workspace whose name carries an ANSI escape is,
192
+ * as far as a bundle name is concerned, a workspace named without it.
193
+ *
194
+ * Exported because a second derivation reads it: a guide title comes from the
195
+ * user's markdown at import, where nobody is present to be refused either.
196
+ */
197
+ export function displayable(name) {
198
+ return name.replace(STRIP_REFUSED_CHARACTERS, '').replace(/\s+/g, ' ').trim();
199
+ }
200
+ /**
201
+ * {@link DISPLAY_NAME_REFUSED_CHARACTERS} minus the two control characters a
202
+ * body is made of. Built from the same source so the class has one definition:
203
+ * a lookahead in front of the shared character class, which is a single class
204
+ * and so takes one.
205
+ */
206
+ const STRIP_REFUSED_CHARACTERS_IN_BODY = new RegExp(`(?![\\n\\t])${DISPLAY_NAME_REFUSED_CHARACTERS.source}`, 'gu');
207
+ /**
208
+ * A *body* safe to print into a terminal: every character in
209
+ * {@link DISPLAY_NAME_REFUSED_CHARACTERS} removed **except `\n` and `\t`**, and
210
+ * nothing else touched — no whitespace collapsed, no ends trimmed.
211
+ *
212
+ * **Why this exists next to {@link displayable} rather than reusing it.** The
213
+ * two answer the same threat and disagree about one thing: what the rest of the
214
+ * string is worth. A name is one line, so collapsing whitespace runs and
215
+ * trimming the ends is a repair. A guide body is markdown, where a run of
216
+ * spaces is an indented code block, a tab is indentation and a newline is the
217
+ * document — collapsing them would corrupt what the user wrote in order to
218
+ * print it, which is a worse outcome than the escape it was defending against.
219
+ * So this one removes exactly the characters that can redraw a terminal line
220
+ * and returns every other byte unchanged.
221
+ *
222
+ * `\n` and `\t` are the two the class refuses that move a cursor **only
223
+ * forward**: neither can rewind the line already printed or arm a sequence. CR
224
+ * is not among them and is removed, along with ESC and the bidi overrides.
225
+ *
226
+ * A render-site strip, never a store-side one: the body is served byte for byte
227
+ * by design, and the guide title printed above it is already cleaned where the
228
+ * server derives it.
229
+ */
230
+ export function printable(body) {
231
+ return body.replace(STRIP_REFUSED_CHARACTERS_IN_BODY, '');
232
+ }
233
+ //# sourceMappingURL=bundleSlug.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundleSlug.js","sourceRoot":"","sources":["../src/bundleSlug.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,CAAC,MAAM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AAC,wBAAwB,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAA;AAC/E,CAAC;AAED;;;;;GAKG;AACH,MAAM,gCAAgC,GAAG,IAAI,MAAM,CACjD,eAAe,+BAA+B,CAAC,MAAM,EAAE,EACvD,IAAI,CACL,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,SAAS,CAAC,IAAY;IACpC,OAAO,IAAI,CAAC,OAAO,CAAC,gCAAgC,EAAE,EAAE,CAAC,CAAA;AAC3D,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=bundleSlug.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundleSlug.test.d.ts","sourceRoot":"","sources":["../src/bundleSlug.test.ts"],"names":[],"mappings":""}