@howaboua/pi-agent-comms 0.0.0-stage → 0.0.1-dev.13.1.gef1ce49691d6

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 (141) hide show
  1. package/INTEGRATION.md +31 -0
  2. package/LICENSE +21 -0
  3. package/PCC-INTEGRATION.md +17 -0
  4. package/README.md +53 -2
  5. package/dist/viewer/archive.js +249 -0
  6. package/dist/viewer/config.js +85 -0
  7. package/dist/viewer/contracts.js +1 -0
  8. package/dist/viewer/server.js +177 -0
  9. package/dist/viewer/source.js +29 -0
  10. package/dist/viewer/web/app.js +88 -0
  11. package/dist/viewer/web/index.html +41 -0
  12. package/dist/viewer/web/navigation.js +72 -0
  13. package/dist/viewer/web/posts.js +105 -0
  14. package/dist/viewer/web/render.js +147 -0
  15. package/dist/viewer/web/session.js +86 -0
  16. package/dist/viewer/web/style.css +517 -0
  17. package/dist/viewer/web/updates.js +106 -0
  18. package/docs/BOARD-CHANGELOG.md +49 -0
  19. package/docs/BOARD.md +124 -0
  20. package/docs/NOTES-CHANGELOG.md +127 -0
  21. package/docs/NOTES.md +122 -0
  22. package/index.ts +21 -0
  23. package/package.json +75 -5
  24. package/src/board/AGENTS.md +12 -0
  25. package/src/board/activity.ts +274 -0
  26. package/src/board/archive.ts +118 -0
  27. package/src/board/awareness.ts +179 -0
  28. package/src/board/briefing.ts +25 -0
  29. package/src/board/config.ts +192 -0
  30. package/src/board/consolidation.ts +32 -0
  31. package/src/board/context-briefing.ts +245 -0
  32. package/src/board/contract.ts +254 -0
  33. package/src/board/delivery.ts +85 -0
  34. package/src/board/feature.ts +91 -0
  35. package/src/board/identity.ts +238 -0
  36. package/src/board/integration.ts +55 -0
  37. package/src/board/paging.ts +54 -0
  38. package/src/board/protocol.ts +78 -0
  39. package/src/board/queries.ts +168 -0
  40. package/src/board/response.ts +82 -0
  41. package/src/board/runtime/activation.ts +50 -0
  42. package/src/board/runtime/catchup.ts +96 -0
  43. package/src/board/runtime/coordinator.ts +311 -0
  44. package/src/board/runtime/engine.ts +40 -0
  45. package/src/board/runtime/index.ts +63 -0
  46. package/src/board/runtime/owner.ts +168 -0
  47. package/src/board/runtime/routing.ts +152 -0
  48. package/src/board/runtime/turns.ts +109 -0
  49. package/src/board/search.ts +95 -0
  50. package/src/board/settings/panel.ts +193 -0
  51. package/src/board/store.ts +427 -0
  52. package/src/board/summaries.ts +124 -0
  53. package/src/board/summarizer.ts +201 -0
  54. package/src/board/tool.ts +27 -0
  55. package/src/board/viewer/AGENTS.md +1 -0
  56. package/src/board/viewer/archive.ts +308 -0
  57. package/src/board/viewer/config.ts +111 -0
  58. package/src/board/viewer/contracts.ts +98 -0
  59. package/src/board/viewer/index.ts +162 -0
  60. package/src/board/viewer/server.ts +204 -0
  61. package/src/board/viewer/source.ts +33 -0
  62. package/src/board/viewer/web/app.js +88 -0
  63. package/src/board/viewer/web/index.html +41 -0
  64. package/src/board/viewer/web/navigation.js +72 -0
  65. package/src/board/viewer/web/posts.js +105 -0
  66. package/src/board/viewer/web/render.js +147 -0
  67. package/src/board/viewer/web/session.js +86 -0
  68. package/src/board/viewer/web/style.css +517 -0
  69. package/src/board/viewer/web/updates.js +106 -0
  70. package/src/guidance.ts +121 -0
  71. package/src/notes/AGENTS.md +27 -0
  72. package/src/notes/activation.ts +150 -0
  73. package/src/notes/agent-identity.ts +221 -0
  74. package/src/notes/attachment-sharing.ts +165 -0
  75. package/src/notes/attachment-snapshot.ts +113 -0
  76. package/src/notes/binding-startup.ts +30 -0
  77. package/src/notes/bridge.ts +130 -0
  78. package/src/notes/compaction-projection.ts +88 -0
  79. package/src/notes/context-owner.ts +99 -0
  80. package/src/notes/context-sharing.ts +178 -0
  81. package/src/notes/extension-hooks.ts +200 -0
  82. package/src/notes/extension-sharing.ts +133 -0
  83. package/src/notes/feature.ts +168 -0
  84. package/src/notes/fresh-checkpoint.ts +143 -0
  85. package/src/notes/fresh-notes.ts +323 -0
  86. package/src/notes/history-search-protocol.ts +39 -0
  87. package/src/notes/history-search-pruning.mjs +120 -0
  88. package/src/notes/history-search-worker.mjs +258 -0
  89. package/src/notes/history-search.ts +269 -0
  90. package/src/notes/history-windows.ts +221 -0
  91. package/src/notes/history.ts +158 -0
  92. package/src/notes/idle-admission.ts +201 -0
  93. package/src/notes/index.ts +125 -0
  94. package/src/notes/integrations.ts +174 -0
  95. package/src/notes/lifecycle.ts +308 -0
  96. package/src/notes/model-role-config.ts +79 -0
  97. package/src/notes/model-role-screen.ts +74 -0
  98. package/src/notes/model-roles.ts +225 -0
  99. package/src/notes/note-query.ts +148 -0
  100. package/src/notes/note-result.ts +88 -0
  101. package/src/notes/note-save-marker.ts +128 -0
  102. package/src/notes/notes-lookup.ts +115 -0
  103. package/src/notes/notes.ts +302 -0
  104. package/src/notes/query-executor.ts +242 -0
  105. package/src/notes/query-input.ts +126 -0
  106. package/src/notes/remote.ts +376 -0
  107. package/src/notes/rollover.ts +224 -0
  108. package/src/notes/saved-session-access.ts +117 -0
  109. package/src/notes/saved-session-index.mjs +83 -0
  110. package/src/notes/saved-session.mjs +241 -0
  111. package/src/notes/saved-session.ts +51 -0
  112. package/src/notes/saved-sharing-records.ts +135 -0
  113. package/src/notes/session-pruning-content.ts +237 -0
  114. package/src/notes/session-pruning-plan.ts +243 -0
  115. package/src/notes/session-pruning-policy.ts +20 -0
  116. package/src/notes/session-pruning-screen.ts +204 -0
  117. package/src/notes/session-pruning-source.ts +44 -0
  118. package/src/notes/session-pruning-transaction.ts +141 -0
  119. package/src/notes/session-pruning.ts +155 -0
  120. package/src/notes/settings-command.ts +95 -0
  121. package/src/notes/settings-controls.ts +199 -0
  122. package/src/notes/settings-screen.ts +113 -0
  123. package/src/notes/settings.ts +287 -0
  124. package/src/notes/shared-notes.ts +411 -0
  125. package/src/notes/shared-session-reader.ts +143 -0
  126. package/src/notes/sharing-service.ts +282 -0
  127. package/src/notes/sqlite.mjs +33 -0
  128. package/src/notes/store.ts +283 -0
  129. package/src/notes/task-boundary.ts +37 -0
  130. package/src/notes/tool-contracts.ts +312 -0
  131. package/src/notes/tools.ts +148 -0
  132. package/src/notes/tree-archive-manifest.mjs +27 -0
  133. package/src/notes/tree-archive.ts +129 -0
  134. package/src/notes/tree-checkpoint.ts +170 -0
  135. package/src/notes/tree-handoff-read.ts +192 -0
  136. package/src/notes/window-checkpoint.ts +105 -0
  137. package/src/notes/window-message.ts +185 -0
  138. package/src/notes/windows.ts +272 -0
  139. package/src/settings-navigation.ts +11 -0
  140. package/src/timestamps.ts +3 -0
  141. package/tsconfig.json +9 -0
@@ -0,0 +1,517 @@
1
+ :root {
2
+ color-scheme: light;
3
+ --ink: #242522;
4
+ --ink-soft: #30312d;
5
+ --paper: #f5f1e8;
6
+ --text: #282924;
7
+ --muted: #69685f;
8
+ --rule: #d7d1c5;
9
+ --accent: #ac482b;
10
+ --rail-text: #e7e3d9;
11
+ --rail-muted: #b5b3a8;
12
+ font-family:
13
+ system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
14
+ font-size: 14px;
15
+ }
16
+ * {
17
+ box-sizing: border-box;
18
+ }
19
+ body {
20
+ margin: 0;
21
+ background: var(--paper);
22
+ color: var(--text);
23
+ }
24
+ button,
25
+ input,
26
+ select {
27
+ font: inherit;
28
+ }
29
+ button,
30
+ select {
31
+ cursor: pointer;
32
+ }
33
+ button {
34
+ border: 1px solid var(--rule);
35
+ background: transparent;
36
+ color: inherit;
37
+ padding: 7px 11px;
38
+ border-radius: 2px;
39
+ }
40
+ button:hover {
41
+ background: #ded7c9;
42
+ }
43
+ input,
44
+ select {
45
+ min-width: 0;
46
+ border: 1px solid var(--rule);
47
+ border-radius: 2px;
48
+ padding: 8px;
49
+ background: transparent;
50
+ color: inherit;
51
+ }
52
+ input[type="checkbox"] {
53
+ accent-color: var(--accent);
54
+ }
55
+ :focus-visible {
56
+ outline: 2px solid #cc6847;
57
+ outline-offset: 3px;
58
+ }
59
+ label {
60
+ display: block;
61
+ font-size: 12px;
62
+ font-weight: 600;
63
+ margin-bottom: 7px;
64
+ }
65
+ h1,
66
+ h2,
67
+ p {
68
+ margin-top: 0;
69
+ }
70
+ .masthead {
71
+ height: 65px;
72
+ display: flex;
73
+ align-items: center;
74
+ gap: 20px;
75
+ padding: 0 24px;
76
+ background: var(--ink);
77
+ color: var(--rail-text);
78
+ border-bottom: 1px solid #44453f;
79
+ }
80
+ .masthead h1 {
81
+ font-family: Georgia, serif;
82
+ font-size: 23px;
83
+ font-weight: normal;
84
+ margin: 0;
85
+ }
86
+ .live-controls {
87
+ margin-left: auto;
88
+ display: flex;
89
+ align-items: center;
90
+ gap: 16px;
91
+ }
92
+ .live-controls label {
93
+ margin: 0;
94
+ display: flex;
95
+ align-items: center;
96
+ gap: 6px;
97
+ }
98
+ .live-controls button {
99
+ border-color: #626358;
100
+ }
101
+ .live-controls button:hover {
102
+ background: #40413b;
103
+ }
104
+ #status {
105
+ background: #e9ddca;
106
+ color: #713821;
107
+ padding: 9px 24px;
108
+ border-bottom: 1px solid var(--rule);
109
+ }
110
+ #status:empty {
111
+ display: none;
112
+ }
113
+ .workspace {
114
+ display: grid;
115
+ grid-template-columns: 225px 330px minmax(0, 1fr);
116
+ height: calc(100dvh - 65px);
117
+ }
118
+ body:has(#status:not(:empty)) .workspace {
119
+ height: calc(100dvh - 104px);
120
+ }
121
+ .rail,
122
+ .index,
123
+ .conversation {
124
+ overflow: auto;
125
+ }
126
+ .rail {
127
+ background: var(--ink);
128
+ color: var(--rail-text);
129
+ padding: 25px 18px;
130
+ }
131
+ .rail select {
132
+ width: 100%;
133
+ border-color: #616258;
134
+ background: var(--ink);
135
+ }
136
+ .context {
137
+ color: var(--rail-muted);
138
+ font-size: 12px;
139
+ line-height: 1.5;
140
+ margin: 10px 0 28px;
141
+ overflow-wrap: anywhere;
142
+ }
143
+ .rail nav {
144
+ display: grid;
145
+ gap: 3px;
146
+ }
147
+ .rail nav button {
148
+ text-align: left;
149
+ display: flex;
150
+ justify-content: space-between;
151
+ gap: 8px;
152
+ border: 0;
153
+ padding: 10px 9px;
154
+ border-radius: 0;
155
+ overflow-wrap: anywhere;
156
+ }
157
+ .rail nav button:hover {
158
+ background: #3b3c35;
159
+ }
160
+ .rail nav button[aria-current="true"] {
161
+ background: #3b3c35;
162
+ border-left: 3px solid #d77650;
163
+ padding-left: 6px;
164
+ }
165
+ .rail nav small {
166
+ color: var(--rail-muted);
167
+ }
168
+ .agent-filter {
169
+ margin-top: 30px;
170
+ }
171
+ details {
172
+ border-top: 1px solid #4a4b43;
173
+ margin-top: 25px;
174
+ padding-top: 16px;
175
+ font-size: 12px;
176
+ color: var(--rail-muted);
177
+ }
178
+ summary {
179
+ cursor: pointer;
180
+ padding: 5px 0;
181
+ }
182
+ #subscriptions p {
183
+ line-height: 1.6;
184
+ overflow-wrap: anywhere;
185
+ margin: 12px 0;
186
+ }
187
+ .index {
188
+ border-right: 1px solid var(--rule);
189
+ background: #eae6dd;
190
+ }
191
+ .index-head {
192
+ padding: 25px 20px 20px;
193
+ border-bottom: 1px solid var(--rule);
194
+ }
195
+ .index-head h2 {
196
+ font-size: 19px;
197
+ font-weight: 600;
198
+ margin-bottom: 21px;
199
+ overflow-wrap: anywhere;
200
+ }
201
+ .search-row {
202
+ display: flex;
203
+ gap: 6px;
204
+ }
205
+ .search-row input {
206
+ width: 100%;
207
+ background: var(--paper);
208
+ }
209
+ .search-row button {
210
+ padding: 7px;
211
+ }
212
+ .thread {
213
+ display: block;
214
+ text-decoration: none;
215
+ color: inherit;
216
+ padding: 18px 20px;
217
+ border-bottom: 1px solid var(--rule);
218
+ border-left: 3px solid transparent;
219
+ }
220
+ .thread:hover {
221
+ background: #f1ede5;
222
+ }
223
+ .thread[aria-current="true"] {
224
+ background: var(--paper);
225
+ border-left-color: var(--accent);
226
+ }
227
+ .thread-meta {
228
+ display: flex;
229
+ gap: 8px;
230
+ align-items: center;
231
+ font-size: 11px;
232
+ color: var(--muted);
233
+ margin-bottom: 9px;
234
+ }
235
+ .thread-meta .author {
236
+ flex: 1;
237
+ min-width: 0;
238
+ }
239
+ .author {
240
+ white-space: nowrap;
241
+ overflow: hidden;
242
+ text-overflow: ellipsis;
243
+ max-width: 100%;
244
+ display: inline-block;
245
+ vertical-align: bottom;
246
+ }
247
+ .thread-preview {
248
+ font-size: 14px;
249
+ line-height: 1.55;
250
+ margin: 0 0 10px;
251
+ display: -webkit-box;
252
+ -webkit-line-clamp: 3;
253
+ -webkit-box-orient: vertical;
254
+ overflow: hidden;
255
+ overflow-wrap: anywhere;
256
+ }
257
+ .thread-foot {
258
+ font-size: 11px;
259
+ color: var(--muted);
260
+ display: flex;
261
+ justify-content: space-between;
262
+ gap: 8px;
263
+ flex-wrap: wrap;
264
+ }
265
+ .thread-status {
266
+ display: inline-block;
267
+ padding: 2px 7px;
268
+ border-radius: 3px;
269
+ font-size: 11px;
270
+ font-weight: 650;
271
+ line-height: 1.5;
272
+ }
273
+ .status-open { color: #365678; background: #dde7ee; }
274
+ .status-completed { color: #315d3d; background: #dfe9da; }
275
+ .status-abandoned { color: #80502d; background: #eee0cf; }
276
+ .mode-control {
277
+ display: flex;
278
+ align-items: center;
279
+ gap: 6px;
280
+ margin: 12px 0 0;
281
+ }
282
+ .mode-control[hidden] { display: none; }
283
+ .search-hint, #summary-snapshot {
284
+ font-size: 11px;
285
+ line-height: 1.6;
286
+ color: var(--muted);
287
+ margin: 8px 0 0;
288
+ overflow-wrap: anywhere;
289
+ }
290
+ .conversation-tools {
291
+ display: flex;
292
+ align-items: center;
293
+ justify-content: space-between;
294
+ gap: 12px;
295
+ max-width: 800px;
296
+ margin: 0 auto 20px;
297
+ }
298
+ .conversation-tools .mode-control { margin: 0; }
299
+ #summary-snapshot { max-width: 800px; margin: 0 auto 24px; }
300
+ .conversation {
301
+ padding: 30px clamp(22px, 4vw, 64px) 60px;
302
+ }
303
+ .post {
304
+ max-width: 800px;
305
+ margin: 0 auto;
306
+ padding: 26px 0;
307
+ border-bottom: 1px solid var(--rule);
308
+ }
309
+ .post:first-child {
310
+ padding-top: 0;
311
+ }
312
+ .post-header {
313
+ display: flex;
314
+ align-items: baseline;
315
+ gap: 14px;
316
+ margin-bottom: 21px;
317
+ font-size: 12px;
318
+ color: var(--muted);
319
+ }
320
+ .post-header .author {
321
+ font-weight: 650;
322
+ color: var(--text);
323
+ max-width: 65%;
324
+ }
325
+ .post-header time {
326
+ margin-left: auto;
327
+ white-space: nowrap;
328
+ font-size: 11px;
329
+ }
330
+ .post-channel {
331
+ font-size: 12px;
332
+ color: var(--accent);
333
+ margin-bottom: 12px;
334
+ overflow-wrap: anywhere;
335
+ }
336
+ .prose {
337
+ font-size: 15px;
338
+ line-height: 1.75;
339
+ overflow-wrap: anywhere;
340
+ }
341
+ .prose p {
342
+ margin-bottom: 1em;
343
+ }
344
+ .prose h1,
345
+ .prose h2,
346
+ .prose h3 {
347
+ line-height: 1.3;
348
+ margin: 1.5em 0 0.7em;
349
+ }
350
+ .prose h1 {
351
+ font-size: 27px;
352
+ }
353
+ .prose h2 {
354
+ font-size: 22px;
355
+ }
356
+ .prose h3 {
357
+ font-size: 18px;
358
+ }
359
+ .prose a {
360
+ color: #974127;
361
+ text-underline-offset: 3px;
362
+ }
363
+ .prose pre {
364
+ overflow: auto;
365
+ background: #e8e2d7;
366
+ padding: 16px;
367
+ font-size: 12px;
368
+ line-height: 1.6;
369
+ }
370
+ .prose code {
371
+ font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
372
+ font-size: 0.88em;
373
+ }
374
+ .prose :not(pre) > code {
375
+ background: #e8e2d7;
376
+ padding: 2px 4px;
377
+ }
378
+ .prose blockquote {
379
+ margin: 1em 0;
380
+ padding-left: 20px;
381
+ border-left: 2px solid #baa88c;
382
+ color: var(--muted);
383
+ }
384
+ .prose table {
385
+ display: block;
386
+ overflow: auto;
387
+ border-collapse: collapse;
388
+ }
389
+ .prose td,
390
+ .prose th {
391
+ border: 1px solid var(--rule);
392
+ padding: 7px 12px;
393
+ }
394
+ .prose img {
395
+ display: none;
396
+ }
397
+ .empty {
398
+ padding: 48px 8px;
399
+ color: var(--muted);
400
+ max-width: 600px;
401
+ }
402
+ .index .empty {
403
+ padding: 25px 20px;
404
+ }
405
+ .page-button {
406
+ display: block;
407
+ margin: 24px auto;
408
+ }
409
+ button[hidden] {
410
+ display: none;
411
+ }
412
+ #back {
413
+ display: none;
414
+ }
415
+ .rail nav small {
416
+ flex-shrink: 0;
417
+ white-space: nowrap;
418
+ }
419
+ @media (min-width: 1500px) {
420
+ .workspace {
421
+ grid-template-columns: 245px 380px minmax(0, 1fr);
422
+ }
423
+ }
424
+ @media (max-width: 1000px) {
425
+ .workspace {
426
+ grid-template-columns: 190px 280px minmax(0, 1fr);
427
+ }
428
+ .rail {
429
+ padding: 20px 12px;
430
+ }
431
+ .conversation {
432
+ padding: 25px 22px;
433
+ }
434
+ .post-header {
435
+ flex-wrap: wrap;
436
+ gap: 8px;
437
+ }
438
+ .post-header time {
439
+ margin-left: 0;
440
+ }
441
+ .post-header .author {
442
+ max-width: 100%;
443
+ }
444
+ }
445
+ @media (max-width: 760px) {
446
+ .masthead {
447
+ height: 60px;
448
+ padding: 0 16px;
449
+ gap: 12px;
450
+ }
451
+ .masthead h1 {
452
+ font-size: 21px;
453
+ }
454
+ .live-controls {
455
+ gap: 8px;
456
+ }
457
+ .live-controls button {
458
+ padding: 6px 8px;
459
+ }
460
+ .workspace,
461
+ body:has(#status:not(:empty)) .workspace {
462
+ display: block;
463
+ height: auto;
464
+ }
465
+ .rail {
466
+ padding: 16px;
467
+ }
468
+ .rail .context {
469
+ margin-bottom: 12px;
470
+ }
471
+ .rail nav {
472
+ display: flex;
473
+ overflow: auto;
474
+ margin-top: 12px;
475
+ }
476
+ .rail nav button {
477
+ flex-shrink: 0;
478
+ max-width: 240px;
479
+ }
480
+ .agent-filter {
481
+ margin-top: 14px;
482
+ }
483
+ .rail details {
484
+ margin-top: 14px;
485
+ padding-top: 10px;
486
+ }
487
+ .index {
488
+ border-right: 0;
489
+ }
490
+ .conversation {
491
+ display: none;
492
+ }
493
+ .detail-open .rail,
494
+ .detail-open .index {
495
+ display: none;
496
+ }
497
+ .detail-open .conversation {
498
+ display: block;
499
+ min-height: calc(100dvh - 60px);
500
+ }
501
+ #back {
502
+ display: block;
503
+ margin-bottom: 28px;
504
+ }
505
+ .index-head {
506
+ padding: 22px 16px;
507
+ }
508
+ .thread {
509
+ padding: 18px 16px;
510
+ }
511
+ .post-header {
512
+ display: flex;
513
+ }
514
+ .empty {
515
+ padding-top: 25px;
516
+ }
517
+ }
@@ -0,0 +1,106 @@
1
+ import { $, state, api, threadParams, setChanged, same } from "./session.js";
2
+ import { renderPost } from "./posts.js";
3
+
4
+ export function createUpdates({
5
+ renderBoard,
6
+ renderThreads,
7
+ renderConversation,
8
+ }) {
9
+ async function refresh(explicit = false) {
10
+ const focused = document.activeElement;
11
+ const focusKey =
12
+ focused?.dataset?.channel !== undefined
13
+ ? ["channel", focused.dataset.channel]
14
+ : focused?.dataset?.thread
15
+ ? ["thread", focused.dataset.thread]
16
+ : null;
17
+ const params = threadParams();
18
+ const [detail, page, conversation] = await Promise.all([
19
+ api("/api/board", { boardId: state.board }),
20
+ api("/api/threads", params),
21
+ state.thread
22
+ ? api("/api/thread", {
23
+ boardId: state.board,
24
+ id: state.thread,
25
+ full: state.full ? "true" : "",
26
+ })
27
+ : Promise.resolve(null),
28
+ ]);
29
+ if (!explicit && (state.threadPages > 1 || state.replyPages > 1)) {
30
+ // Compare only loaded first pages. Never splice fresh cursors into an old tail.
31
+ if (
32
+ !same(detail, state.detail) ||
33
+ !same(page, state.firstPage) ||
34
+ !same(conversation, state.firstConversation)
35
+ )
36
+ setChanged(true);
37
+ return;
38
+ }
39
+ if (!same(detail, state.detail)) {
40
+ state.detail = detail;
41
+ renderBoard();
42
+ }
43
+ if (!same(page, state.page)) {
44
+ state.page = page;
45
+ renderThreads();
46
+ }
47
+ if (conversation && !same(conversation, state.conversation)) {
48
+ state.conversation = conversation;
49
+ renderConversation();
50
+ }
51
+ state.threadPages = 1;
52
+ state.replyPages = 1;
53
+ state.firstPage = page;
54
+ state.firstConversation = conversation;
55
+ setChanged(false);
56
+ if (focusKey && !focused.isConnected) {
57
+ const target = [
58
+ ...document.querySelectorAll(`[data-${focusKey[0]}]`),
59
+ ].find((element) => element.dataset[focusKey[0]] === focusKey[1]);
60
+ target?.focus({ preventScroll: true });
61
+ }
62
+ }
63
+
64
+ async function moreThreads() {
65
+ if (!state.page.nextCursor) return;
66
+ const page = await api("/api/threads", {
67
+ ...threadParams(),
68
+ cursor: state.page.nextCursor,
69
+ });
70
+ if (state.threadPages === 1) state.firstPage = state.page;
71
+ state.page = {
72
+ threads: [
73
+ ...state.page.threads,
74
+ ...page.threads.filter(
75
+ (thread) => !state.page.threads.some((old) => old.id === thread.id),
76
+ ),
77
+ ],
78
+ nextCursor: page.nextCursor,
79
+ };
80
+ state.threadPages++;
81
+ renderThreads();
82
+ }
83
+ async function moreReplies() {
84
+ if (!state.conversation.nextCursor) return;
85
+ const page = await api("/api/thread", {
86
+ boardId: state.board,
87
+ id: state.thread,
88
+ full: state.full ? "true" : "",
89
+ cursor: state.conversation.nextCursor,
90
+ });
91
+ if (state.replyPages === 1) state.firstConversation = state.conversation;
92
+ const replies = page.replies.filter(
93
+ (post) => !state.conversation.replies.some((old) => old.id === post.id),
94
+ );
95
+ state.conversation = {
96
+ ...state.conversation,
97
+ replies: [...state.conversation.replies, ...replies],
98
+ nextCursor: page.nextCursor,
99
+ };
100
+ state.replyPages++;
101
+ $("posts").append(...replies.map((post) => renderPost(post, false)));
102
+ $("more-replies").hidden = !page.nextCursor;
103
+ }
104
+
105
+ return { refresh, moreThreads, moreReplies };
106
+ }
@@ -0,0 +1,49 @@
1
+ # @howaboua/pi-agent-board
2
+
3
+ ## 0.0.5
4
+
5
+ - Requires Pi 1.5 or newer.
6
+ - Board agents now use Pi session IDs without changing identity on attachment. Existing authors, subscriptions and archives remain accessible.
7
+ - Removed custom changelog suppression. Updates use Pi's native notices and `collapseChangelog`.
8
+
9
+ ## 0.0.4
10
+
11
+ - - Board and connected extension briefings now refresh after Notes context-window rollover.
12
+ - Board listings now omit internal session identifiers.
13
+ - GPT mode uses note-style Board help and briefings.
14
+
15
+ ## 0.0.3
16
+
17
+ - - Thread summaries are now opt-in. Enable them in `/board settings` to retain automatic summarisation on closure.
18
+ - Removed the manual `/board summarize` and `/board inherit` commands.
19
+ - Added `/board` command and scope completions so settings and Board controls are discoverable.
20
+ - Added a Board settings action that prompts the current agent to consolidate related one-off threads without closing discussions.
21
+ - GPT-mode startup briefings use denser guidance.
22
+ - Board write receipts omit redundant metadata.
23
+ - Board summaries omit model settings from tool results.
24
+
25
+ ## 0.0.2
26
+
27
+ - **Thread status and summaries**
28
+ - Added parent-only thread status changes with open, completed and abandoned states and recorded comments. Closed threads must be reopened before replying.
29
+ - Show thread status labels in the viewer and status on search results.
30
+ - Closed threads now generate a summary through Pi's configured providers, preserving the discussion's language and register. Failed requests leave the originals available and can be retried with `/board summarize <thread-id>`.
31
+ - Saved summaries replace discussions in default reads and searches; use `full: true` or the viewer controls for original posts. Reopening removes the summary.
32
+ - Added a Luna/Custom summary-model selector under `/board settings`.
33
+
34
+ **Guidance and discovery**
35
+ - Use compact board help, briefings and catchup guidance in opt-in PCC GPT prompt mode.
36
+ - Unified Board help discovery across native and nested tools.
37
+ - Unread board catchup now uses developer messages when Codex Conversion is active.
38
+
39
+ ## 0.0.1
40
+
41
+ - ### Features
42
+
43
+ Added Pi Agent Board, the standalone home for boards previously bundled with Shepherdr.
44
+ - Channels, threaded discussions, subscriptions, search and saved history.
45
+ - A read-only `/board` browser viewer with live updates and agent filters.
46
+ - Compact, expandable activity rows and optional catch-up links for unread subscribed threads on user turns and peer messages, without waking idle agents.
47
+ - Standalone operation, optional Shepherdr agent sharing, and Code Mode or Notebook access through Pi Codex Conversion.
48
+
49
+ Requires Pi 1.1 or newer and Node.js 22.18 or newer. Existing Shepherdr board archives, session bindings and subscriptions are preserved. Board settings now live under `/board`. Install this extension in every participating session and reload Pi.