@prplkane/roundtable 0.0.0-stage → 0.6.3

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 (70) hide show
  1. package/CHANGELOG.md +513 -0
  2. package/LICENSE +21 -0
  3. package/README.md +188 -3
  4. package/SECURITY.md +299 -0
  5. package/docs/workflow.md +1325 -0
  6. package/package.json +52 -6
  7. package/scripts/agent.mjs +40 -0
  8. package/scripts/export.mjs +20 -0
  9. package/scripts/mcp.mjs +175 -0
  10. package/scripts/run-debate.mjs +70 -0
  11. package/scripts/server.mjs +28 -0
  12. package/scripts/setup.mjs +182 -0
  13. package/skills/roundtable/SKILL.md +55 -0
  14. package/src/adapters/agy.js +7 -0
  15. package/src/adapters/catalogue.js +49 -0
  16. package/src/adapters/claude.js +6 -0
  17. package/src/adapters/codex.js +6 -0
  18. package/src/adapters/common.js +304 -0
  19. package/src/adapters/config.js +432 -0
  20. package/src/adapters/endpoint.js +178 -0
  21. package/src/adapters/errors.js +69 -0
  22. package/src/adapters/index.js +11 -0
  23. package/src/adapters/models.js +106 -0
  24. package/src/adapters/quota.js +305 -0
  25. package/src/adapters/spawn.js +178 -0
  26. package/src/agent-client.js +108 -0
  27. package/src/cli.js +44 -0
  28. package/src/contract.js +256 -0
  29. package/src/diagnostics.js +133 -0
  30. package/src/doctor.js +96 -0
  31. package/src/engine.js +902 -0
  32. package/src/estimate.js +331 -0
  33. package/src/export.js +307 -0
  34. package/src/fake.js +75 -0
  35. package/src/folder-picker.js +46 -0
  36. package/src/history.js +220 -0
  37. package/src/local-http.js +39 -0
  38. package/src/local-server.js +82 -0
  39. package/src/notes.js +16 -0
  40. package/src/personas.js +49 -0
  41. package/src/preflight.js +126 -0
  42. package/src/progress.js +30 -0
  43. package/src/prompts.js +278 -0
  44. package/src/research.js +113 -0
  45. package/src/review-view.js +157 -0
  46. package/src/seats.js +272 -0
  47. package/src/server.js +913 -0
  48. package/src/settings.js +27 -0
  49. package/src/setup-toml.js +124 -0
  50. package/src/snapshot.js +93 -0
  51. package/src/store.js +303 -0
  52. package/src/terminal.js +53 -0
  53. package/src/terms.js +52 -0
  54. package/src/ui/app.js +1967 -0
  55. package/src/ui/avatars.js +132 -0
  56. package/src/ui/ceremony.js +87 -0
  57. package/src/ui/design/app.css +714 -0
  58. package/src/ui/design/preset-dusk.css +91 -0
  59. package/src/ui/design/tokens.css +129 -0
  60. package/src/ui/diagnostics.js +61 -0
  61. package/src/ui/help.js +122 -0
  62. package/src/ui/icons.js +64 -0
  63. package/src/ui/index.html +272 -0
  64. package/src/ui/loader.js +73 -0
  65. package/src/ui/logo.svg +4 -0
  66. package/src/ui/scan.js +57 -0
  67. package/src/ui/scribe.js +64 -0
  68. package/src/ui/sound.js +80 -0
  69. package/src/validate.js +112 -0
  70. package/src/version.js +5 -0
package/src/terms.js ADDED
@@ -0,0 +1,52 @@
1
+ // A vendor whose own docs say wrapping its CLI is unsupported or against its terms on some plans
2
+ // (config.js `terms`; today Antigravity). Nothing is sent to that CLI until the person has
3
+ // acknowledged the notice:
4
+ //
5
+ // on the board, once: kept per data folder in _terms.json, so the server knows at start whether
6
+ // it may read the CLI's model list and quota in the background. Only the board page records
7
+ // it (server.js fromBoard); an agent cannot change it for the machine.
8
+ // per request: options.acknowledgeTermsRisk. The board sends it once acknowledged; an agent
9
+ // sends it only when the person has agreed. A live server refuses an Antigravity seat,
10
+ // chairman or searcher without it, and the adapter refuses the call (TERMS_ACK_REQUIRED).
11
+ import { createSettingsStore } from './settings.js';
12
+
13
+ // The vendors on a table that carry a terms notice: seats, chairman and searcher. Pure.
14
+ export function termsVendors(cards, adapters) {
15
+ return [...new Set(cards.filter((s) => s && adapters[s.vendor]?.terms).map((s) => s.vendor))];
16
+ }
17
+
18
+ // The refusal for a request that would run such a vendor without the acknowledgment, or null. Pure.
19
+ export function termsRefusal(cards, options, adapters) {
20
+ const vendors = termsVendors(cards, adapters);
21
+ if (!vendors.length || options?.acknowledgeTermsRisk === true) return null;
22
+ const notices = vendors.map((v) => adapters[v].terms.notice).join(' ');
23
+ return Object.assign(new Error(`${notices} Acknowledge this on the board, or send options.acknowledgeTermsRisk: true once the person has agreed, or choose another provider.`),
24
+ { status: 400, code: 'TERMS_ACK_REQUIRED' });
25
+ }
26
+
27
+ // The board's acknowledgment per vendor, { at, read }: when it was given and the date of the
28
+ // notice it answered (config.js terms.read). A notice checked again later counts as not
29
+ // acknowledged, so the board asks again. A vendor without a notice is always clear.
30
+ export function createTermsRecord(file, { adapters, onError, now = Date.now } = {}) {
31
+ const store = createSettingsStore(file, { onError });
32
+ let value = store.value;
33
+ const acknowledged = (vendor) => {
34
+ const t = adapters[vendor]?.terms;
35
+ return !t || (value[vendor]?.read === t.read && Number.isFinite(value[vendor]?.at));
36
+ };
37
+ // what /api/seats tells the board about one vendor; null when it has no notice
38
+ const status = (vendor) => {
39
+ const t = adapters[vendor]?.terms;
40
+ return t ? { url: t.url, read: t.read, notice: t.notice, acknowledgedAt: acknowledged(vendor) ? value[vendor].at : null } : null;
41
+ };
42
+ function set(vendor, yes) {
43
+ if (!adapters[vendor]?.terms) throw Object.assign(new Error('This provider has no terms notice to acknowledge.'), { status: 400 });
44
+ const next = { ...value };
45
+ if (yes) next[vendor] = { at: now(), read: adapters[vendor].terms.read };
46
+ else delete next[vendor];
47
+ store.save(next);
48
+ value = next;
49
+ return status(vendor);
50
+ }
51
+ return { acknowledged, status, set };
52
+ }