@celljs/ta-relay 4.9.1 → 4.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +29 -2
- package/README.md +29 -2
- package/esm/common/index.d.ts +10 -0
- package/esm/common/index.js +10 -0
- package/esm/common/relay-blobs.d.ts +54 -0
- package/esm/common/relay-blobs.js +153 -0
- package/esm/common/relay-card.d.ts +23 -0
- package/esm/common/relay-card.js +30 -0
- package/esm/common/relay-cipher.d.ts +15 -0
- package/esm/common/relay-cipher.js +62 -2
- package/esm/common/relay-content.d.ts +104 -0
- package/esm/common/relay-content.js +316 -0
- package/esm/common/relay-conversation.d.ts +59 -0
- package/esm/common/relay-conversation.js +9 -0
- package/esm/common/relay-files.d.ts +108 -0
- package/esm/common/relay-files.js +170 -0
- package/esm/common/relay-hub-util.d.ts +91 -0
- package/esm/common/relay-hub-util.js +164 -0
- package/esm/common/relay-hub.d.ts +125 -0
- package/esm/common/relay-hub.js +438 -0
- package/esm/common/relay-hubs.d.ts +271 -0
- package/esm/common/relay-hubs.js +844 -0
- package/esm/common/relay-identity.d.ts +46 -0
- package/esm/common/relay-identity.js +126 -0
- package/esm/common/relay-protocol.d.ts +217 -2
- package/esm/common/relay-protocol.js +53 -0
- package/esm/common/relay-room-chat.d.ts +80 -0
- package/esm/common/relay-room-chat.js +152 -0
- package/esm/common/relay-socket.d.ts +8 -0
- package/esm/common/relay-socket.js +33 -4
- package/esm/guest/guest-i18n.d.ts +47 -0
- package/esm/guest/guest-i18n.js +97 -0
- package/esm/guest/guest-style.d.ts +1 -0
- package/esm/guest/guest-style.js +78 -0
- package/esm/guest/guest.d.ts +1 -0
- package/esm/guest/guest.js +371 -0
- package/esm/node/index.d.ts +3 -0
- package/esm/node/index.js +3 -0
- package/esm/node/relay-files-host.d.ts +27 -0
- package/esm/node/relay-files-host.js +130 -0
- package/esm/node/relay-host.d.ts +35 -2
- package/esm/node/relay-host.js +150 -13
- package/esm/node/relay-hub-files.d.ts +12 -0
- package/esm/node/relay-hub-files.js +39 -0
- package/esm/node/relay-server.d.ts +46 -1
- package/esm/node/relay-server.js +227 -1
- package/esm/node/relay-store.d.ts +72 -0
- package/esm/node/relay-store.js +123 -2
- package/esm/node/relay-viewer.d.ts +7 -0
- package/esm/node/relay-viewer.js +33 -0
- package/esm/viewer/viewer-i18n.d.ts +56 -0
- package/esm/viewer/viewer-i18n.js +117 -0
- package/esm/viewer/viewer-markdown.d.ts +7 -0
- package/esm/viewer/viewer-markdown.js +198 -0
- package/esm/viewer/viewer-style.d.ts +1 -0
- package/esm/viewer/viewer-style.js +72 -0
- package/esm/viewer/viewer.d.ts +8 -0
- package/esm/viewer/viewer.js +378 -0
- package/lib/common/index.d.ts +10 -0
- package/lib/common/index.js +10 -0
- package/lib/common/relay-blobs.d.ts +55 -0
- package/lib/common/relay-blobs.js +157 -0
- package/lib/common/relay-card.d.ts +24 -0
- package/lib/common/relay-card.js +33 -0
- package/lib/common/relay-cipher.d.ts +15 -0
- package/lib/common/relay-cipher.js +63 -3
- package/lib/common/relay-content.d.ts +105 -0
- package/lib/common/relay-content.js +320 -0
- package/lib/common/relay-conversation.d.ts +60 -0
- package/lib/common/relay-conversation.js +12 -0
- package/lib/common/relay-files.d.ts +109 -0
- package/lib/common/relay-files.js +174 -0
- package/lib/common/relay-hub-util.d.ts +92 -0
- package/lib/common/relay-hub-util.js +167 -0
- package/lib/common/relay-hub.d.ts +126 -0
- package/lib/common/relay-hub.js +442 -0
- package/lib/common/relay-hubs.d.ts +272 -0
- package/lib/common/relay-hubs.js +848 -0
- package/lib/common/relay-identity.d.ts +47 -0
- package/lib/common/relay-identity.js +129 -0
- package/lib/common/relay-protocol.d.ts +217 -2
- package/lib/common/relay-protocol.js +54 -1
- package/lib/common/relay-room-chat.d.ts +81 -0
- package/lib/common/relay-room-chat.js +156 -0
- package/lib/common/relay-socket.d.ts +8 -0
- package/lib/common/relay-socket.js +32 -3
- package/lib/guest/guest-i18n.d.ts +48 -0
- package/lib/guest/guest-i18n.js +100 -0
- package/lib/guest/guest-style.d.ts +2 -0
- package/lib/guest/guest-style.js +81 -0
- package/lib/guest/guest.d.ts +2 -0
- package/lib/guest/guest.js +373 -0
- package/lib/node/index.d.ts +3 -0
- package/lib/node/index.js +3 -0
- package/lib/node/relay-files-host.d.ts +28 -0
- package/lib/node/relay-files-host.js +134 -0
- package/lib/node/relay-host.d.ts +35 -2
- package/lib/node/relay-host.js +149 -12
- package/lib/node/relay-hub-files.d.ts +13 -0
- package/lib/node/relay-hub-files.js +43 -0
- package/lib/node/relay-server.d.ts +46 -1
- package/lib/node/relay-server.js +226 -0
- package/lib/node/relay-store.d.ts +72 -0
- package/lib/node/relay-store.js +121 -0
- package/lib/node/relay-viewer.d.ts +8 -0
- package/lib/node/relay-viewer.js +32 -0
- package/lib/viewer/viewer-i18n.d.ts +57 -0
- package/lib/viewer/viewer-i18n.js +120 -0
- package/lib/viewer/viewer-markdown.d.ts +8 -0
- package/lib/viewer/viewer-markdown.js +201 -0
- package/lib/viewer/viewer-style.d.ts +2 -0
- package/lib/viewer/viewer-style.js +75 -0
- package/lib/viewer/viewer.d.ts +9 -0
- package/lib/viewer/viewer.js +381 -0
- package/package.json +5 -4
- package/viewer/frame.html +1 -0
- package/viewer/page.html +80 -0
- package/viewer/room.html +87 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const VIEWER_STYLE = "\n:root{color-scheme:light dark;--bg:#fff;--fg:#1f1f1f;--muted:#737373;--faint:#a3a3a3;--line:#ececec;--soft:#f5f5f5;--bubble:#f2f2f2;--code:#f6f6f6;--accent:#16a34a;--warn:#d97706;--radius:14px}\n@media (prefers-color-scheme:dark){:root{--bg:#191919;--fg:#ececec;--muted:#a3a3a3;--faint:#6b6b6b;--line:#2c2c2c;--soft:#222;--bubble:#2a2a2a;--code:#232323;--accent:#4ade80;--warn:#fbbf24}}\n*{box-sizing:border-box}\nhtml,body{margin:0;background:var(--bg);color:var(--fg);font:15px/1.65 -apple-system,BlinkMacSystemFont,\"Segoe UI\",\"PingFang SC\",\"Hiragino Sans GB\",\"Microsoft YaHei\",sans-serif;-webkit-font-smoothing:antialiased}\n.top{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:10px;padding:10px 16px;background:color-mix(in srgb,var(--bg) 88%,transparent);backdrop-filter:saturate(1.6) blur(12px);-webkit-backdrop-filter:saturate(1.6) blur(12px);border-bottom:1px solid var(--line)}\n.logo{width:26px;height:26px;border-radius:8px;background:var(--fg);color:var(--bg);display:grid;place-items:center;font-weight:700;font-size:13px;flex:none}\n.top .name{font-weight:600;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}\n.top button{flex:none}\nmain{max-width:760px;margin:0 auto;padding:28px 18px 40px}\nmain.wide{max-width:none;padding:0}\nh1.title{font-size:22px;line-height:1.35;margin:0 0 6px;letter-spacing:-.01em;word-break:break-word}\n.meta{color:var(--muted);font-size:13px;margin:0 0 22px;display:flex;flex-wrap:wrap;gap:4px 12px}\n.notes{color:var(--muted);font-size:12.5px;margin:-10px 0 22px;display:flex;flex-direction:column;gap:2px}\n.msg{margin:0 0 18px}\n.msg.user{display:flex;justify-content:flex-end}\n.msg.user .bubble{background:var(--bubble);border-radius:var(--radius) var(--radius) 4px var(--radius);padding:9px 14px;max-width:85%;white-space:pre-wrap;word-break:break-word}\n.msg.ta .text>:first-child{margin-top:0}.msg.ta .text>:last-child{margin-bottom:0}\n.text{word-break:break-word}\n.text p{margin:0 0 .75em}\n.text h2,.text h3,.text h4,.text h5,.text h6{margin:1.2em 0 .5em;line-height:1.35}\n.text h2{font-size:1.25em}.text h3{font-size:1.1em}.text h4,.text h5,.text h6{font-size:1em}\n.text ul,.text ol{margin:0 0 .75em;padding-left:1.4em}.text li{margin:.2em 0}\n.text blockquote{margin:0 0 .75em;padding:2px 0 2px 12px;border-left:3px solid var(--line);color:var(--muted)}\n.text a{color:inherit;text-decoration:underline;text-decoration-color:var(--faint);text-underline-offset:2px}\n.text code{font:12.5px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;background:var(--code);padding:1px 5px;border-radius:5px}\n.text pre{background:var(--code);border-radius:10px;padding:12px 14px;overflow:auto;margin:0 0 .85em}\n.text pre code{background:none;padding:0;font-size:12.5px;white-space:pre}\n.text hr{border:0;border-top:1px solid var(--line);margin:1.2em 0}\n.text .table{overflow:auto;margin:0 0 .85em}\n.text table{border-collapse:collapse;font-size:14px}\n.text th,.text td{border:1px solid var(--line);padding:5px 10px;text-align:left;vertical-align:top}\n.text th{background:var(--soft);font-weight:600}\n.tools{margin:4px 0 10px;display:flex;flex-direction:column;gap:1px}\n.tool{display:flex;align-items:baseline;gap:8px;color:var(--muted);font-size:13.5px;min-width:0;padding:2px 0}\n.tool .dot{width:6px;height:6px;border-radius:50%;background:var(--accent);flex:none;transform:translateY(-2px)}\n.tool.failed .dot{background:var(--faint)}\n.tool .verb{flex:none}\n.tool .target{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--fg);opacity:.8}\n.tool .target.code{font:12.5px ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}\ndetails.out{margin:0 0 6px 14px}\ndetails.out summary{cursor:pointer;color:var(--faint);font-size:12.5px;list-style:none}\ndetails.out summary::-webkit-details-marker{display:none}\ndetails.out pre{margin:6px 0 0;background:var(--code);border-radius:8px;padding:10px 12px;max-height:280px;overflow:auto;font:12px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace;white-space:pre-wrap;word-break:break-word}\n.err{color:var(--warn);font-size:13.5px}\n.card{max-width:380px;margin:12vh auto 0;padding:28px 24px;border:1px solid var(--line);border-radius:18px;text-align:center}\n.card h2{font-size:17px;margin:12px 0 6px}\n.card p{color:var(--muted);font-size:13.5px;margin:0 0 16px}\n.card .icon{width:44px;height:44px;border-radius:50%;background:var(--soft);color:var(--muted);display:grid;place-items:center;margin:0 auto}\n.card form{display:flex;gap:8px}\n.card input{flex:1;min-width:0;font:inherit;padding:9px 12px;border-radius:10px;border:1px solid var(--line);background:var(--bg);color:var(--fg);outline:none}\n.card input:focus{border-color:var(--muted)}\n.card .error{color:var(--warn);font-size:13px;margin:10px 0 0;min-height:1em}\nbutton{font:inherit;font-size:13.5px;padding:8px 14px;border-radius:10px;border:1px solid var(--line);background:var(--bg);color:var(--fg);cursor:pointer}\nbutton.primary{background:var(--fg);color:var(--bg);border-color:var(--fg)}\nbutton:disabled{opacity:.5;cursor:default}\n.spin{width:22px;height:22px;border:2px solid var(--line);border-top-color:var(--muted);border-radius:50%;margin:0 auto;animation:spin .8s linear infinite}\n@keyframes spin{to{transform:rotate(360deg)}}\n@media (prefers-reduced-motion:reduce){.spin{animation-duration:3s}}\n.agent-head{display:flex;flex-direction:column;align-items:center;text-align:center;gap:4px;margin:8px 0 22px}\n.agent-face{width:64px;height:64px;border-radius:50%;background:var(--soft);color:#fff;display:grid;place-items:center;font-size:24px;font-weight:700;margin-bottom:8px;box-shadow:0 0 0 1px var(--line)}\n.agent-head h1.title{margin:0}.agent-head .meta{margin:0;justify-content:center}\n.agent-role{border:1px solid var(--line);border-radius:var(--radius);padding:14px 16px;background:var(--soft)}\n.agent-role>:first-child{margin-top:0}.agent-role>:last-child{margin-bottom:0}\n.agent .notes{margin:10px 0 0}\n.agent-hint{color:var(--muted);font-size:13.5px;text-align:center;margin:18px 0 0}\n.foot{max-width:760px;margin:0 auto;padding:18px 18px 40px;color:var(--faint);font-size:12.5px;border-top:1px solid var(--line);display:flex;flex-direction:column;gap:4px}\n.page{display:block;width:100%;height:calc(100vh - 48px);height:calc(100dvh - 48px);border:0;background:#fff}\n.file img{max-width:100%;border-radius:10px;display:block;margin:0 auto}\n.file pre{white-space:pre-wrap;word-break:break-word;background:var(--code);border-radius:10px;padding:14px;font:12.5px/1.55 ui-monospace,SFMono-Regular,Menlo,monospace}\n";
|
|
2
|
+
//# sourceMappingURL=viewer-style.d.ts.map
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VIEWER_STYLE = void 0;
|
|
4
|
+
exports.VIEWER_STYLE = `
|
|
5
|
+
:root{color-scheme:light dark;--bg:#fff;--fg:#1f1f1f;--muted:#737373;--faint:#a3a3a3;--line:#ececec;--soft:#f5f5f5;--bubble:#f2f2f2;--code:#f6f6f6;--accent:#16a34a;--warn:#d97706;--radius:14px}
|
|
6
|
+
@media (prefers-color-scheme:dark){:root{--bg:#191919;--fg:#ececec;--muted:#a3a3a3;--faint:#6b6b6b;--line:#2c2c2c;--soft:#222;--bubble:#2a2a2a;--code:#232323;--accent:#4ade80;--warn:#fbbf24}}
|
|
7
|
+
*{box-sizing:border-box}
|
|
8
|
+
html,body{margin:0;background:var(--bg);color:var(--fg);font:15px/1.65 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;-webkit-font-smoothing:antialiased}
|
|
9
|
+
.top{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:10px;padding:10px 16px;background:color-mix(in srgb,var(--bg) 88%,transparent);backdrop-filter:saturate(1.6) blur(12px);-webkit-backdrop-filter:saturate(1.6) blur(12px);border-bottom:1px solid var(--line)}
|
|
10
|
+
.logo{width:26px;height:26px;border-radius:8px;background:var(--fg);color:var(--bg);display:grid;place-items:center;font-weight:700;font-size:13px;flex:none}
|
|
11
|
+
.top .name{font-weight:600;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}
|
|
12
|
+
.top button{flex:none}
|
|
13
|
+
main{max-width:760px;margin:0 auto;padding:28px 18px 40px}
|
|
14
|
+
main.wide{max-width:none;padding:0}
|
|
15
|
+
h1.title{font-size:22px;line-height:1.35;margin:0 0 6px;letter-spacing:-.01em;word-break:break-word}
|
|
16
|
+
.meta{color:var(--muted);font-size:13px;margin:0 0 22px;display:flex;flex-wrap:wrap;gap:4px 12px}
|
|
17
|
+
.notes{color:var(--muted);font-size:12.5px;margin:-10px 0 22px;display:flex;flex-direction:column;gap:2px}
|
|
18
|
+
.msg{margin:0 0 18px}
|
|
19
|
+
.msg.user{display:flex;justify-content:flex-end}
|
|
20
|
+
.msg.user .bubble{background:var(--bubble);border-radius:var(--radius) var(--radius) 4px var(--radius);padding:9px 14px;max-width:85%;white-space:pre-wrap;word-break:break-word}
|
|
21
|
+
.msg.ta .text>:first-child{margin-top:0}.msg.ta .text>:last-child{margin-bottom:0}
|
|
22
|
+
.text{word-break:break-word}
|
|
23
|
+
.text p{margin:0 0 .75em}
|
|
24
|
+
.text h2,.text h3,.text h4,.text h5,.text h6{margin:1.2em 0 .5em;line-height:1.35}
|
|
25
|
+
.text h2{font-size:1.25em}.text h3{font-size:1.1em}.text h4,.text h5,.text h6{font-size:1em}
|
|
26
|
+
.text ul,.text ol{margin:0 0 .75em;padding-left:1.4em}.text li{margin:.2em 0}
|
|
27
|
+
.text blockquote{margin:0 0 .75em;padding:2px 0 2px 12px;border-left:3px solid var(--line);color:var(--muted)}
|
|
28
|
+
.text a{color:inherit;text-decoration:underline;text-decoration-color:var(--faint);text-underline-offset:2px}
|
|
29
|
+
.text code{font:12.5px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;background:var(--code);padding:1px 5px;border-radius:5px}
|
|
30
|
+
.text pre{background:var(--code);border-radius:10px;padding:12px 14px;overflow:auto;margin:0 0 .85em}
|
|
31
|
+
.text pre code{background:none;padding:0;font-size:12.5px;white-space:pre}
|
|
32
|
+
.text hr{border:0;border-top:1px solid var(--line);margin:1.2em 0}
|
|
33
|
+
.text .table{overflow:auto;margin:0 0 .85em}
|
|
34
|
+
.text table{border-collapse:collapse;font-size:14px}
|
|
35
|
+
.text th,.text td{border:1px solid var(--line);padding:5px 10px;text-align:left;vertical-align:top}
|
|
36
|
+
.text th{background:var(--soft);font-weight:600}
|
|
37
|
+
.tools{margin:4px 0 10px;display:flex;flex-direction:column;gap:1px}
|
|
38
|
+
.tool{display:flex;align-items:baseline;gap:8px;color:var(--muted);font-size:13.5px;min-width:0;padding:2px 0}
|
|
39
|
+
.tool .dot{width:6px;height:6px;border-radius:50%;background:var(--accent);flex:none;transform:translateY(-2px)}
|
|
40
|
+
.tool.failed .dot{background:var(--faint)}
|
|
41
|
+
.tool .verb{flex:none}
|
|
42
|
+
.tool .target{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--fg);opacity:.8}
|
|
43
|
+
.tool .target.code{font:12.5px ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
|
|
44
|
+
details.out{margin:0 0 6px 14px}
|
|
45
|
+
details.out summary{cursor:pointer;color:var(--faint);font-size:12.5px;list-style:none}
|
|
46
|
+
details.out summary::-webkit-details-marker{display:none}
|
|
47
|
+
details.out pre{margin:6px 0 0;background:var(--code);border-radius:8px;padding:10px 12px;max-height:280px;overflow:auto;font:12px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace;white-space:pre-wrap;word-break:break-word}
|
|
48
|
+
.err{color:var(--warn);font-size:13.5px}
|
|
49
|
+
.card{max-width:380px;margin:12vh auto 0;padding:28px 24px;border:1px solid var(--line);border-radius:18px;text-align:center}
|
|
50
|
+
.card h2{font-size:17px;margin:12px 0 6px}
|
|
51
|
+
.card p{color:var(--muted);font-size:13.5px;margin:0 0 16px}
|
|
52
|
+
.card .icon{width:44px;height:44px;border-radius:50%;background:var(--soft);color:var(--muted);display:grid;place-items:center;margin:0 auto}
|
|
53
|
+
.card form{display:flex;gap:8px}
|
|
54
|
+
.card input{flex:1;min-width:0;font:inherit;padding:9px 12px;border-radius:10px;border:1px solid var(--line);background:var(--bg);color:var(--fg);outline:none}
|
|
55
|
+
.card input:focus{border-color:var(--muted)}
|
|
56
|
+
.card .error{color:var(--warn);font-size:13px;margin:10px 0 0;min-height:1em}
|
|
57
|
+
button{font:inherit;font-size:13.5px;padding:8px 14px;border-radius:10px;border:1px solid var(--line);background:var(--bg);color:var(--fg);cursor:pointer}
|
|
58
|
+
button.primary{background:var(--fg);color:var(--bg);border-color:var(--fg)}
|
|
59
|
+
button:disabled{opacity:.5;cursor:default}
|
|
60
|
+
.spin{width:22px;height:22px;border:2px solid var(--line);border-top-color:var(--muted);border-radius:50%;margin:0 auto;animation:spin .8s linear infinite}
|
|
61
|
+
@keyframes spin{to{transform:rotate(360deg)}}
|
|
62
|
+
@media (prefers-reduced-motion:reduce){.spin{animation-duration:3s}}
|
|
63
|
+
.agent-head{display:flex;flex-direction:column;align-items:center;text-align:center;gap:4px;margin:8px 0 22px}
|
|
64
|
+
.agent-face{width:64px;height:64px;border-radius:50%;background:var(--soft);color:#fff;display:grid;place-items:center;font-size:24px;font-weight:700;margin-bottom:8px;box-shadow:0 0 0 1px var(--line)}
|
|
65
|
+
.agent-head h1.title{margin:0}.agent-head .meta{margin:0;justify-content:center}
|
|
66
|
+
.agent-role{border:1px solid var(--line);border-radius:var(--radius);padding:14px 16px;background:var(--soft)}
|
|
67
|
+
.agent-role>:first-child{margin-top:0}.agent-role>:last-child{margin-bottom:0}
|
|
68
|
+
.agent .notes{margin:10px 0 0}
|
|
69
|
+
.agent-hint{color:var(--muted);font-size:13.5px;text-align:center;margin:18px 0 0}
|
|
70
|
+
.foot{max-width:760px;margin:0 auto;padding:18px 18px 40px;color:var(--faint);font-size:12.5px;border-top:1px solid var(--line);display:flex;flex-direction:column;gap:4px}
|
|
71
|
+
.page{display:block;width:100%;height:calc(100vh - 48px);height:calc(100dvh - 48px);border:0;background:#fff}
|
|
72
|
+
.file img{max-width:100%;border-radius:10px;display:block;margin:0 auto}
|
|
73
|
+
.file pre{white-space:pre-wrap;word-break:break-word;background:var(--code);border-radius:10px;padding:14px;font:12.5px/1.55 ui-monospace,SFMono-Regular,Menlo,monospace}
|
|
74
|
+
`;
|
|
75
|
+
//# sourceMappingURL=viewer-style.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** A call of a tool in a line, as Ta reads it: what it does, and on what. */
|
|
2
|
+
export declare namespace ViewerTools {
|
|
3
|
+
function line(name: string, args: Record<string, unknown>): {
|
|
4
|
+
verb: string;
|
|
5
|
+
target?: string;
|
|
6
|
+
code?: boolean;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=viewer.d.ts.map
|
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ViewerTools = void 0;
|
|
4
|
+
const relay_card_1 = require("../common/relay-card");
|
|
5
|
+
const relay_content_1 = require("../common/relay-content");
|
|
6
|
+
const relay_conversation_1 = require("../common/relay-conversation");
|
|
7
|
+
const relay_protocol_1 = require("../common/relay-protocol");
|
|
8
|
+
const viewer_i18n_1 = require("./viewer-i18n");
|
|
9
|
+
const viewer_markdown_1 = require("./viewer-markdown");
|
|
10
|
+
const viewer_style_1 = require("./viewer-style");
|
|
11
|
+
const { t } = viewer_i18n_1.ViewerI18n;
|
|
12
|
+
const el = viewer_markdown_1.ViewerMarkdown.el;
|
|
13
|
+
/** A call of a tool in a line, as Ta reads it: what it does, and on what. */
|
|
14
|
+
var ViewerTools;
|
|
15
|
+
(function (ViewerTools) {
|
|
16
|
+
const VERBS = {
|
|
17
|
+
read: ['read', ['path', 'file_path']],
|
|
18
|
+
write: ['write', ['path', 'file_path']],
|
|
19
|
+
edit: ['edit', ['path', 'file_path']],
|
|
20
|
+
bash: ['run', ['command'], true],
|
|
21
|
+
grep: ['search', ['pattern'], true],
|
|
22
|
+
find: ['find', ['pattern', 'path']],
|
|
23
|
+
ls: ['list', ['path']],
|
|
24
|
+
web_fetch: ['fetch', ['url']],
|
|
25
|
+
fetch: ['fetch', ['url']],
|
|
26
|
+
web_search: ['webSearch', ['query']],
|
|
27
|
+
codemode: ['script', []],
|
|
28
|
+
};
|
|
29
|
+
function line(name, args) {
|
|
30
|
+
const known = VERBS[name];
|
|
31
|
+
const first = (keys) => keys.map(key => args === null || args === void 0 ? void 0 : args[key]).find(value => typeof value === 'string' && value);
|
|
32
|
+
if (known) {
|
|
33
|
+
return { verb: t(known[0]), target: first(known[1]), code: known[2] };
|
|
34
|
+
}
|
|
35
|
+
const target = Object.values(args !== null && args !== void 0 ? args : {}).find(value => typeof value === 'string' && value.length < 200);
|
|
36
|
+
return { verb: t('use', { name }), target };
|
|
37
|
+
}
|
|
38
|
+
ViewerTools.line = line;
|
|
39
|
+
})(ViewerTools || (exports.ViewerTools = ViewerTools = {}));
|
|
40
|
+
function text(content) {
|
|
41
|
+
if (typeof content === 'string') {
|
|
42
|
+
return { words: content, images: 0 };
|
|
43
|
+
}
|
|
44
|
+
const words = content.flatMap(part => (part.type === 'text' ? [part.text] : [])).join('\n');
|
|
45
|
+
return { words, images: content.filter(part => part.type === 'image').length };
|
|
46
|
+
}
|
|
47
|
+
function toolLine(part, result) {
|
|
48
|
+
const { verb, target, code } = ViewerTools.line(part.name, part.arguments);
|
|
49
|
+
const row = el('div');
|
|
50
|
+
row.className = `tool${(result === null || result === void 0 ? void 0 : result.isError) ? ' failed' : ''}`;
|
|
51
|
+
const dot = el('span');
|
|
52
|
+
dot.className = 'dot';
|
|
53
|
+
row.append(dot, Object.assign(el('span', verb), { className: 'verb' }));
|
|
54
|
+
if (target) {
|
|
55
|
+
const span = el('span', target.split('\n')[0]);
|
|
56
|
+
span.className = `target${code ? ' code' : ''}`;
|
|
57
|
+
span.title = target;
|
|
58
|
+
row.append(span);
|
|
59
|
+
}
|
|
60
|
+
const output = result ? text(result.content).words.trim() : '';
|
|
61
|
+
if (!output) {
|
|
62
|
+
return [row];
|
|
63
|
+
}
|
|
64
|
+
const details = el('details');
|
|
65
|
+
details.className = 'out';
|
|
66
|
+
details.append(el('summary', (result === null || result === void 0 ? void 0 : result.isError) ? t('error') : t('output')), el('pre', output));
|
|
67
|
+
return [row, details];
|
|
68
|
+
}
|
|
69
|
+
function conversation(main, item) {
|
|
70
|
+
var _a, _b, _c;
|
|
71
|
+
const doc = JSON.parse(new TextDecoder().decode(item.data));
|
|
72
|
+
document.title = `${doc.title || item.title} · Ta`;
|
|
73
|
+
main.append(el('h1', doc.title || item.title));
|
|
74
|
+
(_a = main.lastElementChild) === null || _a === void 0 ? void 0 : _a.classList.add('title');
|
|
75
|
+
const meta = el('p');
|
|
76
|
+
meta.className = 'meta';
|
|
77
|
+
const visible = doc.messages.filter(message => message.role !== 'toolResult').length;
|
|
78
|
+
meta.append(...[doc.place, t('sharedAt', { date: viewer_i18n_1.ViewerI18n.date(item.createdAt) }), t('messages', { n: visible })]
|
|
79
|
+
.filter(Boolean)
|
|
80
|
+
.map(part => el('span', part)));
|
|
81
|
+
main.append(meta);
|
|
82
|
+
const notes = [
|
|
83
|
+
((_b = doc.omitted) === null || _b === void 0 ? void 0 : _b.outputs) ? t('outputsOmitted') : '',
|
|
84
|
+
((_c = doc.omitted) === null || _c === void 0 ? void 0 : _c.images) ? t('imagesOmitted', { n: doc.omitted.images }) : '',
|
|
85
|
+
doc.redacted ? t('redacted', { n: doc.redacted }) : '',
|
|
86
|
+
].filter(Boolean);
|
|
87
|
+
if (notes.length) {
|
|
88
|
+
const box = el('div');
|
|
89
|
+
box.className = 'notes';
|
|
90
|
+
box.append(...notes.map(note => el('span', note)));
|
|
91
|
+
main.append(box);
|
|
92
|
+
}
|
|
93
|
+
const results = new Map();
|
|
94
|
+
for (const message of doc.messages) {
|
|
95
|
+
if (message.role === 'toolResult') {
|
|
96
|
+
results.set(message.toolCallId, message);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
for (const message of doc.messages) {
|
|
100
|
+
if (message.role === 'user') {
|
|
101
|
+
const { words, images } = text(message.content);
|
|
102
|
+
const said = [words.trim(), images ? Array.from({ length: images }, () => t('image')).join(' ') : ''].filter(Boolean).join('\n');
|
|
103
|
+
if (!said) {
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
const row = el('div');
|
|
107
|
+
row.className = 'msg user';
|
|
108
|
+
row.append(Object.assign(el('div', said), { className: 'bubble' }));
|
|
109
|
+
main.append(row);
|
|
110
|
+
}
|
|
111
|
+
else if (message.role === 'assistant') {
|
|
112
|
+
const row = el('div');
|
|
113
|
+
row.className = 'msg ta';
|
|
114
|
+
let tools;
|
|
115
|
+
for (const part of message.content) {
|
|
116
|
+
if (part.type === 'text' && part.text.trim()) {
|
|
117
|
+
tools = undefined;
|
|
118
|
+
const block = el('div');
|
|
119
|
+
block.className = 'text';
|
|
120
|
+
block.append(viewer_markdown_1.ViewerMarkdown.render(part.text));
|
|
121
|
+
row.append(block);
|
|
122
|
+
}
|
|
123
|
+
else if (part.type === 'toolCall') {
|
|
124
|
+
if (!tools) {
|
|
125
|
+
tools = el('div');
|
|
126
|
+
tools.className = 'tools';
|
|
127
|
+
row.append(tools);
|
|
128
|
+
}
|
|
129
|
+
tools.append(...toolLine(part, results.get(part.id)));
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
if (message.errorMessage) {
|
|
133
|
+
row.append(Object.assign(el('p', message.errorMessage), { className: 'err' }));
|
|
134
|
+
}
|
|
135
|
+
if (row.childNodes.length) {
|
|
136
|
+
main.append(row);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
function file(main, item) {
|
|
142
|
+
var _a;
|
|
143
|
+
document.title = `${item.title} · Ta`;
|
|
144
|
+
const type = (_a = item.type) !== null && _a !== void 0 ? _a : 'application/octet-stream';
|
|
145
|
+
if (/^text\/html\b/.test(type)) {
|
|
146
|
+
main.classList.add('wide');
|
|
147
|
+
const frame = el('iframe');
|
|
148
|
+
frame.className = 'page';
|
|
149
|
+
frame.title = item.title;
|
|
150
|
+
// Its own origin, opaque: it reaches neither this page nor the key in its address.
|
|
151
|
+
frame.setAttribute('sandbox', 'allow-scripts allow-popups allow-popups-to-escape-sandbox');
|
|
152
|
+
frame.referrerPolicy = 'no-referrer';
|
|
153
|
+
const html = new TextDecoder().decode(item.data);
|
|
154
|
+
addEventListener('message', event => {
|
|
155
|
+
var _a, _b;
|
|
156
|
+
if (event.source === frame.contentWindow && ((_a = event.data) === null || _a === void 0 ? void 0 : _a.ready)) {
|
|
157
|
+
(_b = frame.contentWindow) === null || _b === void 0 ? void 0 : _b.postMessage({ html }, '*');
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
frame.src = relay_protocol_1.RELAY_FRAME_PATH;
|
|
161
|
+
main.append(frame);
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
main.append(Object.assign(el('h1', item.title), { className: 'title' }));
|
|
165
|
+
const meta = el('p', t('sharedAt', { date: viewer_i18n_1.ViewerI18n.date(item.createdAt) }));
|
|
166
|
+
meta.className = 'meta';
|
|
167
|
+
main.append(meta);
|
|
168
|
+
const box = el('div');
|
|
169
|
+
box.className = 'file';
|
|
170
|
+
const blob = new Blob([item.data], { type });
|
|
171
|
+
if (/^image\/(png|jpe?g|gif|webp|avif|bmp)$/.test(type)) {
|
|
172
|
+
const image = el('img');
|
|
173
|
+
image.src = URL.createObjectURL(blob);
|
|
174
|
+
image.alt = item.title;
|
|
175
|
+
box.append(image);
|
|
176
|
+
}
|
|
177
|
+
else if (/markdown/.test(type) || /\.(md|markdown)$/i.test(item.title)) {
|
|
178
|
+
const block = el('div');
|
|
179
|
+
block.className = 'text';
|
|
180
|
+
block.append(viewer_markdown_1.ViewerMarkdown.render(new TextDecoder().decode(item.data)));
|
|
181
|
+
box.append(block);
|
|
182
|
+
}
|
|
183
|
+
else if (/^text\/|json|xml|yaml|javascript|typescript/.test(type)) {
|
|
184
|
+
box.append(el('pre', new TextDecoder().decode(item.data)));
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
const a = el('a', t('download', { name: item.title }));
|
|
188
|
+
a.href = URL.createObjectURL(blob);
|
|
189
|
+
a.download = item.title;
|
|
190
|
+
const button = el('button');
|
|
191
|
+
button.className = 'primary';
|
|
192
|
+
button.append(a);
|
|
193
|
+
a.style.color = 'inherit';
|
|
194
|
+
a.style.textDecoration = 'none';
|
|
195
|
+
box.append(button);
|
|
196
|
+
}
|
|
197
|
+
main.append(box);
|
|
198
|
+
}
|
|
199
|
+
/** An agent's card: its face as its mark in its colour, its name and role, and how to add it. */
|
|
200
|
+
function agent(main, item) {
|
|
201
|
+
const found = relay_card_1.RelayAgentCards.parse(item.data);
|
|
202
|
+
if (!found) {
|
|
203
|
+
return false;
|
|
204
|
+
}
|
|
205
|
+
document.title = `${found.name} · Ta`;
|
|
206
|
+
const box = el('div');
|
|
207
|
+
box.className = 'agent';
|
|
208
|
+
const face = el('div', found.mark);
|
|
209
|
+
face.className = 'agent-face';
|
|
210
|
+
if (found.color) {
|
|
211
|
+
face.style.background = found.color;
|
|
212
|
+
}
|
|
213
|
+
const head = el('div');
|
|
214
|
+
head.className = 'agent-head';
|
|
215
|
+
head.append(face, Object.assign(el('h1', `@${found.name}`), { className: 'title' }), Object.assign(el('p', t('agentKind')), { className: 'meta' }));
|
|
216
|
+
const role = el('div');
|
|
217
|
+
role.className = 'text agent-role';
|
|
218
|
+
role.append(viewer_markdown_1.ViewerMarkdown.render(found.role));
|
|
219
|
+
box.append(head, role);
|
|
220
|
+
if (found.redacted) {
|
|
221
|
+
box.append(Object.assign(el('p', t('redacted', { n: found.redacted })), { className: 'notes' }));
|
|
222
|
+
}
|
|
223
|
+
box.append(Object.assign(el('p', t('agentHint')), { className: 'agent-hint' }));
|
|
224
|
+
main.append(box);
|
|
225
|
+
return true;
|
|
226
|
+
}
|
|
227
|
+
/** Lucide's lock, user, moon and circle-alert as paths, drawn as the rest of Ta draws its icons (stroke 2, round). */
|
|
228
|
+
const ICONS = {
|
|
229
|
+
lock: 'M5 11h14a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2zM7 11V7a5 5 0 0 1 10 0v4',
|
|
230
|
+
self: 'M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2M12 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8z',
|
|
231
|
+
offline: 'M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9z',
|
|
232
|
+
alert: 'M12 8v4M12 16h.01M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20z',
|
|
233
|
+
};
|
|
234
|
+
function svgIcon(name) {
|
|
235
|
+
const ns = 'http://www.w3.org/2000/svg';
|
|
236
|
+
const svg = document.createElementNS(ns, 'svg');
|
|
237
|
+
for (const [key, value] of Object.entries({
|
|
238
|
+
viewBox: '0 0 24 24',
|
|
239
|
+
width: '20',
|
|
240
|
+
height: '20',
|
|
241
|
+
fill: 'none',
|
|
242
|
+
stroke: 'currentColor',
|
|
243
|
+
'stroke-width': '2',
|
|
244
|
+
'stroke-linecap': 'round',
|
|
245
|
+
'stroke-linejoin': 'round',
|
|
246
|
+
})) {
|
|
247
|
+
svg.setAttribute(key, value);
|
|
248
|
+
}
|
|
249
|
+
const path = document.createElementNS(ns, 'path');
|
|
250
|
+
path.setAttribute('d', ICONS[name]);
|
|
251
|
+
svg.append(path);
|
|
252
|
+
return svg;
|
|
253
|
+
}
|
|
254
|
+
function card(main, icon, title, hint) {
|
|
255
|
+
main.replaceChildren();
|
|
256
|
+
const box = el('div');
|
|
257
|
+
box.className = 'card';
|
|
258
|
+
const mark = el('div');
|
|
259
|
+
mark.className = 'icon';
|
|
260
|
+
mark.append(svgIcon(icon));
|
|
261
|
+
box.append(mark, el('h2', title));
|
|
262
|
+
if (hint) {
|
|
263
|
+
box.append(el('p', hint));
|
|
264
|
+
}
|
|
265
|
+
main.append(box);
|
|
266
|
+
return box;
|
|
267
|
+
}
|
|
268
|
+
function askPassword(main, error) {
|
|
269
|
+
const box = card(main, 'lock', t('passwordTitle'), t('passwordHint'));
|
|
270
|
+
const form = el('form');
|
|
271
|
+
const input = el('input');
|
|
272
|
+
input.type = 'password';
|
|
273
|
+
input.placeholder = t('password');
|
|
274
|
+
input.autocomplete = 'off';
|
|
275
|
+
input.required = true;
|
|
276
|
+
const button = el('button', t('open'));
|
|
277
|
+
button.className = 'primary';
|
|
278
|
+
form.append(input, button);
|
|
279
|
+
const message = el('p', error !== null && error !== void 0 ? error : '');
|
|
280
|
+
message.className = 'error';
|
|
281
|
+
box.append(form, message);
|
|
282
|
+
input.focus();
|
|
283
|
+
return new Promise(resolve => form.addEventListener('submit', event => {
|
|
284
|
+
event.preventDefault();
|
|
285
|
+
if (input.value) {
|
|
286
|
+
button.setAttribute('disabled', '');
|
|
287
|
+
message.textContent = '';
|
|
288
|
+
box.append(Object.assign(el('div'), { className: 'spin' }));
|
|
289
|
+
resolve(input.value);
|
|
290
|
+
}
|
|
291
|
+
}));
|
|
292
|
+
}
|
|
293
|
+
function chrome(name) {
|
|
294
|
+
const style = el('style', viewer_style_1.VIEWER_STYLE);
|
|
295
|
+
document.head.append(style);
|
|
296
|
+
const top = el('header');
|
|
297
|
+
top.className = 'top';
|
|
298
|
+
const copy = el('button', t('copy'));
|
|
299
|
+
copy.addEventListener('click', () => {
|
|
300
|
+
var _a;
|
|
301
|
+
void ((_a = navigator.clipboard) === null || _a === void 0 ? void 0 : _a.writeText(location.href).then(() => {
|
|
302
|
+
copy.textContent = t('copied');
|
|
303
|
+
setTimeout(() => (copy.textContent = t('copy')), 1600);
|
|
304
|
+
}));
|
|
305
|
+
});
|
|
306
|
+
const title = el('span', name);
|
|
307
|
+
title.className = 'name';
|
|
308
|
+
top.append(Object.assign(el('span', 'Ta'), { className: 'logo' }), title, copy);
|
|
309
|
+
const main = el('main');
|
|
310
|
+
document.body.replaceChildren(top, main);
|
|
311
|
+
return main;
|
|
312
|
+
}
|
|
313
|
+
function footer(card) {
|
|
314
|
+
const foot = el('footer');
|
|
315
|
+
foot.className = 'foot';
|
|
316
|
+
// A card says how to add it above.
|
|
317
|
+
foot.append(...(card ? [] : [el('span', t('footer'))]), el('span', t('secure')));
|
|
318
|
+
document.body.append(foot);
|
|
319
|
+
}
|
|
320
|
+
async function show() {
|
|
321
|
+
var _a;
|
|
322
|
+
const main = chrome(t('title'));
|
|
323
|
+
let link;
|
|
324
|
+
try {
|
|
325
|
+
link = relay_content_1.RelayContentUtil.parse(location.href);
|
|
326
|
+
}
|
|
327
|
+
catch (_b) {
|
|
328
|
+
card(main, 'alert', t('invalid'));
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
if (link.access === 'self' || link.access === 'people') {
|
|
332
|
+
card(main, 'self', t(link.access));
|
|
333
|
+
return;
|
|
334
|
+
}
|
|
335
|
+
let password;
|
|
336
|
+
let error;
|
|
337
|
+
for (;;) {
|
|
338
|
+
if (link.access === 'password') {
|
|
339
|
+
password = await askPassword(main, error);
|
|
340
|
+
}
|
|
341
|
+
else {
|
|
342
|
+
main.replaceChildren(Object.assign(el('div'), { className: 'spin' }));
|
|
343
|
+
(_a = main.firstElementChild) === null || _a === void 0 ? void 0 : _a.setAttribute('style', 'margin-top:20vh');
|
|
344
|
+
}
|
|
345
|
+
try {
|
|
346
|
+
const item = await relay_content_1.RelayContentUtil.fetch(link, { password });
|
|
347
|
+
main.replaceChildren();
|
|
348
|
+
const name = document.querySelector('.top .name');
|
|
349
|
+
if (name) {
|
|
350
|
+
name.textContent = item.title;
|
|
351
|
+
}
|
|
352
|
+
if (item.kind === relay_conversation_1.RELAY_CONVERSATION_KIND) {
|
|
353
|
+
conversation(main, item);
|
|
354
|
+
}
|
|
355
|
+
else if (!(item.kind === relay_card_1.RELAY_AGENT_KIND && agent(main, item))) {
|
|
356
|
+
file(main, item);
|
|
357
|
+
}
|
|
358
|
+
if (!main.classList.contains('wide')) {
|
|
359
|
+
footer(item.kind === relay_card_1.RELAY_AGENT_KIND);
|
|
360
|
+
}
|
|
361
|
+
return;
|
|
362
|
+
}
|
|
363
|
+
catch (failure) {
|
|
364
|
+
const reason = failure instanceof relay_content_1.RelayContentError ? failure.reason : 'failed';
|
|
365
|
+
if (link.access === 'password' && (reason === 'wrong' || reason === 'password')) {
|
|
366
|
+
error = t('wrong');
|
|
367
|
+
continue;
|
|
368
|
+
}
|
|
369
|
+
if (link.access === 'password' && reason === 'busy') {
|
|
370
|
+
error = t('busy');
|
|
371
|
+
continue;
|
|
372
|
+
}
|
|
373
|
+
const known = ['busy', 'gone', 'offline', 'self', 'invalid', 'timeout', 'large'];
|
|
374
|
+
card(main, reason === 'offline' ? 'offline' : 'alert', t(known.includes(reason) ? reason : 'failed'));
|
|
375
|
+
return;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
addEventListener('hashchange', () => location.reload());
|
|
380
|
+
void show();
|
|
381
|
+
//# sourceMappingURL=viewer.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/ta-relay",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.11.0",
|
|
4
4
|
"description": "Ta from anywhere: a relay that only forwards, and end-to-end encryption between a paired device and ta serve",
|
|
5
5
|
"homepage": "https://github.com/cellbang/cell",
|
|
6
6
|
"bugs": {
|
|
@@ -19,17 +19,18 @@
|
|
|
19
19
|
"files": [
|
|
20
20
|
"lib",
|
|
21
21
|
"esm",
|
|
22
|
+
"viewer",
|
|
22
23
|
"!lib/**/*.spec.*",
|
|
23
24
|
"!**/*.map"
|
|
24
25
|
],
|
|
25
26
|
"scripts": {
|
|
26
|
-
"build": "tsc -b && bun ../../scripts/build-esm.ts",
|
|
27
|
-
"clean": "rm -rf lib esm *.tsbuildinfo",
|
|
27
|
+
"build": "tsc -b && bun ../../scripts/build-esm.ts && bun scripts/build-viewer.ts",
|
|
28
|
+
"clean": "rm -rf lib esm viewer *.tsbuildinfo",
|
|
28
29
|
"test": "bun test ./lib",
|
|
29
30
|
"watch": "tsc -b -w --preserveWatchOutput"
|
|
30
31
|
},
|
|
31
32
|
"dependencies": {
|
|
32
|
-
"@celljs/rpc": "4.
|
|
33
|
+
"@celljs/rpc": "4.11.0"
|
|
33
34
|
},
|
|
34
35
|
"publishConfig": {
|
|
35
36
|
"access": "public"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<!doctype html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover"><meta name="referrer" content="no-referrer"><meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'unsafe-inline' 'unsafe-eval' https: data: blob:; style-src 'unsafe-inline' https: data:; img-src https: data: blob:; font-src https: data:; media-src https: data: blob:; connect-src 'none'; form-action 'none'"><title></title></head><body><script>addEventListener('message',function(e){if(e.source!==parent||!e.data||typeof e.data.html!=='string')return;document.open();document.write(e.data.html);document.close()},{once:true});parent.postMessage({ready:true},'*')</script></body></html>
|