feedcomposer commited on
Commit
e00d80b
·
verified ·
1 Parent(s): 39f707c

Add draft AI-Rights label derived from row 5 (Annex A proposal)

Browse files
Files changed (3) hide show
  1. css/app.css +11 -0
  2. index.html +3 -0
  3. js/app.js +58 -1
css/app.css CHANGED
@@ -205,6 +205,17 @@ code{font:.9em/1.4 ui-monospace,Menlo,Consolas,monospace;background:var(--line-2
205
  padding:11px 14px;margin-bottom:9px;border-top:1px solid var(--line);border-right:1px solid var(--line);border-bottom:1px solid var(--line)}
206
  .guide h4{font-size:13.5px;margin:0 0 4px}
207
  .guide p{font-size:13px;color:var(--ink-2);margin:0;line-height:1.5}
 
 
 
 
 
 
 
 
 
 
 
208
  .export-box{margin:26px 0 18px;padding:16px;background:#fff;border:1px solid var(--line);border-radius:var(--radius)}
209
  .export-box .fineprint{margin:10px 0 0}
210
  .review-doc{background:#e9ecee;border-radius:var(--radius);padding:18px;max-height:calc(100vh - 140px);overflow-y:auto}
 
205
  padding:11px 14px;margin-bottom:9px;border-top:1px solid var(--line);border-right:1px solid var(--line);border-bottom:1px solid var(--line)}
206
  .guide h4{font-size:13.5px;margin:0 0 4px}
207
  .guide p{font-size:13px;color:var(--ink-2);margin:0;line-height:1.5}
208
+ .labelbox{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:14px 16px;margin-bottom:8px}
209
+ .lbl-badge{display:inline-block;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:15px;font-weight:700;
210
+ letter-spacing:.02em;background:var(--accent);color:#fff;padding:6px 13px;border-radius:6px}
211
+ .lbl-exp{font-size:13.2px;color:var(--ink-2);margin:10px 0 0;line-height:1.5}
212
+ .lbl-note{font-size:12.5px;color:var(--amber);margin:7px 0 0;font-weight:600}
213
+ .lbl-mach{margin-top:10px;border-top:1px solid var(--line-2);padding-top:8px}
214
+ .lbl-mach summary{font-size:12.3px;color:var(--muted);cursor:pointer}
215
+ .lbl-mach p{font-size:12.3px;color:var(--ink-2);margin:7px 0 0;line-height:1.55}
216
+ .lbl-star{color:var(--muted) !important}
217
+ .tag-draft{display:inline-block;font-size:9.5px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;
218
+ background:#eef0fb;color:#3b4396;border:1px solid #c7cdf0;border-radius:99px;padding:2px 7px;margin-left:6px;vertical-align:1px}
219
  .export-box{margin:26px 0 18px;padding:16px;background:#fff;border:1px solid var(--line);border-radius:var(--radius)}
220
  .export-box .fineprint{margin:10px 0 0}
221
  .review-doc{background:#e9ecee;border-radius:var(--radius);padding:18px;max-height:calc(100vh - 140px);overflow-y:auto}
index.html CHANGED
@@ -243,6 +243,9 @@
243
  <div class="review-side">
244
  <h2>Before you export</h2>
245
  <div id="checklist"></div>
 
 
 
246
  <h3>Things this licence now commits you to</h3>
247
  <div id="guidance"></div>
248
  <div class="export-box">
 
243
  <div class="review-side">
244
  <h2>Before you export</h2>
245
  <div id="checklist"></div>
246
+ <h3>AI-Rights label <span class="tag-draft">draft proposal</span></h3>
247
+ <div id="labelBox" class="labelbox"></div>
248
+
249
  <h3>Things this licence now commits you to</h3>
250
  <div id="guidance"></div>
251
  <div class="export-box">
js/app.js CHANGED
@@ -451,6 +451,63 @@ function renderFullDoc() {
451
 
452
  /* ───────────── review tab ───────────── */
453
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
454
  function renderChecklist() {
455
  var out = "", total = 0;
456
  SCHEMA.forEach(function (s, i) {
@@ -579,7 +636,7 @@ function showTab(name) {
579
  Array.prototype.forEach.call(document.querySelectorAll(".tab"), function (b) {
580
  b.classList.toggle("is-active", b.dataset.tab === name);
581
  });
582
- if (name === "review") { renderChecklist(); renderGuidance(); renderFullDoc(); }
583
  scrollTop(window);
584
  }
585
 
 
451
 
452
  /* ───────────── review tab ───────────── */
453
 
454
+ /* AI-Rights label (draft proposal — see Annex A). Derived mechanically from row 5:
455
+ P is always granted (Technical Rights), and purpose attaches only to Output and
456
+ Display Rights, per CABI's drafting note for row 5. */
457
+
458
+ var LABEL_RSL = {
459
+ "AI-NONE": { permits: [], prohibits: ["all"] },
460
+ "AI-PREP": { permits: ["ai-index*"], prohibits: ["ai-train", "ai-input", "search"] },
461
+ "AI-TRAIN": { permits: ["ai-index*", "ai-train"], prohibits: ["ai-input", "search"] },
462
+ "AI-QUOTE": { permits: ["ai-index*", "search"], prohibits: ["ai-train", "ai-input"] },
463
+ "AI-GROUND": { permits: ["ai-index*", "ai-input", "search"], prohibits: ["ai-train"] },
464
+ "AI-FULL": { permits: ["ai-all"], prohibits: [] }
465
+ };
466
+
467
+ var LABEL_PROSE = {
468
+ "AI-NONE": "No AI use permitted.",
469
+ "AI-PREP": "Prepare and analyse only \u2014 no training, no outputs, nothing surfaced to end users.",
470
+ "AI-TRAIN": "Prepare and train \u2014 internal use only; no user-facing outputs or extracts.",
471
+ "AI-QUOTE": "Prepare and show attributed verbatim extracts \u2014 no training, no generated outputs.",
472
+ "AI-GROUND": "Prepare, generate grounded outputs and quote attributed extracts \u2014 no training on the corpus.",
473
+ "AI-FULL": "Prepare, train, generate outputs and quote attributed extracts."
474
+ };
475
+
476
+ function aiRightsLabel() {
477
+ var T = !!state.rTraining, G = hasOutputRights(), Q = hasDisplayRights();
478
+ var profile = "AI-PREP"; // Technical Rights are always granted
479
+ if (T && (G || Q)) profile = "AI-FULL";
480
+ else if (T) profile = "AI-TRAIN";
481
+ else if (G) profile = "AI-GROUND";
482
+ else if (Q) profile = "AI-QUOTE";
483
+
484
+ var suffix = "", note = "";
485
+ if (G || Q) {
486
+ var ps = purposesUsed();
487
+ var uniq = ps.filter(function (v, i) { return ps.indexOf(v) === i; });
488
+ if (uniq.length === 1) suffix = uniq[0] === "nc" ? "-NC" : "-C";
489
+ else if (uniq.length > 1) { suffix = "-C"; note = "Row 5 mixes Commercial and Non-Commercial purposes; the label takes the broader of the two."; }
490
+ else note = "No purpose chosen yet for the granted Output or Display Rights.";
491
+ }
492
+ return { label: profile + suffix, profile: profile, note: note, rsl: LABEL_RSL[profile] };
493
+ }
494
+
495
+ function renderLabel() {
496
+ var host = document.getElementById("labelBox");
497
+ if (!host) return;
498
+ var L = aiRightsLabel();
499
+ function toks(a) { return a.length ? "<code>" + a.join("</code> <code>") + "</code>" : "<em>none</em>"; }
500
+ host.innerHTML =
501
+ '<div class="lbl-badge">' + esc(L.label) + "</div>" +
502
+ '<p class="lbl-exp">' + esc(LABEL_PROSE[L.profile]) + "</p>" +
503
+ (L.note ? '<p class="lbl-note">' + esc(L.note) + "</p>" : "") +
504
+ '<details class="lbl-mach"><summary>Machine-readable form</summary>' +
505
+ "<p><strong>RSL 1.0</strong> \u2014 permits " + toks(L.rsl.permits) +
506
+ ", prohibits " + toks(L.rsl.prohibits) + ".</p>" +
507
+ '<p class="lbl-star">* <code>ai-index</code> stands in for a preparation token. GAIA proposes ' +
508
+ "<code>ai-prepare</code>; RSL 1.0 has no equivalent.</p></details>";
509
+ }
510
+
511
  function renderChecklist() {
512
  var out = "", total = 0;
513
  SCHEMA.forEach(function (s, i) {
 
636
  Array.prototype.forEach.call(document.querySelectorAll(".tab"), function (b) {
637
  b.classList.toggle("is-active", b.dataset.tab === name);
638
  });
639
+ if (name === "review") { renderChecklist(); renderGuidance(); renderLabel(); renderFullDoc(); }
640
  scrollTop(window);
641
  }
642