fedipod 1.40.0 → 1.43.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.md +5 -0
- package/architecture.md +1 -3
- package/architecture.svg +93 -85
- package/gateway.md +7 -2
- package/lib/client/c2s.mjs +16 -5
- package/lib/client/masto/oauth.mjs +1 -1
- package/lib/connections/vault.mjs +1 -1
- package/lib/core/agent.mjs +720 -0
- package/lib/core/deliver.mjs +11 -1
- package/lib/core/gateway-move.mjs +58 -0
- package/lib/core/intake/group.mjs +10 -11
- package/lib/core/keys.mjs +1 -1
- package/lib/core/lease.mjs +4 -3
- package/lib/core/publisher/index.mjs +4 -6
- package/lib/core/publisher/notes.mjs +73 -4
- package/lib/core/remote.mjs +54 -0
- package/lib/core/shapes/shapes-text.mjs +11 -3
- package/lib/core/wire.mjs +4 -1
- package/lib/device/admin/index.mjs +4 -11
- package/lib/device/admin/routes/setup.mjs +60 -5
- package/lib/device/admin/server.mjs +18 -5
- package/lib/device/cli/commands/account.mjs +1 -1
- package/lib/device/cli/commands/run.mjs +2 -2
- package/lib/device/cli/commands/service.mjs +1 -1
- package/lib/device/cli/commands/setup.mjs +1 -1
- package/lib/device/cli/commands/state.mjs +1 -1
- package/lib/device/cli/context.mjs +1 -1
- package/lib/{gateway → device}/directory.mjs +1 -1
- package/lib/device/gateway-move.mjs +3 -58
- package/lib/device/home.mjs +3 -50
- package/lib/{client → device}/localapi.mjs +2 -2
- package/lib/device/remote.mjs +3 -54
- package/lib/gateway/copy.mjs +12 -3
- package/lib/gateway/front-core.mjs +16 -17
- package/lib/gateway/front-pages.mjs +31 -0
- package/lib/gateway/gateway-core.mjs +1 -1
- package/lib/gateway/held-mail.mjs +3 -0
- package/lib/gateway/keeper-session.mjs +10 -1
- package/lib/gateway/keeper.mjs +3 -0
- package/lib/gateway/masto-gateway.mjs +61 -12
- package/lib/gateway/outbox-door.mjs +31 -0
- package/lib/gateway/state-api.mjs +39 -7
- package/lib/server/embed.mjs +4 -4
- package/lib/shared/files.mjs +49 -0
- package/lib/shared/ua.mjs +3 -0
- package/lib/surface/index.mjs +7 -0
- package/lib/{device/admin → surface}/origins.mjs +1 -1
- package/lib/{device/admin → surface}/routes/gateway.mjs +7 -11
- package/lib/{device/admin → surface}/routes/lifecycle.mjs +3 -3
- package/lib/{device/admin → surface}/routes/owner.mjs +4 -60
- package/lib/{device/admin → surface}/routes/social.mjs +1 -1
- package/lib/{device/admin → surface}/static.mjs +6 -1
- package/lib/{device/admin → surface}/surface.mjs +19 -16
- package/package.json +23 -5
- package/run-agent.mjs +19 -720
- package/scripts/build-app.mjs +4 -0
- package/scripts/check-netlify-bundles.mjs +88 -0
- package/scripts/check-pod-calls.mjs +42 -0
- package/scripts/vendor-sanitize.mjs +27 -0
- package/vendor/idp-grant.cjs +11 -5
- package/vendor/sanitize-html.cjs +11456 -0
- package/web/app/agent.mjs +4 -2
- package/web/app/copy-mode.mjs +27 -3
- package/web/app/dist/boot.js.map +1 -1
- package/web/app/dist/sw.js +110 -24
- package/web/app/dist/sw.js.map +4 -4
- package/web/app-signin/app-signin.mjs +2 -2
- package/web/app-signin/index.html +13 -5
- package/browser.svg +0 -72
- /package/lib/{device/admin → surface}/routes/connections.mjs +0 -0
|
@@ -51,7 +51,7 @@ async function start() {
|
|
|
51
51
|
const name = document.createElement('strong');
|
|
52
52
|
name.textContent = app.name;
|
|
53
53
|
asking.append(name, ' is asking to use your account');
|
|
54
|
-
if (app.sendsTo) { const where = document.createElement('code'); where.textContent = app.sendsTo; asking.append(', and will be sent back to ', where); }
|
|
54
|
+
if (app.sendsTo) { const where = document.createElement('code'); where.textContent = app.sendsTo; asking.append(', and you will be sent back to ', where); }
|
|
55
55
|
asking.append('.');
|
|
56
56
|
asking.hidden = false;
|
|
57
57
|
const address = remembered();
|
|
@@ -63,7 +63,7 @@ async function start() {
|
|
|
63
63
|
$('signin-form').addEventListener('submit', async (ev) => {
|
|
64
64
|
ev.preventDefault();
|
|
65
65
|
const address = $('address').value.trim();
|
|
66
|
-
if (!address) { say('Write your address
|
|
66
|
+
if (!address) { say('Write your Fediverse address or WebID first.', true); return; }
|
|
67
67
|
const r = await fetch(`/api/authorize?address=${encodeURIComponent(address)}`);
|
|
68
68
|
const who = await r.json().catch(() => ({}));
|
|
69
69
|
if (!r.ok) { say(who.error || `That address was not found (HTTP ${r.status}).`, true); return; }
|
|
@@ -7,14 +7,15 @@
|
|
|
7
7
|
<link rel="stylesheet" href="/app-signin/tokens.css">
|
|
8
8
|
<style>
|
|
9
9
|
body { font-family: var(--font); background: var(--surface); color: var(--fg); margin: 0; line-height: 1.5; }
|
|
10
|
-
main { max-width:
|
|
10
|
+
main { width: fit-content; box-sizing: border-box; max-width: calc(100% - 2rem); margin: 8vh auto; padding: 1.5rem 1.75rem; background: var(--raised);
|
|
11
11
|
border: 1px solid var(--line); border-radius: 10px; }
|
|
12
12
|
h1 { color: var(--heading); font-size: 1.5rem; margin: 0 0 1rem; }
|
|
13
13
|
a { color: var(--link); text-decoration: underline; }
|
|
14
|
-
code {
|
|
14
|
+
code { overflow-wrap: anywhere; background: var(--field-bg); padding: .05em .35em; border-radius: 4px; }
|
|
15
15
|
label { display: block; margin: 1rem 0 .4rem; font-weight: bold; }
|
|
16
16
|
input { font: inherit; width: 100%; box-sizing: border-box; padding: .5rem .7rem; background: var(--field-bg);
|
|
17
17
|
color: var(--field-text); border: 1px solid var(--field-edge); border-radius: 6px; }
|
|
18
|
+
input::placeholder { color: var(--sub); opacity: 1; }
|
|
18
19
|
.hint { color: var(--sub); }
|
|
19
20
|
button { font: inherit; padding: .6rem 1.1rem; background: var(--btn); color: var(--btn-text); border: none;
|
|
20
21
|
border-radius: 9px; cursor: pointer; }
|
|
@@ -22,6 +23,13 @@
|
|
|
22
23
|
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
|
|
23
24
|
#signin-status { margin-top: 1rem; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 8px; }
|
|
24
25
|
#signin-status:empty { display: none; }
|
|
26
|
+
/* A phone: less padding and margin, and the placeholder at the 16px floor, so
|
|
27
|
+
it fits in the field down to a 320px screen. What is typed stays 20px. */
|
|
28
|
+
@media (max-width: 30rem) {
|
|
29
|
+
main { max-width: calc(100% - 1.6rem); margin-top: 1rem; padding: 1.25rem .8rem; }
|
|
30
|
+
input { padding: .5rem; }
|
|
31
|
+
input::placeholder { font-size: .8rem; }
|
|
32
|
+
}
|
|
25
33
|
</style>
|
|
26
34
|
</head>
|
|
27
35
|
<body>
|
|
@@ -29,9 +37,9 @@
|
|
|
29
37
|
<h1>Let an app use your account</h1>
|
|
30
38
|
<p id="asking" hidden></p>
|
|
31
39
|
<form id="signin-form" hidden>
|
|
32
|
-
<label for="address">Your address
|
|
33
|
-
<input type="text" id="address" name="address" autocomplete="username">
|
|
34
|
-
<p class="hint">You sign in at your own pod
|
|
40
|
+
<label for="address">Your Fediverse address or WebID</label>
|
|
41
|
+
<input type="text" id="address" name="address" autocomplete="username" placeholder="@you@provider or your WebID">
|
|
42
|
+
<p class="hint">You sign in at your own pod; no password is typed on this page.</p>
|
|
35
43
|
<p><button type="submit" id="signin">Sign in with your pod</button></p>
|
|
36
44
|
</form>
|
|
37
45
|
<p id="signin-status" role="status" aria-live="polite"></p>
|
package/browser.svg
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 860 486" font-family="Helvetica, Arial, sans-serif">
|
|
2
|
-
<defs>
|
|
3
|
-
<marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto-start-reverse">
|
|
4
|
-
<path d="M0,0 L10,5 L0,10 z" fill="#333"/>
|
|
5
|
-
</marker>
|
|
6
|
-
</defs>
|
|
7
|
-
<rect x="0" y="0" width="860" height="486" fill="#ffffff"/>
|
|
8
|
-
|
|
9
|
-
<!-- boxes (draw.io palette) -->
|
|
10
|
-
<g stroke-width="1.5">
|
|
11
|
-
<rect x="315" y="24" width="230" height="72" rx="6" fill="#dae8fc" stroke="#6c8ebf"/>
|
|
12
|
-
<rect x="315" y="190" width="230" height="68" rx="6" fill="#e1d5e7" stroke="#9673a6"/>
|
|
13
|
-
<rect x="40" y="372" width="210" height="70" rx="6" fill="#f8cecc" stroke="#b85450"/>
|
|
14
|
-
<rect x="580" y="360" width="250" height="88" rx="6" fill="#d5e8d4" stroke="#82b366"/>
|
|
15
|
-
</g>
|
|
16
|
-
|
|
17
|
-
<!-- box labels -->
|
|
18
|
-
<g fill="#111" text-anchor="middle">
|
|
19
|
-
<text x="430" y="56" font-size="17" font-weight="bold">Open Social Web</text>
|
|
20
|
-
<text x="430" y="80" font-size="13">Mastodon · Pixelfed · Bluesky …</text>
|
|
21
|
-
|
|
22
|
-
<text x="430" y="220" font-size="17" font-weight="bold">FediPod Gateway</text>
|
|
23
|
-
<text x="430" y="242" font-size="13">the mail door & the relay</text>
|
|
24
|
-
|
|
25
|
-
<text x="145" y="391" font-size="17" font-weight="bold">Your Pod</text>
|
|
26
|
-
<text x="145" y="409" font-size="13">AP S2S formatted data</text>
|
|
27
|
-
<text x="145" y="426" font-size="13">in addition to other pod data</text>
|
|
28
|
-
|
|
29
|
-
<text x="705" y="392" font-size="17" font-weight="bold">Any Browser</text>
|
|
30
|
-
<text x="705" y="414" font-size="13">runs your FediPod Agent,</text>
|
|
31
|
-
<text x="705" y="431" font-size="13">a Mastodon API client</text>
|
|
32
|
-
</g>
|
|
33
|
-
|
|
34
|
-
<!-- arrows -->
|
|
35
|
-
<g stroke="#333" stroke-width="1.6" fill="none">
|
|
36
|
-
<!-- 1: Open Social Web <-> Gateway (AP S2S mail) -->
|
|
37
|
-
<line x1="430" y1="96" x2="430" y2="190" marker-start="url(#arrow)" marker-end="url(#arrow)"/>
|
|
38
|
-
<!-- 2: Your Pod -> Open Social Web (UNCHANGED, pod answers lookups) -->
|
|
39
|
-
<path d="M110,372 C46,300 46,150 322,92" marker-end="url(#arrow)"/>
|
|
40
|
-
<!-- 3: Gateway -> Your Pod (one way now) -->
|
|
41
|
-
<path d="M338,258 C300,300 250,330 205,372" marker-end="url(#arrow)"/>
|
|
42
|
-
<!-- 4: Gateway <-> Any Browser (agent loaded; signed posts sent) -->
|
|
43
|
-
<path d="M632,360 C560,320 522,300 472,258" marker-start="url(#arrow)" marker-end="url(#arrow)"/>
|
|
44
|
-
<!-- 5: Your Pod <-> Any Browser (Solid) -->
|
|
45
|
-
<line x1="250" y1="408" x2="580" y2="408" marker-start="url(#arrow)" marker-end="url(#arrow)"/>
|
|
46
|
-
<!-- 6: Any Browser <-> Open Social Web (ATProto client — Bluesky) -->
|
|
47
|
-
<path d="M760,360 C824,300 824,150 538,92" marker-start="url(#arrow)" marker-end="url(#arrow)"/>
|
|
48
|
-
</g>
|
|
49
|
-
|
|
50
|
-
<!-- arrow labels -->
|
|
51
|
-
<g fill="#333" font-size="13">
|
|
52
|
-
<text x="418" y="134" text-anchor="end">raw mail in</text>
|
|
53
|
-
<text x="418" y="150" text-anchor="end">relayed posts out</text>
|
|
54
|
-
<text x="442" y="142" text-anchor="start">AP S2S Protocol</text>
|
|
55
|
-
|
|
56
|
-
<text x="96" y="250" text-anchor="start">Pod responds to requests for</text>
|
|
57
|
-
<text x="96" y="266" text-anchor="start">webfinger, actor, public posts</text>
|
|
58
|
-
|
|
59
|
-
<text x="300" y="322" text-anchor="start">verified mail in</text>
|
|
60
|
-
|
|
61
|
-
<text x="588" y="302" text-anchor="middle">FediPod Agent loaded in browser;</text>
|
|
62
|
-
<text x="588" y="318" text-anchor="middle">signed posts sent to gateway</text>
|
|
63
|
-
|
|
64
|
-
<text x="430" y="400" text-anchor="middle" font-weight="bold" fill="#111">Solid Protocol</text>
|
|
65
|
-
<text x="430" y="428" text-anchor="middle">reads & writes your pod</text>
|
|
66
|
-
|
|
67
|
-
<text x="780" y="238" text-anchor="end">ATProto</text>
|
|
68
|
-
<text x="780" y="254" text-anchor="end">client protocol</text>
|
|
69
|
-
</g>
|
|
70
|
-
|
|
71
|
-
<text x="830" y="474" text-anchor="end" font-size="11" fill="#888">© 2026 Jeff Zucker · CC BY-SA 4.0</text>
|
|
72
|
-
</svg>
|
|
File without changes
|