memory-anywhere-server 0.0.0-stage → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +5 -2
- package/config/models.json +37 -0
- package/config/vendors.json +205 -0
- package/dist/server.mjs +12598 -0
- package/migrations/0001_init.mjs +41 -0
- package/migrations/0001_init.sql +551 -0
- package/migrations/0002_aws_mode.sql +31 -0
- package/migrations/0003_import.sql +12 -0
- package/migrations/0004_import_budget.sql +8 -0
- package/package.json +42 -4
- package/seed/attributes.json +574 -0
- package/seed/sections.json +65 -0
- package/web/assets/app.css +291 -0
- package/web/assets/app.js +322 -0
- package/web/templates/admin-apps.eta +43 -0
- package/web/templates/admin-changes.eta +10 -0
- package/web/templates/admin-empty.eta +3 -0
- package/web/templates/admin-exports.eta +15 -0
- package/web/templates/admin-home.eta +24 -0
- package/web/templates/admin-memories.eta +17 -0
- package/web/templates/admin-memory.eta +44 -0
- package/web/templates/admin-observations.eta +13 -0
- package/web/templates/admin-repos.eta +10 -0
- package/web/templates/admin-reviews.eta +31 -0
- package/web/templates/admin-sections.eta +22 -0
- package/web/templates/admin-system.eta +22 -0
- package/web/templates/admin.eta +6 -0
- package/web/templates/approve.eta +26 -0
- package/web/templates/consent-code.eta +8 -0
- package/web/templates/consent.eta +14 -0
- package/web/templates/error.eta +3 -0
- package/web/templates/layout.eta +16 -0
- package/web/templates/recover.eta +9 -0
- package/web/templates/setup.eta +20 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<% layout("./admin") %>
|
|
2
|
+
<% if (it.reset) { %>
|
|
3
|
+
<section class="banner">
|
|
4
|
+
<h1 class="danger">An owner reset is scheduled</h1>
|
|
5
|
+
<p>At <%~ it.fmt.time(it.reset.effective_at) %> every passkey, recovery code and app connection will be removed. If you did not ask for this, cancel it now.</p>
|
|
6
|
+
<button type="button" id="cancel-reset">Cancel the reset</button>
|
|
7
|
+
</section>
|
|
8
|
+
<% } %>
|
|
9
|
+
<% for (const a of it.alerts) { %>
|
|
10
|
+
<form class="act alert" data-action="alert.ack">
|
|
11
|
+
<input type="hidden" name="id" value="<%= a.id %>">
|
|
12
|
+
<span><strong><%= it.fmt.alert(a.kind) %></strong><% if (a.subject) { %> · <%= a.subject %><% } %><% if (a.count > 1) { %> · ×<%= a.count %><% } %> <span class="muted"><%~ it.fmt.time(a.last_at) %></span><% if (it.fmt.alertAction(a.kind)) { %><br><span class="muted"><%= it.fmt.alertAction(a.kind) %></span><% } %></span>
|
|
13
|
+
<button type="submit" class="secondary">Dismiss</button>
|
|
14
|
+
</form>
|
|
15
|
+
<% } %>
|
|
16
|
+
<div class="tiles">
|
|
17
|
+
<a class="tile" href="<%= it.root ?? "" %>/memories"><span class="n"><%= it.counts.memories %></span>memories</a>
|
|
18
|
+
<a class="tile" href="<%= it.root ?? "" %>/memories?status=contested"><span class="n"><%= it.counts.contested %></span>contested</a>
|
|
19
|
+
<a class="tile" href="<%= it.root ?? "" %>/reviews"><span class="n"><%= it.counts.reviews %></span>to review</a>
|
|
20
|
+
<a class="tile" href="<%= it.root ?? "" %>/observations"><span class="n"><%= it.counts.observations %></span>observations</a>
|
|
21
|
+
<a class="tile" href="<%= it.root ?? "" %>/apps"><span class="n"><%= it.counts.approvals %></span>approvals waiting</a>
|
|
22
|
+
<a class="tile" href="<%= it.root ?? "" %>/system"><span class="n">$<%= it.llmToday.toFixed(2) %></span>LLM today of $<%= it.llmCap.toFixed(2) %></a>
|
|
23
|
+
</div>
|
|
24
|
+
<p class="muted">Store <%= it.healthy ? "healthy" : "not writable" %><% if (it.counts.jobsFailing > 0) { %> · <span class="danger"><%= it.counts.jobsFailing %> failed jobs</span><% } %></p>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<% layout("./admin") %>
|
|
2
|
+
<form class="filters" method="get" action="<%= it.root ?? "" %>/memories">
|
|
3
|
+
<input name="q" value="<%= it.filters.text ?? '' %>" placeholder="Search" aria-label="Search">
|
|
4
|
+
<select name="section" aria-label="Section"><option value="">All sections</option><% for (const s of it.sections) { %><option value="<%= s.id %>"<% if (s.id === it.filters.section) { %> selected<% } %>><%= s.name %></option><% } %></select>
|
|
5
|
+
<select name="status" aria-label="Status">
|
|
6
|
+
<% for (const s of ["", "active", "contested", "pending_review", "forgotten", "superseded"]) { %><option value="<%= s %>"<% if (s === (it.filters.status ?? '')) { %> selected<% } %>><%= s || "Current" %></option><% } %>
|
|
7
|
+
</select>
|
|
8
|
+
<button type="submit">Go</button>
|
|
9
|
+
</form>
|
|
10
|
+
<ul class="list">
|
|
11
|
+
<% for (const m of it.rows) { %>
|
|
12
|
+
<li><a href="<%= it.root ?? "" %>/memories/<%= m.id %>"><%= m.content %></a>
|
|
13
|
+
<span class="muted"><%= m.section %> · <%= m.entity %><% if (m.attribute) { %> · <%= m.attribute %><% } %> · <%= it.fmt.tier(m.tier) %> · <%= m.status %><% if (m.pinned) { %> · pinned<% } %></span></li>
|
|
14
|
+
<% } %>
|
|
15
|
+
</ul>
|
|
16
|
+
<% if (it.rows.length === 0) { %><p class="muted">Nothing found.</p><% } %>
|
|
17
|
+
<% if (it.rows.length === 50) { %><a href="?q=<%= encodeURIComponent(it.filters.text ?? '') %>&section=<%= it.filters.section ?? '' %>&status=<%= it.filters.status ?? '' %>&page=<%= it.filters.page + 1 %>">More</a><% } %>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<% layout("./admin") %>
|
|
2
|
+
<% const m = it.memory; %>
|
|
3
|
+
<p class="lead"><%= m.content %></p>
|
|
4
|
+
<p class="muted"><%= m.kind %> · <%= m.section %> · <%= m.entity %><% if (m.attribute) { %> · <%= m.attribute %><% } %> · <%= it.fmt.tier(m.tier) %> · <%= m.status %> · <span class="code"><%= m.id %></span></p>
|
|
5
|
+
<div class="actions">
|
|
6
|
+
<% if (m.status === "forgotten") { %>
|
|
7
|
+
<form class="act" data-action="memory.undo"><input type="hidden" name="id" value="<%= m.id %>"><button type="submit">Restore</button></form>
|
|
8
|
+
<% } else if (m.status !== "purged") { %>
|
|
9
|
+
<form class="act" data-action="memory.pin"><input type="hidden" name="id" value="<%= m.id %>"><input type="hidden" name="pinned" value="<%= m.pinned ? 'false' : 'true' %>" data-type="bool"><button type="submit" class="secondary"><%= m.pinned ? "Unpin" : "Pin" %></button></form>
|
|
10
|
+
<form class="act" data-action="memory.forget"><input type="hidden" name="id" value="<%= m.id %>"><button type="submit" class="secondary">Forget</button></form>
|
|
11
|
+
<form class="act inline" data-action="memory.move"><input type="hidden" name="ids" value="<%= m.id %>" data-type="list"><select name="section_id" aria-label="Section"><% for (const s of it.sections) { %><option value="<%= s.id %>"<% if (s.id === m.section_id) { %> selected<% } %>><%= s.name %></option><% } %></select><button type="submit" class="secondary">Move</button></form>
|
|
12
|
+
<% } %>
|
|
13
|
+
<% if (m.status !== "purged") { %>
|
|
14
|
+
<form class="act" data-action="memory.purge" data-confirm="Purge deletes every copy of this text for good. Continue?"><input type="hidden" name="id" value="<%= m.id %>"><button type="submit" class="danger-button">Purge</button></form>
|
|
15
|
+
<% } %>
|
|
16
|
+
</div>
|
|
17
|
+
<% if (m.status === "active" || m.status === "contested") { %>
|
|
18
|
+
<form class="act stack" data-action="memory.edit">
|
|
19
|
+
<input type="hidden" name="id" value="<%= m.id %>">
|
|
20
|
+
<label for="content">Edit</label>
|
|
21
|
+
<textarea id="content" name="content" maxlength="400" rows="3"><%= m.content %></textarea>
|
|
22
|
+
<select name="change" aria-label="Kind of change"><option value="update">It changed (keeps the old value as history)</option><option value="correction">It was wrong (replaces it)</option></select>
|
|
23
|
+
<button type="submit">Save</button>
|
|
24
|
+
</form>
|
|
25
|
+
<% } %>
|
|
26
|
+
<% if (it.contested.length > 0) { %>
|
|
27
|
+
<h2>Contested with</h2>
|
|
28
|
+
<ul class="list">
|
|
29
|
+
<li><%= m.content %> <form class="act inline" data-action="memory.resolve"><input type="hidden" name="keep" value="<%= m.id %>"><button type="submit">Keep this</button></form></li>
|
|
30
|
+
<% for (const c of it.contested) { %>
|
|
31
|
+
<li><%= c.content %> <span class="muted"><%= it.fmt.tier(c.tier) %></span> <form class="act inline" data-action="memory.resolve"><input type="hidden" name="keep" value="<%= c.id %>"><button type="submit">Keep this</button></form></li>
|
|
32
|
+
<% } %>
|
|
33
|
+
</ul>
|
|
34
|
+
<% } %>
|
|
35
|
+
<h2>History</h2>
|
|
36
|
+
<ol class="list">
|
|
37
|
+
<% for (const v of it.versions) { %>
|
|
38
|
+
<li><%= v.content ?? "(purged)" %> <span class="muted"><%= v.change_kind %> · <%= it.fmt.tier(v.tier) %> · <%= v.client_id %> · recorded <%~ it.fmt.time(v.recorded_at) %><% if (v.valid_from) { %> · from <%= v.valid_from %><% } %><% if (v.valid_to) { %> to <%= v.valid_to %><% } %><% if (v.expired_at) { %> · replaced <%~ it.fmt.time(v.expired_at) %><% } %></span></li>
|
|
39
|
+
<% } %>
|
|
40
|
+
</ol>
|
|
41
|
+
<h2>Sources</h2>
|
|
42
|
+
<ul class="list">
|
|
43
|
+
<% for (const s of it.sources) { %><li><%= s.client %> <span class="muted"><%~ it.fmt.time(s.observed_at) %></span><% if (s.user_words) { %><br><q><%= s.user_words %></q><% } %></li><% } %>
|
|
44
|
+
</ul>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<% layout("./admin") %>
|
|
2
|
+
<h1>Observations</h1>
|
|
3
|
+
<p class="muted">Things an app noticed once. They become memories when they come up again in another session, or when you promote them.</p>
|
|
4
|
+
<ul class="list">
|
|
5
|
+
<% for (const o of it.rows) { %>
|
|
6
|
+
<li><%= o.content %> <span class="muted"><%= o.section %> · <%= o.client %> · seen <%= o.mention_count %>× · until <%~ it.fmt.time(o.expires_at) %></span>
|
|
7
|
+
<div class="actions">
|
|
8
|
+
<form class="act inline" data-action="observation.promote"><input type="hidden" name="id" value="<%= o.id %>"><button type="submit">Promote</button></form>
|
|
9
|
+
<form class="act inline" data-action="observation.forget"><input type="hidden" name="id" value="<%= o.id %>"><button type="submit" class="secondary">Forget</button></form>
|
|
10
|
+
</div></li>
|
|
11
|
+
<% } %>
|
|
12
|
+
</ul>
|
|
13
|
+
<% if (it.rows.length === 0) { %><p class="muted">None open.</p><% } %>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<% layout("./admin") %>
|
|
2
|
+
<h1>Repositories</h1>
|
|
3
|
+
<ul class="list">
|
|
4
|
+
<% for (const r of it.rows) { %>
|
|
5
|
+
<li><strong><%= r.display_name %></strong> <span class="muted"><%= r.enabled ? "enabled" : "off" %><% if (r.enabled) { %> · capture <%= r.capture ? "on" : "off" %><% } %></span>
|
|
6
|
+
<form class="act inline" data-action="repo.set"><input type="hidden" name="repo_key" value="<%= r.repo_key %>"><input type="hidden" name="enabled" value="<%= r.enabled ? 'false' : 'true' %>" data-type="bool"><input type="hidden" name="capture" value="<%= r.capture ? 'true' : 'false' %>" data-type="bool"><button type="submit" class="secondary"><%= r.enabled ? "Disable" : "Enable" %></button></form>
|
|
7
|
+
<% if (r.enabled) { %><form class="act inline" data-action="repo.set"><input type="hidden" name="repo_key" value="<%= r.repo_key %>"><input type="hidden" name="enabled" value="true" data-type="bool"><input type="hidden" name="capture" value="<%= r.capture ? 'false' : 'true' %>" data-type="bool"><button type="submit" class="secondary">Capture <%= r.capture ? "off" : "on" %></button></form><% } %></li>
|
|
8
|
+
<% } %>
|
|
9
|
+
</ul>
|
|
10
|
+
<% if (it.rows.length === 0) { %><p class="muted">Run <span class="code">mema enable</span> in a repository to add it.</p><% } %>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<% layout("./admin") %>
|
|
2
|
+
<h1>Review</h1>
|
|
3
|
+
<% for (const b of it.imports) { %>
|
|
4
|
+
<form class="act" data-action="review.approve_import" data-confirm="Store all <%= b.n %> sensitive items from this <%= b.source_type %> import? Every connected app may recall them.">
|
|
5
|
+
<input type="hidden" name="batch_id" value="<%= b.batch_id %>">
|
|
6
|
+
<button type="submit">Approve all <%= b.n %> from <%= b.source_type %></button>
|
|
7
|
+
</form>
|
|
8
|
+
<% } %>
|
|
9
|
+
<% for (const group of [{ rows: it.rows, title: "" }, { rows: it.oneByOne, title: "Name someone else: decide one by one" }]) { %>
|
|
10
|
+
<% if (group.rows.length > 0) { %>
|
|
11
|
+
<% if (group.title) { %><h2><%= group.title %></h2><% } %>
|
|
12
|
+
<ul class="list">
|
|
13
|
+
<% for (const r of group.rows) { %>
|
|
14
|
+
<li><span class="muted"><%= it.fmt.review(r.kind) %><% if (r.category) { %> · <%= r.category %><% } %> · <%= r.client %> · <%~ it.fmt.time(r.created_at) %></span><br><%= r.content %>
|
|
15
|
+
<div class="actions">
|
|
16
|
+
<form class="act inline" data-action="review.decide">
|
|
17
|
+
<input type="hidden" name="id" value="<%= r.id %>"><input type="hidden" name="approve" value="true" data-type="bool">
|
|
18
|
+
<% if (r.kind === "sensitive" || r.kind === "import_sensitive") { %>
|
|
19
|
+
<fieldset class="choices"><legend class="muted">Apps that may recall it</legend>
|
|
20
|
+
<% for (const a of it.apps) { %><label><input type="checkbox" name="clients" value="<%= a.client_id %>" data-type="list"> <%= a.display_name %></label><% } %>
|
|
21
|
+
</fieldset>
|
|
22
|
+
<% } %>
|
|
23
|
+
<button type="submit">Approve</button>
|
|
24
|
+
</form>
|
|
25
|
+
<form class="act inline" data-action="review.decide"><input type="hidden" name="id" value="<%= r.id %>"><input type="hidden" name="approve" value="false" data-type="bool"><button type="submit" class="secondary">Reject</button></form>
|
|
26
|
+
</div></li>
|
|
27
|
+
<% } %>
|
|
28
|
+
</ul>
|
|
29
|
+
<% } %>
|
|
30
|
+
<% } %>
|
|
31
|
+
<% if (it.rows.length === 0 && it.oneByOne.length === 0) { %><p class="muted">Nothing waiting.</p><% } %>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<% layout("./admin") %>
|
|
2
|
+
<h1>Sections</h1>
|
|
3
|
+
<ul class="list">
|
|
4
|
+
<% for (const s of it.sections) { %>
|
|
5
|
+
<li><strong><%= s.name %></strong> <span class="muted"><%= s.origin %> · <%= s.memories %> memories<% if (!s.approved) { %> · new<% } %></span>
|
|
6
|
+
<div class="actions">
|
|
7
|
+
<% if (!s.approved) { %><form class="act inline" data-action="section.approve"><input type="hidden" name="id" value="<%= s.id %>"><button type="submit">Keep</button></form><% } %>
|
|
8
|
+
<form class="act inline" data-action="section.rename"><input type="hidden" name="id" value="<%= s.id %>"><input name="name" value="<%= s.name %>" maxlength="32" aria-label="New name"><button type="submit" class="secondary">Rename</button></form>
|
|
9
|
+
<% if (s.origin === "dynamic") { %><form class="act inline" data-action="section.undo"><input type="hidden" name="id" value="<%= s.id %>"><button type="submit" class="secondary">Undo</button></form><% } %>
|
|
10
|
+
<form class="act inline" data-action="section.merge"><input type="hidden" name="from" value="<%= s.id %>"><select name="into" aria-label="Merge into"><% for (const t of it.sections) { if (t.id !== s.id) { %><option value="<%= t.id %>"><%= t.name %></option><% } } %></select><button type="submit" class="secondary">Merge into</button></form>
|
|
11
|
+
</div></li>
|
|
12
|
+
<% } %>
|
|
13
|
+
</ul>
|
|
14
|
+
<h1>Attributes</h1>
|
|
15
|
+
<form class="act stack" data-action="attribute.add">
|
|
16
|
+
<label>Name <input name="name" placeholder="self.coffee_order" required></label>
|
|
17
|
+
<select name="cardinality" aria-label="Values"><option value="one">One value</option><option value="many">Many values</option></select>
|
|
18
|
+
<select name="section" aria-label="Section"><% for (const s of it.sections) { %><option value="<%= s.id %>"><%= s.name %></option><% } %></select>
|
|
19
|
+
<label>Description <input name="description" maxlength="200" required></label>
|
|
20
|
+
<button type="submit">Add attribute</button>
|
|
21
|
+
</form>
|
|
22
|
+
<ul class="list"><% for (const a of it.attributes) { %><li><span class="code"><%= a.name %></span> <span class="muted"><%= a.cardinality %> · <%= a.section %> · <%= a.origin %></span></li><% } %></ul>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<% layout("./admin") %>
|
|
2
|
+
<h1>LLM spend</h1>
|
|
3
|
+
<p class="muted">Capped at $<%= it.cap.toFixed(2) %> a day; past it the server works without the LLM until midnight UTC.</p>
|
|
4
|
+
<table class="table"><thead><tr><th>Day</th><th>Use</th><th>USD</th><th>Tokens in / out</th></tr></thead><tbody>
|
|
5
|
+
<% for (const s of it.spend) { %><tr><td><%= s.day %></td><td><%= s.purpose %></td><td><%= s.usd.toFixed(4) %></td><td><%= s.tokens_in %> / <%= s.tokens_out %></td></tr><% } %>
|
|
6
|
+
</tbody></table>
|
|
7
|
+
<h1>Alerts</h1>
|
|
8
|
+
<p class="muted">The daily digest goes out at <%= it.digestHour %>:00 your time (server.toml <span class="code">alerts.digest_hour_local</span>).</p>
|
|
9
|
+
<ul class="list"><% for (const a of it.alerts) { %><li><strong><%= it.fmt.alert(a.kind) %></strong> <span class="muted"><%= a.subject %> ×<%= a.count %> · <%~ it.fmt.time(a.last_at) %></span></li><% } %></ul>
|
|
10
|
+
<% if (it.alerts.length === 0) { %><p class="muted">No open alerts.</p><% } %>
|
|
11
|
+
<% if (it.recoveryCodesLeft !== undefined) { %>
|
|
12
|
+
<h1>Recovery codes</h1>
|
|
13
|
+
<p class="muted"><%= it.recoveryCodesLeft %> of 10 unused. New codes replace every old one.</p>
|
|
14
|
+
<button type="button" id="new-codes">New recovery codes</button>
|
|
15
|
+
<section id="codes-step" hidden>
|
|
16
|
+
<p>Save them now: they are shown once.</p>
|
|
17
|
+
<ol id="codes" class="code"></ol>
|
|
18
|
+
<label for="confirm-code">Type one of them</label>
|
|
19
|
+
<input id="confirm-code" autocomplete="off" autocapitalize="characters" spellcheck="false">
|
|
20
|
+
<button id="confirm-codes" type="button">Done</button>
|
|
21
|
+
</section>
|
|
22
|
+
<% } %>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<% layout("./layout") %>
|
|
2
|
+
<nav class="nav" aria-label="Admin">
|
|
3
|
+
<% for (const n of it.nav) { %><a href="<%= it.root ?? "" %><%= n.path %>"<% if (n.path === it.active) { %> aria-current="page"<% } %>><%= n.label %></a><% } %>
|
|
4
|
+
</nav>
|
|
5
|
+
<%~ it.body %>
|
|
6
|
+
<p id="msg" role="status"></p>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<% layout("./layout") %>
|
|
2
|
+
<% if (!it.signedIn) { %>
|
|
3
|
+
<h1>Sign in to approve</h1>
|
|
4
|
+
<button id="signin" type="button">Sign in with passkey</button>
|
|
5
|
+
<% } else if (!it.open) { %>
|
|
6
|
+
<h1>This request is closed</h1>
|
|
7
|
+
<p>It was approved, denied or has expired. Run the command again if you still want it.</p>
|
|
8
|
+
<% } else { %>
|
|
9
|
+
<p class="muted">Code</p>
|
|
10
|
+
<p class="host code"><%= it.userCode %></p>
|
|
11
|
+
<p class="muted">must match your terminal</p>
|
|
12
|
+
<h1>Approve this command?</h1>
|
|
13
|
+
<% for (const line of it.lines) { %><p class="<%= line.startsWith('WARNING') ? 'danger' : '' %>"><%= line %></p><% } %>
|
|
14
|
+
<% if (it.needsSecondConfirm) { %>
|
|
15
|
+
<label for="confirm">Type the last 8 characters of the key</label>
|
|
16
|
+
<input id="confirm" autocomplete="off" spellcheck="false" maxlength="8">
|
|
17
|
+
<% } else if (it.confirmDollars !== undefined) { %>
|
|
18
|
+
<label for="confirm">Type the estimated cost in whole dollars, rounded up</label>
|
|
19
|
+
<input id="confirm" autocomplete="off" spellcheck="false" inputmode="numeric" maxlength="6">
|
|
20
|
+
<% } %>
|
|
21
|
+
<div class="actions">
|
|
22
|
+
<button id="approve" type="button" disabled>Approve with passkey</button>
|
|
23
|
+
<button id="deny" type="button" class="secondary">Deny</button>
|
|
24
|
+
</div>
|
|
25
|
+
<% } %>
|
|
26
|
+
<p id="msg" role="status"></p>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<% layout("./layout") %>
|
|
2
|
+
<h1>Pairing code</h1>
|
|
3
|
+
<form id="code-form">
|
|
4
|
+
<label for="code">The 8 characters shown where you opened this connection</label>
|
|
5
|
+
<input id="code" name="code" autocomplete="off" autocapitalize="characters" spellcheck="false" maxlength="8" required>
|
|
6
|
+
<button type="submit">Continue</button>
|
|
7
|
+
</form>
|
|
8
|
+
<p id="msg" role="status"></p>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<% layout("./layout") %>
|
|
2
|
+
<p><%= it.vendor %> will return to</p>
|
|
3
|
+
<p class="host"><%= it.redirectHost %></p>
|
|
4
|
+
<p class="muted break"><%= it.redirectUri %></p>
|
|
5
|
+
<% if (it.clientName) { %><p>Name: <%= it.clientName %> <span class="muted">(self-declared)</span></p><% } %>
|
|
6
|
+
<% if (it.pcCode) { %><p>Code: <strong class="code"><%= it.pcCode %></strong> <span class="muted">must match your terminal</span></p><% } %>
|
|
7
|
+
<p>Can <strong><%= it.scope %></strong>.</p>
|
|
8
|
+
<p class="muted"><%= it.age %></p>
|
|
9
|
+
<h1>Did you just click Connect in <%= it.vendor %>?</h1>
|
|
10
|
+
<div class="actions">
|
|
11
|
+
<button id="approve" type="button" disabled>Approve with passkey</button>
|
|
12
|
+
<button id="deny" type="button" class="secondary">Deny</button>
|
|
13
|
+
</div>
|
|
14
|
+
<p id="msg" role="status"></p>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
6
|
+
<meta name="referrer" content="no-referrer">
|
|
7
|
+
<title><%= it.title %></title>
|
|
8
|
+
<link rel="stylesheet" href="<%= it.root ?? "" %>/assets/app.css">
|
|
9
|
+
<script type="module" src="<%= it.root ?? "" %>/assets/app.js"></script>
|
|
10
|
+
</head>
|
|
11
|
+
<body data-page="<%= it.page %>" data-csrf="<%= it.csrf ?? '' %>" data-base="<%= it.base ?? '' %>" data-root="<%= it.root ?? '' %>">
|
|
12
|
+
<main>
|
|
13
|
+
<%~ it.body %>
|
|
14
|
+
</main>
|
|
15
|
+
</body>
|
|
16
|
+
</html>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<% layout("./layout") %>
|
|
2
|
+
<h1>Recover access</h1>
|
|
3
|
+
<p>A recovery code removes every passkey and signed-in browser, then lets you add two new passkeys. Connected apps keep working.</p>
|
|
4
|
+
<form id="recover-form">
|
|
5
|
+
<label for="code">Recovery code</label>
|
|
6
|
+
<input id="code" autocomplete="off" autocapitalize="characters" spellcheck="false" required>
|
|
7
|
+
<button type="submit">Recover</button>
|
|
8
|
+
</form>
|
|
9
|
+
<p id="msg" role="status"></p>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<% layout("./layout") %>
|
|
2
|
+
<h1>Set up memory-anywhere</h1>
|
|
3
|
+
<section id="step-1">
|
|
4
|
+
<p>Add a passkey: your phone, a password manager, Windows Hello or a security key.</p>
|
|
5
|
+
<button id="add-1" type="button">Add first passkey</button>
|
|
6
|
+
</section>
|
|
7
|
+
<section id="step-2" hidden>
|
|
8
|
+
<p>Add a second passkey kept somewhere else, so losing one never locks you out. A security key or this computer's Windows Hello works; a second synced passkey must come from another provider.</p>
|
|
9
|
+
<p class="muted">Do not keep both in the Google account you use for Gemini.</p>
|
|
10
|
+
<label><input id="different" type="checkbox"> The two passkeys are with different providers</label>
|
|
11
|
+
<button id="add-2" type="button">Add second passkey</button>
|
|
12
|
+
</section>
|
|
13
|
+
<section id="step-3" hidden>
|
|
14
|
+
<p>Recovery codes. Save them now: they are shown once.</p>
|
|
15
|
+
<ol id="codes" class="code"></ol>
|
|
16
|
+
<label for="confirm-code">Type one of them</label>
|
|
17
|
+
<input id="confirm-code" autocomplete="off" autocapitalize="characters" spellcheck="false">
|
|
18
|
+
<button id="confirm" type="button">Finish</button>
|
|
19
|
+
</section>
|
|
20
|
+
<p id="msg" role="status"></p>
|