dsh-cherry-bridge 0.1.6 → 0.1.8
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.
- package/README.en.md +30 -16
- package/README.md +19 -11
- package/dist/index.mjs +253 -45
- package/package.json +1 -1
- package/src/defaults.ts +21 -0
- package/src/tools.ts +423 -78
package/src/defaults.ts
CHANGED
|
@@ -137,3 +137,24 @@ export const INTERACTIONS_LIST_PAGE_CLAMP = Math.floor(
|
|
|
137
137
|
|
|
138
138
|
/** Items per every other aggregated list page (agents/sessions/messages). */
|
|
139
139
|
export const LIST_PAGE_CLAMP = 16
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Hard ceiling on ONE resume token (issues #70 and #74), in characters.
|
|
143
|
+
*
|
|
144
|
+
* BOTH faces take a token back from the caller — `cursor` on the four list
|
|
145
|
+
* tools, `messagesResumeCursor` on `cherry_read` — and both tail it with a
|
|
146
|
+
* peer-supplied position whose length we do not control: the desktop's session
|
|
147
|
+
* cursor is `entity:<orderKey>:<uuid>` (~57 characters), a message cursor
|
|
148
|
+
* `<ms>:<uuid>`, the numeric `pageOf` faces a handful of digits, and a future
|
|
149
|
+
* desktop may use something longer — but nothing legitimate comes near this.
|
|
150
|
+
* The bound exists so a hand-built or model-mangled string is refused by a
|
|
151
|
+
* BOUND instead of being split, hashed and carried to the peer, and so both
|
|
152
|
+
* parameters can declare `maxLength` honestly. ONE number for both faces: it
|
|
153
|
+
* bounds caller INPUT, not what a token means.
|
|
154
|
+
*
|
|
155
|
+
* The emit side enforces it too (#76): a stop point whose token would exceed
|
|
156
|
+
* this is not named at all, because a token this tool refuses to replay is
|
|
157
|
+
* worse than no token — `truncated` still says the walk was cut. One number,
|
|
158
|
+
* judged in both directions.
|
|
159
|
+
*/
|
|
160
|
+
export const MAX_RESUME_TOKEN_CHARS = 4_096
|