aegisone 1.0.39 → 1.0.40
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/LICENSING.md +186 -0
- package/README.md +2 -2
- package/bin/aegis.js +1 -1
- package/package.json +3 -2
- package/scripts/predist.mjs +1 -1
- package/src/child.js +1 -1
- package/src/permissions.js +1 -1
- package/vendor/cli/package.json +4 -2
- package/vendor/cli/src/app.js +1 -1
- package/vendor/cli/src/chatflow.js +1 -1
- package/vendor/cli/src/commands.js +3 -1
- package/vendor/cli/src/config.js +1 -1
- package/vendor/cli/src/engine.js +1 -1
- package/vendor/cli/src/history.js +1 -1
- package/vendor/cli/src/models.js +1 -1
- package/vendor/cli/src/overlays.js +1 -1
- package/vendor/cli/src/panels.js +1 -1
- package/vendor/cli/vendor/client/brain-catalog.js +1 -1
- package/vendor/cli/vendor/client/byok-catalog.js +1 -1
- package/vendor/cli/vendor/client/credits.js +45 -0
- package/vendor/cli/vendor/client/foreign-sessions.js +3 -0
- package/vendor/cli/vendor/client/naming.js +1 -1
- package/vendor/cli/vendor/client/prefs.js +1 -1
- package/vendor/cli/vendor/client/session-search.js +3 -0
- package/vendor/cli/vendor/desktop/lib/local/claude-pro.js +1 -1
- package/vendor/cli/vendor/desktop/lib/local/engine.js +1 -1
- package/vendor/cli/vendor/desktop/lib/local/integrity.js +42 -2
- package/vendor/cli/vendor/desktop/lib/local/perm-rules.js +206 -0
- package/vendor/cli/vendor/desktop/lib/local/perm-store.js +298 -0
- package/vendor/cli/vendor/desktop/lib/local/perm-write.js +199 -0
- package/vendor/cli/vendor/desktop/lib/local/pro-sessions.js +3 -0
- package/vendor/cli/vendor/desktop/lib/local/sandbox-appcontainer.js +242 -0
- package/vendor/cli/vendor/desktop/lib/local/sandbox-bwrap.js +316 -0
- package/vendor/cli/vendor/desktop/lib/local/sandbox-seatbelt.js +380 -0
- package/vendor/cli/vendor/desktop/lib/local/sandbox.js +493 -0
- package/vendor/cli/vendor/desktop/lib/local/shell.js +155 -20
- package/vendor/cli/vendor/desktop/lib/local/tools.js +29 -4
- package/vendor/cli/vendor/desktop/lib/settings.js +1 -1
- package/vendor/cli/vendor/desktop/main.js +774 -37
- package/vendor/cli/vendor/desktop/renderer/usage.js +1 -1
- package/vendor/cli/vendor/mcp/admission.js +3 -0
- package/vendor/cli/vendor/mcp/server.js +1 -1
- package/vendor/cli/vendor/one/src/child.js +1 -1
- package/vendor/cli/vendor/one/src/permissions.js +1 -1
- package/vendor/desktop/bin/aegis.js +1 -1
- package/vendor/desktop/lib/local/claude-pro.js +1 -1
- package/vendor/desktop/lib/local/engine.js +1 -1
- package/vendor/desktop/lib/local/integrity.js +42 -2
- package/vendor/desktop/lib/local/perm-rules.js +206 -0
- package/vendor/desktop/lib/local/perm-store.js +298 -0
- package/vendor/desktop/lib/local/perm-write.js +199 -0
- package/vendor/desktop/lib/local/pro-sessions.js +3 -0
- package/vendor/desktop/lib/local/sandbox-appcontainer.js +242 -0
- package/vendor/desktop/lib/local/sandbox-bwrap.js +316 -0
- package/vendor/desktop/lib/local/sandbox-seatbelt.js +380 -0
- package/vendor/desktop/lib/local/sandbox.js +493 -0
- package/vendor/desktop/lib/local/shell.js +155 -20
- package/vendor/desktop/lib/local/tools.js +29 -4
- package/vendor/desktop/lib/settings.js +1 -1
- package/vendor/desktop/lib/sync/memory-store.js +3 -0
- package/vendor/desktop/main.js +774 -37
- package/vendor/desktop/package.json +19 -7
- package/vendor/desktop/preload.js +1 -1
- package/vendor/desktop/renderer/app.js +5 -1
- package/vendor/desktop/renderer/index.html +221 -5
- package/vendor/desktop/renderer/provider-mark.js +1 -1
- package/vendor/desktop/renderer/provider-toolbar.js +1 -1
- package/vendor/desktop/renderer/providers.js +1 -1
- package/vendor/desktop/renderer/style.css +223 -6
- package/vendor/desktop/renderer/usage.js +1 -1
- package/vendor/desktop/vendor/brain-catalog.js +1 -1
- package/vendor/desktop/vendor/byok-catalog.js +1 -1
- package/vendor/desktop/vendor/credits.js +45 -0
- package/vendor/desktop/vendor/faces/cli/package.json +3 -2
- package/vendor/desktop/vendor/faces/cli/src/app.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/chatflow.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/commands.js +3 -1
- package/vendor/desktop/vendor/faces/cli/src/config.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/engine.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/history.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/models.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/overlays.js +1 -1
- package/vendor/desktop/vendor/faces/cli/src/panels.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/brain-catalog.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/byok-catalog.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/credits.js +45 -0
- package/vendor/desktop/vendor/faces/cli/vendor/client/foreign-sessions.js +3 -0
- package/vendor/desktop/vendor/faces/cli/vendor/client/naming.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/prefs.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/client/session-search.js +3 -0
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/claude-pro.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/engine.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/integrity.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/perm-rules.js +3 -0
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/perm-store.js +3 -0
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/perm-write.js +3 -0
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/pro-sessions.js +3 -0
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/sandbox-appcontainer.js +3 -0
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/sandbox-bwrap.js +3 -0
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/sandbox-seatbelt.js +3 -0
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/sandbox.js +3 -0
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/shell.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/local/tools.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/lib/settings.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/main.js +4 -2
- package/vendor/desktop/vendor/faces/cli/vendor/desktop/renderer/usage.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/mcp/admission.js +3 -0
- package/vendor/desktop/vendor/faces/cli/vendor/mcp/server.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/one/src/child.js +1 -1
- package/vendor/desktop/vendor/faces/cli/vendor/one/src/permissions.js +1 -1
- package/vendor/desktop/vendor/foreign-sessions.js +3 -0
- package/vendor/desktop/vendor/naming.js +1 -1
- package/vendor/desktop/vendor/prefs.js +1 -1
- package/vendor/desktop/vendor/sandbox/provenance.json +20 -0
- package/vendor/desktop/vendor/sandbox/x64-linux/bwrap +0 -0
- package/vendor/desktop/vendor/session-search.js +3 -0
|
@@ -35,6 +35,17 @@
|
|
|
35
35
|
for, so an untouched thread never shows a `0 tokens` it never measured. -->
|
|
36
36
|
<div class="session-meter" id="session-meter" hidden></div>
|
|
37
37
|
<div class="spacer"></div>
|
|
38
|
+
<!-- Import session. In the TOOLBAR, not buried in the Memory card, because
|
|
39
|
+
it is the first thing a user arriving from another tool wants: their
|
|
40
|
+
existing conversations, in here, where they can read and continue them.
|
|
41
|
+
Opening the sheet is a dry scan (read-only, nothing copied); the copy
|
|
42
|
+
only happens from the sheet's own button, which names the count. -->
|
|
43
|
+
<button
|
|
44
|
+
type="button"
|
|
45
|
+
id="import-session-btn"
|
|
46
|
+
class="ghost-btn toolbar-import"
|
|
47
|
+
title="Import sessions & memory from other AI tools"
|
|
48
|
+
>Import session</button>
|
|
38
49
|
<button type="button" id="new-chat" class="ghost-btn">New chat</button>
|
|
39
50
|
</header>
|
|
40
51
|
|
|
@@ -371,6 +382,74 @@
|
|
|
371
382
|
<span>confirm before running tools</span>
|
|
372
383
|
</label>
|
|
373
384
|
<p class="hint" id="confirm-mode-hint"></p>
|
|
385
|
+
|
|
386
|
+
<label
|
|
387
|
+
class="flow-toggle"
|
|
388
|
+
for="plan-mode-toggle"
|
|
389
|
+
title="Read-only session: the agent may read files, search and run read-only shell commands, but writeFile / editFile / mutating exec calls are refused outright — no approval card, because plan mode promises not to ask. Turn off to let it edit again."
|
|
390
|
+
>
|
|
391
|
+
<input type="checkbox" id="plan-mode-toggle" />
|
|
392
|
+
<span>plan mode (read-only)</span>
|
|
393
|
+
</label>
|
|
394
|
+
<p class="hint" id="plan-mode-hint"></p>
|
|
395
|
+
|
|
396
|
+
<!-- Rules: what the gate decides WITHOUT asking. Same file the CLI's
|
|
397
|
+
/permissions command edits (~/.aegiscode/permissions.json), so a
|
|
398
|
+
rule added here is honoured by both faces. Deny is rendered first
|
|
399
|
+
because it is the floor: an allow cannot override it. -->
|
|
400
|
+
<div class="rules-block" id="perm-rules">
|
|
401
|
+
<h3 class="rules-title">Rules</h3>
|
|
402
|
+
<p class="hint" id="perm-rules-hint">
|
|
403
|
+
A rule is <code>tool(pattern)</code> — <code>exec(npm test)</code>,
|
|
404
|
+
<code>exec(npm run *)</code>, <code>writeFile(src/**)</code>.
|
|
405
|
+
Deny beats allow. Anything with no rule still asks.
|
|
406
|
+
</p>
|
|
407
|
+
<ul class="rules-list" id="perm-rules-list"></ul>
|
|
408
|
+
<form class="rules-add" id="perm-rules-form">
|
|
409
|
+
<select id="perm-rules-list-select" aria-label="Rule list">
|
|
410
|
+
<option value="allow">allow</option>
|
|
411
|
+
<option value="deny">deny</option>
|
|
412
|
+
<option value="ask">ask</option>
|
|
413
|
+
</select>
|
|
414
|
+
<input
|
|
415
|
+
type="text"
|
|
416
|
+
id="perm-rules-input"
|
|
417
|
+
class="rules-input"
|
|
418
|
+
placeholder="exec(npm test)"
|
|
419
|
+
autocomplete="off"
|
|
420
|
+
spellcheck="false"
|
|
421
|
+
aria-label="Rule"
|
|
422
|
+
/>
|
|
423
|
+
<button type="submit" class="ghost-btn" id="perm-rules-add">Add</button>
|
|
424
|
+
</form>
|
|
425
|
+
<p class="hint" id="perm-rules-status"></p>
|
|
426
|
+
</div>
|
|
427
|
+
|
|
428
|
+
<!-- Sandbox posture (docs/agent-safety-plan.md §1). The switch above
|
|
429
|
+
decides whether you are ASKED; this decides what a command can
|
|
430
|
+
reach once it runs. They are different bounds and the copy says so,
|
|
431
|
+
because a user who reads this as "more approvals" would set it to
|
|
432
|
+
off and lose the only bound that survives an injected model. -->
|
|
433
|
+
<div class="rules-block" id="sandbox-policy">
|
|
434
|
+
<h3 class="rules-title">Command sandbox</h3>
|
|
435
|
+
<p class="hint" id="sandbox-policy-hint">
|
|
436
|
+
What a shell command can touch once it runs. Rules decide whether
|
|
437
|
+
you are asked; this decides what "yes" is allowed to mean.
|
|
438
|
+
</p>
|
|
439
|
+
<label class="rules-add" for="sandbox-mode-select">
|
|
440
|
+
<span>Mode</span>
|
|
441
|
+
<select id="sandbox-mode-select" aria-label="Sandbox mode">
|
|
442
|
+
<option value="workspace-write">workspace-write</option>
|
|
443
|
+
<option value="read-only">read-only</option>
|
|
444
|
+
<option value="off">off</option>
|
|
445
|
+
</select>
|
|
446
|
+
</label>
|
|
447
|
+
<label class="flow-toggle" for="sandbox-network-toggle">
|
|
448
|
+
<input type="checkbox" id="sandbox-network-toggle" />
|
|
449
|
+
<span>allow network from sandboxed commands</span>
|
|
450
|
+
</label>
|
|
451
|
+
<p class="hint" id="sandbox-policy-status"></p>
|
|
452
|
+
</div>
|
|
374
453
|
</section>
|
|
375
454
|
|
|
376
455
|
<!-- Sessions and Memory are panes behind one strip now, not two
|
|
@@ -624,7 +703,11 @@
|
|
|
624
703
|
<template id="welcome-template">
|
|
625
704
|
<div class="chat-welcome" id="chat-welcome">
|
|
626
705
|
<div class="chat-greeting-row">
|
|
627
|
-
|
|
706
|
+
<!-- Decorative mark, drawn in CSS (desktop/renderer/style.css
|
|
707
|
+
.chat-welcome .glyph) rather than this element's content —
|
|
708
|
+
the shape is a mask-image, not text, see that rule for why.
|
|
709
|
+
"Hello" already carries the row's meaning. -->
|
|
710
|
+
<div class="glyph" aria-hidden="true"></div>
|
|
628
711
|
<div class="title" id="chat-greeting">Hello</div>
|
|
629
712
|
</div>
|
|
630
713
|
<div class="sub" id="welcome-tagline">Your intent, AI automated.</div>
|
|
@@ -888,6 +971,134 @@
|
|
|
888
971
|
</div>
|
|
889
972
|
</div>
|
|
890
973
|
|
|
974
|
+
<!-- Session search (View > Search sessions…, Cmd/Ctrl+K).
|
|
975
|
+
|
|
976
|
+
This sheet is what that menu item now opens. It used to open the memory
|
|
977
|
+
inspector below — the label, the accelerator and the sheet all named
|
|
978
|
+
different things, and nothing in the app searched conversations at all.
|
|
979
|
+
Static markup populated by renderSessionSearch() (app.js); no inline
|
|
980
|
+
handlers, because this renderer runs under `script-src 'self'`.
|
|
981
|
+
|
|
982
|
+
The ranking is main.js's `searchSessions` channel over
|
|
983
|
+
client/session-search.js — the SAME module the terminal's /resume picker
|
|
984
|
+
filters with, so the two faces cannot disagree about which conversation
|
|
985
|
+
matches. -->
|
|
986
|
+
<div class="memory-overlay session-overlay" id="session-overlay" hidden>
|
|
987
|
+
<div class="memory-backdrop" id="session-backdrop"></div>
|
|
988
|
+
<div
|
|
989
|
+
class="memory-panel"
|
|
990
|
+
role="dialog"
|
|
991
|
+
aria-modal="true"
|
|
992
|
+
aria-labelledby="session-panel-title"
|
|
993
|
+
>
|
|
994
|
+
<header class="memory-panel-head">
|
|
995
|
+
<h2 id="session-panel-title">Sessions</h2>
|
|
996
|
+
<span class="memory-count" id="session-count"></span>
|
|
997
|
+
<div class="spacer"></div>
|
|
998
|
+
<button type="button" id="session-close" class="ghost-btn" title="Close (Esc)">
|
|
999
|
+
Close
|
|
1000
|
+
</button>
|
|
1001
|
+
</header>
|
|
1002
|
+
|
|
1003
|
+
<form class="memory-filters" id="session-filters">
|
|
1004
|
+
<input
|
|
1005
|
+
type="text"
|
|
1006
|
+
id="session-query"
|
|
1007
|
+
placeholder="Search sessions by title, path or anything you typed…"
|
|
1008
|
+
autocomplete="off"
|
|
1009
|
+
aria-controls="session-list"
|
|
1010
|
+
/>
|
|
1011
|
+
<button type="submit">Search</button>
|
|
1012
|
+
<button type="button" id="session-clear" class="ghost-btn">Clear</button>
|
|
1013
|
+
</form>
|
|
1014
|
+
|
|
1015
|
+
<p class="hint" id="session-hint"></p>
|
|
1016
|
+
|
|
1017
|
+
<div class="memory-scroll">
|
|
1018
|
+
<ul class="memory-list" id="session-list"></ul>
|
|
1019
|
+
</div>
|
|
1020
|
+
</div>
|
|
1021
|
+
</div>
|
|
1022
|
+
|
|
1023
|
+
<!-- Import session (the toolbar's Import session button).
|
|
1024
|
+
|
|
1025
|
+
Two lists, because two different things are imported and mixing them
|
|
1026
|
+
would hide the half that matters:
|
|
1027
|
+
|
|
1028
|
+
sessions — whole conversations, copied into the SHARED session store
|
|
1029
|
+
(client/session-store.js) so they appear in Sessions and in
|
|
1030
|
+
the terminal's /resume;
|
|
1031
|
+
memory — durable fragments, pushed to cloud memory exactly as the
|
|
1032
|
+
Memory card's own import always did.
|
|
1033
|
+
|
|
1034
|
+
Rows are painted from the scan the toolbar button already ran — the sheet
|
|
1035
|
+
never scans by itself, so opening it twice costs no extra disk walk. -->
|
|
1036
|
+
<div class="memory-overlay import-overlay" id="import-overlay" hidden>
|
|
1037
|
+
<div class="memory-backdrop" id="import-backdrop"></div>
|
|
1038
|
+
<div
|
|
1039
|
+
class="memory-panel"
|
|
1040
|
+
role="dialog"
|
|
1041
|
+
aria-modal="true"
|
|
1042
|
+
aria-labelledby="import-panel-title"
|
|
1043
|
+
>
|
|
1044
|
+
<header class="memory-panel-head">
|
|
1045
|
+
<h2 id="import-panel-title">Import from other AI tools</h2>
|
|
1046
|
+
<span class="memory-count" id="import-count"></span>
|
|
1047
|
+
<div class="spacer"></div>
|
|
1048
|
+
<button type="button" id="import-close" class="ghost-btn" title="Close (Esc)">
|
|
1049
|
+
Close
|
|
1050
|
+
</button>
|
|
1051
|
+
</header>
|
|
1052
|
+
|
|
1053
|
+
<p class="hint" id="import-hint">scanning…</p>
|
|
1054
|
+
|
|
1055
|
+
<div class="memory-scroll">
|
|
1056
|
+
<ul class="memory-list" id="import-list"></ul>
|
|
1057
|
+
</div>
|
|
1058
|
+
|
|
1059
|
+
<footer class="import-actions">
|
|
1060
|
+
<label class="import-sync">
|
|
1061
|
+
<input type="checkbox" id="import-sync" />
|
|
1062
|
+
also sync imported sessions to my account
|
|
1063
|
+
</label>
|
|
1064
|
+
<div class="spacer"></div>
|
|
1065
|
+
<button type="button" id="import-memory-btn" class="ghost-btn">
|
|
1066
|
+
Import memory only
|
|
1067
|
+
</button>
|
|
1068
|
+
<button type="button" id="import-sessions-btn" class="btn-block">Import sessions</button>
|
|
1069
|
+
</footer>
|
|
1070
|
+
</div>
|
|
1071
|
+
</div>
|
|
1072
|
+
|
|
1073
|
+
<!-- Credits & licence (Help > Credits & licence…).
|
|
1074
|
+
|
|
1075
|
+
Every row is painted from main.js's `credits` channel, which is
|
|
1076
|
+
client/credits.js reading LICENSING.md and the two NOTICE files. That is
|
|
1077
|
+
the point: the attribution is not retyped here, so bumping a vendored
|
|
1078
|
+
file is a one-file change and this sheet follows. -->
|
|
1079
|
+
<div class="memory-overlay credits-overlay" id="credits-overlay" hidden>
|
|
1080
|
+
<div class="memory-backdrop" id="credits-backdrop"></div>
|
|
1081
|
+
<div
|
|
1082
|
+
class="memory-panel"
|
|
1083
|
+
role="dialog"
|
|
1084
|
+
aria-modal="true"
|
|
1085
|
+
aria-labelledby="credits-panel-title"
|
|
1086
|
+
>
|
|
1087
|
+
<header class="memory-panel-head">
|
|
1088
|
+
<h2 id="credits-panel-title">Credits & Licence</h2>
|
|
1089
|
+
<span class="memory-count" id="credits-licence-tag"></span>
|
|
1090
|
+
<div class="spacer"></div>
|
|
1091
|
+
<button type="button" id="credits-close" class="ghost-btn" title="Close (Esc)">
|
|
1092
|
+
Close
|
|
1093
|
+
</button>
|
|
1094
|
+
</header>
|
|
1095
|
+
|
|
1096
|
+
<div class="memory-scroll" id="credits-body">
|
|
1097
|
+
<p class="hint" id="credits-status">loading…</p>
|
|
1098
|
+
</div>
|
|
1099
|
+
</div>
|
|
1100
|
+
</div>
|
|
1101
|
+
|
|
891
1102
|
<!-- φ(α) panel. Same sheet as the memory inspector (the classes are shared on
|
|
892
1103
|
purpose: one translucent layer, one Escape policy). Every control is
|
|
893
1104
|
bound in fingerprint.js, which is also where these ids are declared — a
|
|
@@ -1123,6 +1334,15 @@
|
|
|
1123
1334
|
</div>
|
|
1124
1335
|
|
|
1125
1336
|
<script src="providers.js"></script>
|
|
1337
|
+
<!-- Must load before provider-toolbar.js: that script reads
|
|
1338
|
+
window.aegisProviderMark into a top-level `const` at parse time (the
|
|
1339
|
+
same pattern providers.js's `window.aegisProviders` already uses one
|
|
1340
|
+
line up), so loading it after would capture `undefined` forever — the
|
|
1341
|
+
icon beside every row would silently never paint, with no error, since
|
|
1342
|
+
`M && ...` reads as a quiet no-op. See the "loaded before app.js" note
|
|
1343
|
+
below for the comment this tag used to carry; app.js also needs it, but
|
|
1344
|
+
provider-toolbar.js needs it FIRST. -->
|
|
1345
|
+
<script src="provider-mark.js"></script>
|
|
1126
1346
|
<script src="provider-toolbar.js"></script>
|
|
1127
1347
|
<script src="companion.js"></script>
|
|
1128
1348
|
<script src="budget.js"></script>
|
|
@@ -1136,10 +1356,6 @@
|
|
|
1136
1356
|
<script src="vendor/purify.min.js"></script>
|
|
1137
1357
|
<script src="vendor/aegis-highlight.js"></script>
|
|
1138
1358
|
<script src="markdown.js"></script>
|
|
1139
|
-
<!-- Paints the provider glyph in the composer row from the selected model
|
|
1140
|
-
id. Loaded before app.js, which calls window.aegisProviderMark.paint
|
|
1141
|
-
through updateBudgetControls(). -->
|
|
1142
|
-
<script src="provider-mark.js"></script>
|
|
1143
1359
|
<!-- Loaded before app.js: app.js's init() calls window.aegisFingerprint.mount
|
|
1144
1360
|
and composes its overlay into the Escape policy, and the orphan check in
|
|
1145
1361
|
test/renderer-wiring.test.mjs fails if this tag goes missing. -->
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
2
|
// Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
|
|
3
|
-
"use strict";const VENDOR_MATCHERS=Object.freeze(["azure-openai","huggingface","openrouter","together-ai","anthropic","deepseek","fireworks","voyage-ai","together","gemini","google","mistral","openai","grok","x-ai","xai","groq"]),PROVIDER_LABELS=Object.freeze({openai:"OpenAI",anthropic:"Anthropic",deepseek:"DeepSeek",google:"Gemini",gemini:"Gemini",groq:"Groq",mistral:"Mistral",openrouter:"OpenRouter",together:"Together","together-ai":"Together",xai:"xAI","x-ai":"xAI",grok:"xAI",huggingface:"Hugging Face",fireworks:"Fireworks","voyage-ai":"Voyage AI","azure-openai":"Azure OpenAI"});function providerOfModel(e){const r=String(null==e?"":e).toLowerCase();if(!r)return"";const t=r.indexOf(":");if(t>0){const e=r.slice(0,t);if(PROVIDER_LABELS[e])return e}const i=r.indexOf("/");if(i>0){const e=r.slice(0,i);if(PROVIDER_LABELS[e])return e}if(r.startsWith("claude"))return"anthropic";if(/^gpt([-.\d]|$)/.test(r))return"openai";for(const e of VENDOR_MATCHERS)if(new RegExp(`(^|[/_.\\-])${e}($|[/_.\\-])`).test(r))return e;return""}function providerGlyph(e){switch(e){case"openai":return[["circle",{cx:"8",cy:"8",r:"5.4"}],["path",{d:"M8 2.6v10.8"}]];case"anthropic":return[["path",{d:"M8 2.2 12.6 13.8H10.2L9.2 11H6.8L5.8 13.8H3.4Z"}]];case"deepseek":return[["path",{d:"M2 10.4c2.2 0 3-3.2 5-3.2s2.6 2.4 4.4 2.4 1.8-1.6 2.6-1.6"}]];case"google":case"gemini":return[["path",{d:"M8 1.8 9.6 6.4 14.2 8 9.6 9.6 8 14.2 6.4 9.6 1.8 8 6.4 6.4Z"}]];case"groq":return[["path",{d:"M9.4 1.6 3.6 9.2h3.6L6 14.4l6.4-8.2H8.6Z"}]];case"mistral":return[["path",{d:"M2 13V7h3v6Z"}],["path",{d:"M6.5 13V4.6h3V13Z"}],["path",{d:"M11 13V8h3v5Z"}]];case"openrouter":return[["path",{d:"M2 8h4.4c1.2 0 1.8-.8 2.4-1.6"}],["path",{d:"M2 8h4.4c1.2 0 1.8.8 2.4 1.6"}],["path",{d:"M8.4 5.4 11.6 8 8.4 10.6"}]];case"together":case"together-ai":return[["circle",{cx:"4.6",cy:"8",r:"2.5"}],["circle",{cx:"11.4",cy:"8",r:"2.5"}]];case"xai":case"x-ai":case"grok":return[["path",{d:"M3 3l10 10M13 3L3 13"}]];case"huggingface":return[["path",{d:"M8 2.4 13.4 5.4 8 8.4 2.6 5.4Z"}],["path",{d:"M2.6 8 8 11l5.4-3"}]];case"fireworks":case"voyage-ai":return[["path",{d:"M2 8h2.4l1.4-4 2.4 8 2.4-6 1.4 2h2"}]];case"azure-openai":return[["rect",{x:"2.4",y:"2.4",width:"11.2",height:"11.2",rx:"2"}],["circle",{cx:"8",cy:"8",r:"2.8"}]];default:return[["circle",{cx:"8",cy:"8",r:"3.2"}]]}}function buildProviderMark(e,r,t){const i=providerOfModel(r),o=PROVIDER_LABELS[i]||String(t||""),n=e.createElement("span");n.className="provider-mark"+(i?` provider-${i}`:" provider-unknown"),n.setAttribute("role","img"),n.setAttribute("aria-label",o||"unknown provider"),n.title=o?`This model is served by ${o}`:"Provider unknown for this model";const a="http://www.w3.org/2000/svg",d=e.createElementNS(a,"svg");d.setAttribute("viewBox","0 0 16 16"),d.setAttribute("width","14"),d.setAttribute("height","14"),d.setAttribute("aria-hidden","true"),d.setAttribute("focusable","false");for(const[r,t]of providerGlyph(i)){const i=e.createElementNS(a,r);for(const e of Object.keys(t))i.setAttribute(e,t[e]);d.appendChild(i)}return n.appendChild(d),{el:n,provider:i,label:o}}function paintProviderMark(e,r,t){if(!e||"undefined"==typeof document)return!1;const i=buildProviderMark(document,r,t);return e.textContent="",e.appendChild(i.el),!0}"undefined"!=typeof window&&(window.aegisProviderMark={paint:paintProviderMark,build:buildProviderMark,providerOfModel:providerOfModel,providerGlyph:providerGlyph,PROVIDER_LABELS:PROVIDER_LABELS}),"undefined"!=typeof module&&module.exports&&(module.exports={providerOfModel:providerOfModel,providerGlyph:providerGlyph,buildProviderMark:buildProviderMark,PROVIDER_LABELS:PROVIDER_LABELS,VENDOR_MATCHERS:VENDOR_MATCHERS});
|
|
3
|
+
"use strict";const VENDOR_MATCHERS=Object.freeze(["azure-openai","huggingface","openrouter","together-ai","anthropic","deepseek","fireworks","voyage-ai","together","gemini","google","mistral","openai","ollama","grok","x-ai","xai","groq"]),PROVIDER_LABELS=Object.freeze({openai:"OpenAI",anthropic:"Anthropic",deepseek:"DeepSeek",google:"Gemini",gemini:"Gemini",groq:"Groq",mistral:"Mistral",openrouter:"OpenRouter",together:"Together","together-ai":"Together",xai:"xAI","x-ai":"xAI",grok:"xAI",huggingface:"Hugging Face",fireworks:"Fireworks","voyage-ai":"Voyage AI","azure-openai":"Azure OpenAI",ollama:"Ollama",local:"Ollama"});function providerOfModel(e){const r=String(null==e?"":e).toLowerCase();if(!r)return"";const t=r.indexOf(":");if(t>0){const e=r.slice(0,t);if(PROVIDER_LABELS[e])return e}const a=r.indexOf("/");if(a>0){const e=r.slice(0,a);if(PROVIDER_LABELS[e])return e}if(r.startsWith("claude"))return"anthropic";if(/^gpt([-.\d]|$)/.test(r))return"openai";for(const e of VENDOR_MATCHERS)if(new RegExp(`(^|[/_.\\-])${e}($|[/_.\\-])`).test(r))return e;return""}const REAL_MARK_ATTRS=Object.freeze({fill:"currentColor",stroke:"none",transform:"scale(.666667)"});function providerGlyph(e){switch(e){case"openai":return[["circle",{cx:"8",cy:"8",r:"5.4"}],["path",{d:"M8 2.6v10.8"}]];case"anthropic":return[["path",{...REAL_MARK_ATTRS,d:"M17.3041 3.541h-3.6718l6.696 16.918H24Zm-10.6082 0L0 20.459h3.7442l1.3693-3.5527h7.0052l1.3693 3.5528h3.7442L10.5363 3.5409Zm-.3712 10.2232 2.2914-5.9456 2.2914 5.9456Z"}]];case"deepseek":return[["path",{...REAL_MARK_ATTRS,d:"M23.748 4.651c-.254-.124-.364.113-.512.233-.051.04-.094.09-.137.137-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.155-.708-.311-.955-.65-.172-.24-.219-.509-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.094.172.187.129.323-.082.28-.18.553-.266.833-.055.179-.137.218-.328.14a5.5 5.5 0 0 1-1.737-1.179c-.857-.828-1.631-1.743-2.597-2.46a12 12 0 0 0-.689-.47c-.985-.957.13-1.743.387-1.836.27-.098.094-.433-.778-.428-.872.003-1.67.295-2.687.685a3 3 0 0 1-.465.136 9.6 9.6 0 0 0-2.883-.101c-1.885.21-3.39 1.1-4.497 2.622C.082 8.776-.231 10.854.152 13.02c.403 2.284 1.568 4.175 3.36 5.653 1.857 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.132-.284 4.994-1.86.47.234.962.328 1.78.398.629.058 1.235-.031 1.705-.129.735-.155.684-.836.418-.961-2.155-1.004-1.682-.595-2.112-.926 1.095-1.295 2.768-3.598 3.284-6.733.05-.346.115-.834.108-1.114-.004-.171.035-.238.23-.257a4.2 4.2 0 0 0 1.545-.475c1.397-.763 1.96-2.016 2.093-3.517.02-.23-.004-.467-.247-.588M11.58 18.168c-2.088-1.642-3.101-2.183-3.52-2.16-.39.024-.32.472-.234.763.09.288.207.487.371.74.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.168-1.361-.801-2.5-1.86-3.301-3.306-.775-1.393-1.225-2.888-1.299-4.482-.02-.385.094-.522.477-.592a4.7 4.7 0 0 1 1.53-.038c2.131.311 3.946 1.264 5.467 2.774.868.86 1.525 1.887 2.202 2.89.72 1.066 1.494 2.082 2.48 2.915.348.291.626.513.892.677-.802.09-2.14.109-3.055-.615zm1.001-6.44a.306.306 0 0 1 .415-.287.3.3 0 0 1 .113.074.3.3 0 0 1 .086.214c0 .17-.136.307-.308.307a.303.303 0 0 1-.306-.307m3.11 1.596c-.2.081-.4.151-.591.16a1.25 1.25 0 0 1-.798-.254c-.274-.23-.47-.358-.551-.758a1.7 1.7 0 0 1 .015-.588c.07-.327-.007-.537-.238-.727-.188-.156-.426-.199-.689-.199a.6.6 0 0 1-.254-.078.253.253 0 0 1-.114-.358 1 1 0 0 1 .192-.21c.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.392.451.462.576.685.915.176.264.336.536.446.848.066.194-.02.353-.25.45"}]];case"google":case"gemini":return[["path",{...REAL_MARK_ATTRS,d:"M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81"}]];case"groq":return[["path",{d:"M9.4 1.6 3.6 9.2h3.6L6 14.4l6.4-8.2H8.6Z"}]];case"mistral":return[["path",{d:"M2 13V7h3v6Z"}],["path",{d:"M6.5 13V4.6h3V13Z"}],["path",{d:"M11 13V8h3v5Z"}]];case"openrouter":return[["path",{d:"M2 8h4.4c1.2 0 1.8-.8 2.4-1.6"}],["path",{d:"M2 8h4.4c1.2 0 1.8.8 2.4 1.6"}],["path",{d:"M8.4 5.4 11.6 8 8.4 10.6"}]];case"together":case"together-ai":return[["circle",{cx:"4.6",cy:"8",r:"2.5"}],["circle",{cx:"11.4",cy:"8",r:"2.5"}]];case"xai":case"x-ai":case"grok":return[["path",{...REAL_MARK_ATTRS,d:"M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z"}]];case"huggingface":return[["path",{d:"M8 2.4 13.4 5.4 8 8.4 2.6 5.4Z"}],["path",{d:"M2.6 8 8 11l5.4-3"}]];case"fireworks":case"voyage-ai":return[["path",{d:"M2 8h2.4l1.4-4 2.4 8 2.4-6 1.4 2h2"}]];case"azure-openai":return[["rect",{x:"2.4",y:"2.4",width:"11.2",height:"11.2",rx:"2"}],["circle",{cx:"8",cy:"8",r:"2.8"}]];case"ollama":case"local":return[["path",{...REAL_MARK_ATTRS,d:"M16.361 10.26a.894.894 0 0 0-.558.47l-.072.148.001.207c0 .193.004.217.059.353.076.193.152.312.291.448.24.238.51.3.872.205a.86.86 0 0 0 .517-.436.752.752 0 0 0 .08-.498c-.064-.453-.33-.782-.724-.897a1.06 1.06 0 0 0-.466 0zm-9.203.005c-.305.096-.533.32-.65.639a1.187 1.187 0 0 0-.06.52c.057.309.31.59.598.667.362.095.632.033.872-.205.14-.136.215-.255.291-.448.055-.136.059-.16.059-.353l.001-.207-.072-.148a.894.894 0 0 0-.565-.472 1.02 1.02 0 0 0-.474.007Zm4.184 2c-.131.071-.223.25-.195.383.031.143.157.288.353.407.105.063.112.072.117.136.004.038-.01.146-.029.243-.02.094-.036.194-.036.222.002.074.07.195.143.253.064.052.076.054.255.059.164.005.198.001.264-.03.169-.082.212-.234.15-.525-.052-.243-.042-.28.087-.355.137-.08.281-.219.324-.314a.365.365 0 0 0-.175-.48.394.394 0 0 0-.181-.033c-.126 0-.207.03-.355.124l-.085.053-.053-.032c-.219-.13-.259-.145-.391-.143a.396.396 0 0 0-.193.032zm.39-2.195c-.373.036-.475.05-.654.086-.291.06-.68.195-.951.328-.94.46-1.589 1.226-1.787 2.114-.04.176-.045.234-.045.53 0 .294.005.357.043.524.264 1.16 1.332 2.017 2.714 2.173.3.033 1.596.033 1.896 0 1.11-.125 2.064-.727 2.493-1.571.114-.226.169-.372.22-.602.039-.167.044-.23.044-.523 0-.297-.005-.355-.045-.531-.288-1.29-1.539-2.304-3.072-2.497a6.873 6.873 0 0 0-.855-.031zm.645.937a3.283 3.283 0 0 1 1.44.514c.223.148.537.458.671.662.166.251.26.508.303.82.02.143.01.251-.043.482-.08.345-.332.705-.672.957a3.115 3.115 0 0 1-.689.348c-.382.122-.632.144-1.525.138-.582-.006-.686-.01-.853-.042-.57-.107-1.022-.334-1.35-.68-.264-.28-.385-.535-.45-.946-.03-.192.025-.509.137-.776.136-.326.488-.73.836-.963.403-.269.934-.46 1.422-.512.187-.02.586-.02.773-.002zm-5.503-11a1.653 1.653 0 0 0-.683.298C5.617.74 5.173 1.666 4.985 2.819c-.07.436-.119 1.04-.119 1.503 0 .544.064 1.24.155 1.721.02.107.031.202.023.208a8.12 8.12 0 0 1-.187.152 5.324 5.324 0 0 0-.949 1.02 5.49 5.49 0 0 0-.94 2.339 6.625 6.625 0 0 0-.023 1.357c.091.78.325 1.438.727 2.04l.13.195-.037.064c-.269.452-.498 1.105-.605 1.732-.084.496-.095.629-.095 1.294 0 .67.009.803.088 1.266.095.555.288 1.143.503 1.534.071.128.243.393.264.407.007.003-.014.067-.046.141a7.405 7.405 0 0 0-.548 1.873c-.062.417-.071.552-.071.991 0 .56.031.832.148 1.279L3.42 24h1.478l-.05-.091c-.297-.552-.325-1.575-.068-2.597.117-.472.25-.819.498-1.296l.148-.29v-.177c0-.165-.003-.184-.057-.293a.915.915 0 0 0-.194-.25 1.74 1.74 0 0 1-.385-.543c-.424-.92-.506-2.286-.208-3.451.124-.486.329-.918.544-1.154a.787.787 0 0 0 .223-.531c0-.195-.07-.355-.224-.522a3.136 3.136 0 0 1-.817-1.729c-.14-.96.114-2.005.69-2.834.563-.814 1.353-1.336 2.237-1.475.199-.033.57-.028.776.01.226.04.367.028.512-.041.179-.085.268-.19.374-.431.093-.215.165-.333.36-.576.234-.29.46-.489.822-.729.413-.27.884-.467 1.352-.561.17-.035.25-.04.569-.04.319 0 .398.005.569.04a4.07 4.07 0 0 1 1.914.997c.117.109.398.457.488.602.034.057.095.177.132.267.105.241.195.346.374.43.14.068.286.082.503.045.343-.058.607-.053.943.016 1.144.23 2.14 1.173 2.581 2.437.385 1.108.276 2.267-.296 3.153-.097.15-.193.27-.333.419-.301.322-.301.722-.001 1.053.493.539.801 1.866.708 3.036-.062.772-.26 1.463-.533 1.854a2.096 2.096 0 0 1-.224.258.916.916 0 0 0-.194.25c-.054.109-.057.128-.057.293v.178l.148.29c.248.476.38.823.498 1.295.253 1.008.231 2.01-.059 2.581a.845.845 0 0 0-.044.098c0 .006.329.009.732.009h.73l.02-.074.036-.134c.019-.076.057-.3.088-.516.029-.217.029-1.016 0-1.258-.11-.875-.295-1.57-.597-2.226-.032-.074-.053-.138-.046-.141.008-.005.057-.074.108-.152.376-.569.607-1.284.724-2.228.031-.26.031-1.378 0-1.628-.083-.645-.182-1.082-.348-1.525a6.083 6.083 0 0 0-.329-.7l-.038-.064.131-.194c.402-.604.636-1.262.727-2.04a6.625 6.625 0 0 0-.024-1.358 5.512 5.512 0 0 0-.939-2.339 5.325 5.325 0 0 0-.95-1.02 8.097 8.097 0 0 1-.186-.152.692.692 0 0 1 .023-.208c.208-1.087.201-2.443-.017-3.503-.19-.924-.535-1.658-.98-2.082-.354-.338-.716-.482-1.15-.455-.996.059-1.8 1.205-2.116 3.01a6.805 6.805 0 0 0-.097.726c0 .036-.007.066-.015.066a.96.96 0 0 1-.149-.078A4.857 4.857 0 0 0 12 3.03c-.832 0-1.687.243-2.456.698a.958.958 0 0 1-.148.078c-.008 0-.015-.03-.015-.066a6.71 6.71 0 0 0-.097-.725C8.997 1.392 8.337.319 7.46.048a2.096 2.096 0 0 0-.585-.041Zm.293 1.402c.248.197.523.759.682 1.388.03.113.06.244.069.292.007.047.026.152.041.233.067.365.098.76.102 1.24l.002.475-.12.175-.118.178h-.278c-.324 0-.646.041-.954.124l-.238.06c-.033.007-.038-.003-.057-.144a8.438 8.438 0 0 1 .016-2.323c.124-.788.413-1.501.696-1.711.067-.05.079-.049.157.013zm9.825-.012c.17.126.358.46.498.888.28.854.36 2.028.212 3.145-.019.14-.024.151-.057.144l-.238-.06a3.693 3.693 0 0 0-.954-.124h-.278l-.119-.178-.119-.175.002-.474c.004-.669.066-1.19.214-1.772.157-.623.434-1.185.68-1.382.078-.062.09-.063.159-.012z"}]];default:return[["circle",{cx:"8",cy:"8",r:"3.2"}]]}}function buildProviderMark(e,r,t,a){const i=a||providerOfModel(r),o=PROVIDER_LABELS[i]||String(t||""),c=e.createElement("span");c.className="provider-mark"+(i?` provider-${i}`:" provider-unknown"),c.setAttribute("role","img"),c.setAttribute("aria-label",o||"unknown provider"),c.title=o?`This model is served by ${o}`:"Provider unknown for this model";const n="http://www.w3.org/2000/svg",l=e.createElementNS(n,"svg");l.setAttribute("viewBox","0 0 16 16"),l.setAttribute("width","14"),l.setAttribute("height","14"),l.setAttribute("aria-hidden","true"),l.setAttribute("focusable","false");for(const[r,t]of providerGlyph(i)){const a=e.createElementNS(n,r);for(const e of Object.keys(t))a.setAttribute(e,t[e]);l.appendChild(a)}return c.appendChild(l),{el:c,provider:i,label:o}}function paintProviderMark(e,r,t,a){if(!e||"undefined"==typeof document)return!1;const i=buildProviderMark(document,r,t,a);return e.textContent="",e.appendChild(i.el),!0}"undefined"!=typeof window&&(window.aegisProviderMark={paint:paintProviderMark,build:buildProviderMark,providerOfModel:providerOfModel,providerGlyph:providerGlyph,PROVIDER_LABELS:PROVIDER_LABELS}),"undefined"!=typeof module&&module.exports&&(module.exports={providerOfModel:providerOfModel,providerGlyph:providerGlyph,buildProviderMark:buildProviderMark,PROVIDER_LABELS:PROVIDER_LABELS,VENDOR_MATCHERS:VENDOR_MATCHERS});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
2
|
// Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
|
|
3
|
-
"use strict";!function(){if("undefined"==typeof window)return;const e=window.aegisProviders;function
|
|
3
|
+
"use strict";!function(){if("undefined"==typeof window)return;const e=window.aegisProviders;if(!e)return;const t=window.aegisProviderMark;function n(e,t,n){const l=document.createElement(e);return t&&(l.className=t),null!=n&&(l.textContent=n),l}window.aegisProviderToolbar={mount:function(l){const o=l||{};let i=[];function r(l){const i=n("li","pt-row");if(l.selectable){const r=n("button","pt-pick");r.type="button";const d=n("div","pt-head");if(t&&"function"==typeof t.build){const e="local"===l.class?"ollama":l.provider||"",n=t.build(document,l.model,l.classLabel,e);n.el.classList.add("pt-mark"),d.appendChild(n.el)}d.appendChild(n("span","pt-model",l.modelLabel||l.model)),r.appendChild(d),l.model&&l.modelLabel&&l.modelLabel!==l.model&&r.appendChild(n("span","pt-id",l.model)),r.appendChild(n("span","pt-target",l.url?`${l.method} ${l.url}`:"no network route — runs as a local process")),r.addEventListener("click",(()=>{o.onSelect&&o.onSelect(e.selectionFor(l))})),i.appendChild(r)}else i.appendChild(n("span","pt-model pt-muted",l.modelLabel)),i.appendChild(n("span","pt-target",l.url?`${l.method} ${l.url}`:"—"));return l.billing&&i.appendChild(n("span","pt-billing",l.billing)),l.blocked&&i.appendChild(n("span","pt-blocked",l.blocked)),i}function d(t){const l=e.filterEntries(i,t);if(o.count&&(o.count.textContent=i.length?`${l.length} of ${i.length} provider route${1===i.length?"":"s"}`:"no providers reported"),o.list){o.list.innerHTML="";let e=null,t=null;for(const i of l){if(i.group!==e){e=i.group;const l=n("li","pt-group");l.appendChild(n("h3","pt-group-title",e)),t=n("ul","pt-rows"),l.appendChild(t),o.list.appendChild(l)}t.appendChild(r(i))}l.length||o.list.appendChild(n("li","pt-empty",i.length?"No provider or model matches that filter.":"No provider paths yet — press Refresh once a key is saved."))}if(o.hint&&t&&l.length){const e=l.filter((e=>e.url&&!/localhost|127\.0\.0\.1/.test(e.url))).length,t=l.filter((e=>e.url&&/localhost|127\.0\.0\.1/.test(e.url))).length,n=l.filter((e=>!e.url)).length;o.hint.textContent=[e?`${e} over the network`:"",t?`${t} on this machine`:"",n?`${n} with no route`:""].filter(Boolean).join(" · ")}else o.hint&&!t&&(o.hint.textContent=i.length?"Every provider this build can address, and the URL a turn to it uses.":"")}return o.search&&o.search.addEventListener("input",(()=>d(o.search.value))),{set:t=>(i=e.buildProviderPaths(t),d(o.search?o.search.value:""),i),entries:()=>i.slice()}}}}();
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
2
|
// Copyright (C) 2026 Niklas Borneklint — AEGIS Code (aegiscode) / Aegiscloud.
|
|
3
|
-
"use strict";const POOLED_PATH="/api/v1/chat/completions",BYOK_PATH="/api/v1/byok/chat/completions",LOCAL_PATH="/v1/chat/completions",DEFAULT_CLOUD_BASE="https://aegiscloud.org",DEFAULT_LOCAL_BASE="http://localhost:11434";function joinUrl(e,l){const o="string"==typeof e?e.trim():"",r="string"==typeof l?l.trim():"";return o?/^https?:\/\//i.test(r)?r:r?`${o.replace(/\/+$/,"")}/${r.replace(/^\/+/,"")}`:o.replace(/\/+$/,""):""}function billingFor(e,l,o,r){if("pro"===e)return"Claude Code subscription — no AEGIS tokens spent";if("local"===e)return"free — runs on this machine";if("byok"===e){const e=r&&r.fee||null;return e&&e.require_balance?"your provider key pays the vendor; an AEGIS key and a funded balance pay the handling fee":"your provider key pays the vendor; an AEGIS key attributes the handling fee"}return"billed to your AEGIS account"}function blockedReason(e,l,o,r){return"aegis"===e&&r&&r.needsKey?"no AEGIS API key on this machine":"local"===e&&r&&r.needsDaemon?"no model server listening":"local"===e&&r&&!1===r.listed?"server answered but lists no models":"byok"===e&&o&&!1===o.configured?o.keyRejected?`provider key rejected: ${o.keyRejected}`:"no key saved for this provider":"pro"===e&&l&&!1===l.configured?"not signed in to Claude Code":null}function buildProviderPaths(e){const l=[],o=Array.isArray(e)?e:[];for(const e of o){if(!e||"string"!=typeof e.class)continue;const o=e.class,r={configured:!1!==e.classConfigured},
|
|
3
|
+
"use strict";const POOLED_PATH="/api/v1/chat/completions",BYOK_PATH="/api/v1/byok/chat/completions",LOCAL_PATH="/v1/chat/completions",DEFAULT_CLOUD_BASE="https://aegiscloud.org",DEFAULT_LOCAL_BASE="http://localhost:11434";function joinUrl(e,l){const o="string"==typeof e?e.trim():"",r="string"==typeof l?l.trim():"";return o?/^https?:\/\//i.test(r)?r:r?`${o.replace(/\/+$/,"")}/${r.replace(/^\/+/,"")}`:o.replace(/\/+$/,""):""}function billingFor(e,l,o,r){if("pro"===e)return"Claude Code subscription — no AEGIS tokens spent";if("local"===e)return"free — runs on this machine";if("byok"===e){const e=r&&r.fee||null;return e&&e.require_balance?"your provider key pays the vendor; an AEGIS key and a funded balance pay the handling fee":"your provider key pays the vendor; an AEGIS key attributes the handling fee"}return"billed to your AEGIS account"}function blockedReason(e,l,o,r){return"aegis"===e&&r&&r.needsKey?"no AEGIS API key on this machine":"local"===e&&r&&r.needsDaemon?"no model server listening":"local"===e&&r&&!1===r.listed?"server answered but lists no models":"byok"===e&&o&&!1===o.configured?o.keyRejected?`provider key rejected: ${o.keyRejected}`:"no key saved for this provider":"pro"===e&&l&&!1===l.configured?"not signed in to Claude Code":null}function buildProviderPaths(e){const l=[],o=Array.isArray(e)?e:[];for(const e of o){if(!e||"string"!=typeof e.class)continue;const o=e.class,r={configured:!1!==e.classConfigured},i=e.list&&"object"==typeof e.list?e.list:null,n=Array.isArray(i&&i.models)?i.models:[],s=i&&(i.apiBase||i.baseURL)||DEFAULT_CLOUD_BASE,t=i&&i.baseURL||DEFAULT_LOCAL_BASE;if(n.length)for(const a of n){if(!a||!a.id)continue;const n="string"==typeof a.provider&&a.provider?a.provider:o;let d=null,c=null;"aegis"===o?(d=joinUrl(s,POOLED_PATH),c="POST"):"byok"===o?(d=joinUrl(s,BYOK_PATH),c="POST"):"local"===o&&(d=joinUrl(t,LOCAL_PATH),c="POST"),l.push({class:o,classLabel:e.classLabel||o,model:a.id,modelLabel:a.label||a.id,provider:n,uniqueModel:`${o}:${a.id}`,group:e.classLabel||o,url:d,method:c,billing:billingFor(o,r,a,i),blocked:blockedReason(o,r,a,i),selectable:!0})}else{const n="aegis"===o||"local"===o;l.push({class:o,classLabel:e.classLabel||o,model:"",modelLabel:"aegis"===o?"server default (auto)":"local"===o?"type a model tag in the Model card":"—",provider:"",uniqueModel:o,group:e.classLabel||o,url:n?joinUrl("local"===o?t:s,"local"===o?LOCAL_PATH:POOLED_PATH):null,method:n?"POST":null,billing:billingFor(o,r,null,i),blocked:blockedReason(o,r,null,i),selectable:!1})}}return l}function filterEntries(e,l){const o=Array.isArray(e)?e:[],r=String(null==l?"":l).trim().toLowerCase();if(!r)return o.slice();const i=r.split(/\s+/).filter(Boolean);return o.filter((e=>{const l=[e.model,e.modelLabel,e.provider,e.class,e.classLabel,e.url||""].join("\n").toLowerCase();return i.every((e=>l.includes(e)))}))}function selectionFor(e){return e?{class:e.class,model:"aegis"!==e.class||e.model?e.model:""}:null}"undefined"!=typeof module&&module.exports&&(module.exports={buildProviderPaths:buildProviderPaths,filterEntries:filterEntries,selectionFor:selectionFor,joinUrl:joinUrl,POOLED_PATH:POOLED_PATH,BYOK_PATH:BYOK_PATH,LOCAL_PATH:LOCAL_PATH}),"undefined"!=typeof window&&(window.aegisProviders={buildProviderPaths:buildProviderPaths,filterEntries:filterEntries,selectionFor:selectionFor,joinUrl:joinUrl,POOLED_PATH:POOLED_PATH,BYOK_PATH:BYOK_PATH,LOCAL_PATH:LOCAL_PATH});
|
|
@@ -2200,17 +2200,37 @@ label {
|
|
|
2200
2200
|
justify-content: center;
|
|
2201
2201
|
}
|
|
2202
2202
|
|
|
2203
|
+
/* A hexagon faceted into 6 triangles, not the four-point sparkle this used to
|
|
2204
|
+
be — the sparkle is Google's Gemini mark at a glance, and this app has no
|
|
2205
|
+
relationship to Gemini to be implying. The gradient, the glow and the
|
|
2206
|
+
`shimmer` sweep are UNCHANGED from the glyph this replaced; only how the
|
|
2207
|
+
shape is cut is different, because that glyph was TEXT ('✦', clipped out of
|
|
2208
|
+
the gradient via `background-clip: text`) and a drawn icon has no glyph
|
|
2209
|
+
outline to clip to. `mask-image` is the same trick for arbitrary shapes:
|
|
2210
|
+
the gradient background paints the whole box and the SVG mask decides which
|
|
2211
|
+
pixels of it survive.
|
|
2212
|
+
The mask SVG is six SEPARATELY FILLED triangles, each inset ~8% toward its
|
|
2213
|
+
own centroid — not one hexagon with lines stroked on top. `mask-image`
|
|
2214
|
+
composites by ALPHA, not luminance (confirmed by rendering both ways): an
|
|
2215
|
+
opaque black line over an opaque white fill is still 100% opaque everywhere
|
|
2216
|
+
and vanishes from the mask, so the facets have to be real transparent gaps,
|
|
2217
|
+
which only separately-shrunk shapes produce. */
|
|
2203
2218
|
.chat-welcome .glyph {
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2219
|
+
width: 34px;
|
|
2220
|
+
height: 34px;
|
|
2221
|
+
flex: none;
|
|
2207
2222
|
background: linear-gradient(135deg, #b0d4ee, #5a7fd4, var(--teal));
|
|
2208
2223
|
background-size: 200%;
|
|
2209
|
-
-webkit-background-clip: text;
|
|
2210
|
-
background-clip: text;
|
|
2211
|
-
-webkit-text-fill-color: transparent;
|
|
2212
2224
|
filter: drop-shadow(0 0 14px rgba(0, 229, 192, 0.3));
|
|
2213
2225
|
animation: shimmer 5s linear infinite;
|
|
2226
|
+
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12.40 12.23 21.60 12.23 17.00 20.20Z'/%3E%3Cpath fill='%23fff' d='M12.00 12.46 16.60 20.43 7.40 20.43Z'/%3E%3Cpath fill='%23fff' d='M11.60 12.23 7.00 20.20 2.40 12.23Z'/%3E%3Cpath fill='%23fff' d='M11.60 11.77 2.40 11.77 7.00 3.80Z'/%3E%3Cpath fill='%23fff' d='M12.00 11.54 7.40 3.57 16.60 3.57Z'/%3E%3Cpath fill='%23fff' d='M12.40 11.77 17.00 3.80 21.60 11.77Z'/%3E%3C/svg%3E");
|
|
2227
|
+
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12.40 12.23 21.60 12.23 17.00 20.20Z'/%3E%3Cpath fill='%23fff' d='M12.00 12.46 16.60 20.43 7.40 20.43Z'/%3E%3Cpath fill='%23fff' d='M11.60 12.23 7.00 20.20 2.40 12.23Z'/%3E%3Cpath fill='%23fff' d='M11.60 11.77 2.40 11.77 7.00 3.80Z'/%3E%3Cpath fill='%23fff' d='M12.00 11.54 7.40 3.57 16.60 3.57Z'/%3E%3Cpath fill='%23fff' d='M12.40 11.77 17.00 3.80 21.60 11.77Z'/%3E%3C/svg%3E");
|
|
2228
|
+
-webkit-mask-size: contain;
|
|
2229
|
+
mask-size: contain;
|
|
2230
|
+
-webkit-mask-repeat: no-repeat;
|
|
2231
|
+
mask-repeat: no-repeat;
|
|
2232
|
+
-webkit-mask-position: center;
|
|
2233
|
+
mask-position: center;
|
|
2214
2234
|
}
|
|
2215
2235
|
|
|
2216
2236
|
.chat-welcome .title {
|
|
@@ -2880,6 +2900,35 @@ body.is-scrolled .composer {
|
|
|
2880
2900
|
filter: brightness(1.2);
|
|
2881
2901
|
}
|
|
2882
2902
|
|
|
2903
|
+
/* The per-row Undo affordance (app.js appendUndoRow), same font/size/padding
|
|
2904
|
+
as .diff-summary so the two read as one continuous block rather than a
|
|
2905
|
+
bolted-on control. */
|
|
2906
|
+
.diff-undo-row {
|
|
2907
|
+
font-family: var(--font-mono);
|
|
2908
|
+
font-size: 11px;
|
|
2909
|
+
line-height: 1.45;
|
|
2910
|
+
padding: 1px 0;
|
|
2911
|
+
}
|
|
2912
|
+
|
|
2913
|
+
.diff-undo-link {
|
|
2914
|
+
cursor: pointer;
|
|
2915
|
+
color: #787878;
|
|
2916
|
+
}
|
|
2917
|
+
|
|
2918
|
+
.diff-undo-link:hover {
|
|
2919
|
+
filter: brightness(1.3);
|
|
2920
|
+
}
|
|
2921
|
+
|
|
2922
|
+
.diff-undo-done {
|
|
2923
|
+
color: #50c850;
|
|
2924
|
+
cursor: default;
|
|
2925
|
+
}
|
|
2926
|
+
|
|
2927
|
+
.diff-undo-failed {
|
|
2928
|
+
color: #dc5a5a;
|
|
2929
|
+
cursor: default;
|
|
2930
|
+
}
|
|
2931
|
+
|
|
2883
2932
|
.diff-body {
|
|
2884
2933
|
display: block;
|
|
2885
2934
|
}
|
|
@@ -3259,6 +3308,15 @@ body.keys-open {
|
|
|
3259
3308
|
outline: 2px solid currentColor;
|
|
3260
3309
|
outline-offset: 2px;
|
|
3261
3310
|
}
|
|
3311
|
+
.pt-head {
|
|
3312
|
+
display: flex;
|
|
3313
|
+
align-items: center;
|
|
3314
|
+
gap: 6px;
|
|
3315
|
+
}
|
|
3316
|
+
.pt-mark {
|
|
3317
|
+
flex: none;
|
|
3318
|
+
color: var(--text2);
|
|
3319
|
+
}
|
|
3262
3320
|
.pt-model {
|
|
3263
3321
|
font-weight: 600;
|
|
3264
3322
|
}
|
|
@@ -3311,3 +3369,162 @@ body.keys-open {
|
|
|
3311
3369
|
#companion-card[hidden] {
|
|
3312
3370
|
display: none;
|
|
3313
3371
|
}
|
|
3372
|
+
|
|
3373
|
+
/* ── Permission rules (Settings › Tool approvals › Rules) ──────────────────
|
|
3374
|
+
A list of rules the engine's gate consults before it raises a card. Laid out
|
|
3375
|
+
as rows rather than prose because the list is scanned, not read: tag, pattern,
|
|
3376
|
+
remove. `deny` is rendered first and carries the only alarming colour — it is
|
|
3377
|
+
the floor, and an allow cannot override it, so the visual weight has to match
|
|
3378
|
+
the precedence or the card teaches the wrong order. */
|
|
3379
|
+
.rules-block {
|
|
3380
|
+
margin-top: 10px;
|
|
3381
|
+
border-top: 1px solid var(--line, rgba(128, 128, 128, 0.25));
|
|
3382
|
+
padding-top: 10px;
|
|
3383
|
+
}
|
|
3384
|
+
.rules-title {
|
|
3385
|
+
font-size: 12px;
|
|
3386
|
+
font-weight: 600;
|
|
3387
|
+
text-transform: uppercase;
|
|
3388
|
+
letter-spacing: 0.04em;
|
|
3389
|
+
opacity: 0.75;
|
|
3390
|
+
margin: 0 0 6px;
|
|
3391
|
+
}
|
|
3392
|
+
.rules-list {
|
|
3393
|
+
list-style: none;
|
|
3394
|
+
margin: 0 0 8px;
|
|
3395
|
+
padding: 0;
|
|
3396
|
+
display: flex;
|
|
3397
|
+
flex-direction: column;
|
|
3398
|
+
gap: 4px;
|
|
3399
|
+
max-height: 220px;
|
|
3400
|
+
overflow-y: auto;
|
|
3401
|
+
}
|
|
3402
|
+
.rules-row {
|
|
3403
|
+
display: flex;
|
|
3404
|
+
align-items: center;
|
|
3405
|
+
gap: 8px;
|
|
3406
|
+
padding: 3px 6px;
|
|
3407
|
+
border-radius: 4px;
|
|
3408
|
+
background: rgba(128, 128, 128, 0.08);
|
|
3409
|
+
}
|
|
3410
|
+
.rules-row-muted {
|
|
3411
|
+
opacity: 0.6;
|
|
3412
|
+
font-style: italic;
|
|
3413
|
+
background: none;
|
|
3414
|
+
padding-left: 0;
|
|
3415
|
+
}
|
|
3416
|
+
.rules-tag {
|
|
3417
|
+
flex: 0 0 auto;
|
|
3418
|
+
font-size: 10px;
|
|
3419
|
+
font-weight: 700;
|
|
3420
|
+
text-transform: uppercase;
|
|
3421
|
+
letter-spacing: 0.05em;
|
|
3422
|
+
padding: 1px 5px;
|
|
3423
|
+
border-radius: 3px;
|
|
3424
|
+
background: rgba(128, 128, 128, 0.22);
|
|
3425
|
+
}
|
|
3426
|
+
/* The three lists read in precedence order, so the colours do too: deny is the
|
|
3427
|
+
only one that means "never", allow means "without asking", ask is a deliberate
|
|
3428
|
+
prompt that would otherwise have run unattended. */
|
|
3429
|
+
.rules-tag-deny { color: #ff8f8f; background: rgba(255, 90, 90, 0.16); }
|
|
3430
|
+
.rules-tag-allow { color: #8fd6a0; background: rgba(90, 200, 120, 0.14); }
|
|
3431
|
+
.rules-tag-ask { color: #e8c07a; background: rgba(230, 180, 90, 0.14); }
|
|
3432
|
+
.rules-pattern {
|
|
3433
|
+
flex: 1 1 auto;
|
|
3434
|
+
font-family: var(--font-mono);
|
|
3435
|
+
font-size: 12px;
|
|
3436
|
+
word-break: break-all;
|
|
3437
|
+
}
|
|
3438
|
+
.rules-remove {
|
|
3439
|
+
flex: 0 0 auto;
|
|
3440
|
+
font-size: 11px;
|
|
3441
|
+
padding: 1px 6px;
|
|
3442
|
+
}
|
|
3443
|
+
.rules-add {
|
|
3444
|
+
display: flex;
|
|
3445
|
+
gap: 6px;
|
|
3446
|
+
align-items: center;
|
|
3447
|
+
}
|
|
3448
|
+
.rules-add select {
|
|
3449
|
+
flex: 0 0 auto;
|
|
3450
|
+
}
|
|
3451
|
+
.rules-input {
|
|
3452
|
+
flex: 1 1 auto;
|
|
3453
|
+
min-width: 0;
|
|
3454
|
+
font-family: var(--font-mono);
|
|
3455
|
+
font-size: 12px;
|
|
3456
|
+
}
|
|
3457
|
+
|
|
3458
|
+
/* ─────────────────────────────────────────────────────── import sheet
|
|
3459
|
+
The toolbar's "Import session" surface. Same panel/backdrop primitives as the
|
|
3460
|
+
memory inspector and session search (one sheet look in the app), plus the two
|
|
3461
|
+
pieces only this sheet needs: a compact toolbar button that does not shout
|
|
3462
|
+
next to "New chat", and a footer where the two import actions live. */
|
|
3463
|
+
|
|
3464
|
+
.toolbar-import {
|
|
3465
|
+
margin-right: 8px;
|
|
3466
|
+
border-color: color-mix(in srgb, var(--teal) 45%, var(--border));
|
|
3467
|
+
color: color-mix(in srgb, var(--teal) 80%, var(--text));
|
|
3468
|
+
}
|
|
3469
|
+
|
|
3470
|
+
.import-overlay .memory-panel {
|
|
3471
|
+
width: min(720px, 100%);
|
|
3472
|
+
}
|
|
3473
|
+
|
|
3474
|
+
.import-row {
|
|
3475
|
+
display: flex;
|
|
3476
|
+
align-items: baseline;
|
|
3477
|
+
gap: 10px;
|
|
3478
|
+
padding: 7px 2px;
|
|
3479
|
+
border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
|
|
3480
|
+
}
|
|
3481
|
+
|
|
3482
|
+
.import-row:last-child {
|
|
3483
|
+
border-bottom: 0;
|
|
3484
|
+
}
|
|
3485
|
+
|
|
3486
|
+
.import-row .import-source {
|
|
3487
|
+
font-size: 12px;
|
|
3488
|
+
color: var(--text);
|
|
3489
|
+
}
|
|
3490
|
+
|
|
3491
|
+
.import-row .session-meta {
|
|
3492
|
+
margin-left: auto;
|
|
3493
|
+
font-family: var(--font-mono);
|
|
3494
|
+
font-size: 11px;
|
|
3495
|
+
color: var(--text2);
|
|
3496
|
+
}
|
|
3497
|
+
|
|
3498
|
+
/* Not installed / not readable: still listed, visibly secondary. A source that
|
|
3499
|
+
is absent must not read as a failure — it is the normal answer on a machine
|
|
3500
|
+
that never installed that tool. */
|
|
3501
|
+
.import-row.import-absent .import-source,
|
|
3502
|
+
.import-row.import-absent .session-meta {
|
|
3503
|
+
color: var(--text3, var(--text2));
|
|
3504
|
+
opacity: 0.7;
|
|
3505
|
+
}
|
|
3506
|
+
|
|
3507
|
+
.import-actions {
|
|
3508
|
+
display: flex;
|
|
3509
|
+
align-items: center;
|
|
3510
|
+
gap: 10px;
|
|
3511
|
+
padding: 12px 16px;
|
|
3512
|
+
border-top: 1px solid var(--border);
|
|
3513
|
+
}
|
|
3514
|
+
|
|
3515
|
+
.import-actions .spacer {
|
|
3516
|
+
flex: 1;
|
|
3517
|
+
}
|
|
3518
|
+
|
|
3519
|
+
.import-sync {
|
|
3520
|
+
display: flex;
|
|
3521
|
+
align-items: center;
|
|
3522
|
+
gap: 6px;
|
|
3523
|
+
font-size: 11px;
|
|
3524
|
+
color: var(--text2);
|
|
3525
|
+
}
|
|
3526
|
+
|
|
3527
|
+
.import-actions .btn-block {
|
|
3528
|
+
width: auto;
|
|
3529
|
+
margin: 0;
|
|
3530
|
+
}
|