editorbrain 0.49.0 → 0.49.1
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.
- package/README.md +2 -2
- package/bin/editorbrain.mjs +654 -169
- package/package.json +1 -1
- package/skill/editorbrain/references/production-continuity.md +31 -2
package/README.md
CHANGED
|
@@ -5,13 +5,13 @@ Editorial references, brand context and portable video projects for Claude Code
|
|
|
5
5
|
Inspect the CLI without configuring your agent:
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
|
-
npx editorbrain@0.49.
|
|
8
|
+
npx editorbrain@0.49.1 help
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
For a persistent installation:
|
|
12
12
|
|
|
13
13
|
```sh
|
|
14
|
-
npm install -g editorbrain@0.49.
|
|
14
|
+
npm install -g editorbrain@0.49.1
|
|
15
15
|
editorbrain login --url https://api.editorbrain.com
|
|
16
16
|
editorbrain status --url https://api.editorbrain.com
|
|
17
17
|
editorbrain projects list
|
package/bin/editorbrain.mjs
CHANGED
|
@@ -209088,6 +209088,13 @@ import { fileURLToPath } from "node:url";
|
|
|
209088
209088
|
|
|
209089
209089
|
// packages/cli/src/agent-guidance-history.ts
|
|
209090
209090
|
var VERIFIED_GUIDANCE_RELEASES = [
|
|
209091
|
+
{
|
|
209092
|
+
"version": "0.49.0",
|
|
209093
|
+
"archiveSha256": "d547230e888151ce6d41e9fc2b382b2562b11614a20c11db27ada51987f98544",
|
|
209094
|
+
"files": {
|
|
209095
|
+
"editorbrain/references/production-continuity.md": "ca27f7b10c7fcb230c4317e9dd7cdce8a8697775433e77c13be9dea692b825d3"
|
|
209096
|
+
}
|
|
209097
|
+
},
|
|
209091
209098
|
{
|
|
209092
209099
|
"version": "0.48.0",
|
|
209093
209100
|
"archiveSha256": "c4f3c075b863c14e6bf01ab234d57c1de3eb97d4957850605ec63c89388e6af3",
|
|
@@ -217323,37 +217330,260 @@ import { createHash as createHash25, randomUUID as randomUUID10 } from "node:cry
|
|
|
217323
217330
|
|
|
217324
217331
|
// packages/cli/src/review-artifact-html.ts
|
|
217325
217332
|
import { createHash as createHash24 } from "node:crypto";
|
|
217333
|
+
|
|
217334
|
+
// packages/cli/src/review-artifact-design.ts
|
|
217335
|
+
var reviewArtifactCss = String.raw`
|
|
217336
|
+
*{box-sizing:border-box}
|
|
217337
|
+
[hidden]{display:none!important}
|
|
217338
|
+
:root{color-scheme:light;--paper:#F3EDE3;--surface:#FBF8F2;--ink:#29231F;--muted:#70635A;--line:#D9CDBF;--wine:#682E3B;--wine-hover:#51232E;--soft:#EFE2DE;--amber:#E89A4A;font-family:'Avenir Next',Manrope,ui-sans-serif,system-ui,-apple-system,sans-serif;color:var(--ink);background:var(--paper);font-size:15px;line-height:1.5}
|
|
217339
|
+
body{margin:0;min-width:280px;-webkit-font-smoothing:antialiased}
|
|
217340
|
+
button,input,textarea,select{font:inherit}
|
|
217341
|
+
button,a,summary{touch-action:manipulation}
|
|
217342
|
+
button{min-height:44px;padding:10px 16px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);cursor:pointer;font-weight:600;font-size:14px;line-height:1.35}
|
|
217343
|
+
button:hover:not(:disabled){background:#EDE3D6;border-color:#AC9686;transform:translateY(-1px)}
|
|
217344
|
+
button:disabled{opacity:.45;cursor:not-allowed}
|
|
217345
|
+
button.primary{background:var(--wine);color:#FFF9F0;border-color:var(--wine)}
|
|
217346
|
+
button.primary:hover:not(:disabled){background:var(--wine-hover);border-color:var(--wine-hover)}
|
|
217347
|
+
button.text-button{border-color:transparent;background:none;color:var(--wine);padding-inline:0;text-align:left}
|
|
217348
|
+
:focus-visible{outline:3px solid var(--wine);outline-offset:4px}
|
|
217349
|
+
::selection{background:var(--wine);color:#FFF9F0}
|
|
217350
|
+
a{color:var(--wine);text-underline-offset:4px;overflow-wrap:anywhere}
|
|
217351
|
+
h1,h2,h3,p{margin-top:0}
|
|
217352
|
+
h1{font-size:16px;font-weight:650;letter-spacing:-.025em;line-height:1.35;margin-bottom:3px;overflow-wrap:anywhere}
|
|
217353
|
+
h2{font-size:clamp(24px,2.7vw,32px);line-height:1.2;letter-spacing:-.04em;font-weight:650;margin-bottom:10px}
|
|
217354
|
+
h3{font-size:18px;letter-spacing:-.02em;line-height:1.35;margin-bottom:8px}
|
|
217355
|
+
p{line-height:1.6}
|
|
217356
|
+
.muted{color:var(--muted);font-size:13px}
|
|
217357
|
+
.topbar{display:flex;align-items:center;gap:20px 30px;padding:20px clamp(18px,4vw,48px);border-bottom:1px solid var(--line);flex-wrap:wrap;background:var(--surface)}
|
|
217358
|
+
.brand{flex:0 0 auto;display:block;color:var(--ink)}
|
|
217359
|
+
.brand svg{width:150px;height:auto;display:block}
|
|
217360
|
+
.project-heading{border-left:1px solid var(--line);padding-left:24px;flex:1;min-width:160px}
|
|
217361
|
+
#version{font-size:12px;color:var(--muted)}
|
|
217362
|
+
.project-stages{display:flex;flex-wrap:wrap;list-style:none;margin:0;padding:0;gap:6px;font-size:12px;color:var(--muted)}
|
|
217363
|
+
.project-stages li{padding:6px 10px;border:1px solid transparent;border-radius:30px;white-space:nowrap}
|
|
217364
|
+
.project-stages li[aria-current=step]{border-color:var(--line);background:var(--paper);color:var(--wine);font-weight:700}
|
|
217365
|
+
.project-stages b{font-variant-numeric:tabular-nums;margin-right:5px;font-weight:500}
|
|
217366
|
+
.header-actions{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
|
|
217367
|
+
button.guide-button{display:inline-flex;align-items:center;gap:7px;min-height:38px;padding:8px 10px;background:transparent;border-color:transparent;color:var(--wine);font-size:12px;white-space:nowrap}
|
|
217368
|
+
.guide-button span{display:grid;place-items:center;width:18px;height:18px;border:1px solid currentColor;border-radius:50%;font-size:11px}
|
|
217369
|
+
.review-guide{max-width:min(560px,calc(100vw - 32px));width:100%;max-height:calc(100svh - 32px);margin:auto;overflow:auto;overscroll-behavior:contain;padding:26px;border:1px solid var(--line);border-radius:20px;background:var(--surface);color:var(--ink);box-shadow:0 24px 80px #29231F33}
|
|
217370
|
+
.review-guide::backdrop{background:#29231F85}
|
|
217371
|
+
.guide-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
|
|
217372
|
+
.guide-heading .eyebrow{margin:0}
|
|
217373
|
+
.guide-heading button{min-width:36px;min-height:36px;padding:3px 8px;border-color:transparent;background:transparent;font-size:24px;font-weight:400}
|
|
217374
|
+
.review-guide h2{font-size:25px;line-height:1.25;margin-bottom:10px}
|
|
217375
|
+
#guide-intro{font-size:14px;color:var(--muted);margin-bottom:20px}
|
|
217376
|
+
.guide-steps{counter-reset:guide;list-style:none;padding:0;margin:0 0 18px}
|
|
217377
|
+
.guide-steps li{counter-increment:guide;position:relative;padding-left:38px;margin-bottom:16px}
|
|
217378
|
+
.guide-steps li::before{content:counter(guide);position:absolute;left:0;top:0;width:25px;height:25px;display:grid;place-items:center;border-radius:50%;background:var(--soft);color:var(--wine);font-size:12px;font-weight:600}
|
|
217379
|
+
.guide-steps strong{font-size:14px;font-weight:650}
|
|
217380
|
+
.guide-steps p{margin:4px 0 0;font-size:13px;color:var(--muted);line-height:1.55}
|
|
217381
|
+
.guide-approval{font-size:13px;color:var(--wine);border-left:2px solid var(--wine);padding-left:12px}
|
|
217382
|
+
.guide-storage{padding:14px 16px;background:var(--paper);border-radius:12px;margin:18px 0}
|
|
217383
|
+
.guide-storage strong{font-size:13px}
|
|
217384
|
+
.guide-storage p{font-size:12px;line-height:1.55;color:var(--muted);margin:7px 0 0}
|
|
217385
|
+
#guide-close{width:100%;margin-top:2px}
|
|
217386
|
+
.context-help{border:0;padding:0;margin:0 0 16px}
|
|
217387
|
+
.context-help summary{color:var(--wine);font-size:12px;font-weight:500;min-height:24px}
|
|
217388
|
+
.context-help p{font-size:12px;color:var(--muted);line-height:1.6;margin:8px 0 0;max-width:620px}
|
|
217389
|
+
.shell{width:100%;max-width:1360px;margin:0 auto;padding:26px clamp(18px,4vw,48px) 40px}
|
|
217390
|
+
.utility{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:24px;font-size:12px;color:var(--muted);flex-wrap:wrap}
|
|
217391
|
+
.utility p{margin:0}
|
|
217392
|
+
.privacy-dot{width:6px;height:6px;display:inline-block;border-radius:50%;background:var(--wine);margin-right:7px}
|
|
217393
|
+
.eyebrow{font-size:10px;letter-spacing:.13em;text-transform:uppercase;font-weight:700;color:var(--wine);margin-bottom:10px}
|
|
217394
|
+
.section-intro{max-width:720px;margin-bottom:24px}
|
|
217395
|
+
.section-intro p:last-child{margin-bottom:0;color:var(--muted);font-size:15px}
|
|
217396
|
+
.wizard{display:flex;gap:14px;max-width:720px;margin-bottom:26px}
|
|
217397
|
+
.wizard button{display:flex;flex:1;align-items:center;gap:9px;border:0;border-top:3px solid var(--line);border-radius:0;padding:12px 0 0;text-align:left;background:transparent;color:var(--muted);font-size:13px;min-width:0;min-height:45px}
|
|
217398
|
+
.wizard button span{font-variant-numeric:tabular-nums}
|
|
217399
|
+
.wizard button[aria-current=step]{border-top-color:var(--wine);color:var(--wine)}
|
|
217400
|
+
.wizard button:hover:not(:disabled){background:transparent;transform:none;color:var(--wine)}
|
|
217401
|
+
.workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,320px);align-items:start;gap:28px}
|
|
217402
|
+
.workspace.no-transcript{grid-template-columns:minmax(0,1fr);max-width:980px;margin-inline:auto}
|
|
217403
|
+
.preview{min-width:0}
|
|
217404
|
+
.media-meta{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px;flex-wrap:wrap}
|
|
217405
|
+
#media-quality{margin:0}
|
|
217406
|
+
.screen{display:flex;align-items:center;justify-content:center;overflow:hidden;min-height:190px;border:1px solid #29231F;border-radius:20px;background:#191511;box-shadow:0 8px 24px #29231F0B}
|
|
217407
|
+
.screen video{display:block;max-width:100%;width:100%;max-height:min(60svh,570px);object-fit:contain}
|
|
217408
|
+
.controls{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:10px 0 16px;color:var(--muted);font-size:12px;font-variant-numeric:tabular-nums}
|
|
217409
|
+
.controls-actions{display:flex;gap:6px}
|
|
217410
|
+
.controls button{min-height:36px;padding:7px 10px;font-size:12px;background:transparent}
|
|
217411
|
+
.watch-actions{display:flex;gap:10px;flex-wrap:wrap;padding:16px 0;border-top:1px solid var(--line)}
|
|
217412
|
+
.watch-actions button{flex:1;min-width:150px}
|
|
217413
|
+
.watch-actions p{flex-basis:100%;margin:0;font-size:12px;color:var(--muted)}
|
|
217414
|
+
.transcript-panel{position:sticky;top:22px;min-width:0;border:1px solid var(--line);border-radius:16px;background:var(--surface);padding:18px}
|
|
217415
|
+
details{border-top:1px solid var(--line);padding-top:14px;margin-top:16px}
|
|
217416
|
+
summary{cursor:pointer;font-size:14px;line-height:1.6;font-weight:650;min-height:30px}
|
|
217417
|
+
.transcript-panel details{margin:0;padding:0;border:0}
|
|
217418
|
+
.transcript-panel p{margin:10px 0;font-size:12px}
|
|
217419
|
+
#phrases{max-height:410px;overflow-y:auto;padding:3px;margin-top:14px;scrollbar-width:thin;scrollbar-color:var(--line) transparent}
|
|
217420
|
+
#phrases article{padding:12px;margin-bottom:8px;border:1px solid transparent;border-left:3px solid transparent;border-radius:10px;background:var(--paper)}
|
|
217421
|
+
#phrases article.speaking{border-left-color:var(--wine);background:var(--soft)}
|
|
217422
|
+
#phrases article.removed{background:transparent;border-color:var(--line)}
|
|
217423
|
+
#phrases article>button:first-child{padding:0;min-height:35px;display:block;border:0;background:none;text-align:left;line-height:1.65;width:100%;font-weight:500;font-size:13px}
|
|
217424
|
+
#phrases article>button:last-child{margin-top:8px;padding:6px 9px;min-height:34px;font-size:11px}
|
|
217425
|
+
#phrases small{color:var(--muted);font-size:11px}
|
|
217426
|
+
#phrases p{overflow-wrap:anywhere}
|
|
217427
|
+
#show-cuts-label{display:flex;gap:9px;align-items:center;margin-top:12px;color:var(--muted);font-size:12px}
|
|
217428
|
+
.change-panel{margin-top:18px;padding:22px;border:1px solid var(--line);border-radius:18px;background:var(--surface)}
|
|
217429
|
+
.change-panel h3{margin-bottom:6px}
|
|
217430
|
+
.change-panel>p{margin-bottom:18px}
|
|
217431
|
+
fieldset{border:0;margin:0;padding:0;min-width:0}
|
|
217432
|
+
legend,label{font-size:13px;font-weight:600}
|
|
217433
|
+
.target{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:10px 0 16px}
|
|
217434
|
+
.target button{min-height:42px;font-size:12px;padding:9px 12px;font-weight:500}
|
|
217435
|
+
.target button[aria-pressed=true]{background:var(--soft);border-color:var(--wine);color:var(--wine)}
|
|
217436
|
+
#target{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
|
|
217437
|
+
#clear-time{min-width:38px;padding-inline:8px}
|
|
217438
|
+
textarea{display:block;min-width:0;width:100%;min-height:110px;resize:vertical;background:#FFFDF8;border:1px solid #B8A898;border-radius:12px;padding:14px;color:var(--ink);font-size:14px;line-height:1.65;margin-top:9px}
|
|
217439
|
+
textarea::placeholder{color:#807268}
|
|
217440
|
+
.form-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px;flex-wrap:wrap}
|
|
217441
|
+
#draft-count{font-size:11px;color:var(--muted)}
|
|
217442
|
+
.templates{border:0;padding:0;margin:14px 0 0}
|
|
217443
|
+
.template-groups{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding-top:14px}
|
|
217444
|
+
.template-groups h4{font-size:11px;letter-spacing:.03em;color:var(--muted);margin:0 0 8px}
|
|
217445
|
+
.template-groups button{display:block;min-height:36px;padding:6px 9px;font-size:12px;font-weight:500;text-align:left;width:100%;margin:5px 0;background:var(--paper)}
|
|
217446
|
+
.change-actions{display:flex;justify-content:space-between;gap:12px;margin-top:18px;flex-wrap:wrap}
|
|
217447
|
+
.notice{border-radius:12px;border:1px solid #D9C1A9;background:#F5E7D6;padding:12px 16px;font-size:13px;margin-bottom:18px}
|
|
217448
|
+
.notice.error{background:#F7E6E0;border-color:#CB8E84;color:#812B2B}
|
|
217449
|
+
#markers{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:12px}
|
|
217450
|
+
#markers:empty{display:none}
|
|
217451
|
+
#markers button{padding:5px 9px;min-height:32px;font-size:11px;font-variant-numeric:tabular-nums}
|
|
217452
|
+
.comments{margin-top:20px}
|
|
217453
|
+
.comments summary{margin-bottom:12px}
|
|
217454
|
+
#notes{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr));gap:12px}
|
|
217455
|
+
#notes article{padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--surface);overflow-wrap:anywhere;font-size:13px}
|
|
217456
|
+
#notes p{margin:9px 0 0;white-space:pre-wrap}
|
|
217457
|
+
.note-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
|
|
217458
|
+
.note-head button{font-size:11px;padding:5px 8px;min-height:32px;background:transparent}
|
|
217459
|
+
.note-head button:last-child{color:var(--muted);border-color:transparent}
|
|
217460
|
+
#undo{margin-top:12px;font-size:12px}
|
|
217461
|
+
#notes-empty{font-size:13px;color:var(--muted)}
|
|
217462
|
+
.send-summary{display:flex;gap:16px;padding:20px 22px;background:var(--surface);border:1px solid var(--line);border-radius:16px;margin-bottom:22px;align-items:flex-start}
|
|
217463
|
+
.summary-symbol{width:38px;height:38px;border-radius:50%;background:var(--soft);color:var(--wine);display:grid;place-items:center;font-size:20px;flex:0 0 auto}
|
|
217464
|
+
.send-summary h3{margin-bottom:5px}
|
|
217465
|
+
.send-summary p{font-size:14px;color:var(--muted);margin:0;overflow-wrap:anywhere}
|
|
217466
|
+
.handoff{margin-top:24px;padding-top:22px;border-top:1px solid var(--line)}
|
|
217467
|
+
.handoff h2{font-size:24px}
|
|
217468
|
+
.handoff-steps{display:grid;grid-template-columns:1fr 1fr;gap:14px;list-style:none;padding:0;margin:18px 0}
|
|
217469
|
+
.handoff-steps li{border:1px solid var(--line);border-radius:16px;background:var(--surface);padding:22px;display:flex;flex-direction:column;gap:14px}
|
|
217470
|
+
.handoff-steps li:first-child{border-color:var(--wine)}
|
|
217471
|
+
.handoff-steps strong{font-size:16px;letter-spacing:-.02em}
|
|
217472
|
+
.handoff-steps .step-number{width:28px;height:28px;display:grid;place-items:center;border-radius:50%;font-size:12px;background:var(--soft);color:var(--wine)}
|
|
217473
|
+
.handoff-steps p{font-size:13px;color:var(--muted);margin:0}
|
|
217474
|
+
.handoff-steps button{min-height:50px;margin-top:auto}
|
|
217475
|
+
.handoff-steps .chat-label{margin-top:auto;padding:12px 14px;border-radius:10px;background:var(--paper);font-size:13px;color:var(--muted)}
|
|
217476
|
+
.handoff-options{display:flex;align-items:center;gap:18px;flex-wrap:wrap}
|
|
217477
|
+
.handoff-options button{font-size:13px}
|
|
217478
|
+
.handoff-options details{border:0;margin:0;padding:0;flex:1 1 100%}
|
|
217479
|
+
#request,#phone-request{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;min-height:180px}
|
|
217480
|
+
#status{font-size:13px;color:var(--wine);margin:18px 0 0;overflow-wrap:anywhere}
|
|
217481
|
+
#status:empty{display:none}
|
|
217482
|
+
.auxiliary{margin-top:26px;max-width:780px}
|
|
217483
|
+
.auxiliary details>p{font-size:13px;color:var(--muted);max-width:700px}
|
|
217484
|
+
#phone-copy{margin-top:3px}
|
|
217485
|
+
#phone-status{margin-bottom:0}
|
|
217486
|
+
.learning-section{margin-top:22px;background:var(--surface);padding:18px 22px;border-radius:16px;border:1px solid var(--line)}
|
|
217487
|
+
.learning-section>details{border:0;margin:0;padding:0}
|
|
217488
|
+
.learning-section p{font-size:13px;color:var(--muted)}
|
|
217489
|
+
#learning-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:16px}
|
|
217490
|
+
#learning-options article{border-top:1px solid var(--line);padding-top:16px}
|
|
217491
|
+
#learning-options label{display:flex;align-items:flex-start;gap:9px;font-size:14px}
|
|
217492
|
+
select{max-width:100%;width:100%;background:var(--paper);border:1px solid #B8A898;border-radius:10px;min-height:44px;padding:10px;color:var(--ink);font-size:13px}
|
|
217493
|
+
input[type=checkbox]{accent-color:var(--wine);width:16px;height:16px;flex-shrink:0;margin:3px 0 0}
|
|
217494
|
+
#direction-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,275px),1fr));gap:18px}
|
|
217495
|
+
.direction{display:flex;flex-direction:column;padding:12px 12px 18px;border:1px solid var(--line);background:var(--surface);border-radius:18px;position:relative;min-width:0}
|
|
217496
|
+
.direction.chosen{border-color:var(--wine);box-shadow:0 0 0 1px var(--wine)}
|
|
217497
|
+
.direction-media{position:relative;aspect-ratio:16/10;border-radius:11px;overflow:hidden;background:#191511;margin-bottom:16px}
|
|
217498
|
+
.direction-media img,.direction-media video{width:100%;height:100%;display:block;object-fit:contain}
|
|
217499
|
+
.direction .no-preview{height:100%;display:flex;flex-direction:column;gap:9px;align-items:center;justify-content:center;background:#EDE3D6;color:var(--muted);font-size:12px;padding:16px;text-align:center}
|
|
217500
|
+
.no-preview span:first-child{font:italic 32px/1 Georgia,serif;color:var(--wine)}
|
|
217501
|
+
.direction h3{margin:0 4px 7px;font-size:19px}
|
|
217502
|
+
.direction>p{margin:0 4px 18px;color:var(--muted);font-size:14px;flex:1;overflow-wrap:anywhere}
|
|
217503
|
+
.direction>.direction-choice{width:100%;margin-top:14px}
|
|
217504
|
+
.direction.chosen>.direction-choice{background:var(--wine);border-color:var(--wine);color:#FFF9F0}
|
|
217505
|
+
.chosen-label{position:absolute;top:10px;left:10px;background:var(--wine);color:#FFF9F0;padding:5px 10px;border-radius:20px;font-size:11px;pointer-events:none}
|
|
217506
|
+
.direction details{margin:0 4px;padding-top:10px}
|
|
217507
|
+
.direction details a{display:block;font-size:12px;margin:8px 0}
|
|
217508
|
+
footer{display:flex;justify-content:space-between;gap:12px;border-top:1px solid var(--line);margin-top:30px;padding-top:16px;color:var(--muted);font-size:11px;flex-wrap:wrap}
|
|
217509
|
+
.noscript{padding:18px;margin:18px;border:1px solid var(--line);border-radius:12px}
|
|
217510
|
+
@media(min-width:761px){.topbar{padding-block:14px}.shell{padding-top:18px}.utility{margin-bottom:12px}.wizard{margin-bottom:16px}.section-intro{margin-bottom:16px}.eyebrow{margin-bottom:6px}.section-intro h2{margin-bottom:6px}.media-meta{margin-bottom:8px}.screen video{max-height:min(52svh,max(180px,calc(100svh - 480px)),570px)}.controls{margin-top:8px;margin-bottom:10px}.watch-actions{padding-block:12px;gap:8px}}
|
|
217511
|
+
@media(max-width:950px){.header-actions{width:100%;justify-content:space-between;gap:4px 8px}.project-stages{justify-content:flex-start}.topbar{gap:16px;padding-block:16px}.workspace{grid-template-columns:minmax(0,1fr) 270px;gap:20px}.shell{padding-top:22px}.brand svg{width:132px}.project-heading{padding-left:18px}}
|
|
217512
|
+
@media(max-width:760px){.topbar{padding-inline:18px}.project-heading{min-width:120px}.shell{padding:20px 18px 28px}.utility{gap:6px;margin-bottom:20px}.workspace{grid-template-columns:1fr}.transcript-panel{position:static;padding:16px}.screen{min-height:150px;border-radius:14px}.screen video{max-height:49svh}.controls{margin-bottom:12px}.wizard{gap:10px;margin-bottom:22px}.wizard button{font-size:12px}.change-panel{padding:18px}.handoff-steps{grid-template-columns:1fr}.handoff-steps li{padding:18px}.handoff-steps li+li{gap:10px}.send-summary{padding:18px}.watch-actions button{min-width:120px}.learning-section{padding:18px}#phrases{max-height:260px}h2{font-size:26px}}
|
|
217513
|
+
@media(max-width:380px){.brand svg{width:110px}.topbar{gap:12px}.project-heading{padding-left:12px}.project-stages{gap:0;font-size:11px}.project-stages li{padding-inline:8px}.utility{font-size:11px}.template-groups{grid-template-columns:1fr}.target{gap:6px}.target button{padding:8px}.watch-actions{flex-direction:column}.controls{flex-wrap:wrap}.form-footer{align-items:stretch}.form-footer button{width:100%}.change-actions button{flex:1}}
|
|
217514
|
+
@media(prefers-reduced-motion:no-preference){button,.direction{transition:background .15s,border-color .15s,transform .15s}.step-content{animation:arrive .18s ease-out}@keyframes arrive{from{opacity:.6;transform:translateY(4px)}to{opacity:1;transform:none}}}
|
|
217515
|
+
`;
|
|
217516
|
+
|
|
217517
|
+
// packages/cli/src/review-artifact-html.ts
|
|
217326
217518
|
function reviewApp() {
|
|
217327
217519
|
const data = JSON.parse(document.getElementById("review-data").textContent);
|
|
217328
217520
|
const $ = (id4) => document.getElementById(id4);
|
|
217329
217521
|
const text15 = (tag, value, cls = "") => {
|
|
217330
|
-
const
|
|
217331
|
-
|
|
217332
|
-
|
|
217333
|
-
return
|
|
217522
|
+
const node2 = document.createElement(tag);
|
|
217523
|
+
node2.textContent = value;
|
|
217524
|
+
node2.className = cls;
|
|
217525
|
+
return node2;
|
|
217334
217526
|
};
|
|
217335
|
-
const button = (label,
|
|
217336
|
-
const
|
|
217337
|
-
|
|
217338
|
-
|
|
217339
|
-
return
|
|
217527
|
+
const button = (label, run2, cls = "") => {
|
|
217528
|
+
const node2 = text15("button", label, cls);
|
|
217529
|
+
node2.type = "button";
|
|
217530
|
+
node2.onclick = run2;
|
|
217531
|
+
return node2;
|
|
217340
217532
|
};
|
|
217341
217533
|
const time3 = (ms) => `${Math.floor(ms / 6e4).toString().padStart(2, "0")}:${(ms / 1e3 % 60).toFixed(1).padStart(4, "0")}`;
|
|
217342
|
-
const status = (
|
|
217343
|
-
$("status").textContent =
|
|
217534
|
+
const status = (message) => {
|
|
217535
|
+
$("status").textContent = message;
|
|
217344
217536
|
};
|
|
217345
|
-
let notes = [], choice = "", approval = false
|
|
217537
|
+
let notes = [], choice = "", approval = false;
|
|
217538
|
+
let mark, segmentId, endMs;
|
|
217346
217539
|
let learningChoices = {};
|
|
217347
|
-
let removed, storageOk = true, restoredDraft = "";
|
|
217540
|
+
let removed, storageOk = true, restoredDraft = "", copied = false;
|
|
217541
|
+
let step = 1;
|
|
217348
217542
|
const key = "editorbrain:review:" + data.artifactId;
|
|
217543
|
+
const note = $("note");
|
|
217544
|
+
const player = $("player");
|
|
217545
|
+
let mediaReady = false;
|
|
217546
|
+
const isDirections = data.stage === "directions";
|
|
217547
|
+
const isDelivery = data.stage === "delivery";
|
|
217548
|
+
const approvalReady = () => approval && mediaReady && !note.value.trim();
|
|
217549
|
+
const guide = $("review-guide");
|
|
217550
|
+
const guideButton = $("how-it-works");
|
|
217551
|
+
const guideSteps = isDirections ? [
|
|
217552
|
+
["Mira las propuestas", "Compara las im\xE1genes o videos y la idea de cada direcci\xF3n."],
|
|
217553
|
+
["Elige una direcci\xF3n", "Pulsa Elegir en la que prefieras. Puedes cambiar de elecci\xF3n."],
|
|
217554
|
+
["Copia tu elecci\xF3n", "El mensaje incluye la propuesta y esta versi\xF3n."],
|
|
217555
|
+
["P\xE9gala en el mismo chat", "Tu agente recibir\xE1 tu elecci\xF3n y podr\xE1 preparar la muestra."]
|
|
217556
|
+
] : [
|
|
217557
|
+
["Mira esta versi\xF3n", "Reproduce el video con audio antes de decidir."],
|
|
217558
|
+
["Marca o comenta", "En Cambia, se\xF1ala un segundo con Marcar este momento o elige En todo el video."],
|
|
217559
|
+
["Guarda tus comentarios", "Pulsa Guardar comentario en cada nota y revisa el resumen en Env\xEDa."],
|
|
217560
|
+
["Copia y pega en tu chat", "Copia el mensaje y p\xE9galo en la misma conversaci\xF3n de Claude o Codex."]
|
|
217561
|
+
];
|
|
217562
|
+
$("guide-title").textContent = isDirections ? "Elige la direcci\xF3n de tu video" : isDelivery ? "Revisa y aprueba la entrega" : "Revisa tu video sin complicarte";
|
|
217563
|
+
for (const [title, description] of guideSteps) {
|
|
217564
|
+
const item = text15("li", "");
|
|
217565
|
+
item.append(text15("strong", title), text15("p", description));
|
|
217566
|
+
$("guide-steps").append(item);
|
|
217567
|
+
}
|
|
217568
|
+
$("guide-approval").hidden = isDirections;
|
|
217569
|
+
$("guide-approval").textContent = isDelivery ? "Sin cambios: pulsa Aprobar esta entrega y copia la aprobaci\xF3n al chat." : "Sin cambios: pulsa Me gusta esta versi\xF3n y copia la aprobaci\xF3n al chat.";
|
|
217570
|
+
guideButton.onclick = () => {
|
|
217571
|
+
for (const video of Array.from(document.querySelectorAll("video"))) video.pause();
|
|
217572
|
+
if (!guide.open) guide.showModal();
|
|
217573
|
+
};
|
|
217574
|
+
$("guide-dismiss").onclick = () => guide.close();
|
|
217575
|
+
$("guide-close").onclick = () => guide.close();
|
|
217576
|
+
guide.onclose = () => guideButton.focus({ preventScroll: true });
|
|
217349
217577
|
try {
|
|
217350
217578
|
const saved = JSON.parse(localStorage.getItem(key) || "null");
|
|
217351
217579
|
if (saved) {
|
|
217352
217580
|
for (const proposal of data.learnings ?? []) {
|
|
217353
|
-
const
|
|
217354
|
-
if (
|
|
217581
|
+
const value = saved.learningChoices?.[proposal.id];
|
|
217582
|
+
if (value && ["project", "style", "series", "format", "brand"].includes(value.target)) {
|
|
217583
|
+
learningChoices[proposal.id] = { selected: value.selected === true, target: value.target };
|
|
217584
|
+
}
|
|
217355
217585
|
}
|
|
217356
|
-
notes = Array.isArray(saved.notes) ? saved.notes.filter((n) => n && typeof n.id === "string" && typeof n.text === "string" && n.text.length <= 1500 && [n.startMs, n.endMs].every((t) => t === void 0 || Number.isFinite(t) && t >= 0 && t <= 36e6) &&
|
|
217586
|
+
notes = Array.isArray(saved.notes) ? saved.notes.filter((n) => n && typeof n.id === "string" && typeof n.text === "string" && n.text.length <= 1500 && [n.startMs, n.endMs].every((t) => t === void 0 || Number.isFinite(t) && t >= 0 && t <= 36e6) && (n.segmentId === void 0 || typeof n.segmentId === "string")).slice(0, 100) : [];
|
|
217357
217587
|
choice = data.directions?.some((d) => d.id === saved.choice) ? saved.choice : "";
|
|
217358
217588
|
approval = saved.approval === true && !notes.length;
|
|
217359
217589
|
restoredDraft = typeof saved.draft === "string" && saved.draft.length <= 1500 ? saved.draft : "";
|
|
@@ -217362,155 +217592,224 @@ function reviewApp() {
|
|
|
217362
217592
|
endMs = Number.isFinite(saved.endMs) && saved.endMs >= 0 ? saved.endMs : void 0;
|
|
217363
217593
|
segmentId = typeof saved.segmentId === "string" ? saved.segmentId : void 0;
|
|
217364
217594
|
}
|
|
217595
|
+
if ([1, 2, 3].includes(saved.step)) step = saved.step;
|
|
217596
|
+
else if (notes.length || restoredDraft) step = 2;
|
|
217597
|
+
if (step === 3 && (restoredDraft || !notes.length && !approval)) step = restoredDraft ? 2 : 1;
|
|
217365
217598
|
}
|
|
217366
217599
|
} catch {
|
|
217367
217600
|
storageOk = false;
|
|
217368
217601
|
}
|
|
217369
|
-
|
|
217602
|
+
note.value = restoredDraft;
|
|
217603
|
+
function persist() {
|
|
217370
217604
|
try {
|
|
217371
|
-
localStorage.setItem(key, JSON.stringify({ notes, choice, approval, learningChoices, draft:
|
|
217605
|
+
localStorage.setItem(key, JSON.stringify({ notes, choice, approval, learningChoices, draft: note.value, mark, endMs, segmentId, step }));
|
|
217372
217606
|
} catch {
|
|
217373
217607
|
storageOk = false;
|
|
217374
217608
|
}
|
|
217375
|
-
$("saved").textContent = storageOk ? "Guardado en este navegador" : "Descarga tus cambios antes de cerrar";
|
|
217376
|
-
}
|
|
217377
|
-
$("title").textContent = data.title;
|
|
217378
|
-
$("version").textContent = data.version;
|
|
217379
|
-
$("phase").textContent = data.stage === "directions" ? "01 \xB7 ELIGE UNA DIRECCI\xD3N" : data.stage === "delivery" ? "03 \xB7 TU ENTREGA" : "02 \xB7 REVISA TU VIDEO";
|
|
217380
|
-
$("media-quality").textContent = data.video?.purpose === "preview" ? `Vista previa${data.video.quality ? " \xB7 " + data.video.quality + "p" : ""} \xB7 Revisa cortes, textos y audio` : data.video?.purpose === "final" ? "Render final" : "Vista de revisi\xF3n";
|
|
217381
|
-
const player = $("player");
|
|
217382
|
-
let mediaReady = false;
|
|
217609
|
+
$("saved").textContent = storageOk ? "Guardado en este navegador \xB7 Nada se env\xEDa solo" : "No se pudo guardar aqu\xED \xB7 Descarga tus cambios antes de cerrar";
|
|
217610
|
+
}
|
|
217383
217611
|
function seek(ms) {
|
|
217384
217612
|
if (mediaReady) {
|
|
217385
217613
|
player.pause();
|
|
217386
217614
|
player.currentTime = Math.min(Math.max(0, ms / 1e3), player.duration);
|
|
217387
217615
|
}
|
|
217388
217616
|
}
|
|
217389
|
-
const feedback2 = () => ({ schemaVersion: 1, kind: "editorbrain.review-feedback", projectId: data.projectId, artifactId: data.artifactId, version: data.version, videoSha256: data.video?.sha256 ?? null, stage: data.stage, contextVersion: data.contextVersion ?? null, scope: "project", directionId: choice || null, decision:
|
|
217390
|
-
const
|
|
217617
|
+
const feedback2 = () => ({ schemaVersion: 1, kind: "editorbrain.review-feedback", projectId: data.projectId, artifactId: data.artifactId, version: data.version, videoSha256: data.video?.sha256 ?? null, stage: data.stage, contextVersion: data.contextVersion ?? null, scope: "project", directionId: choice || null, decision: approvalReady() ? data.stage === "delivery" ? "approve_final" : "approve_sample" : "changes", comments: notes, ...approvalReady() ? { learningRequests: (data.learnings ?? []).filter((p) => learningChoices[p.id]?.selected).map((p) => ({ ...p, target: learningChoices[p.id].target, context: data.learningContext, userConfirmed: true })) } : {} });
|
|
217618
|
+
const draftWarning = () => note.value.trim() ? "Hay un comentario sin guardar. No interpretes este mensaje como una aprobaci\xF3n ni como la lista completa de cambios. P\xEDdeme guardar el comentario y volver a copiar la indicaci\xF3n.\n\n" : "";
|
|
217619
|
+
const prompt = () => `${draftWarning()}Contin\xFAa mi proyecto ${data.projectId} desde la versi\xF3n ${data.version}. Adjunto mis decisiones del artefacto EditorBrain. Verifica artifactId y el hash del video antes de aplicarlas. Los cambios son solo de este video; conserva mi marca y lo dem\xE1s. Para una frase recortada, usa su segmentId en la transcripci\xF3n del artefacto y sus tiempos de origen, nunca como tiempos del montaje. ${data.video?.purpose === "preview" ? "Esta revisi\xF3n corresponde al borrador. Si la decisi\xF3n es aprobar, genera la entrega desde los originales con el perfil final del proyecto; nunca escales el archivo de la vista previa. " : ""}No gastes fuera del presupuesto ya autorizado. Entrega la nueva versi\xF3n con su artefacto actualizado. Solo si learningRequests contiene selecciones, guarda esas preferencias en el alcance elegido con la API de memoria y revisiones vigentes; no actives otras sugerencias. La aprobaci\xF3n del video no es consentimiento para compartir se\xF1ales de producto. Confirma lo que efectivamente se guard\xF3, no solo lo preparado aqu\xED.
|
|
217391
217620
|
|
|
217392
217621
|
${JSON.stringify(feedback2(), null, 2)}`;
|
|
217393
217622
|
const phonePrompt = () => `Quiero revisar en mi tel\xE9fono esta versi\xF3n de EditorBrain: proyecto ${data.projectId}, versi\xF3n ${data.version}, artifactId ${data.artifactId}, video SHA-256 ${data.video?.sha256 ?? "sin video"}. Mant\xE9n \xABEn computadora\xBB como opci\xF3n principal. ${data.stage === "directions" ? "Mu\xE9strame estas propuestas con im\xE1genes ligeras en el chat m\xF3vil; todav\xEDa no hay una muestra de video para registrar." : "Autorizo subir solo una copia ligera de esta muestra a mi proyecto privado de EditorBrain. Reutiliza la copia y el registro si ya existen; verifica el hash, el contexto, el espacio disponible y las reservas antes de subir. Conserva originales y master en mi computadora. No subas originales para completar una transcripci\xF3n. Si falta espacio, conserva la revisi\xF3n local y ofrece alternativas sin borrar archivos ni cambiar mi plan. Devu\xE9lveme el enlace autenticado al proyecto, nunca localhost ni un enlace p\xFAblico. Comprueba reproducci\xF3n y versi\xF3n. No crees un enlace hasta confirmar la subida y el registro."} Esto no aprueba la edici\xF3n ni autoriza generar contenido de pago. Mis comentarios locales no se sincronizan solos; te adjunto los guardados para que los concilies antes de continuar.
|
|
217394
217623
|
|
|
217395
217624
|
${JSON.stringify({ ...feedback2(), kind: "editorbrain.review-access-request", decision: "request_phone_review" }, null, 2)}`;
|
|
217396
|
-
|
|
217397
|
-
if (
|
|
217398
|
-
|
|
217399
|
-
|
|
217625
|
+
function renderSteps() {
|
|
217626
|
+
if (isDirections) return;
|
|
217627
|
+
if (step === 3) player.pause();
|
|
217628
|
+
$("editing").hidden = step === 3;
|
|
217629
|
+
$("change-panel").hidden = step !== 2;
|
|
217630
|
+
$("watch-actions").hidden = step !== 1;
|
|
217631
|
+
$("change-actions").hidden = step !== 2;
|
|
217632
|
+
$("comments").hidden = step === 1;
|
|
217633
|
+
$("send-summary").hidden = step !== 3;
|
|
217634
|
+
$("handoff").hidden = step !== 3;
|
|
217635
|
+
$("learning-section").hidden = step !== 3 || !approvalReady() || !data.learnings?.length;
|
|
217636
|
+
const names = ["step-watch", "step-change", "step-send"];
|
|
217637
|
+
for (let index = 0; index < names.length; index++) {
|
|
217638
|
+
if (step === index + 1) $(names[index]).setAttribute("aria-current", "step");
|
|
217639
|
+
else $(names[index]).removeAttribute("aria-current");
|
|
217640
|
+
}
|
|
217641
|
+
$("step-title").textContent = step === 1 ? isDelivery ? "Tu video est\xE1 listo para revisar" : "Mira esta versi\xF3n" : step === 2 ? "Dinos qu\xE9 quieres cambiar" : "Todo listo para tu agente";
|
|
217642
|
+
$("intro").textContent = step === 1 ? "Reproduce el video. Puedes pedir ajustes o preparar tu aprobaci\xF3n." : step === 2 ? "Marca un momento o comenta sobre todo el video. Lo dem\xE1s se conserva." : "Revisa tu decisi\xF3n y ll\xE9vala a la misma conversaci\xF3n.";
|
|
217643
|
+
}
|
|
217644
|
+
function setStep(next, focus = true) {
|
|
217645
|
+
if (next === 3) {
|
|
217646
|
+
if (note.value.trim()) {
|
|
217647
|
+
status("Guarda tu comentario antes de preparar el env\xEDo.");
|
|
217648
|
+
note.focus();
|
|
217649
|
+
return;
|
|
217650
|
+
}
|
|
217651
|
+
if (!notes.length && !(approval && mediaReady)) {
|
|
217652
|
+
status("A\xF1ade un comentario o prepara tu aprobaci\xF3n antes de continuar.");
|
|
217653
|
+
return;
|
|
217654
|
+
}
|
|
217400
217655
|
}
|
|
217401
|
-
|
|
217402
|
-
|
|
217403
|
-
|
|
217404
|
-
|
|
217405
|
-
|
|
217406
|
-
$("
|
|
217407
|
-
$("phone-request").focus();
|
|
217408
|
-
$("phone-request").select();
|
|
217409
|
-
$("phone-status").textContent = "Copia esta indicaci\xF3n y p\xE9gala en el mismo chat. Todav\xEDa no se ha subido nada.";
|
|
217656
|
+
step = next;
|
|
217657
|
+
renderSteps();
|
|
217658
|
+
persist();
|
|
217659
|
+
if (focus) {
|
|
217660
|
+
$("step-title").focus({ preventScroll: true });
|
|
217661
|
+
$("step-title").scrollIntoView({ block: "nearest" });
|
|
217410
217662
|
}
|
|
217411
|
-
}
|
|
217663
|
+
}
|
|
217664
|
+
function prepareComment() {
|
|
217665
|
+
if (!isDirections) setStep(2, false);
|
|
217666
|
+
note.focus({ preventScroll: true });
|
|
217667
|
+
note.scrollIntoView({ block: "nearest" });
|
|
217668
|
+
}
|
|
217669
|
+
function renderTarget() {
|
|
217670
|
+
$("target").textContent = mark !== void 0 ? `Momento ${time3(mark)}` : segmentId ? "Frase del original" : "Todo el video";
|
|
217671
|
+
$("mark").setAttribute("aria-pressed", String(mark !== void 0));
|
|
217672
|
+
$("scope-all").setAttribute("aria-pressed", String(mark === void 0 && !segmentId));
|
|
217673
|
+
$("clear-time").hidden = mark === void 0 && !segmentId;
|
|
217674
|
+
}
|
|
217675
|
+
function updateActions() {
|
|
217676
|
+
const pendingDraft = !!note.value.trim();
|
|
217677
|
+
const canExport = !pendingDraft && (isDirections ? !!choice : !!notes.length || approvalReady());
|
|
217678
|
+
$("approve").disabled = !!notes.length || !mediaReady;
|
|
217679
|
+
$("approve").textContent = approvalReady() ? "Aprobaci\xF3n preparada" : isDelivery ? "Aprobar esta entrega" : "Me gusta esta versi\xF3n";
|
|
217680
|
+
$("copy").textContent = pendingDraft ? "Guarda tu comentario primero" : copied ? "Copiado \xB7 P\xE9galo en el chat" : isDirections ? "Copiar mi elecci\xF3n" : approvalReady() ? "Copiar aprobaci\xF3n" : "Copiar cambios";
|
|
217681
|
+
$("copy").disabled = !canExport;
|
|
217682
|
+
$("download").disabled = !canExport;
|
|
217683
|
+
$("review-send").disabled = !notes.length || pendingDraft;
|
|
217684
|
+
$("step-send").disabled = !canExport || pendingDraft;
|
|
217685
|
+
$("draft-count").textContent = `${note.value.length} / 1500`;
|
|
217686
|
+
}
|
|
217687
|
+
function renderSummary() {
|
|
217688
|
+
const chosen = data.directions?.find((d) => d.id === choice);
|
|
217689
|
+
const pendingDraft = !!note.value.trim();
|
|
217690
|
+
$("summary-title").textContent = pendingDraft ? "Comentario sin guardar" : isDirections ? "Tu elecci\xF3n" : approvalReady() ? "Aprobaci\xF3n preparada" : `${notes.length} ${notes.length === 1 ? "cambio para tu agente" : "cambios para tu agente"}`;
|
|
217691
|
+
$("summary-detail").textContent = pendingDraft ? "Guarda tu comentario para preparar una indicaci\xF3n completa. Todav\xEDa no hay una aprobaci\xF3n lista para enviar." : isDirections ? chosen?.title || "" : `${data.version} \xB7 ${approvalReady() ? "Se enviar\xE1 \xFAnicamente la aprobaci\xF3n de esta versi\xF3n." : "Tu agente aplicar\xE1 estos ajustes. Esta vista todav\xEDa muestra la versi\xF3n anterior."}`;
|
|
217692
|
+
}
|
|
217693
|
+
function refreshOutput() {
|
|
217694
|
+
$("request").value = prompt();
|
|
217695
|
+
$("phone-request").value = draftWarning() + phonePrompt();
|
|
217696
|
+
}
|
|
217697
|
+
function draftChanged() {
|
|
217698
|
+
copied = false;
|
|
217699
|
+
updateActions();
|
|
217700
|
+
renderSummary();
|
|
217701
|
+
refreshOutput();
|
|
217702
|
+
persist();
|
|
217703
|
+
}
|
|
217412
217704
|
function update() {
|
|
217413
|
-
$("learning-section").hidden = !approval || !data.learnings?.length;
|
|
217414
217705
|
$("notes").replaceChildren();
|
|
217415
217706
|
$("markers").replaceChildren();
|
|
217416
|
-
for (const
|
|
217417
|
-
const card = text15("article", "");
|
|
217418
|
-
const
|
|
217419
|
-
|
|
217420
|
-
|
|
217707
|
+
for (const item of notes) {
|
|
217708
|
+
const card = text15("article", ""), head = text15("div", "", "note-head");
|
|
217709
|
+
const jump = button(item.startMs === void 0 ? item.segmentId ? "Frase del original" : "Todo el video" : time3(item.startMs), () => {
|
|
217710
|
+
if (item.startMs !== void 0) {
|
|
217711
|
+
setStep(2, false);
|
|
217712
|
+
seek(item.startMs);
|
|
217713
|
+
player.scrollIntoView({ block: "nearest" });
|
|
217714
|
+
}
|
|
217421
217715
|
});
|
|
217422
|
-
jump.disabled =
|
|
217716
|
+
jump.disabled = item.startMs === void 0 || !mediaReady;
|
|
217423
217717
|
head.append(jump, button("Quitar nota", () => {
|
|
217424
|
-
removed =
|
|
217425
|
-
notes = notes.filter((
|
|
217718
|
+
removed = item;
|
|
217719
|
+
notes = notes.filter((n) => n.id !== item.id);
|
|
217720
|
+
copied = false;
|
|
217426
217721
|
update();
|
|
217427
217722
|
$("undo").hidden = false;
|
|
217428
217723
|
}));
|
|
217429
|
-
card.append(head, text15("p",
|
|
217724
|
+
card.append(head, text15("p", item.text));
|
|
217430
217725
|
$("notes").append(card);
|
|
217431
|
-
if (
|
|
217432
|
-
const marker = button(time3(
|
|
217433
|
-
marker.title =
|
|
217726
|
+
if (item.startMs !== void 0) {
|
|
217727
|
+
const marker = button(time3(item.startMs), () => seek(item.startMs));
|
|
217728
|
+
marker.title = item.text;
|
|
217729
|
+
marker.disabled = !mediaReady;
|
|
217434
217730
|
$("markers").append(marker);
|
|
217435
217731
|
}
|
|
217436
217732
|
}
|
|
217733
|
+
$("notes-empty").hidden = !!notes.length;
|
|
217734
|
+
$("comments-label").textContent = `Mis comentarios${notes.length ? ` \xB7 ${notes.length}` : ""}`;
|
|
217437
217735
|
$("pending").hidden = !notes.length;
|
|
217438
217736
|
$("pending").textContent = `${notes.length} ${notes.length === 1 ? "cambio pendiente" : "cambios pendientes"}. El video todav\xEDa no incluye estas correcciones.`;
|
|
217439
|
-
|
|
217440
|
-
$("
|
|
217441
|
-
$("copy").textContent = data.stage === "directions" ? "Copiar mi elecci\xF3n" : approval ? "Copiar aprobaci\xF3n" : "Copiar cambios";
|
|
217442
|
-
$("copy").disabled = data.stage === "directions" ? !choice : !notes.length && !approval;
|
|
217443
|
-
$("download").disabled = $("copy").disabled;
|
|
217737
|
+
renderSummary();
|
|
217738
|
+
$("paste-step").classList.toggle("copied", copied);
|
|
217444
217739
|
for (const card of Array.from(document.querySelectorAll("[data-choice]"))) {
|
|
217445
217740
|
const selected = card.dataset.choice === choice;
|
|
217446
217741
|
card.classList.toggle("chosen", selected);
|
|
217447
|
-
card.querySelector("
|
|
217448
|
-
|
|
217449
|
-
|
|
217450
|
-
|
|
217742
|
+
const pick3 = card.querySelector(".direction-choice");
|
|
217743
|
+
pick3.setAttribute("aria-pressed", String(selected));
|
|
217744
|
+
pick3.textContent = selected ? "Elegida para este video" : "Elegir " + card.querySelector("h3").textContent;
|
|
217745
|
+
card.querySelector(".chosen-label").hidden = !selected;
|
|
217746
|
+
}
|
|
217747
|
+
if (isDirections) {
|
|
217748
|
+
$("handoff").hidden = !choice;
|
|
217749
|
+
$("send-summary").hidden = !choice;
|
|
217750
|
+
} else renderSteps();
|
|
217751
|
+
updateActions();
|
|
217752
|
+
renderTarget();
|
|
217753
|
+
refreshOutput();
|
|
217451
217754
|
persist();
|
|
217452
217755
|
}
|
|
217453
|
-
|
|
217454
|
-
|
|
217455
|
-
|
|
217456
|
-
|
|
217457
|
-
|
|
217458
|
-
|
|
217459
|
-
|
|
217460
|
-
|
|
217461
|
-
|
|
217462
|
-
|
|
217463
|
-
|
|
217464
|
-
|
|
217465
|
-
|
|
217466
|
-
|
|
217467
|
-
|
|
217468
|
-
if (!select.value) select.value = "project";
|
|
217469
|
-
const save = () => {
|
|
217470
|
-
learningChoices[proposal.id] = { selected: check2.checked, target: select.value };
|
|
217471
|
-
update();
|
|
217472
|
-
};
|
|
217473
|
-
check2.onchange = save;
|
|
217474
|
-
select.onchange = save;
|
|
217475
|
-
label.append(check2, document.createTextNode(" " + proposal.text));
|
|
217476
|
-
item.append(label, text15("p", proposal.conditions || "Revisar seg\xFAn la escena.", "muted"), text15("p", "De tu correcci\xF3n: " + proposal.origin.evidence, "muted"), select);
|
|
217477
|
-
$("learning-options").append(item);
|
|
217478
|
-
}
|
|
217756
|
+
$("title").textContent = data.title;
|
|
217757
|
+
$("version").textContent = data.version;
|
|
217758
|
+
$("phase").textContent = isDirections ? "Propuestas para este video" : isDelivery ? "Entrega" : "Revisi\xF3n";
|
|
217759
|
+
$(isDirections ? "phase-directions" : isDelivery ? "phase-delivery" : "phase-review").setAttribute("aria-current", "step");
|
|
217760
|
+
$("media-quality").textContent = data.video?.purpose === "preview" ? `Vista previa${data.video.quality ? " \xB7 " + data.video.quality + "p" : ""} \xB7 Revisa cortes, textos y audio` : data.video?.purpose === "final" ? "Render final" : "Vista de revisi\xF3n";
|
|
217761
|
+
$("step-watch").onclick = () => setStep(1);
|
|
217762
|
+
$("step-change").onclick = () => setStep(2);
|
|
217763
|
+
$("step-send").onclick = () => setStep(3);
|
|
217764
|
+
$("start-changes").onclick = () => {
|
|
217765
|
+
setStep(2);
|
|
217766
|
+
note.focus({ preventScroll: true });
|
|
217767
|
+
};
|
|
217768
|
+
$("review-send").onclick = () => setStep(3);
|
|
217769
|
+
$("back-watch").onclick = () => setStep(1);
|
|
217770
|
+
$("back-edit").onclick = () => setStep(2);
|
|
217479
217771
|
$("undo").onclick = () => {
|
|
217480
|
-
if (removed)
|
|
217481
|
-
|
|
217482
|
-
|
|
217483
|
-
|
|
217484
|
-
$("undo").hidden = true;
|
|
217772
|
+
if (!removed) return;
|
|
217773
|
+
if (notes.length >= 100) {
|
|
217774
|
+
status("Guarda esta tanda de cambios antes de recuperar m\xE1s notas.");
|
|
217775
|
+
return;
|
|
217485
217776
|
}
|
|
217777
|
+
notes.push(removed);
|
|
217778
|
+
removed = void 0;
|
|
217779
|
+
approval = false;
|
|
217780
|
+
copied = false;
|
|
217781
|
+
update();
|
|
217782
|
+
$("undo").hidden = true;
|
|
217486
217783
|
};
|
|
217487
|
-
|
|
217488
|
-
|
|
217489
|
-
if (mark !== void 0) $("target").textContent = `Momento ${time3(mark)}`;
|
|
217490
|
-
note.oninput = persist;
|
|
217491
|
-
const clearTarget = () => {
|
|
217784
|
+
note.oninput = draftChanged;
|
|
217785
|
+
function clearTarget() {
|
|
217492
217786
|
mark = void 0;
|
|
217493
217787
|
endMs = void 0;
|
|
217494
217788
|
segmentId = void 0;
|
|
217495
|
-
|
|
217789
|
+
renderTarget();
|
|
217496
217790
|
persist();
|
|
217497
|
-
}
|
|
217791
|
+
}
|
|
217498
217792
|
$("clear-time").onclick = clearTarget;
|
|
217793
|
+
$("scope-all").onclick = clearTarget;
|
|
217499
217794
|
$("mark").onclick = () => {
|
|
217500
217795
|
if (!mediaReady) return;
|
|
217501
217796
|
player.pause();
|
|
217502
217797
|
mark = Math.round(player.currentTime * 1e3);
|
|
217503
217798
|
endMs = void 0;
|
|
217504
217799
|
segmentId = void 0;
|
|
217505
|
-
|
|
217800
|
+
renderTarget();
|
|
217506
217801
|
persist();
|
|
217507
|
-
|
|
217802
|
+
prepareComment();
|
|
217508
217803
|
};
|
|
217509
217804
|
$("back").onclick = () => seek(player.currentTime * 1e3 - 5e3);
|
|
217510
217805
|
$("forward").onclick = () => seek(player.currentTime * 1e3 + 5e3);
|
|
217511
|
-
$("form").onsubmit = (
|
|
217512
|
-
|
|
217806
|
+
$("form").onsubmit = (event) => {
|
|
217807
|
+
event.preventDefault();
|
|
217513
217808
|
if (!note.value.trim()) return;
|
|
217809
|
+
if (note.value.length > 1500) {
|
|
217810
|
+
status("Acorta el comentario a 1500 caracteres.");
|
|
217811
|
+
return;
|
|
217812
|
+
}
|
|
217514
217813
|
if (notes.length >= 100) {
|
|
217515
217814
|
status("Guarda esta tanda de cambios antes de a\xF1adir m\xE1s.");
|
|
217516
217815
|
return;
|
|
@@ -217523,26 +217822,36 @@ ${JSON.stringify({ ...feedback2(), kind: "editorbrain.review-access-request", de
|
|
|
217523
217822
|
note.value = "";
|
|
217524
217823
|
clearTarget();
|
|
217525
217824
|
approval = false;
|
|
217825
|
+
copied = false;
|
|
217526
217826
|
update();
|
|
217527
|
-
|
|
217827
|
+
$("comments").open = true;
|
|
217828
|
+
status(storageOk ? "Comentario guardado aqu\xED. Puedes a\xF1adir otro o preparar el env\xEDo." : "Comentario preparado. Este navegador no puede guardarlo: desc\xE1rgalo antes de cerrar.");
|
|
217528
217829
|
};
|
|
217529
217830
|
$("approve").onclick = () => {
|
|
217530
217831
|
if (!mediaReady || notes.length) return;
|
|
217531
217832
|
if (note.value.trim()) {
|
|
217532
217833
|
status("Guarda o borra el comentario que est\xE1s escribiendo antes de aprobar.");
|
|
217834
|
+
prepareComment();
|
|
217533
217835
|
return;
|
|
217534
217836
|
}
|
|
217535
217837
|
approval = true;
|
|
217838
|
+
copied = false;
|
|
217839
|
+
step = 3;
|
|
217536
217840
|
update();
|
|
217841
|
+
$("step-title").focus({ preventScroll: true });
|
|
217537
217842
|
status("Aprobaci\xF3n preparada. C\xF3piala al chat para que tu agente contin\xFAe.");
|
|
217538
217843
|
};
|
|
217539
217844
|
$("copy").onclick = async () => {
|
|
217540
217845
|
if (note.value.trim()) {
|
|
217541
217846
|
status("Guarda tu comentario antes de copiar los cambios.");
|
|
217847
|
+
prepareComment();
|
|
217542
217848
|
return;
|
|
217543
217849
|
}
|
|
217850
|
+
if (isDirections ? !choice : !notes.length && !(approval && mediaReady)) return;
|
|
217544
217851
|
try {
|
|
217545
217852
|
await navigator.clipboard.writeText(prompt());
|
|
217853
|
+
copied = true;
|
|
217854
|
+
updateActions();
|
|
217546
217855
|
status("Copiado. P\xE9galo en el mismo chat de Claude o Codex para continuar.");
|
|
217547
217856
|
} catch {
|
|
217548
217857
|
$("manual").open = true;
|
|
@@ -217554,105 +217863,199 @@ ${JSON.stringify({ ...feedback2(), kind: "editorbrain.review-access-request", de
|
|
|
217554
217863
|
$("download").onclick = () => {
|
|
217555
217864
|
if (note.value.trim()) {
|
|
217556
217865
|
status("Guarda tu comentario antes de descargar.");
|
|
217866
|
+
prepareComment();
|
|
217557
217867
|
return;
|
|
217558
217868
|
}
|
|
217869
|
+
if (isDirections ? !choice : !notes.length && !(approval && mediaReady)) return;
|
|
217559
217870
|
const blob = new Blob([JSON.stringify(feedback2(), null, 2)], { type: "application/json" });
|
|
217560
|
-
const url3 = URL.createObjectURL(blob),
|
|
217561
|
-
|
|
217562
|
-
|
|
217563
|
-
|
|
217871
|
+
const url3 = URL.createObjectURL(blob), anchor2 = document.createElement("a");
|
|
217872
|
+
anchor2.href = url3;
|
|
217873
|
+
anchor2.download = `${data.projectId}-review-${data.artifactId.slice(0, 8)}.json`;
|
|
217874
|
+
anchor2.click();
|
|
217564
217875
|
setTimeout(() => URL.revokeObjectURL(url3), 1e3);
|
|
217565
217876
|
status("Adjunta el archivo descargado al mismo chat. Todav\xEDa no se ha enviado al agente.");
|
|
217566
217877
|
};
|
|
217567
|
-
|
|
217568
|
-
|
|
217878
|
+
$("phone-copy").onclick = async () => {
|
|
217879
|
+
if (note.value.trim()) {
|
|
217880
|
+
status("Guarda tu comentario antes de preparar la revisi\xF3n en tel\xE9fono.");
|
|
217881
|
+
prepareComment();
|
|
217882
|
+
return;
|
|
217883
|
+
}
|
|
217884
|
+
$("phone-request").value = phonePrompt();
|
|
217885
|
+
try {
|
|
217886
|
+
await navigator.clipboard.writeText(phonePrompt());
|
|
217887
|
+
$("phone-status").textContent = "Copiado. P\xE9galo en el mismo chat; tu agente preparar\xE1 el acceso. Todav\xEDa no se ha subido nada.";
|
|
217888
|
+
} catch {
|
|
217889
|
+
$("phone-manual").open = true;
|
|
217890
|
+
$("phone-request").focus();
|
|
217891
|
+
$("phone-request").select();
|
|
217892
|
+
$("phone-status").textContent = "Copia esta indicaci\xF3n y p\xE9gala en el mismo chat. Todav\xEDa no se ha subido nada.";
|
|
217893
|
+
}
|
|
217894
|
+
};
|
|
217895
|
+
const templateGroups = [
|
|
217896
|
+
{ title: "Texto e imagen", items: [["Texto m\xE1s claro", "Haz este texto m\xE1s grande y f\xE1cil de leer."], ["Deja ver mi cara", "Mueve este elemento para que no tape mi cara."], ["Cambia la imagen", "Busca otra imagen para explicar mejor esta idea."]] },
|
|
217897
|
+
{ title: "Audio y ritmo", items: [["Baja la m\xFAsica", "Baja la m\xFAsica para que se entienda mejor la voz."], ["Deja respirar", "Dale un poco m\xE1s de tiempo a este momento."], ["Hazlo m\xE1s \xE1gil", "Acorta este tramo manteniendo la idea completa."]] }
|
|
217898
|
+
];
|
|
217899
|
+
for (const group of templateGroups) {
|
|
217900
|
+
const block = text15("section", "");
|
|
217901
|
+
block.append(text15("h4", group.title));
|
|
217902
|
+
for (const [title, suggestion] of group.items) block.append(button(title, () => {
|
|
217903
|
+
const next = note.value.trim() ? note.value + "\n" + suggestion : suggestion;
|
|
217904
|
+
if (next.length > 1500) {
|
|
217905
|
+
status("Tu comentario ya es largo. Ac\xF3rtalo antes de a\xF1adir esta idea.");
|
|
217906
|
+
return;
|
|
217907
|
+
}
|
|
217908
|
+
note.value = next;
|
|
217909
|
+
draftChanged();
|
|
217910
|
+
prepareComment();
|
|
217911
|
+
}));
|
|
217912
|
+
$("template-groups").append(block);
|
|
217913
|
+
}
|
|
217914
|
+
for (const proposal of data.learnings ?? []) {
|
|
217915
|
+
const item = text15("article", ""), label = text15("label", ""), check2 = document.createElement("input");
|
|
217916
|
+
check2.type = "checkbox";
|
|
217917
|
+
check2.checked = learningChoices[proposal.id]?.selected ?? false;
|
|
217918
|
+
const select = document.createElement("select");
|
|
217919
|
+
select.setAttribute("aria-label", "Alcance: " + proposal.text);
|
|
217920
|
+
for (const [value, title] of [["project", "Solo este video"], ["style", "Este estilo, dentro de mi marca"], ["series", "Esta serie"], ["format", "Este formato"], ["brand", "Toda mi marca"]]) {
|
|
217921
|
+
if (value === "series" && !data.learningContext?.seriesId || value === "format" && !data.learningContext?.formatId) continue;
|
|
217922
|
+
const option = document.createElement("option");
|
|
217923
|
+
option.value = value;
|
|
217924
|
+
option.textContent = title;
|
|
217925
|
+
select.append(option);
|
|
217926
|
+
}
|
|
217927
|
+
select.value = learningChoices[proposal.id]?.target ?? "project";
|
|
217928
|
+
if (!select.value) select.value = "project";
|
|
217929
|
+
learningChoices[proposal.id] = { selected: check2.checked, target: select.value };
|
|
217930
|
+
const save = () => {
|
|
217931
|
+
learningChoices[proposal.id] = { selected: check2.checked, target: select.value };
|
|
217932
|
+
copied = false;
|
|
217933
|
+
update();
|
|
217934
|
+
};
|
|
217935
|
+
check2.onchange = save;
|
|
217936
|
+
select.onchange = save;
|
|
217937
|
+
label.append(check2, document.createTextNode(proposal.text));
|
|
217938
|
+
item.append(label, text15("p", proposal.conditions || "Revisar seg\xFAn la escena.", "muted"), text15("p", "De tu correcci\xF3n: " + proposal.origin.evidence, "muted"), select);
|
|
217939
|
+
$("learning-options").append(item);
|
|
217940
|
+
}
|
|
217941
|
+
if (isDirections) {
|
|
217942
|
+
$("wizard").hidden = true;
|
|
217569
217943
|
$("editing").hidden = true;
|
|
217944
|
+
$("comments").hidden = true;
|
|
217570
217945
|
$("direction-grid").hidden = false;
|
|
217571
|
-
$("
|
|
217572
|
-
|
|
217946
|
+
$("step-title").textContent = "Elige el estilo de tu video";
|
|
217947
|
+
$("intro").textContent = "Son propuestas para este video. Elige la que m\xE1s te guste; tu agente preparar\xE1 la primera muestra con ella.";
|
|
217948
|
+
$("phone").querySelector("p").textContent = "Pide ver estas propuestas con im\xE1genes ligeras en tu chat m\xF3vil. No se sube ning\xFAn video autom\xE1ticamente.";
|
|
217949
|
+
$("back-edit").hidden = true;
|
|
217950
|
+
for (const direction of data.directions) {
|
|
217573
217951
|
const card = text15("article", "", "direction");
|
|
217574
|
-
card.dataset.choice =
|
|
217575
|
-
|
|
217576
|
-
|
|
217577
|
-
|
|
217578
|
-
|
|
217579
|
-
|
|
217580
|
-
|
|
217581
|
-
|
|
217582
|
-
|
|
217583
|
-
|
|
217584
|
-
|
|
217585
|
-
|
|
217586
|
-
|
|
217587
|
-
|
|
217588
|
-
|
|
217589
|
-
|
|
217590
|
-
|
|
217952
|
+
card.dataset.choice = direction.id;
|
|
217953
|
+
const media3 = text15("div", "", "direction-media");
|
|
217954
|
+
if (direction.preview) {
|
|
217955
|
+
const isVideo = direction.preview.mimeType.startsWith("video/");
|
|
217956
|
+
const element = document.createElement(isVideo ? "video" : "img");
|
|
217957
|
+
element.src = direction.preview.uri;
|
|
217958
|
+
if (isVideo) {
|
|
217959
|
+
element.controls = true;
|
|
217960
|
+
element.playsInline = true;
|
|
217961
|
+
element.preload = "metadata";
|
|
217962
|
+
element.setAttribute("aria-label", direction.title);
|
|
217963
|
+
} else {
|
|
217964
|
+
element.alt = direction.title;
|
|
217965
|
+
element.loading = "lazy";
|
|
217966
|
+
}
|
|
217967
|
+
media3.append(element);
|
|
217968
|
+
} else {
|
|
217969
|
+
const blank = text15("div", "", "no-preview");
|
|
217970
|
+
blank.append(text15("span", "A"), text15("span", "Sin muestra visual adjunta"));
|
|
217971
|
+
media3.append(blank);
|
|
217972
|
+
}
|
|
217973
|
+
const chosen = text15("span", "\u2713 Elegida", "chosen-label");
|
|
217974
|
+
chosen.hidden = true;
|
|
217975
|
+
media3.append(chosen);
|
|
217976
|
+
card.append(media3, text15("h3", direction.title), text15("p", direction.description));
|
|
217977
|
+
if (direction.references?.length) {
|
|
217591
217978
|
const refs = text15("details", "");
|
|
217592
217979
|
refs.append(text15("summary", "Ver referencias"));
|
|
217593
|
-
for (const
|
|
217594
|
-
const
|
|
217595
|
-
|
|
217596
|
-
|
|
217597
|
-
|
|
217598
|
-
refs.append(
|
|
217980
|
+
for (const reference of direction.references) {
|
|
217981
|
+
const anchor2 = text15("a", reference.label);
|
|
217982
|
+
anchor2.href = reference.url;
|
|
217983
|
+
anchor2.target = "_blank";
|
|
217984
|
+
anchor2.rel = "noopener noreferrer";
|
|
217985
|
+
refs.append(anchor2);
|
|
217599
217986
|
}
|
|
217600
217987
|
card.append(refs);
|
|
217601
217988
|
}
|
|
217989
|
+
card.append(button("Elegir " + direction.title, () => {
|
|
217990
|
+
choice = direction.id;
|
|
217991
|
+
copied = false;
|
|
217992
|
+
update();
|
|
217993
|
+
status("Elecci\xF3n preparada. Copia tu elecci\xF3n y p\xE9gala en el chat.");
|
|
217994
|
+
}, "direction-choice"));
|
|
217602
217995
|
$("direction-grid").append(card);
|
|
217603
217996
|
}
|
|
217604
217997
|
} else {
|
|
217605
|
-
player.src = data.video.uri;
|
|
217606
217998
|
player.onloadedmetadata = () => {
|
|
217607
217999
|
mediaReady = Number.isFinite(player.duration) && player.duration > 0;
|
|
217608
218000
|
$("mark").disabled = !mediaReady;
|
|
218001
|
+
$("back").disabled = !mediaReady;
|
|
218002
|
+
$("forward").disabled = !mediaReady;
|
|
218003
|
+
$("media-error").hidden = true;
|
|
217609
218004
|
if (data.transcript && Math.abs(player.duration * 1e3 - data.transcript.durationMs) > 300) {
|
|
217610
218005
|
$("transcript").hidden = true;
|
|
218006
|
+
$("transcript-panel").hidden = true;
|
|
218007
|
+
$("workspace").classList.add("no-transcript");
|
|
217611
218008
|
status("La transcripci\xF3n no coincide con la duraci\xF3n de esta muestra. Pide corregir sus tiempos; puedes dejar comentarios sobre el video.");
|
|
217612
218009
|
}
|
|
217613
218010
|
update();
|
|
217614
218011
|
};
|
|
217615
218012
|
player.onerror = () => {
|
|
217616
218013
|
mediaReady = false;
|
|
217617
|
-
|
|
217618
|
-
|
|
218014
|
+
approval = false;
|
|
218015
|
+
copied = false;
|
|
218016
|
+
for (const id4 of ["mark", "back", "forward"]) $(id4).disabled = true;
|
|
218017
|
+
const message = data.video.uri.startsWith("data:") ? "Este visor no pudo reproducir el video. Pide a tu agente abrir una revisi\xF3n local ligera. No apruebes una muestra que no pudiste revisar." : "No se pudo cargar el video. Pide a tu agente mantener abierto el servidor de revisi\xF3n y comprobar el preview en tu navegador. No apruebes una muestra que no pudiste revisar.";
|
|
218018
|
+
$("media-error").textContent = message;
|
|
218019
|
+
$("media-error").hidden = false;
|
|
218020
|
+
status(message);
|
|
217619
218021
|
update();
|
|
217620
218022
|
};
|
|
217621
218023
|
player.ontimeupdate = () => {
|
|
217622
218024
|
$("clock").textContent = `${time3(player.currentTime * 1e3)} / ${time3(Number.isFinite(player.duration) ? player.duration * 1e3 : 0)}`;
|
|
217623
|
-
for (const
|
|
218025
|
+
for (const row of Array.from(document.querySelectorAll("[data-start]"))) row.classList.toggle("speaking", player.currentTime * 1e3 >= Number(row.dataset.start) && player.currentTime * 1e3 < Number(row.dataset.end));
|
|
217624
218026
|
};
|
|
217625
218027
|
if (data.transcript?.segments.length) {
|
|
217626
218028
|
$("transcript").hidden = false;
|
|
217627
|
-
|
|
217628
|
-
|
|
217629
|
-
row
|
|
217630
|
-
|
|
217631
|
-
|
|
217632
|
-
row.dataset.
|
|
217633
|
-
row.
|
|
218029
|
+
$("transcript-panel").hidden = false;
|
|
218030
|
+
for (const segment of data.transcript.segments) {
|
|
218031
|
+
const row = text15("article", "", segment.state === "removed" ? "removed" : "");
|
|
218032
|
+
row.dataset.state = segment.state;
|
|
218033
|
+
if (segment.state === "kept") {
|
|
218034
|
+
row.dataset.start = segment.startMs;
|
|
218035
|
+
row.dataset.end = segment.endMs;
|
|
218036
|
+
row.append(button(time3(segment.startMs) + " \xB7 " + segment.text, () => seek(segment.startMs)));
|
|
217634
218037
|
} else {
|
|
217635
218038
|
row.hidden = true;
|
|
217636
|
-
row.append(text15("small", "Recortada del original \xB7 " + time3(
|
|
218039
|
+
row.append(text15("small", "Recortada del original \xB7 " + time3(segment.source.startMs)), text15("p", segment.text));
|
|
217637
218040
|
}
|
|
217638
|
-
row.append(button(
|
|
218041
|
+
row.append(button(segment.state === "kept" ? "Pedir quitar frase" : "Pedir recuperar frase", () => {
|
|
217639
218042
|
if (note.value.trim() && !window.confirm("\xBFReemplazar tu comentario sin guardar?")) return;
|
|
217640
|
-
segmentId =
|
|
217641
|
-
mark =
|
|
217642
|
-
endMs =
|
|
217643
|
-
note.value =
|
|
217644
|
-
|
|
217645
|
-
|
|
217646
|
-
|
|
218043
|
+
segmentId = segment.id;
|
|
218044
|
+
mark = segment.state === "kept" ? segment.startMs : void 0;
|
|
218045
|
+
endMs = segment.state === "kept" ? segment.endMs : void 0;
|
|
218046
|
+
note.value = segment.state === "kept" ? `Quita esta frase: \xAB${segment.text}\xBB. Conserva lo dem\xE1s y revisa la uni\xF3n del audio.` : `Recupera esta frase: \xAB${segment.text}\xBB. Busca su tramo original en la transcripci\xF3n y conserva lo dem\xE1s.`;
|
|
218047
|
+
draftChanged();
|
|
218048
|
+
renderTarget();
|
|
218049
|
+
prepareComment();
|
|
217647
218050
|
}));
|
|
217648
218051
|
$("phrases").append(row);
|
|
217649
218052
|
}
|
|
217650
|
-
|
|
217651
|
-
$("show-cuts
|
|
217652
|
-
|
|
217653
|
-
for (const row of Array.from(document.querySelectorAll('[data-state="removed"]'))) row.hidden = !e.target.checked;
|
|
218053
|
+
$("show-cuts-label").hidden = !data.transcript.segments.some((segment) => segment.state === "removed");
|
|
218054
|
+
$("show-cuts").onchange = (event) => {
|
|
218055
|
+
for (const row of Array.from(document.querySelectorAll('[data-state="removed"]'))) row.hidden = !event.target.checked;
|
|
217654
218056
|
};
|
|
217655
|
-
}
|
|
218057
|
+
} else $("workspace").classList.add("no-transcript");
|
|
218058
|
+
player.src = data.video.uri;
|
|
217656
218059
|
}
|
|
217657
218060
|
$("future").onclick = () => {
|
|
217658
218061
|
$("future-details").open = !$("future-details").open;
|
|
@@ -217660,13 +218063,95 @@ ${JSON.stringify({ ...feedback2(), kind: "editorbrain.review-access-request", de
|
|
|
217660
218063
|
update();
|
|
217661
218064
|
}
|
|
217662
218065
|
function renderReviewArtifact(data, wordmark) {
|
|
217663
|
-
const script = `(${reviewApp.toString()})()
|
|
218066
|
+
const script = `(${reviewApp.toString()})();`;
|
|
218067
|
+
const hash13 = createHash24("sha256").update(script).digest("base64");
|
|
217664
218068
|
const json2 = JSON.stringify(data).replace(/</g, "\\u003c").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
|
|
217665
|
-
return `<!doctype html
|
|
217666
|
-
|
|
217667
|
-
|
|
217668
|
-
|
|
217669
|
-
|
|
218069
|
+
return `<!doctype html>
|
|
218070
|
+
<html lang="es"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
|
218071
|
+
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'sha256-${hash13}'; style-src 'unsafe-inline'; img-src 'self' data:; media-src 'self' data: blob:; connect-src 'none'; font-src 'none'; object-src 'none'; base-uri 'none'; form-action 'none'">
|
|
218072
|
+
<title>EditorBrain \xB7 Tu edici\xF3n</title><style>${reviewArtifactCss}</style></head>
|
|
218073
|
+
<body>
|
|
218074
|
+
<header class="topbar">
|
|
218075
|
+
<div class="brand" role="img" aria-label="EditorBrain">${wordmark.replaceAll("#f3ede3", "#29231F")}</div>
|
|
218076
|
+
<div class="project-heading"><h1 id="title"></h1><span id="version"></span></div>
|
|
218077
|
+
<div class="header-actions"><ol class="project-stages" aria-label="Etapa de este artefacto">
|
|
218078
|
+
<li id="phase-directions"><b>01</b> Propuestas</li><li id="phase-review"><b>02</b> Revisi\xF3n</li><li id="phase-delivery"><b>03</b> Entrega</li>
|
|
218079
|
+
</ol><button id="how-it-works" type="button" class="guide-button" aria-haspopup="dialog" aria-controls="review-guide"><span aria-hidden="true">?</span> C\xF3mo funciona</button></div>
|
|
218080
|
+
</header>
|
|
218081
|
+
<dialog id="review-guide" class="review-guide" aria-labelledby="guide-title" aria-describedby="guide-intro">
|
|
218082
|
+
<div class="guide-heading"><p class="eyebrow">Una gu\xEDa r\xE1pida</p><button id="guide-dismiss" type="button" aria-label="Cerrar gu\xEDa" autofocus>\xD7</button></div>
|
|
218083
|
+
<h2 id="guide-title"></h2><p id="guide-intro">Revisa aqu\xED. Contin\xFAa en tu chat.</p>
|
|
218084
|
+
<ol id="guide-steps" class="guide-steps"></ol><p id="guide-approval" class="guide-approval"></p>
|
|
218085
|
+
<div class="guide-storage"><strong>Se queda en tu navegador</strong><p>Tus borradores y decisiones se guardan aqu\xED, si el navegador lo permite. No se sincronizan entre dispositivos ni se env\xEDan al agente autom\xE1ticamente. Tu marca no cambia.</p><p>Si no se pudo guardar, copia o descarga antes de cerrar.</p></div>
|
|
218086
|
+
<button id="guide-close" type="button" class="primary">Entendido</button>
|
|
218087
|
+
</dialog>
|
|
218088
|
+
<noscript><p class="noscript">Para reproducir, comentar y preparar tu respuesta, abre este artefacto en un navegador con JavaScript. Nada se env\xEDa autom\xE1ticamente.</p></noscript>
|
|
218089
|
+
<main class="shell">
|
|
218090
|
+
<div class="utility"><p id="review-location"><span class="privacy-dot"></span>En computadora \xB7 Revisi\xF3n privada</p><p id="saved">Se guarda en este navegador \xB7 Nada se env\xEDa solo</p></div>
|
|
218091
|
+
<nav id="wizard" class="wizard" aria-label="Pasos de esta revisi\xF3n">
|
|
218092
|
+
<button id="step-watch" type="button" aria-current="step"><span>01</span> Mira</button>
|
|
218093
|
+
<button id="step-change" type="button"><span>02</span> Cambia</button>
|
|
218094
|
+
<button id="step-send" type="button" disabled><span>03</span> Env\xEDa</button>
|
|
218095
|
+
</nav>
|
|
218096
|
+
<div class="section-intro"><p id="phase" class="eyebrow"></p><h2 id="step-title" tabindex="-1">Mira tu video</h2><p id="intro"></p></div>
|
|
218097
|
+
<div id="direction-grid" hidden></div>
|
|
218098
|
+
<p id="media-error" class="notice error" role="alert" hidden></p>
|
|
218099
|
+
<section id="editing" class="step-content">
|
|
218100
|
+
<p id="pending" class="notice" role="status" hidden></p>
|
|
218101
|
+
<div id="workspace" class="workspace">
|
|
218102
|
+
<div class="preview">
|
|
218103
|
+
<div class="media-meta"><p id="media-quality" class="muted"></p></div>
|
|
218104
|
+
<div class="screen"><video id="player" controls playsinline preload="metadata" aria-label="Tu edici\xF3n"></video></div>
|
|
218105
|
+
<div class="controls"><span id="clock">00:00.0</span><div class="controls-actions"><button id="back" type="button" disabled aria-label="Retroceder 5 segundos">\u22125 s</button><button id="forward" type="button" disabled aria-label="Avanzar 5 segundos">+5 s</button></div></div>
|
|
218106
|
+
<div id="markers" aria-label="Momentos comentados"></div>
|
|
218107
|
+
<div id="watch-actions" class="watch-actions">
|
|
218108
|
+
<button id="start-changes" type="button" class="primary">Quiero hacer cambios</button>
|
|
218109
|
+
<button id="approve" type="button" disabled>Me gusta esta versi\xF3n</button>
|
|
218110
|
+
<p>Tu decisi\xF3n se prepara aqu\xED. T\xFA la copias al chat para continuar.</p>
|
|
218111
|
+
</div>
|
|
218112
|
+
<section id="change-panel" class="change-panel" hidden>
|
|
218113
|
+
<h3>\xBFQu\xE9 cambiamos?</h3><p class="muted">Solo para este video. Tus preferencias de marca se conservan.</p>
|
|
218114
|
+
<form id="form">
|
|
218115
|
+
<fieldset><legend>\xBFD\xF3nde est\xE1 el cambio?</legend><div class="target">
|
|
218116
|
+
<button id="mark" type="button" disabled aria-pressed="false">Marcar este momento</button>
|
|
218117
|
+
<button id="scope-all" type="button" aria-pressed="true">En todo el video</button>
|
|
218118
|
+
<span id="target">Todo el video</span><button id="clear-time" type="button" aria-label="Quitar momento" hidden>\xD7</button>
|
|
218119
|
+
</div></fieldset>
|
|
218120
|
+
<details id="moment-help" class="context-help"><summary>\xBFC\xF3mo elijo el momento?</summary><p>Coloca el video en el punto que quieres comentar y pulsa Marcar este momento. El video se pausa y ese segundo queda unido a tu nota. En todo el video quita la marca de tiempo; no cambia el texto que escribiste.</p></details>
|
|
218121
|
+
<label for="note">Tu comentario</label><textarea id="note" maxlength="1500" placeholder="Por ejemplo: baja la m\xFAsica aqu\xED para escuchar mejor mi voz\u2026" required></textarea>
|
|
218122
|
+
<details class="templates"><summary>Ideas para comentar</summary><div id="template-groups" class="template-groups"></div></details>
|
|
218123
|
+
<div class="form-footer"><span id="draft-count">0 / 1500</span><button class="save primary" type="submit">Guardar comentario</button></div>
|
|
218124
|
+
</form>
|
|
218125
|
+
</section>
|
|
218126
|
+
<div id="change-actions" class="change-actions" hidden><button id="back-watch" type="button" class="text-button">\u2190 Volver al video</button><button id="review-send" type="button" class="primary" disabled>Preparar env\xEDo \u2192</button></div>
|
|
218127
|
+
</div>
|
|
218128
|
+
<aside id="transcript-panel" class="transcript-panel" hidden>
|
|
218129
|
+
<details id="transcript" hidden><summary>Revisar cortes desde el texto</summary><p class="muted">Toca una frase para ubicarla. Quitar o recuperar prepara un comentario; no modifica este video.</p>
|
|
218130
|
+
<label id="show-cuts-label"><input id="show-cuts" type="checkbox"> Mostrar frases recortadas</label><div id="phrases"></div>
|
|
218131
|
+
</details>
|
|
218132
|
+
</aside>
|
|
218133
|
+
</div>
|
|
218134
|
+
</section>
|
|
218135
|
+
<section id="send-summary" class="send-summary step-content" hidden><span class="summary-symbol" aria-hidden="true">\u2197</span><div><h3 id="summary-title"></h3><p id="summary-detail"></p></div></section>
|
|
218136
|
+
<details id="comments" class="comments" hidden><summary id="comments-label">Mis comentarios</summary><p id="notes-empty">No has guardado comentarios.</p><div id="notes"></div><button id="undo" type="button" hidden>Deshacer eliminaci\xF3n de nota</button></details>
|
|
218137
|
+
<section id="learning-section" class="learning-section" hidden><details><summary>Guardar lo que me gust\xF3 \xB7 opcional</summary><p>Elige qu\xE9 recordar y d\xF3nde. Solo se recuerdan las opciones que marques. Se guardar\xE1 cuando pegues la solicitud en tu chat y el agente confirme el resultado.</p><div id="learning-options"></div></details></section>
|
|
218138
|
+
<section id="handoff" class="handoff" hidden>
|
|
218139
|
+
<h2>Contin\xFAa en tu chat</h2><p class="muted">Dos pasos. Tu agente recibe la versi\xF3n y los momentos exactos.</p>
|
|
218140
|
+
<ol class="handoff-steps">
|
|
218141
|
+
<li><span class="step-number">1</span><strong>Copia tu mensaje</strong><p>Incluye tu decisi\xF3n y los comentarios que guardaste.</p><button id="copy" class="primary" type="button" disabled>Copiar cambios</button></li>
|
|
218142
|
+
<li id="paste-step"><span class="step-number">2</span><strong>P\xE9galo en Claude o Codex</strong><p>En la misma conversaci\xF3n donde est\xE1s editando este video.</p><span class="chat-label">Este artefacto no inicia al agente por s\xED solo.</span></li>
|
|
218143
|
+
</ol>
|
|
218144
|
+
<div class="handoff-options"><button id="back-edit" class="text-button" type="button">\u2190 Revisar mis cambios</button><button id="download" class="text-button" type="button" disabled>Prefiero descargar un archivo</button>
|
|
218145
|
+
<details id="manual"><summary>Ver indicaci\xF3n para copiar</summary><textarea id="request" readonly aria-label="Indicaci\xF3n para tu agente"></textarea></details>
|
|
218146
|
+
</div>
|
|
218147
|
+
</section>
|
|
218148
|
+
<p id="status" role="status" aria-live="polite"></p>
|
|
218149
|
+
<div class="auxiliary">
|
|
218150
|
+
<details id="phone"><summary>\xBFQuieres revisarlo en tu tel\xE9fono?</summary><p class="muted">P\xEDdeselo a tu agente desde el mismo chat. Solo se sube la muestra que quieras revisar; los originales se quedan en tu computadora.</p><button id="phone-copy" type="button">Copiar solicitud para mi agente</button><p id="phone-status" class="muted" role="status" aria-live="polite"></p><details id="phone-manual"><summary>Ver indicaci\xF3n para copiar</summary><textarea id="phone-request" readonly aria-label="Solicitud de revisi\xF3n en tel\xE9fono"></textarea></details></details>
|
|
218151
|
+
<details id="future-details"><summary>\xBFY si quiero cambiar mi estilo para futuros videos?</summary><p class="future-note">P\xEDdeselo expl\xEDcitamente a tu agente o cambia \xABC\xF3mo editas\xBB en EditorBrain. Los comentarios son solo de este video. Para recordar una correcci\xF3n, elige su alcance en \xABGuardar lo que me gust\xF3\xBB y env\xEDala al chat. Nada actualiza tu marca autom\xE1ticamente.</p></details>
|
|
218152
|
+
</div>
|
|
218153
|
+
<footer><span>EditorBrain \xB7 Tu edici\xF3n, con criterio</span><span>Revisi\xF3n privada \xB7 Sin env\xEDos autom\xE1ticos</span></footer><button id="future" hidden type="button"></button>
|
|
218154
|
+
</main><script id="review-data" type="application/json">${json2}</script><script>${script}</script></body></html>`;
|
|
217670
218155
|
}
|
|
217671
218156
|
|
|
217672
218157
|
// packages/cli/src/review-artifact.ts
|
package/package.json
CHANGED
|
@@ -286,8 +286,37 @@ visual review on the surface chosen above. This section describes the local HTML
|
|
|
286
286
|
Claude/Codex when computer review applies. For web/cloud review, the registered,
|
|
287
287
|
verified private project player satisfies that delivery; do not additionally require
|
|
288
288
|
a local artifact or send localhost as the only link. An empty dashboard or long chat
|
|
289
|
-
description alone is not a visual review. The local interface
|
|
290
|
-
|
|
289
|
+
description alone is not a visual review. The local interface uses EditorBrain's
|
|
290
|
+
product branding; its colors are not the customer's video palette. No extra model
|
|
291
|
+
is needed.
|
|
292
|
+
|
|
293
|
+
Since CLI 0.49.1, the local artifact uses Atelier: warm paper/ink chrome and the
|
|
294
|
+
original Thought Loop logo identify EditorBrain; preserve the customer's footage
|
|
295
|
+
and visual direction. Its local
|
|
296
|
+
**Mira → Cambia → Envía** navigation means watch/select, optionally annotate, then
|
|
297
|
+
review and copy/download feedback. These are views inside the artifact, not new
|
|
298
|
+
workflow stages or required checkpoints. The input phases remain `directions`,
|
|
299
|
+
`review`, `delivery`. Do not require notes, repeat an already valid approval or add
|
|
300
|
+
an intermediate review when the user explicitly chose direct editing.
|
|
301
|
+
|
|
302
|
+
The optional **Cómo funciona** button explains the current phase: choosing a
|
|
303
|
+
proposal in `directions`, requesting preview changes in `review`, or reviewing the
|
|
304
|
+
delivered version in `delivery`. It is accessible by keyboard; opening or closing
|
|
305
|
+
it keeps notes and selections. Point the user to it when useful without requiring
|
|
306
|
+
them to finish a tutorial. It does not advance workflow, create approval evidence,
|
|
307
|
+
send feedback or upload files.
|
|
308
|
+
The dialog closes with Escape, its close control or **Entendido**, returning focus
|
|
309
|
+
to the button. Opening it pauses playback; closing it does not resume playback
|
|
310
|
+
automatically. The optional **¿Cómo elijo el momento?** help in Cambia explains
|
|
311
|
+
timestamped versus general comments.
|
|
312
|
+
|
|
313
|
+
On **Envía**, the user copies the request into the current chat or downloads the
|
|
314
|
+
feedback JSON. Copying/exporting neither sends to the agent nor uploads media nor
|
|
315
|
+
approves a remote revision. Only record presentation after handing over the actual
|
|
316
|
+
usable artifact; preserve the current rules in [visual evidence](workflow-evidence.md).
|
|
317
|
+
Use the real validated project input, never a mockup's example video, transcript or
|
|
318
|
+
simulated playback. An older installed UI may look different; consult installed
|
|
319
|
+
help/capabilities instead of inventing unsupported actions.
|
|
291
320
|
|
|
292
321
|
Discover `production review-artifact` in the installed CLI before calling it:
|
|
293
322
|
|