@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,228 @@
1
+ /**
2
+ * The what-syncs disclosure: session evidence, selected content uploads, and
3
+ * the transcript processing that happens before session sync.
4
+ *
5
+ * One source, two surfaces. The dashboard's privacy panel renders this through
6
+ * its localisation layer, and `mossbear what-syncs` prints it at the terminal —
7
+ * a terminal-only user never opens the dashboard, so a disclosure that lived
8
+ * only there was invisible to exactly the reader most likely to ask. Both read
9
+ * the tables below rather than carrying their own copy, so they cannot disagree
10
+ * about what is sent.
11
+ *
12
+ * The session field lists are cross-checked against the CLI→server session
13
+ * schema (`DashboardSyncRequestSchema`). This guard covers field names, not
14
+ * the meaning of their text or separate content uploads:
15
+ * - {@link SyncedPayloadKey} is derived from the exported `DashboardSyncRequest`
16
+ * type, so a new top-level sync array becomes a compile error until the
17
+ * manifest (a `Record` keyed by every wire key) documents it.
18
+ * - {@link missingSyncDisclosureKeys} is a runtime belt-and-suspenders guard
19
+ * asserted by the unit test.
20
+ *
21
+ * Field lists are exhaustive per the `Dashboard*Schema` definitions in
22
+ * `schemas.ts` — under-disclosing on a trust surface would be worse than showing
23
+ * an internal identifier.
24
+ *
25
+ * Plain data on purpose: no React, no localisation, no terminal. Each surface
26
+ * owns its own rendering of these strings.
27
+ */
28
+ import { DashboardSyncRequestSchema } from './schemas.js';
29
+ /** The wire keys actually present on the schema at runtime. */
30
+ export const SYNCED_PAYLOAD_KEYS = Object.keys(DashboardSyncRequestSchema.entries).sort();
31
+ /**
32
+ * Every session-sync field, per payload category, with the
33
+ * sentence a reader sees for it. Keyed as a `Record<SyncedPayloadKey, ...>` so
34
+ * adding a wire key to the protocol fails to compile until it's documented
35
+ * here. Nested fields (e.g. token usage) are shown with dotted paths to stay
36
+ * honest about structure.
37
+ */
38
+ const SYNCED = {
39
+ actions: {
40
+ label: 'Verdicts, action summaries & redacted transcript excerpts',
41
+ fields: [
42
+ 'id',
43
+ 'sessionId',
44
+ 'agentSessionId',
45
+ 'actionType',
46
+ 'summary',
47
+ 'filePaths',
48
+ 'verdict',
49
+ 'gradingTier',
50
+ 'guideIds',
51
+ 'violatedGuideId',
52
+ 'evalReasoning',
53
+ 'metadata',
54
+ // Transcript evidence: the user turn and the adjacent assistant prose,
55
+ // both prose-redacted on the machine before upload, with code blocks
56
+ // removed structurally and tool-result bodies never included (the
57
+ // transcript-content-classes design, founder call 2026-08-13).
58
+ //
59
+ // Listed here in the same change that put the field on the wire,
60
+ // because the drift guard in the unit test requires exactly that — and
61
+ // it is right to: a wire field that exists before its disclosure does
62
+ // is how a trust surface goes stale.
63
+ 'narration',
64
+ ],
65
+ },
66
+ turns: {
67
+ label: 'User turns, redacted on your device',
68
+ fields: ['agentSessionId', 'ordinal', 'text'],
69
+ },
70
+ guideSuggestions: {
71
+ label: 'Guide suggestions',
72
+ fields: ['id', 'content', 'reasoning', 'triggerType', 'sourceActionIds', 'status'],
73
+ },
74
+ runUsage: {
75
+ label: 'Token counts & session usage',
76
+ fields: [
77
+ 'sessionId',
78
+ 'agentSessionId',
79
+ 'usage.model',
80
+ 'usage.provider',
81
+ 'usage.occurredAt',
82
+ 'usage.inputTokens',
83
+ 'usage.outputTokens',
84
+ 'usage.cacheReadTokens',
85
+ 'usage.cacheWriteTokens',
86
+ ],
87
+ },
88
+ skillUsage: {
89
+ label: 'Skill load-overhead token counts',
90
+ fields: [
91
+ 'sessionId',
92
+ 'agentSessionId',
93
+ 'usage.skillName',
94
+ 'usage.model',
95
+ 'usage.inputTokens',
96
+ 'usage.cacheWriteTokens',
97
+ ],
98
+ },
99
+ // A scalar rather than a list of records: the version of the CLI making the
100
+ // request. Disclosed as its own category because it is the one thing that
101
+ // leaves the machine on every sync regardless of what else is in the batch.
102
+ cliVersion: {
103
+ label: 'The CLI version making the sync request',
104
+ fields: ['cliVersion'],
105
+ },
106
+ // Agent session identifiers the `SessionEnd` hook reports as finished, so the
107
+ // server can close those runs and grade them. Ids only — the same session ids
108
+ // already disclosed under `actions` and `runUsage`, carrying no content of
109
+ // their own. Listed anyway: this surface's contract is that everything on the
110
+ // wire appears here, and a category that "carries nothing interesting" is
111
+ // exactly the kind of judgement call that erodes it.
112
+ completedSessionIds: {
113
+ label: 'Which agent sessions have finished',
114
+ fields: ['agentSessionId'],
115
+ },
116
+ // Which rule files the synced repo has on disk, so grading only counts
117
+ // guidance the agent was actually given. Paths and hashes — never contents:
118
+ // this manifest carries no file contents, and selected content uploads are
119
+ // disclosed separately in the intro. `repoId` is a one-way digest that lets the dashboard
120
+ // tell two of your checkouts apart without learning either path.
121
+ ruleManifest: {
122
+ label: 'Which rule files this repo has on disk (paths and hashes, never contents)',
123
+ fields: ['repoId', 'files.path', 'files.format', 'files.contentHash', 'truncated'],
124
+ },
125
+ // Where the checkout stood when a run closed, so a commit can be traced back
126
+ // to the session that produced it. A sha and a ref name — no file contents,
127
+ // no diff, no commit message, and nothing about any commit other than the
128
+ // head. Sent only on the sync that closes a run, and absent entirely for a
129
+ // session that ran outside a git repo.
130
+ commitAnchor: {
131
+ label: 'The commit and branch your session ended on (never the code itself)',
132
+ fields: ['headSha', 'branch'],
133
+ },
134
+ // What the agent said it did, in its own closing message — the prose of the
135
+ // session's final assistant turn, so a later grade can check the claim
136
+ // against the actions actually recorded. The same content class as
137
+ // `actions.narration` and the same promise: code blocks removed structurally,
138
+ // the remainder prose-redacted on this machine and truncated. Text outside
139
+ // recognized code blocks can still include code or diff snippets.
140
+ //
141
+ // Sent only on the sync that closes a run, and absent entirely when the
142
+ // repo has narration switched off, when there is no transcript to read, or
143
+ // when the session ended without the agent speaking.
144
+ //
145
+ // Listed bare, like every other category. These paths read relative to the
146
+ // category, and a dot means nesting *inside* it — `files.path` under
147
+ // `ruleManifest`, `usage.model` under `runUsage`. `SessionSelfReportSchema` is
148
+ // `{ agentSessionId, text }`, so that is what is listed.
149
+ selfReport: {
150
+ label: "Your agent's closing summary of what it did, redacted the same way as the excerpts above",
151
+ fields: ['agentSessionId', 'text'],
152
+ },
153
+ // Which CLI entry point sent the request, and only when that entry point is
154
+ // the `SessionStart` hook — the literal string `session-start`, carrying
155
+ // nothing about the machine, the repo or the session. It exists so the
156
+ // dashboard can tell a project whose hooks are firing from one where `init`
157
+ // was never run, which is otherwise indistinguishable from the outside.
158
+ //
159
+ // Listed even though it is a fixed word rather than anything derived from
160
+ // the user's work, for the same reason `completedSessionIds` is: the
161
+ // contract of this surface is that everything on the wire appears here, and
162
+ // "this one carries nothing interesting" is the judgement call that erodes
163
+ // it.
164
+ origin: {
165
+ label: 'Whether the sync came from a session hook rather than a typed command',
166
+ fields: ['origin'],
167
+ },
168
+ };
169
+ /** What leaves the machine, in display order. */
170
+ export const SYNCED_CATEGORIES = Object.keys(SYNCED).map((key) => ({ key, ...SYNCED[key] }));
171
+ /** What session sync does not upload, in display order. */
172
+ export const LOCAL_ONLY_ITEMS = [
173
+ {
174
+ key: 'transcripts',
175
+ label: 'Full raw conversation transcript files',
176
+ },
177
+ ];
178
+ export const LOCAL_ONLY_KEYS = LOCAL_ONLY_ITEMS.map((item) => item.key);
179
+ /**
180
+ * The three rules for what is taken from a transcript, in full. These are the
181
+ * whole of the promise: a fourth content class would need a fourth rule here
182
+ * before it could ship.
183
+ */
184
+ export const TRANSCRIPT_RULES = [
185
+ {
186
+ title: 'What you asked for, and what the agent said it would do',
187
+ body: "Each user turn in a closed session, plus the sentence or two of the agent's reply next to each action. Both are scanned on your machine for keys, tokens, passwords, credentials in URLs and email addresses, which are replaced before anything is sent. Turn text uses the same repository narration setting as the excerpts.",
188
+ },
189
+ {
190
+ title: 'Code blocks are removed, not scanned',
191
+ body: 'Recognized fenced and indented code blocks are replaced with a note of their language and line count before secret redaction. Code or diffs outside those blocks can remain in the text.',
192
+ },
193
+ {
194
+ title: 'Tool-result bodies are excluded from transcript excerpts',
195
+ body: 'The transcript reader excludes tool-result blocks, including command output, file reads and search results. Text you or the agent copies into a message can still appear in an excerpt.',
196
+ },
197
+ ];
198
+ /**
199
+ * The framing sentences around the three lists, so the two surfaces introduce
200
+ * them in the same words. Product-name sentences carry the name spelled out;
201
+ * the dashboard substitutes its own constant when it renders them.
202
+ */
203
+ export const WHAT_SYNCS_COPY = {
204
+ intro: 'Mossbear grades your sessions in the cloud, from evidence prepared on your machine. Session sync sends action metadata and redacted transcript text. Separately, linking guidance or publishing context uploads selected content, including skill member files. When a session ends in a repo subscribed to a document bundle, a subscribed document you edited locally can also be pushed back, unless other recent session activity or the bundle write settings block it. A repo that declares published paths in its current config can also publish their committed contents after a local commit that touches them. These uploads are not filtered by the transcript rules below.',
205
+ synced: {
206
+ title: 'Leaves your machine',
207
+ lead: 'Session evidence synced to your account. Action summaries can include secret-redacted, length-capped shell command text. The field list below covers session sync, not separate guidance and context uploads.',
208
+ },
209
+ transcript: {
210
+ title: 'What we take from your transcript',
211
+ lead: "Redacted excerpts travel with actions. When a session closes, redacted user turns and the agent's closing summary can also sync. These use the same repository narration setting.",
212
+ caveats: 'Redaction uses patterns, so it is not a guarantee. Our servers can read synced content; it is not end-to-end encrypted. Run mossbear narration off in a repository to stop preparing new transcript excerpts, user turns and closing summaries there. Pending user turns from that repository are discarded. Older queued turns without repository identity are also discarded before delivery. An upload already started cannot be recalled. Update the CLI before relying on queued-turn deletion. Action metadata and selected content uploads are unaffected.',
213
+ },
214
+ localOnly: {
215
+ title: 'Stays local during session sync',
216
+ lead: 'Session sync reads these files locally and sends the excerpts and usage described above, not the full files.',
217
+ },
218
+ };
219
+ /**
220
+ * Wire-schema keys that leave the machine but aren't described in
221
+ * {@link SYNCED_CATEGORIES}. Non-empty means the disclosure has drifted from the
222
+ * protocol and must be updated. Pure — safe to assert on in tests.
223
+ */
224
+ export function missingSyncDisclosureKeys() {
225
+ const documented = new Set(SYNCED_CATEGORIES.map((c) => c.key));
226
+ return SYNCED_PAYLOAD_KEYS.filter((key) => !documented.has(key));
227
+ }
228
+ //# sourceMappingURL=whatSyncs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"whatSyncs.js","sourceRoot":"","sources":["../src/whatSyncs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAA;AAOzD,+DAA+D;AAC/D,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,IAAI,CAC5C,0BAA0B,CAAC,OAAO,CACnC,CAAC,IAAI,EAAwB,CAAA;AAW9B;;;;;;GAMG;AACH,MAAM,MAAM,GAA0D;IACpE,OAAO,EAAE;QACP,KAAK,EAAE,2DAA2D;QAClE,MAAM,EAAE;YACN,IAAI;YACJ,WAAW;YACX,gBAAgB;YAChB,YAAY;YACZ,SAAS;YACT,WAAW;YACX,SAAS;YACT,aAAa;YACb,UAAU;YACV,iBAAiB;YACjB,eAAe;YACf,UAAU;YACV,uEAAuE;YACvE,qEAAqE;YACrE,kEAAkE;YAClE,+DAA+D;YAC/D,EAAE;YACF,iEAAiE;YACjE,uEAAuE;YACvE,sEAAsE;YACtE,qCAAqC;YACrC,WAAW;SACZ;KACF;IACD,KAAK,EAAE;QACL,KAAK,EAAE,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AAsC;QAC7C,IAAI,EAAE,0LAA0L;KACjM;IACD;QACE,KAAK,EAAE,0DAA0D;QACjE,IAAI,EAAE,yLAAyL;KAChM;CACF,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,KAAK,EACH,ypBAAypB;IAC3pB,MAAM,EAAE;QACN,KAAK,EAAE,qBAAqB;QAC5B,IAAI,EAAE,+MAA+M;KACtN;IACD,UAAU,EAAE;QACV,KAAK,EAAE,mCAAmC;QAC1C,IAAI,EAAE,mLAAmL;QACzL,OAAO,EACL,miBAAmiB;KACtiB;IACD,SAAS,EAAE;QACT,KAAK,EAAE,iCAAiC;QACxC,IAAI,EAAE,8GAA8G;KACrH;CACO,CAAA;AAEV;;;;GAIG;AACH,MAAM,UAAU,yBAAyB;IACvC,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;IAC/D,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAA;AAClE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=whatSyncs.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"whatSyncs.test.d.ts","sourceRoot":"","sources":["../src/whatSyncs.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,113 @@
1
+ import * as v from 'valibot';
2
+ import { describe, expect, it } from 'vitest';
3
+ import { CommitAnchorSchema, DashboardGuideSuggestionSchema, DashboardSessionUsageSchema, DashboardSkillUsageSchema, DashboardSyncActionSchema, DashboardSyncRequestSchema, DashboardSyncTurnSchema, RuleFileManifestSchema, RuleManifestFileSchema, SessionSelfReportSchema, SkillUsageEntrySchema, TokenUsageSchema, } from './schemas.js';
4
+ import { LOCAL_ONLY_ITEMS, LOCAL_ONLY_KEYS, missingSyncDisclosureKeys, SYNCED_CATEGORIES, SYNCED_PAYLOAD_KEYS, TRANSCRIPT_RULES, } from './whatSyncs.js';
5
+ const fieldsFor = (key) => SYNCED_CATEGORIES.find((c) => c.key === key)?.fields ?? [];
6
+ /** Top-level names covered by a category, collapsing dotted nested paths. */
7
+ const topLevelFields = (key) => new Set(fieldsFor(key).map((f) => f.split('.')[0] ?? f));
8
+ describe('whatSyncs disclosure', () => {
9
+ it('derives the synced payload keys from the wire schema', () => {
10
+ expect([...SYNCED_PAYLOAD_KEYS].sort()).toEqual(Object.keys(DashboardSyncRequestSchema.entries).sort());
11
+ });
12
+ it('documents every category that leaves the machine (drift guard)', () => {
13
+ // If the protocol grows a new top-level sync array, this fails until the
14
+ // disclosure is updated — preventing silent divergence from reality.
15
+ expect(missingSyncDisclosureKeys()).toEqual([]);
16
+ });
17
+ it('only claims to sync keys that exist on the wire schema', () => {
18
+ const wireKeys = new Set(Object.keys(DashboardSyncRequestSchema.entries));
19
+ for (const category of SYNCED_CATEGORIES) {
20
+ expect(wireKeys.has(category.key)).toBe(true);
21
+ }
22
+ });
23
+ // Exhaustiveness: a trust surface must not under-disclose. Each category's
24
+ // field list must cover every field on its wire schema (nested token fields
25
+ // collapse to their top-level `usage` parent).
26
+ it('lists every actions field on the wire schema', () => {
27
+ expect(topLevelFields('actions')).toEqual(new Set(Object.keys(DashboardSyncActionSchema.entries)));
28
+ });
29
+ it('lists every captured-turn field on the wire schema', () => {
30
+ expect(topLevelFields('turns')).toEqual(new Set(Object.keys(DashboardSyncTurnSchema.entries)));
31
+ });
32
+ it('rejects empty turn text and fields outside the disclosure', () => {
33
+ const base = { agentSessionId: 'session', ordinal: 1, text: 'Fix the parser.' };
34
+ expect(v.safeParse(DashboardSyncTurnSchema, { ...base, text: '' }).success).toBe(false);
35
+ expect(v.safeParse(DashboardSyncTurnSchema, { ...base, rawText: 'secret' }).success).toBe(false);
36
+ });
37
+ it('lists every guideSuggestions field on the wire schema', () => {
38
+ expect(topLevelFields('guideSuggestions')).toEqual(new Set(Object.keys(DashboardGuideSuggestionSchema.entries)));
39
+ });
40
+ it('lists every runUsage field, including nested token usage', () => {
41
+ expect(topLevelFields('runUsage')).toEqual(new Set(Object.keys(DashboardSessionUsageSchema.entries)));
42
+ // Every TokenUsage sub-field is disclosed as `usage.<field>`.
43
+ const usageFields = fieldsFor('runUsage')
44
+ .filter((f) => f.startsWith('usage.'))
45
+ .map((f) => f.slice('usage.'.length));
46
+ expect(new Set(usageFields)).toEqual(new Set(Object.keys(TokenUsageSchema.entries)));
47
+ });
48
+ // The four object-valued categories that had no exhaustiveness test until
49
+ // 2026-08-22. Their absence is what let `selfReport` ship claiming
50
+ // `selfReport.agentSessionId` — a field path that named a nesting level which
51
+ // does not exist — because `topLevelFields` collapses a dotted path to its
52
+ // first segment, so the disclosure read `{selfReport}` where the wire says
53
+ // `{agentSessionId, text}`. Nothing compared the two.
54
+ it.each([
55
+ ['skillUsage', DashboardSkillUsageSchema],
56
+ ['ruleManifest', RuleFileManifestSchema],
57
+ ['commitAnchor', CommitAnchorSchema],
58
+ ['selfReport', SessionSelfReportSchema],
59
+ ])('lists every %s field on the wire schema', (key, schema) => {
60
+ expect(topLevelFields(key)).toEqual(new Set(Object.keys(schema.entries)));
61
+ });
62
+ // …and one level down, which the assertion above cannot see. It compares
63
+ // collapsed names, so `usage.model` and `files.path` reduce to `usage` and
64
+ // `files` and match whatever the outer schema says regardless of what sits
65
+ // inside them — the same blindness that let `selfReport` through, in the
66
+ // two newly covered categories that have nested entries. `runUsage` above
67
+ // already drills into `TokenUsageSchema`; these two were left flat.
68
+ it.each([
69
+ ['skillUsage', 'usage', SkillUsageEntrySchema],
70
+ ['ruleManifest', 'files', RuleManifestFileSchema],
71
+ ])('lists every %s.%s sub-field on the wire schema', (key, prefix, schema) => {
72
+ const nested = fieldsFor(key)
73
+ .filter((f) => f.startsWith(`${prefix}.`))
74
+ .map((f) => f.slice(prefix.length + 1));
75
+ expect(new Set(nested)).toEqual(new Set(Object.keys(schema.entries)));
76
+ });
77
+ it('keeps raw content fields out of the session-sync field list', () => {
78
+ // This guards session field names only. Separate guidance imports carry
79
+ // rawContent, and summaries can contain sanitized shell command text.
80
+ const forbidden = ['rawContent', 'content_body', 'command', 'diff', 'transcript'];
81
+ const synced = SYNCED_CATEGORIES.flatMap((c) => c.fields);
82
+ for (const field of forbidden) {
83
+ expect(synced).not.toContain(field);
84
+ }
85
+ });
86
+ it('enumerates the local-only categories', () => {
87
+ expect(LOCAL_ONLY_KEYS).toContain('transcripts');
88
+ expect(LOCAL_ONLY_KEYS).not.toContain('fileContents');
89
+ expect(LOCAL_ONLY_KEYS).not.toContain('diffs');
90
+ expect(LOCAL_ONLY_KEYS).not.toContain('shellCommands');
91
+ expect(LOCAL_ONLY_KEYS).not.toContain('verdictQueue');
92
+ expect(LOCAL_ONLY_KEYS.length).toBeGreaterThan(0);
93
+ expect(LOCAL_ONLY_ITEMS.map((item) => item.key)).toEqual(LOCAL_ONLY_KEYS);
94
+ });
95
+ // Two surfaces read these strings — the dashboard panel and `mossbear
96
+ // what-syncs` — and both would render an empty label as a blank row rather
97
+ // than fail. A trust surface with a blank row is one that lists something it
98
+ // does not name.
99
+ it('gives every row a sentence a reader can act on', () => {
100
+ for (const category of SYNCED_CATEGORIES) {
101
+ expect(category.label.trim(), category.key).not.toBe('');
102
+ expect(category.fields.length, category.key).toBeGreaterThan(0);
103
+ }
104
+ for (const item of LOCAL_ONLY_ITEMS)
105
+ expect(item.label.trim(), item.key).not.toBe('');
106
+ expect(TRANSCRIPT_RULES).toHaveLength(3);
107
+ for (const rule of TRANSCRIPT_RULES) {
108
+ expect(rule.title.trim()).not.toBe('');
109
+ expect(rule.body.trim()).not.toBe('');
110
+ }
111
+ });
112
+ });
113
+ //# sourceMappingURL=whatSyncs.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"whatSyncs.test.js","sourceRoot":"","sources":["../src/whatSyncs.test.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,EAAE,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;YACxD,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAA;QACjE,CAAC;QACD,KAAK,MAAM,IAAI,IAAI,gBAAgB;YAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QACrF,MAAM,CAAC,gBAAgB,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAA;QACxC,KAAK,MAAM,IAAI,IAAI,gBAAgB,EAAE,CAAC;YACpC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;YACtC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QACvC,CAAC;IACH,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@mossbear/protocol",
3
+ "version": "0.1.0-alpha.100",
4
+ "private": false,
5
+ "description": "Shared types and wire schemas for Mossbear — the contract between the mossbear CLI and the dashboard.",
6
+ "license": "MIT",
7
+ "type": "module",
8
+ "main": "./dist/index.js",
9
+ "types": "./dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "import": "./dist/index.js",
13
+ "types": "./dist/index.d.ts"
14
+ },
15
+ "./frameProtocol": {
16
+ "import": "./dist/frameProtocol.js",
17
+ "types": "./dist/frameProtocol.d.ts"
18
+ }
19
+ },
20
+ "files": [
21
+ "dist",
22
+ "!dist/.tsbuildinfo",
23
+ "README.md",
24
+ "LICENSE"
25
+ ],
26
+ "homepage": "https://mossbear.io",
27
+ "bugs": {
28
+ "url": "https://mossbear.io/docs/"
29
+ },
30
+ "publishConfig": {
31
+ "access": "public",
32
+ "provenance": false
33
+ },
34
+ "scripts": {
35
+ "build": "tsc --project tsconfig.json",
36
+ "dev": "tsc --project tsconfig.json --watch",
37
+ "typecheck": "tsc --project tsconfig.json --noEmit",
38
+ "lint": "oxlint",
39
+ "lint:fix": "oxfmt && oxlint --fix",
40
+ "format": "oxfmt",
41
+ "format:check": "oxfmt --check",
42
+ "test": "vitest run",
43
+ "models:sync": "bun catalog-sync.ts"
44
+ },
45
+ "devDependencies": {
46
+ "@types/node": "^20.0.0",
47
+ "typescript": "5.9.3"
48
+ },
49
+ "dependencies": {
50
+ "valibot": "^1.4.2"
51
+ }
52
+ }