@prplkane/roundtable 0.6.6 → 0.8.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.
@@ -431,7 +431,7 @@ details.panel:not([open]) > .panel-title { border-bottom: 0; }
431
431
  ends at the panel's edge instead of in a blank column. */
432
432
  .rules { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-3) var(--space-4); border-top: var(--border-width) solid var(--color-border); }
433
433
  .rules .field { flex: 0 0 140px; }
434
- .rules .field:has(#memory) { flex: 1 1 260px; }
434
+ .rules .field:has(#memory, #provider-history-mode) { flex: 1 1 260px; }
435
435
  .rules .field-check { flex: 0 0 auto; }
436
436
  .rules .field-check .check { min-height: 36px; }
437
437
  /* Unattended: an arming switch. The checkbox stays for the keyboard and screen readers; the
@@ -601,7 +601,8 @@ a.btn { display: inline-flex; align-items: center; text-decoration: none; }
601
601
  .startbar { position: sticky; bottom: 40px; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-2) var(--space-3); padding: var(--space-2) var(--space-3); background: var(--color-surface-raised); border: var(--border-width) solid var(--color-border-strong); border-radius: var(--radius); box-shadow: var(--shadow-hard); }
602
602
  .startbar-summary { margin-right: auto; font: var(--text-sm) var(--font-mono); font-variant-numeric: tabular-nums; color: var(--color-text-muted); }
603
603
  .startbar-summary b { color: var(--color-text); }
604
- .startbar .error { margin-right: 0; }
604
+ .startbar-copy { flex: 1 1 28rem; min-width: 0; }
605
+ .startbar .error:not(:empty) { margin-top: var(--space-2); white-space: pre-line; overflow-wrap: anywhere; }
605
606
 
606
607
  /* Errors on the board: banners above it, a plain reason on a failed card, the CLI's words behind it */
607
608
  .banners { display: flex; flex-direction: column; gap: var(--space-2); }
package/src/ui/help.js CHANGED
@@ -13,9 +13,10 @@ const HELP = {
13
13
  questionWait: { title: 'Answer window', text: 'How long the table waits when a seat asks you a question. If nobody answers, it continues with the missing facts still unknown. Writing an answer or choosing More time extends this window, within the overall time limit.' },
14
14
  wall: { title: 'Wall clock', text: 'The total time limit, including pauses while you read or type. When it runs out, the review stops. Give yourself enough time to respond.' },
15
15
  unattended: { title: 'Unattended', text: 'Off: the table gives you timed windows to read and answer questions, then continues automatically. On: it never waits; the seats state missing facts as assumptions. Use it when nobody can answer, whether the review is launched from the browser or an agent.' },
16
+ providerHistory: { title: 'Provider chat history', text: 'Applies to the searcher, seats and chairman. The default uses a non-saving session when available. Some providers can only archive the chat afterward or manage history themselves. Requiring a non-saving session checks every provider before the review. Roundtable keeps its own transcript.' },
16
17
  memory: { title: 'Memory', text: 'Stateless starts a fresh call each round with the relevant notes and replies. Resume continues a growing conversation and may use more tokens. Stateless is a good starting point.' },
17
18
  isolation: { title: 'Limited isolation', text: 'Antigravity cannot be fully sealed off: it still loads your shared Antigravity customizations and discovers your MCP servers, and its web search cannot be switched off. Roundtable denies its file, command, URL and MCP tools and stops the call at the first tool it reports. Choosing Antigravity on this card accepts that; choose another provider if it does not suit you.' },
18
- searcher: { title: 'Searcher', text: 'Optional. One extra call before the first round, on the provider you pick: it searches the web for your query and saves up to eight cited sources that every seat and the chairman then read. It sees only the query, never your notes, and never argues or votes.' },
19
+ searcher: { title: 'Searcher', text: 'Optional. One extra call before the first round, on the provider you pick: it searches the web for your query and saves up to eight cited sources that every seat and the chairman then read. It receives the query and any allowed source URLs. Roundtable opens public pages to check their excerpts.' },
19
20
  searchLimits: { title: 'Search limits', text: 'Searches: how many the CLI may report before the call is stopped. One search can cover several queries or pages, and the one over the limit may already have started. Time: when the searcher is stopped. Sources come from the provider and are not checked by Roundtable.' },
20
21
  effort: { title: 'Effort', text: 'How much reasoning the model should use. Higher effort can take longer and use more quota. No filled squares means the provider’s default.' },
21
22
  };
package/src/ui/index.html CHANGED
@@ -113,7 +113,7 @@
113
113
  <div class="f"><span class="label help-label" data-help="effort" tabindex="0" aria-describedby="help-effort">Effort</span><span class="pips" id="chair-pips"></span><select id="chairman-effort" class="effort" hidden><option value="">default</option></select></div>
114
114
  <span class="seat-note lamp-note" id="chair-note" tabindex="0"></span>
115
115
  <span class="iso-slot" id="chair-iso"></span>
116
- <details class="seat-more" id="chair-profile"><summary>Login profile</summary><input id="chairman-account" class="flat" placeholder="none: your usual login" aria-label="Chairman login profile"></details>
116
+ <details class="seat-more" id="chair-profile"><summary>Login profile</summary><input id="chairman-account" class="flat" placeholder="none: your usual login" aria-label="Chairman login profile"><span id="chair-model-discovery"></span></details>
117
117
  </div>
118
118
  </article>
119
119
  </div>
@@ -139,6 +139,7 @@
139
139
  <div class="f"><span class="label help-label" data-help="searchLimits" tabindex="0" aria-describedby="help-searchLimits">Limits</span><span class="searcher-limits"><input id="research-searches" class="flat" type="number" min="1" max="8" value="4" aria-label="Search limit"> searches · <input id="research-time" class="flat" type="number" min="30" max="600" value="120" aria-label="Time limit in seconds"> s</span></div>
140
140
  <span class="seat-note lamp-note" id="searcher-note" tabindex="0"></span>
141
141
  <span class="iso-slot" id="searcher-iso"></span>
142
+ <details class="seat-more"><summary>Allowed source URLs</summary><label for="research-scopes">Optional HTTPS hosts or paths, one per line. Roundtable opens public pages to check excerpts.</label><textarea id="research-scopes" rows="3"></textarea></details>
142
143
  <details class="seat-more" id="searcher-profile"><summary>Login profile</summary><input id="searcher-account" class="flat" placeholder="none: your usual login" aria-label="Searcher login profile"></details>
143
144
  </div>
144
145
  </article>
@@ -148,19 +149,24 @@
148
149
  <div class="field"><label class="label help-label" data-help="auto" tabindex="0" for="auto" aria-describedby="help-auto">Review window (s)</label><input id="auto" type="number" min="0.1" step="0.1" max="600" value="15" aria-describedby="help-auto"></div>
149
150
  <div class="field"><label class="label help-label" data-help="questionWait" tabindex="0" for="question-wait" aria-describedby="help-questionWait">Answer window (s)</label><input id="question-wait" type="number" min="0.1" step="0.1" max="600" value="120" aria-describedby="help-questionWait"></div>
150
151
  <div class="field"><label class="label help-label" data-help="wall" tabindex="0" for="wall" aria-describedby="help-wall">Wall clock (min)</label><input id="wall" type="number" min="1" max="180" value="30" aria-describedby="help-wall"></div>
152
+ <div class="field"><label class="label help-label" data-help="providerHistory" tabindex="0" for="provider-history-mode" aria-describedby="help-providerHistory">Provider chat history</label><select id="provider-history-mode" aria-describedby="help-providerHistory"><option value="prefer-ephemeral">Keep out of history when possible</option><option value="require-ephemeral">Require a non-saving session</option><option value="provider-default">Use provider default</option></select></div>
151
153
  <div class="field"><label class="label help-label" data-help="memory" tabindex="0" for="memory" aria-describedby="help-memory">Memory</label><select id="memory" aria-describedby="help-memory"><option value="stateless">stateless: fresh call per round</option><option value="resume">resume: re-send the thread</option></select></div>
152
154
  <div class="field field-check"><label class="label help-label" data-help="unattended" tabindex="0" for="unattended" aria-describedby="help-unattended">Unattended</label><label class="check"><input id="unattended" type="checkbox" aria-describedby="help-unattended"><span class="switch" aria-hidden="true"></span><span class="switch-text" data-off="off" data-on="armed"></span></label></div>
153
155
  </div>
154
156
  </section>
155
157
  <details class="panel" id="projection-panel">
156
- <summary class="panel-title fold"><span>Quota picture</span><span class="hint" id="projection-summary"></span></summary>
157
- <p class="hint panel-note">One pool per account: every seat on it draws from the same limit. Figures are estimates from past debates on this machine; other use of the same account moves the windows too.</p>
158
+ <summary class="panel-title fold"><span>Review estimate and account quota</span><span class="hint" id="projection-summary"></span></summary>
159
+ <p class="hint panel-note">Tokens and costs estimate what this review would use. Account usage comes from the provider’s last quota report.</p>
158
160
  <div id="projection" class="pools"></div>
159
161
  </details>
160
162
 
161
163
  <div class="startbar">
162
- <span class="startbar-summary" id="start-summary"></span>
163
- <span class="error" id="setup-error" role="alert"></span>
164
+ <div class="startbar-copy">
165
+ <div class="startbar-summary" id="start-summary"></div>
166
+ <div class="seat-note" id="start-profile-note" hidden>Opening this table runs the selected AgentLink profiles with their configured permissions and billing.</div>
167
+ <div class="error" id="setup-error" role="alert"></div>
168
+ </div>
169
+ <button class="btn btn-small" id="start-refresh" type="button" hidden>Refresh status</button>
164
170
  <button class="btn btn-primary" id="start" type="button">Open the table</button>
165
171
  </div>
166
172
  </section>
@@ -175,7 +181,8 @@
175
181
  <button class="fold-toggle" id="usage-toggle" type="button" aria-expanded="false" aria-controls="usage-details">Usage details</button>
176
182
  </div>
177
183
  <div id="usage-details" class="panel usage-details" hidden>
178
- <table id="usage"><thead><tr><th class="label">Pool and seat</th><th class="label num" title="Fresh input tokens">Input</th><th class="label num" title="Input tokens read from or written to the provider's cache">Cached</th><th class="label num">Output</th><th class="label num" title="A + marks a sum where some calls reported no cost">Cost</th><th class="label num">Time</th><th class="label num" title="Input tokens, cache included, that this seat sent in its latest round">Last round</th></tr></thead><tbody></tbody></table>
184
+ <table id="usage"><thead><tr><th class="label">Pool and seat</th><th class="label num" title="Fresh input tokens">Input</th><th class="label num" title="Input tokens read from or written to the provider's cache">Cached</th><th class="label num">Output</th><th class="label num" title="Separate total reported by the provider when available. A + indicates incomplete coverage.">CLI total</th><th class="label num" title="A + marks a sum where some calls reported no cost">Cost</th><th class="label num">Time</th><th class="label num" title="Input tokens, cache included, that this seat sent in its latest round">Last round</th></tr></thead><tbody></tbody></table>
185
+ <p id="provider-history" class="hint" hidden></p>
179
186
  </div>
180
187
  <header class="review-head" aria-label="Review">
181
188
  <h2 id="board-title" class="review-question"></h2>
package/src/validate.js CHANGED
@@ -3,6 +3,7 @@
3
3
  // the seats module or the exporter sees it. Pure, so it is unit tested.
4
4
 
5
5
  import { researchSettings } from './research.js';
6
+ import { agentLinkProfile } from './seats.js';
6
7
 
7
8
  export const LIMITS = {
8
9
  decision: 2000, option: 200, options: [2, 12], field: 4000, exportTo: 1024, seats: [2, 8], message: 4000,
@@ -68,6 +69,11 @@ export function validateDebateRequest(body, { adapters }) {
68
69
  if (o.critiqueRounds != null) options_.critiqueRounds = int(o.critiqueRounds, 'critiqueRounds', LIMITS.critiqueRounds);
69
70
  for (const k of ['autoContinueMs', 'questionWaitMs', 'wallClockMs', 'callTimeoutMs']) if (o[k] != null) options_[k] = int(o[k], k, LIMITS[k]);
70
71
  if (o.memory != null) { if (!['stateless', 'resume'].includes(o.memory)) fail('memory', 'stateless or resume'); options_.memory = o.memory; }
72
+ if (o.providerHistory != null) {
73
+ if (!['prefer-ephemeral', 'require-ephemeral', 'provider-default'].includes(o.providerHistory)) fail('providerHistory', 'prefer-ephemeral, require-ephemeral or provider-default');
74
+ options_.providerHistory = o.providerHistory;
75
+ }
76
+ if (options_.providerHistory === 'require-ephemeral' && options_.memory === 'resume') fail('memory', 'non-saving sessions require stateless memory');
71
77
  // an endpoint seat has no thread at the vendor to continue, so `resume` prompts would reach it
72
78
  // with no context: refuse the table rather than run it on half-prompts
73
79
  if (options_.memory === 'resume' && [...body.seats, body.chairman].some((s) => s && adapters[s.vendor]?.kind === 'api')) fail('memory', 'resume needs a session to continue, and an API endpoint seat has none; use stateless');
@@ -79,11 +85,17 @@ export function validateDebateRequest(body, { adapters }) {
79
85
  if (o.budget != null) {
80
86
  if (typeof o.budget !== 'object' || Array.isArray(o.budget)) fail('budget', 'an object');
81
87
  options_.budget = {};
82
- for (const [vendor, cap] of Object.entries(o.budget)) {
88
+ for (const [key, cap] of Object.entries(o.budget)) {
89
+ // a bare vendor caps every seat of that vendor; `acp@profile` caps one AgentLink profile
90
+ const at = key.indexOf('@'), vendor = at < 0 ? key : key.slice(0, at), profile = at < 0 ? null : key.slice(at + 1);
83
91
  if (!adapters[vendor]) fail('budget', `unknown vendor ${vendor}`);
84
- const tokens = amount(cap?.tokens, `${vendor} token cap`), usd = amount(cap?.usd, `${vendor} dollar cap`);
92
+ if (profile != null) {
93
+ if (adapters[vendor].kind !== 'acp') fail('budget', `${adapters[vendor].label} takes one budget for all its seats; use "${vendor}"`);
94
+ try { agentLinkProfile(profile); } catch (e) { fail('budget', `${key}: ${e.message}`); }
95
+ }
96
+ const tokens = amount(cap?.tokens, `${key} token cap`), usd = amount(cap?.usd, `${key} dollar cap`);
85
97
  if (usd > 0 && !adapters[vendor].paths?.cost) fail('budget', `${adapters[vendor].label} does not report cost, so it cannot take a dollar cap`);
86
- options_.budget[vendor] = { ...(tokens != null ? { tokens } : {}), ...(usd != null ? { usd } : {}) };
98
+ options_.budget[key] = { ...(tokens != null ? { tokens } : {}), ...(usd != null ? { usd } : {}) };
87
99
  }
88
100
  }
89
101
  return { fieldNotes, seats: body.seats, chairman: body.chairman ?? null, options: options_ };