@wipcomputer/wip-ldm-os 0.4.85-alpha.2 → 0.4.85-alpha.4
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/bin/ldm.js +18 -0
- package/package.json +4 -1
- package/scripts/test-crc-agentid-tenant-boundary.mjs +72 -0
- package/scripts/test-crc-e2ee-session-route.mjs +122 -0
- package/scripts/test-crc-pair-login-flow.mjs +40 -0
- package/src/hosted-mcp/app/footer.js +74 -0
- package/src/hosted-mcp/app/kaleidoscope-login.html +843 -0
- package/src/hosted-mcp/app/pair.html +147 -57
- package/src/hosted-mcp/app/sprites.png +0 -0
- package/src/hosted-mcp/demo/index.html +3 -7
- package/src/hosted-mcp/demo/login.html +318 -20
- package/src/hosted-mcp/deploy.sh +306 -56
- package/src/hosted-mcp/nginx/codex-relay.conf +25 -0
- package/src/hosted-mcp/nginx/conf.d/redact-logs.conf +60 -0
- package/src/hosted-mcp/nginx/mcp-oauth.conf +58 -0
- package/src/hosted-mcp/nginx/wip.computer.conf +25 -1
- package/src/hosted-mcp/scripts/audit-logs.sh +205 -0
- package/src/hosted-mcp/scripts/verify-deploy.sh +102 -0
- package/src/hosted-mcp/server.mjs +775 -112
package/bin/ldm.js
CHANGED
|
@@ -738,6 +738,24 @@ function deployDocs() {
|
|
|
738
738
|
console.log(` + ${agentDocsCount} personalized doc(s) deployed to ${agentLibraryDest.replace(HOME, '~')}/`);
|
|
739
739
|
}
|
|
740
740
|
|
|
741
|
+
// Migration-window compatibility write (added 2026-04-30).
|
|
742
|
+
// dev-guide-wipcomputerinc.md was migrated from ~/.ldm/shared/ to
|
|
743
|
+
// ~/.ldm/library/documentation/ on 2026-04-19, but agent boot files,
|
|
744
|
+
// ~/.claude/rules/, and other consumers still reference the old shared
|
|
745
|
+
// path. Without this write, the old path serves stale content and
|
|
746
|
+
// agents reading by the old path get pre-migration policy.
|
|
747
|
+
// Forward-migration (grep-update consumers, then remove this compat
|
|
748
|
+
// write) is tracked separately. See bugs/installer/ ticket
|
|
749
|
+
// 2026-04-30--cc-mini--dev-guide-split-path-migration.md.
|
|
750
|
+
const devGuideName = 'dev-guide-wipcomputerinc.md';
|
|
751
|
+
const devGuideNew = join(agentLibraryDest, devGuideName);
|
|
752
|
+
const devGuideOld = join(LDM_ROOT, 'shared', devGuideName);
|
|
753
|
+
if (existsSync(devGuideNew)) {
|
|
754
|
+
mkdirSync(dirname(devGuideOld), { recursive: true });
|
|
755
|
+
cpSync(devGuideNew, devGuideOld);
|
|
756
|
+
console.log(` + Compat write: ${devGuideName} also deployed to ${devGuideOld.replace(HOME, '~')} (migration window)`);
|
|
757
|
+
}
|
|
758
|
+
|
|
741
759
|
return docsCount + agentDocsCount;
|
|
742
760
|
}
|
|
743
761
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wipcomputer/wip-ldm-os",
|
|
3
|
-
"version": "0.4.85-alpha.
|
|
3
|
+
"version": "0.4.85-alpha.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "LDM OS: identity, memory, and sovereignty infrastructure for AI agents",
|
|
6
6
|
"engines": {
|
|
@@ -26,6 +26,9 @@
|
|
|
26
26
|
"test:ldm-install-bin-shim": "node scripts/test-ldm-install-preserves-foreign-bin.mjs",
|
|
27
27
|
"test:doctor-cron-target": "node scripts/test-doctor-cron-target.mjs",
|
|
28
28
|
"test:bin-manifest": "node scripts/test-bin-manifest.mjs",
|
|
29
|
+
"test:crc-agentid-tenant-boundary": "node scripts/test-crc-agentid-tenant-boundary.mjs",
|
|
30
|
+
"test:crc-pair-login-flow": "node scripts/test-crc-pair-login-flow.mjs",
|
|
31
|
+
"test:crc-e2ee-session-route": "node scripts/test-crc-e2ee-session-route.mjs",
|
|
29
32
|
"fmt": "npx prettier --write 'src/**/*.{ts,mjs}' 'lib/**/*.mjs' 'bin/**/*.js'",
|
|
30
33
|
"fmt:check": "npx prettier --check 'src/**/*.{ts,mjs}' 'lib/**/*.mjs' 'bin/**/*.js'"
|
|
31
34
|
},
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
|
|
4
|
+
const server = readFileSync("src/hosted-mcp/server.mjs", "utf8");
|
|
5
|
+
|
|
6
|
+
function assertContains(needle, label) {
|
|
7
|
+
if (!server.includes(needle)) {
|
|
8
|
+
throw new Error(`${label} missing expected text: ${needle}`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function assertNotContains(needle, label) {
|
|
13
|
+
if (server.includes(needle)) {
|
|
14
|
+
throw new Error(`${label} still contains forbidden text: ${needle}`);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
assertContains('const ACCOUNT_TENANT_PREFIX = "acct:";', "account tenant prefix");
|
|
19
|
+
assertContains('const LEGACY_API_KEY_TENANT_PREFIX = "key:";', "legacy key tenant prefix");
|
|
20
|
+
assertContains('const RESERVED_AGENT_HANDLES = new Set([', "reserved handle set");
|
|
21
|
+
assertContains('"parker-smoke-test",', "reserved parker smoke handle");
|
|
22
|
+
assertContains('function accountTenantIdForUserId(userId)', "account tenant helper");
|
|
23
|
+
assertContains('function identityForApiKey(key)', "api key identity helper");
|
|
24
|
+
assertContains('return identityForApiKey(key);', "http auth uses identity helper");
|
|
25
|
+
assertContains("const agentId = accountTenantIdForUserId(stored.userId);", "registration uses immutable account tenant");
|
|
26
|
+
assertContains("await saveApiKey(apiKey, agentId, { handle: credentialLabel });", "registration stores handle separately");
|
|
27
|
+
assertContains('json(res, 409, { error: "reserved_handle"', "reserved handle rejected");
|
|
28
|
+
assertContains('json(res, 409, { error: "handle_taken"', "duplicate handle rejected");
|
|
29
|
+
assertContains("p.handle = identity.handle;", "pair stores display handle separately");
|
|
30
|
+
assertContains("handle: identity.handle,", "relay metadata returns display handle");
|
|
31
|
+
assertContains("codexDaemons.has(identity.agentId)", "daemon presence uses tenant id");
|
|
32
|
+
assertContains("codexDaemonPubkeys.get(identity.agentId)", "daemon pubkey uses tenant id");
|
|
33
|
+
assertContains("agentId: identity.agentId,", "relay tickets bind tenant id");
|
|
34
|
+
assertContains("handle: identity.handle,", "relay tickets preserve display handle");
|
|
35
|
+
assertContains("codexDaemons.set(identity.agentId, ws);", "daemon ws keyed by tenant id");
|
|
36
|
+
assertContains("const key = codexRelayKey(identity.agentId, threadId);", "web ws keyed by tenant id");
|
|
37
|
+
assertContains("const daemonWs = codexDaemons.get(identity.agentId);", "web sends to tenant daemon");
|
|
38
|
+
assertNotContains("const agentId = stored.username || (\"passkey-\"", "registration must not use chosen handle as tenant");
|
|
39
|
+
assertNotContains("const existingKey = Object.entries(API_KEYS).find(([k, v]) => v === agentId);", "oauth must not reuse chosen handle as tenant");
|
|
40
|
+
|
|
41
|
+
function legacyTenantIdForApiKey(key) {
|
|
42
|
+
return "key:" + createHash("sha256").update(key).digest("base64url").slice(0, 32);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function accountTenantIdForUserId(userId) {
|
|
46
|
+
return "acct:" + userId;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const chosenHandle = "parker-smoke-test";
|
|
50
|
+
const accountA = accountTenantIdForUserId("user-a");
|
|
51
|
+
const accountB = accountTenantIdForUserId("user-b");
|
|
52
|
+
if (accountA === accountB) {
|
|
53
|
+
throw new Error("different user ids collapsed to one account tenant");
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const legacyA = legacyTenantIdForApiKey("ck-a");
|
|
57
|
+
const legacyB = legacyTenantIdForApiKey("ck-b");
|
|
58
|
+
if (legacyA === legacyB) {
|
|
59
|
+
throw new Error("legacy API-key tenants collided");
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const threadId = "thread-019dfa";
|
|
63
|
+
const webKeyA = `${accountA}:${threadId}`;
|
|
64
|
+
const webKeyB = `${accountB}:${threadId}`;
|
|
65
|
+
if (webKeyA === webKeyB) {
|
|
66
|
+
throw new Error("same display handle can still collide across account tenants");
|
|
67
|
+
}
|
|
68
|
+
if (`${chosenHandle}:${threadId}` === webKeyA || `${chosenHandle}:${threadId}` === webKeyB) {
|
|
69
|
+
throw new Error("model still keys relay routes by display handle");
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
console.log("crc agentId tenant boundary checks passed");
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
|
|
3
|
+
const server = readFileSync("src/hosted-mcp/server.mjs", "utf8");
|
|
4
|
+
|
|
5
|
+
function assertContains(needle, label) {
|
|
6
|
+
if (!server.includes(needle)) {
|
|
7
|
+
throw new Error(`${label} missing expected text: ${needle}`);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function assertBefore(first, second, label) {
|
|
12
|
+
const firstIndex = server.indexOf(first);
|
|
13
|
+
const secondIndex = firstIndex === -1 ? -1 : server.indexOf(second, firstIndex + first.length);
|
|
14
|
+
if (firstIndex === -1 || secondIndex === -1 || firstIndex >= secondIndex) {
|
|
15
|
+
throw new Error(`${label} expected "${first}" before "${second}"`);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
assertContains("const codexWebClients = new Map(); // `${agentId}:${threadId}` -> Set<ws>", "thread-keyed web client sets");
|
|
20
|
+
assertContains("const codexE2eeSessionRoutes = new Map(); // `${agentId}:${e2eeSession}` -> { threadId, webKey, ws }", "e2ee session route map");
|
|
21
|
+
assertContains("function registerCodexE2eeSessionRoute(agentId, e2eeSession, threadId, ws)", "route registration helper");
|
|
22
|
+
assertContains("codexE2eeSessionRoutes.set(codexRelayKey(agentId, e2eeSession), { threadId, webKey, ws });", "route map stores e2ee session to thread");
|
|
23
|
+
assertContains("function addCodexWebClient(webKey, ws)", "web client set add helper");
|
|
24
|
+
assertContains("function removeCodexWebClient(webKey, ws)", "web client set remove helper");
|
|
25
|
+
assertContains("function openCodexWebClientsForKey(webKey)", "web client set read helper");
|
|
26
|
+
assertContains("function resolveCodexWebClientsForDaemonFrame(agentId, routeId)", "daemon route resolver");
|
|
27
|
+
assertContains("const routed = codexE2eeSessionRoutes.get(codexRelayKey(agentId, routeId));", "daemon route lookup uses e2ee session map");
|
|
28
|
+
assertContains("if (routed && routed.ws && routed.ws.readyState === routed.ws.OPEN) return [routed.ws];", "daemon route resolves to active owner socket");
|
|
29
|
+
assertContains("return openCodexWebClientsForKey(codexRelayKey(agentId, routeId));", "daemon route keeps direct thread fallback");
|
|
30
|
+
assertContains("const targets = resolveCodexWebClientsForDaemonFrame(identity.agentId, sessionId);", "daemon frames use route resolver");
|
|
31
|
+
assertContains("for (const target of targets) {", "daemon frames send to every resolved target");
|
|
32
|
+
assertContains("if (isCodexE2eeEnvelope(envelope) && envelope.session) {", "web e2ee messages are detected");
|
|
33
|
+
assertContains("registerCodexE2eeSessionRoute(identity.agentId, envelope.session, threadId, ws);", "web e2ee session is registered");
|
|
34
|
+
assertContains("const clientCount = addCodexWebClient(key, ws);", "new web connections are added without replacing existing clients");
|
|
35
|
+
assertContains("removeCodexWebClient(key, ws);", "close cleanup removes only the closing socket");
|
|
36
|
+
assertContains("removeCodexE2eeRoutesForWeb(identity.agentId, threadId, ws);", "close cleanup");
|
|
37
|
+
assertContains("if (route.webKey === webKey && (!ws || route.ws === ws)) {", "cleanup only removes routes owned by the closing socket");
|
|
38
|
+
assertBefore(
|
|
39
|
+
"registerCodexE2eeSessionRoute(identity.agentId, envelope.session, threadId, ws);",
|
|
40
|
+
"daemonWs.send(text);",
|
|
41
|
+
"web session route registered before forwarding to daemon",
|
|
42
|
+
);
|
|
43
|
+
if (server.includes("const previous = codexWebClients.get(key);")) {
|
|
44
|
+
throw new Error("web client replacement lookup is still present");
|
|
45
|
+
}
|
|
46
|
+
if (server.includes("codexWebClients.set(key, ws);")) {
|
|
47
|
+
throw new Error("web client singleton set is still present");
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const OPEN = 1;
|
|
51
|
+
const agentId = "parker-smoke-test";
|
|
52
|
+
const threadId = "thread-123";
|
|
53
|
+
const e2eeSession = "e2ee-random-session-456";
|
|
54
|
+
if (e2eeSession === threadId) {
|
|
55
|
+
throw new Error("test setup must use a random E2EE session distinct from threadId");
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const modelWebClients = new Map();
|
|
59
|
+
const modelRoutes = new Map();
|
|
60
|
+
const webSocketA = { readyState: OPEN, OPEN };
|
|
61
|
+
const webSocketB = { readyState: OPEN, OPEN };
|
|
62
|
+
const webSocketC = { readyState: OPEN, OPEN };
|
|
63
|
+
const webKey = `${agentId}:${threadId}`;
|
|
64
|
+
|
|
65
|
+
function modelAddWebClient(ws) {
|
|
66
|
+
let clients = modelWebClients.get(webKey);
|
|
67
|
+
if (!clients) {
|
|
68
|
+
clients = new Set();
|
|
69
|
+
modelWebClients.set(webKey, clients);
|
|
70
|
+
}
|
|
71
|
+
clients.add(ws);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function modelRegister(session, ws) {
|
|
75
|
+
modelRoutes.set(`${agentId}:${session}`, { webKey, ws });
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function modelResolve(routeId) {
|
|
79
|
+
const route = modelRoutes.get(`${agentId}:${routeId}`);
|
|
80
|
+
if (route && route.ws.readyState === route.ws.OPEN) return [route.ws];
|
|
81
|
+
const clients = modelWebClients.get(`${agentId}:${routeId}`) || new Set();
|
|
82
|
+
return [...clients].filter((webWs) => webWs.readyState === webWs.OPEN);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function modelRemoveOwnedRoutes(ws) {
|
|
86
|
+
for (const [routeKey, route] of modelRoutes) {
|
|
87
|
+
if (route.webKey === webKey && route.ws === ws) modelRoutes.delete(routeKey);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function modelRemoveWebClient(ws) {
|
|
92
|
+
const clients = modelWebClients.get(webKey);
|
|
93
|
+
if (!clients) return;
|
|
94
|
+
clients.delete(ws);
|
|
95
|
+
if (clients.size === 0) modelWebClients.delete(webKey);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
modelAddWebClient(webSocketA);
|
|
99
|
+
modelAddWebClient(webSocketB);
|
|
100
|
+
modelRegister(e2eeSession, webSocketA);
|
|
101
|
+
if (modelResolve(e2eeSession)[0] !== webSocketA) {
|
|
102
|
+
throw new Error("random E2EE session did not route to the owning thread web socket");
|
|
103
|
+
}
|
|
104
|
+
const threadTargets = modelResolve(threadId);
|
|
105
|
+
if (threadTargets.length !== 2 || !threadTargets.includes(webSocketA) || !threadTargets.includes(webSocketB)) {
|
|
106
|
+
throw new Error("direct thread fallback did not broadcast to every thread web socket");
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
modelRemoveOwnedRoutes(webSocketA);
|
|
110
|
+
modelRemoveWebClient(webSocketA);
|
|
111
|
+
modelAddWebClient(webSocketC);
|
|
112
|
+
modelRegister(e2eeSession, webSocketC);
|
|
113
|
+
modelRemoveOwnedRoutes(webSocketA);
|
|
114
|
+
if (modelResolve(e2eeSession)[0] !== webSocketC) {
|
|
115
|
+
throw new Error("old socket cleanup removed or stole the replacement E2EE route");
|
|
116
|
+
}
|
|
117
|
+
const remainingThreadTargets = modelResolve(threadId);
|
|
118
|
+
if (remainingThreadTargets.length !== 2 || !remainingThreadTargets.includes(webSocketB) || !remainingThreadTargets.includes(webSocketC)) {
|
|
119
|
+
throw new Error("closing one web socket removed another browser client");
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
console.log("crc e2ee session route checks passed");
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
|
|
3
|
+
const server = readFileSync("src/hosted-mcp/server.mjs", "utf8");
|
|
4
|
+
const loginFiles = [
|
|
5
|
+
"src/hosted-mcp/app/kaleidoscope-login.html",
|
|
6
|
+
"src/hosted-mcp/demo/login.html",
|
|
7
|
+
];
|
|
8
|
+
|
|
9
|
+
function assertContains(source, needle, label) {
|
|
10
|
+
if (!source.includes(needle)) {
|
|
11
|
+
throw new Error(`${label} missing expected text: ${needle}`);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function assertBefore(source, first, second, label) {
|
|
16
|
+
const firstIndex = source.indexOf(first);
|
|
17
|
+
const secondIndex = source.indexOf(second);
|
|
18
|
+
if (firstIndex === -1 || secondIndex === -1 || firstIndex >= secondIndex) {
|
|
19
|
+
throw new Error(`${label} expected "${first}" before "${second}"`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
assertContains(server, "const PAIR_NEXT_REGEX = /^\\/pair\\/[ABCDEFGHJKLMNPQRSTUVWXYZ23456789]{6}$/;", "server pair regex");
|
|
24
|
+
assertContains(server, "const REMOTE_CONTROL_NEXT_REGEX = /^\\/codex-remote-control\\/", "server remote-control regex");
|
|
25
|
+
assertContains(server, "purpose, // \"pair\" | null", "server stores pair purpose");
|
|
26
|
+
assertContains(server, "next: next || null, // sanitized `/pair/<CODE>` or null", "server stores sanitized next");
|
|
27
|
+
assertContains(server, "json(res, 200, { status: \"approved\", agentId: entry.agentId });", "server strips desktop pair status");
|
|
28
|
+
assertContains(server, "json(res, 200, { ok: true, next: entry.next });", "server returns next to phone approve");
|
|
29
|
+
|
|
30
|
+
for (const file of loginFiles) {
|
|
31
|
+
const html = readFileSync(file, "utf8");
|
|
32
|
+
assertContains(html, "function isPairNextOnDesktop()", `${file} desktop pair helper`);
|
|
33
|
+
assertContains(html, "} else if (isPairNextOnDesktop()) {", `${file} auto-start desktop pair QR`);
|
|
34
|
+
assertContains(html, "startQrLogin('', 'signin');", `${file} pair QR uses sign-in mode`);
|
|
35
|
+
assertContains(html, "if (approveResponse && typeof approveResponse.next === 'string' && isWhitelistedNext(approveResponse.next))", `${file} consumes approve next`);
|
|
36
|
+
assertContains(html, "if (urlNext && PAIR_NEXT_REGEX.test(urlNext))", `${file} desktop pair approved branch`);
|
|
37
|
+
assertBefore(html, "if (isPairNextOnDesktop() && !qrSessionMode)", "if (needsCustomQR() && !qrSessionMode)", `${file} create button forces pair QR before normal QR fallback`);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
console.log("crc pair login flow checks passed");
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// Shared footer for all Kaleidoscope pages (production-owned).
|
|
2
|
+
// Include with: <div id="kscope-footer"></div><script src="/app/footer.js"></script>
|
|
3
|
+
(function() {
|
|
4
|
+
var container = document.getElementById('kscope-footer');
|
|
5
|
+
if (!container) return;
|
|
6
|
+
|
|
7
|
+
var mobile = navigator.maxTouchPoints > 0 && window.innerWidth < 768;
|
|
8
|
+
|
|
9
|
+
// Desktop: fixed at bottom. Mobile: in page flow (below fold).
|
|
10
|
+
if (mobile) {
|
|
11
|
+
container.style.cssText = 'background:#FFFDF5;padding:16px 0;';
|
|
12
|
+
} else {
|
|
13
|
+
container.style.cssText = 'position:fixed;bottom:0;left:0;right:0;background:#FFFDF5;padding:16px 0;';
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
var inner = document.createElement('div');
|
|
17
|
+
inner.style.cssText = 'max-width:980px;margin:0 auto;padding:0 24px;border-top:1px solid rgba(0,0,0,0.06);padding-top:16px;text-align:left;font-size:13px;color:#a8a4a0;line-height:1.6;';
|
|
18
|
+
|
|
19
|
+
// On mobile, copyright and links on separate lines (like Apple)
|
|
20
|
+
if (mobile) {
|
|
21
|
+
inner.innerHTML = '<p style="margin:0;">WIP Computer, Inc.</p>'
|
|
22
|
+
+ '<p style="margin:2px 0 0;">Learning Dreaming Machines</p>'
|
|
23
|
+
+ '<p style="margin:8px 0 0;">Copyright © 2026 WIP Computer, Inc. All rights reserved.</p>'
|
|
24
|
+
+ '<p style="margin:4px 0 0;">'
|
|
25
|
+
+ '<a href="/legal/privacy/en-ww/" style="color:#a8a4a0;text-decoration:none;">Privacy Policy</a> | '
|
|
26
|
+
+ '<a href="/legal/internet-services/terms/site.html" style="color:#a8a4a0;text-decoration:none;">Terms of Use</a></p>'
|
|
27
|
+
+ '<p style="margin:4px 0 0;">'
|
|
28
|
+
+ '<a href="/agent.txt" style="color:#a8a4a0;text-decoration:none;">Are you an AI Agent?</a></p>'
|
|
29
|
+
+ '<p style="margin:4px 0 0;">Made in California.</p>';
|
|
30
|
+
} else {
|
|
31
|
+
inner.innerHTML = '<p style="margin:0;">WIP Computer, Inc.</p>'
|
|
32
|
+
+ '<p style="margin:2px 0 0;">Learning Dreaming Machines</p>'
|
|
33
|
+
+ '<p style="margin:8px 0 0;">Copyright © 2026 WIP Computer, Inc. All rights reserved. '
|
|
34
|
+
+ '<a href="/legal/privacy/en-ww/" style="color:#a8a4a0;text-decoration:none;">Privacy Policy</a> | '
|
|
35
|
+
+ '<a href="/legal/internet-services/terms/site.html" style="color:#a8a4a0;text-decoration:none;">Terms of Use</a></p>'
|
|
36
|
+
+ '<p style="margin:4px 0 0;">'
|
|
37
|
+
+ '<a href="/agent.txt" style="color:#a8a4a0;text-decoration:none;">Are you an AI Agent?</a> | '
|
|
38
|
+
+ '<a id="localPasskeysToggle" onclick="toggleLocalPasskeys()" style="color:#a8a4a0;text-decoration:none;cursor:pointer;display:inline-flex;align-items:center;gap:4px;vertical-align:middle;">'
|
|
39
|
+
+ '<span id="passkeys-dot" style="display:inline-block;width:8px;height:8px;border-radius:50%;"></span> '
|
|
40
|
+
+ '<span id="passkeys-label">Local passkeys off</span></a></p>'
|
|
41
|
+
+ '<p style="margin:4px 0 0;">Made in California.</p>';
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
container.appendChild(inner);
|
|
45
|
+
|
|
46
|
+
// Local passkeys toggle
|
|
47
|
+
if (!window.isLocalPasskeysOn) {
|
|
48
|
+
window.isLocalPasskeysOn = function() { return localStorage.getItem('localPasskeys') === 'on'; };
|
|
49
|
+
}
|
|
50
|
+
if (!window.toggleLocalPasskeys) {
|
|
51
|
+
window.toggleLocalPasskeys = function() {
|
|
52
|
+
var on = isLocalPasskeysOn();
|
|
53
|
+
localStorage.setItem('localPasskeys', on ? 'off' : 'on');
|
|
54
|
+
updatePasskeysDot();
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
if (!window.updatePasskeysDot) {
|
|
58
|
+
window.updatePasskeysDot = function() {
|
|
59
|
+
var dot = document.getElementById('passkeys-dot');
|
|
60
|
+
var label = document.getElementById('passkeys-label');
|
|
61
|
+
if (!dot) return;
|
|
62
|
+
if (isLocalPasskeysOn()) {
|
|
63
|
+
dot.style.background = '#2E7D32';
|
|
64
|
+
dot.style.opacity = '1';
|
|
65
|
+
if (label) label.textContent = 'Local passkeys on';
|
|
66
|
+
} else {
|
|
67
|
+
dot.style.background = '#D32F2F';
|
|
68
|
+
dot.style.opacity = '0.4';
|
|
69
|
+
if (label) label.textContent = 'Local passkeys off';
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
updatePasskeysDot();
|
|
74
|
+
})();
|