@ibgib/space-gib 0.0.22 → 0.0.23
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/dist/client/PRIVACY_POLICY.md +144 -0
- package/dist/client/bootstrap.mjs +36 -43
- package/dist/client/chunk-7LVERIWN.mjs +8 -0
- package/dist/client/chunk-JT6UUKP5.mjs +27 -0
- package/dist/client/{chunk-O6EUMDNJ.mjs → chunk-PJDAAEMZ.mjs} +339 -49
- package/dist/client/index.html +1 -1
- package/dist/client/index.mjs +40 -40
- package/dist/client/script.mjs +1 -1
- package/dist/server/server.mjs +100 -91
- package/generate-privacy-html.js +5 -0
- package/package.json +6 -6
- package/src/client/AUTO-GENERATED-version.mts +1 -1
- package/src/client/PRIVACY_POLICY.md +144 -0
- package/src/client/bootstrap.mts +1 -1
- package/src/client/dev-tools/vcs-workspace.mts +16 -4
- package/src/client/index.html +1 -1
- package/src/client/ui/shell/space-gib-shell-service.mts +61 -11
- package/src/server/server.mts +1 -1
- package/dist/client/chunk-772Z4Q4C.mjs +0 -1
- package/dist/client/chunk-XZM4L3U6.mjs +0 -25
package/generate-privacy-html.js
CHANGED
|
@@ -21,9 +21,14 @@ console.log(`${lc} starting...`);
|
|
|
21
21
|
|
|
22
22
|
const privacyMdPath = pathUtils.resolve(__dirname, '../../docs/PRIVACY_POLICY.md');
|
|
23
23
|
const outputHtmlPath = pathUtils.resolve(__dirname, './src/client/privacy.html');
|
|
24
|
+
const outputMdPath = pathUtils.resolve(__dirname, './src/client/PRIVACY_POLICY.md');
|
|
24
25
|
|
|
25
26
|
const mdContent = await readFile(privacyMdPath, { encoding: 'utf8' });
|
|
26
27
|
|
|
28
|
+
// Ensure PRIVACY_POLICY.md is copied to src/client for runtime fetching by <ibgib-privacy-policy>
|
|
29
|
+
await writeFile(outputMdPath, mdContent, { encoding: 'utf8' });
|
|
30
|
+
console.log(`${lc} wrote ${outputMdPath}`);
|
|
31
|
+
|
|
27
32
|
const bodyHtml = convertMarkdownToHtml(mdContent, { linkTarget: '_blank', linkRel: 'noopener' });
|
|
28
33
|
|
|
29
34
|
const fullHtml = `<!DOCTYPE html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibgib/space-gib",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.23",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "ibgib storage and provider service — SaaS at ibgib.space",
|
|
6
6
|
"scripts": {
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
"build:test": "tsc -p tsconfig.test.json"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@ibgib/core-gib": "^0.1.
|
|
16
|
-
"@ibgib/helper-gib": "^0.0.
|
|
17
|
-
"@ibgib/ts-gib": "^0.5.
|
|
18
|
-
"@ibgib/web-gib": "^0.0.
|
|
19
|
-
"@ibgib/node-gib": "^0.0.
|
|
15
|
+
"@ibgib/core-gib": "^0.1.79",
|
|
16
|
+
"@ibgib/helper-gib": "^0.0.38",
|
|
17
|
+
"@ibgib/ts-gib": "^0.5.35",
|
|
18
|
+
"@ibgib/web-gib": "^0.0.65",
|
|
19
|
+
"@ibgib/node-gib": "^0.0.24"
|
|
20
20
|
},
|
|
21
21
|
"engines": {
|
|
22
22
|
"node": ">=20.0.0"
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Privacy Policy
|
|
2
|
+
|
|
3
|
+
**Status**: DRAFT (Active Development)
|
|
4
|
+
**Effective Date**: August 21, 2026
|
|
5
|
+
**Last Updated**: August 21, 2026
|
|
6
|
+
|
|
7
|
+
> [!WARNING]
|
|
8
|
+
> **Draft Notice & Active Development Disclaimer**:
|
|
9
|
+
> This Privacy Policy is currently in **draft status**. The `ibGib` platform, underlying cryptographic keystone engine, and decentralized data graph architecture are under **active research and development**. This document expresses our architectural intent, privacy commitments, and operational principles; however, as the technology is actively evolving, certain features, administrative tooling, and data workflows described herein may be experimental, partially implemented, or subject to change.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 1. Introduction & Overview
|
|
14
|
+
|
|
15
|
+
Welcome to **ibGib**. We are committed to transparency, cryptographic self-sovereignty, and user privacy.
|
|
16
|
+
|
|
17
|
+
This Privacy Policy explains how `ibGib` (including `ibgib.space`, `ibgib.com`, and related open-source applications in this monorepo) collects, uses, stores, and protects your information when you interact with our network, services, and applications.
|
|
18
|
+
|
|
19
|
+
> [!IMPORTANT]
|
|
20
|
+
> **Summary for Everyone**:
|
|
21
|
+
> * **Public Directory**: Just like a public PGP key or public DNS record, your chosen **username**, **registered email address**, and **identity keystone** are part of the public graph so people and your devices can find and authenticate you.
|
|
22
|
+
> * **No Passwords on the Wire**: Your master passphrase, biometric data (Touch ID / Face ID / Windows Hello), and physical security keys (YubiKeys) **never** leave your local device.
|
|
23
|
+
> * **No Data Selling**: We do **not** sell, rent, monetize, or share your personal data with third-party advertisers or data brokers.
|
|
24
|
+
> * **Standard Transport Security**: All communications between your devices and our servers operate over industry-standard **TLS 1.3 / HTTPS** encryption.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 2. Categories of Information We Collect
|
|
29
|
+
|
|
30
|
+
### A. Identity & Public Directory Data
|
|
31
|
+
When you create an account or link authentication methods, the following information is recorded in your identity keystone:
|
|
32
|
+
* **Chosen Username**: A human-readable identifier (e.g. `alice`).
|
|
33
|
+
* **Registered Email Address**: Provided during account creation or SSO linking to enable account discovery, verification, and recovery.
|
|
34
|
+
* **Public Keystone DAG Addresses & Challenge Hashes**: Cryptographic addresses and mathematical challenge hashes ($H = \text{Hash}(S)$) that define your identity's evolution timeline.
|
|
35
|
+
* **Registered Device Delegate Tags**: Public labels for devices authorized to sync on your behalf (e.g. `pwd-alice-desk-a9a0`, `passkey-mobile-b4c1`).
|
|
36
|
+
|
|
37
|
+
### B. Technical, Connection & Log Data
|
|
38
|
+
When accessing our hosted web nodes, standard operational connection data may be logged:
|
|
39
|
+
* **Internet Protocol (IP) Address** and approximate geographic origin.
|
|
40
|
+
* **HTTP/TLS Request Metadata**: Date/time of request, HTTP status code, URL path, and TLS cipher suite.
|
|
41
|
+
* **User-Agent Strings**: Browser type, operating system, and client application version.
|
|
42
|
+
* **Retention**: Operational and access logs are retained for a bounded window (typically **30 to 90 days**) strictly for system reliability, rate limiting, intrusion detection, and security forensics, after which they are automatically rotated and deleted.
|
|
43
|
+
|
|
44
|
+
### C. Workspace & Application Data
|
|
45
|
+
* **User-Created Content**: Notes, comments, graph nodes, and files stored within your tenant workspace.
|
|
46
|
+
* **Storage Status**: Workspace data is stored in tenant-isolated domain spaces. Data in transit is encrypted via TLS 1.3. Data at rest on the server is currently stored unencrypted within your isolated space directory (client-side data encryption is planned as a future capability).
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 3. Public Directory Nature of Identity Keystones
|
|
51
|
+
|
|
52
|
+
> [!WARNING]
|
|
53
|
+
> **Experimental Architecture Notice**:
|
|
54
|
+
> Identity Keystones are built on an innovative Zero-Knowledge Proof (ZKP) Distributed Ledger Technology (DLT) architecture. While designed to eliminate reliance on central certificate authorities, this technology is experimental. See [Section 7](#7securityarchitectur) for detailed security context.
|
|
55
|
+
|
|
56
|
+
### Innovative ZKP DLT vs. Conventional PKI
|
|
57
|
+
`ibGib` is built upon public-key cryptographic principles, but **is not conventional Public Key Infrastructure (PKI)**:
|
|
58
|
+
* Instead of relying on asymmetric digital signatures (RSA, ECDSA) and centralized X.509 Certificate Authorities (CAs), `ibGib` identities utilize a **Zero-Knowledge Proof (ZKP) Distributed Ledger Technology (DLT)** architecture with symmetric hash-reveal challenge-response pools.
|
|
59
|
+
* **Public by Design**: Identity Keystones function as public directory records. Anyone on the network who knows your username or email address can query the server to retrieve your public keystone.
|
|
60
|
+
* **Zero Secret Exposure**: Public keystones contain only public challenge hashes ($H$). Revealing a challenge hash gives an observer zero ability to compute your private secret pre-image ($S$) or act on your behalf.
|
|
61
|
+
* **Biometric & Password Isolation**:
|
|
62
|
+
* Passwords, PINs, and passphrase pre-images are processed strictly inside your local browser memory and discarded.
|
|
63
|
+
* Hardware biometrics (fingerprints, facial recognition) and security keys operate exclusively within your device's hardware Secure Enclave / TPM via the W3C WebAuthn standard. Raw biometric data is never transmitted over the network or accessible to our servers.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## 4. How We Use Your Information
|
|
68
|
+
|
|
69
|
+
We process personal and cryptographic data solely for the following legitimate purposes:
|
|
70
|
+
1. **Identity Resolution & Discovery**: Matching incoming authentication requests and email lookups to the correct tenant domain space.
|
|
71
|
+
2. **Cryptographic Multi-Device Authorization**: Permitting your devices to authorize scoped synchronization claims via local device sync delegates ($D_{\text{device}}$), while the native ibGib sync engine executes graph synchronization.
|
|
72
|
+
3. **Account Verification & Sign-In**: Sending one-time 6-digit verification codes (OTP) to confirm email ownership and authenticate sign-ins.
|
|
73
|
+
4. **Security & Abuse Prevention**: Enforcing rate limits, detecting brute-force attacks, and preventing server abuse.
|
|
74
|
+
|
|
75
|
+
We do **not** use your data for profiling, automated decision-making, or third-party targeted advertising.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## 5. Third-Party Service Providers
|
|
80
|
+
|
|
81
|
+
We utilize minimal third-party services essential to core platform functionality:
|
|
82
|
+
|
|
83
|
+
* **Single Sign-On (SSO) Authentication (Optional)**:
|
|
84
|
+
* **Google OAuth2**: Currently supported for single-tap passwordless account creation and sign-in. When linking Google, we receive verified identity tokens (such as your verified email address and provider user ID) to authenticate your identity. We do not receive or store your Google password.
|
|
85
|
+
* **Future Providers**: We plan to introduce additional OAuth2 providers (such as GitHub and others) in future updates.
|
|
86
|
+
* **Transactional Email & Hosting Infrastructure**:
|
|
87
|
+
* **Transactional Email**: We send emails strictly for transactional account confirmation, sign-in verification codes, and security notices. We never send marketing, newsletter, or promotional spam emails.
|
|
88
|
+
* **Cloud Server & Storage Nodes**: Web nodes, domain space storage, and network routing are hosted on secure cloud infrastructure located in the United States.
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## 6. Immutable Timeline Integrity, Revocations & Data Deletion
|
|
93
|
+
|
|
94
|
+
### Cryptographic Timeline Integrity
|
|
95
|
+
`ibGib` is built on an **append-only, directed acyclic graph (DAG) architecture**. Similar to version control systems (like Git) and cryptographic ledgers (like Bitcoin), timeline records are mathematically linked using cryptographic hashes to ensure data integrity and tamper-evidence. Just as past blocks in a blockchain cannot be modified without destroying cryptographic integrity, historical keystone frames remain part of the verifiable audit chain.
|
|
96
|
+
|
|
97
|
+
### Revocations & Tombstones
|
|
98
|
+
When you modify your identity permissions—such as unlinking a Google SSO provider or revoking a lost device passkey:
|
|
99
|
+
* The system publishes a cryptographically signed **tombstone evolution frame** ($n \to n+1$).
|
|
100
|
+
* This frame officially revokes that authority and unlinks the provider from server-side reverse lookup indices.
|
|
101
|
+
|
|
102
|
+
### Content Takedowns & Full Account Erasure
|
|
103
|
+
1. **Content & Asset Takedowns**: Standalone content nodes and binary file payloads can be unlinked, de-indexed, or removed from server storage upon authorized request or valid legal takedown without compromising structural timeline history.
|
|
104
|
+
2. **Complete Tenant Erasure**: If you request complete account deletion, your entire tenant domain space (including all hosted keystones, delegate frames, and stored data) and reverse email index entries will be permanently purged and removed from server storage.
|
|
105
|
+
3. **Local Device Data Control**: You maintain full control over all data stored locally on your physical devices. You may clear your local cryptographic tokens, delegates, and cached workspace data at any time via the application settings or by clearing your browser's IndexedDB / local storage.
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## 7. Security Architecture & Experimental Protocol Notice
|
|
110
|
+
|
|
111
|
+
### Innovative & Experimental Nature
|
|
112
|
+
Identity Keystones, multi-pool challenge-response mechanisms, and decentralized sync delegates represent innovative, experimental cryptographic protocols. While we apply diligent best efforts in cryptanalysis and utilize industry-standard, proven cryptographic primitives (such as SHA-256, SHA-512, AES, and WebAuthn PRF), the composite architecture is actively evolving. Users should evaluate this platform understanding its experimental research nature.
|
|
113
|
+
|
|
114
|
+
### Conventional Security Foundations
|
|
115
|
+
All communications, API endpoints, and authentication exchanges between your client devices and our server infrastructure operate strictly over industry-standard **TLS 1.3 / HTTPS** encryption. Server-side data isolation, atomic file indexing, and timing side-channel protections are implemented following standard enterprise security practices.
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## 8. Your Privacy Rights (Texas TDPSA & US State Privacy Laws)
|
|
120
|
+
|
|
121
|
+
If you are a resident of Texas (governed by the **Texas Data Privacy and Security Act - TDPSA**) or other jurisdictions with applicable privacy legislation, you have the following rights regarding your personal data:
|
|
122
|
+
|
|
123
|
+
* **Right to Know / Access**: You have the right to confirm whether we process your personal data and to access such data.
|
|
124
|
+
* **Right to Correct**: You have the right to correct inaccuracies in your personal data.
|
|
125
|
+
* **Right to Delete**: You have the right to request deletion of personal data provided by or obtained about you.
|
|
126
|
+
* **Right to Data Portability**: You have the right to obtain a copy of your personal data in a portable and readily usable format.
|
|
127
|
+
* **Right to Opt-Out of Sale / Targeted Advertising**: We do **not** sell your personal data or process it for targeted advertising, so no opt-out is necessary.
|
|
128
|
+
* **Right to Non-Discrimination**: We will never discriminate against you, deny services, or alter pricing for exercising your privacy rights.
|
|
129
|
+
|
|
130
|
+
### How to Exercise Your Rights
|
|
131
|
+
To submit a privacy inquiry, request data export, or request permanent deletion of your tenant domain space, please contact us using the information in Section 9 below. We will verify your identity (using your registered email or cryptographic keystone proof) and respond within the statutory timeframe (typically 45 days).
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## 9. Contact Information & Policy Updates
|
|
136
|
+
|
|
137
|
+
### Contact Us
|
|
138
|
+
If you have questions, comments, or requests regarding this Privacy Policy or our data handling practices, please reach out to us:
|
|
139
|
+
|
|
140
|
+
* **Open-Source Packages**: Published on **npm** under the `@ibgib` scope.
|
|
141
|
+
* **Email / Privacy Inquiries**: `ibgib.info@gmail.com`
|
|
142
|
+
|
|
143
|
+
### Updates to This Policy
|
|
144
|
+
We may update this Privacy Policy from time to time to reflect architectural advancements, legal requirements, or operational changes. When changes are made, the "Last Updated" date at the top of this document will be updated. We encourage you to review this policy periodically.
|
package/src/client/bootstrap.mts
CHANGED
|
@@ -45,7 +45,7 @@ const hasDevProfile = clientProfiles.some(p => p.endsWith('.dev'));
|
|
|
45
45
|
const hasStagingProfile = clientProfiles.some(p => p.endsWith('.staging'));
|
|
46
46
|
|
|
47
47
|
if (isProdEnv && (hasDevProfile || hasStagingProfile)) {
|
|
48
|
-
throw new Error(`Security Violation: Non-production keystone profiles are prohibited when NODE_ENV=production. Active client profiles: ${clientProfiles.join(', ')}. (E:
|
|
48
|
+
throw new Error(`Security Violation: Non-production keystone profiles are prohibited when NODE_ENV=production. Active client profiles: ${clientProfiles.join(', ')}. (E: genuuid)`);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
if (hasDevProfile) {
|
|
@@ -12,8 +12,10 @@ import { InnerSpace_V1 } from '@ibgib/core-gib/dist/witness/space/inner-space/in
|
|
|
12
12
|
import { DEFAULT_INNER_SPACE_DATA_V1 } from '@ibgib/core-gib/dist/witness/space/inner-space/inner-space-types.mjs';
|
|
13
13
|
import { getB2tFSBranchSpaceName } from '@ibgib/core-gib/dist/vcs/branch/branch-helper.mjs';
|
|
14
14
|
import { VcsRepository } from '@ibgib/core-gib/dist/vcs/vcs-repository.mjs';
|
|
15
|
+
import { VCS_DEFAULT_FOLDER_NAME } from '@ibgib/core-gib/dist/vcs/vcs-core-constants.mjs';
|
|
15
16
|
|
|
16
17
|
import { devLog, lc } from './common.mjs';
|
|
18
|
+
import { B2TFS_BRANCH_DEFAULT_NAME } from '@ibgib/core-gib/dist/vcs/branch/branch-constants.mjs';
|
|
17
19
|
|
|
18
20
|
interface VcsDevState {
|
|
19
21
|
backingSpace?: InnerSpace_V1;
|
|
@@ -68,7 +70,7 @@ export function initVcsInitButton(): void {
|
|
|
68
70
|
name: 'web_ws_space_main',
|
|
69
71
|
uuid: 'web_ws_uuid',
|
|
70
72
|
workspaceRoot: '/',
|
|
71
|
-
vcsFolderName:
|
|
73
|
+
vcsFolderName: VCS_DEFAULT_FOLDER_NAME,
|
|
72
74
|
},
|
|
73
75
|
backingSpace,
|
|
74
76
|
});
|
|
@@ -80,7 +82,8 @@ export function initVcsInitButton(): void {
|
|
|
80
82
|
metaspace,
|
|
81
83
|
workspaceSpace: wsSpace,
|
|
82
84
|
localSpace: backingSpace,
|
|
83
|
-
|
|
85
|
+
vcsFolderName: VCS_DEFAULT_FOLDER_NAME,
|
|
86
|
+
repoRoot: undefined,
|
|
84
87
|
enableBranchLocking: true,
|
|
85
88
|
});
|
|
86
89
|
vcsDevState.repo = repo;
|
|
@@ -88,7 +91,7 @@ export function initVcsInitButton(): void {
|
|
|
88
91
|
// 4. Initialize repository
|
|
89
92
|
await repo.init({
|
|
90
93
|
rootFolderName: 'my-app',
|
|
91
|
-
|
|
94
|
+
branchName: B2TFS_BRANCH_DEFAULT_NAME,
|
|
92
95
|
});
|
|
93
96
|
|
|
94
97
|
// 5. Seed initial files into virtual workspace
|
|
@@ -98,7 +101,16 @@ export function initVcsInitButton(): void {
|
|
|
98
101
|
wsSpace.setVirtualFile('.ibgibignore', 'node_modules/\n*.log\n');
|
|
99
102
|
|
|
100
103
|
// 6. Initial stage & commit
|
|
101
|
-
await repo.
|
|
104
|
+
const indexIbGib = await repo.getIndexIbGib();
|
|
105
|
+
const activeBranchSpace = await repo.getActiveBranchSpace(indexIbGib);
|
|
106
|
+
await repo.add([], {
|
|
107
|
+
all: true,
|
|
108
|
+
indexIbGib,
|
|
109
|
+
activeBranchSpace,
|
|
110
|
+
repoRoot: repo.repoRoot!,
|
|
111
|
+
paths: undefined,
|
|
112
|
+
targetDir: undefined,
|
|
113
|
+
});
|
|
102
114
|
const commitRes = await repo.commit({ message: 'Initial repository commit' });
|
|
103
115
|
|
|
104
116
|
devLog(`✅ In-Memory Repo initialized via VcsRepository!\n Commit: ${commitRes.commitAddr.slice(0, 8)}\n Files: ${wsSpace.listVirtualPaths().join(', ')}`);
|
package/src/client/index.html
CHANGED
|
@@ -308,7 +308,7 @@
|
|
|
308
308
|
<p class="footer-text">
|
|
309
309
|
<span>© ibgib contributors</span> ·
|
|
310
310
|
<a href="https://ibgib.space" class="footer-link">ibgib.space</a> ·
|
|
311
|
-
<a href="
|
|
311
|
+
<a href="#" id="link-privacy-policy" class="footer-link">Privacy Policy</a>
|
|
312
312
|
</p>
|
|
313
313
|
</footer>
|
|
314
314
|
|
|
@@ -11,12 +11,17 @@ import {
|
|
|
11
11
|
ID_FOOTER_RESIZER, ID_BTN_LEFT_PANEL_TOGGLE, ID_BTN_RIGHT_PANEL_TOGGLE,
|
|
12
12
|
ID_BTN_CREATE_KEYSTONE, ID_CENTER_PANEL_CONTENT
|
|
13
13
|
} from "./space-gib-shell-constants.mjs";
|
|
14
|
-
import {
|
|
14
|
+
import {
|
|
15
|
+
EVENT_IBGIB_SHELL_READY, EVENT_IBGIB_UI_BUSY, EVENT_IBGIB_UI_MESSAGE,
|
|
16
|
+
UI_ACTION_SHOW_IDENTITY_MANAGER, UI_ACTION_SHOW_KEYSTONE_CREATOR,
|
|
17
|
+
UI_ACTION_SHOW_ADD_DEVICE, UI_ACTION_SHOW_PRIVACY_POLICY
|
|
18
|
+
} from "@ibgib/web-gib/dist/ui/ui-constants.mjs";
|
|
15
19
|
import { showFullscreenDialog, FullscreenDialogController } from "@ibgib/web-gib/dist/ui/ui-helpers.mjs";
|
|
16
20
|
import { getIbGibAddr } from "@ibgib/ts-gib/dist/helper.mjs";
|
|
17
21
|
import { getKeystoneSyncService } from "@ibgib/web-gib/dist/identity/keystone-sync-service.mjs";
|
|
18
22
|
import { PanelState } from "./space-gib-shell-types.mjs";
|
|
19
23
|
import { registerStandardIdentityComponents } from "@ibgib/web-gib/dist/ui/component/identity/index.mjs";
|
|
24
|
+
import { registerPrivacyPolicyComponent } from "@ibgib/web-gib/dist/ui/component/privacy-policy/index.mjs";
|
|
20
25
|
|
|
21
26
|
export class SpaceGibShellService {
|
|
22
27
|
private lc: string = `[SpaceGibShellService]`;
|
|
@@ -99,14 +104,25 @@ export class SpaceGibShellService {
|
|
|
99
104
|
btnCreate.addEventListener('click', () => this.showIdentityManager());
|
|
100
105
|
}
|
|
101
106
|
|
|
107
|
+
// Privacy Policy Link
|
|
108
|
+
const linkPrivacy = document.getElementById('link-privacy-policy');
|
|
109
|
+
if (linkPrivacy) {
|
|
110
|
+
linkPrivacy.addEventListener('click', (e) => {
|
|
111
|
+
e.preventDefault();
|
|
112
|
+
this.showPrivacyPolicy();
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
|
|
102
116
|
window.addEventListener(EVENT_IBGIB_UI_MESSAGE, (ev: any) => {
|
|
103
117
|
const action = ev.detail?.action;
|
|
104
|
-
if (action ===
|
|
118
|
+
if (action === UI_ACTION_SHOW_IDENTITY_MANAGER) {
|
|
105
119
|
this.showIdentityManager();
|
|
106
|
-
} else if (action ===
|
|
120
|
+
} else if (action === UI_ACTION_SHOW_KEYSTONE_CREATOR) {
|
|
107
121
|
this.showKeystoneCreator();
|
|
108
|
-
} else if (action ===
|
|
122
|
+
} else if (action === UI_ACTION_SHOW_ADD_DEVICE) {
|
|
109
123
|
this.showAddDevice();
|
|
124
|
+
} else if (action === UI_ACTION_SHOW_PRIVACY_POLICY) {
|
|
125
|
+
this.showPrivacyPolicy();
|
|
110
126
|
}
|
|
111
127
|
});
|
|
112
128
|
|
|
@@ -154,19 +170,25 @@ export class SpaceGibShellService {
|
|
|
154
170
|
public async showIdentityManager() {
|
|
155
171
|
const lc = `${this.lc}[${this.showIdentityManager.name}]`;
|
|
156
172
|
try {
|
|
157
|
-
// 2. Instantiate and inject the component
|
|
158
173
|
const componentSvc = await getComponentSvc();
|
|
159
|
-
|
|
174
|
+
|
|
175
|
+
// create the component
|
|
176
|
+
const identityMgrComponent = await componentSvc.getComponentInstance({
|
|
160
177
|
path: 'ibgib-identity-manager',
|
|
161
178
|
ibGibAddr: ROOT_ADDR, // Virtual address for initial render
|
|
162
179
|
useRegExpPrefilter: true,
|
|
163
180
|
});
|
|
181
|
+
if (!identityMgrComponent) { throw new Error(`(UNEXPECTED) identityMgrComponent falsy? (E: b814f2d7818811b87e31851835017b26)`); }
|
|
164
182
|
|
|
183
|
+
// get a ref to the parent container
|
|
165
184
|
const centerPanel = document.getElementById(ID_CENTER_PANEL_CONTENT);
|
|
166
|
-
if (centerPanel
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
185
|
+
if (!centerPanel) { throw new Error(`(UNEXPECTED) centerPanel falsy? (E: 769e952153b6af539a8e4ba9ff3c8126)`); }
|
|
186
|
+
|
|
187
|
+
// inject via componentSvc
|
|
188
|
+
await componentSvc.inject({
|
|
189
|
+
parentEl: centerPanel,
|
|
190
|
+
componentToInject: identityMgrComponent
|
|
191
|
+
});
|
|
170
192
|
} catch (error) {
|
|
171
193
|
console.error(`${lc} ${extractErrorMsg(error)}`);
|
|
172
194
|
}
|
|
@@ -213,6 +235,33 @@ export class SpaceGibShellService {
|
|
|
213
235
|
}
|
|
214
236
|
}
|
|
215
237
|
|
|
238
|
+
public async showPrivacyPolicy() {
|
|
239
|
+
const lc = `${this.lc}[${this.showPrivacyPolicy.name}]`;
|
|
240
|
+
try {
|
|
241
|
+
const componentSvc = await getComponentSvc();
|
|
242
|
+
|
|
243
|
+
// create the component
|
|
244
|
+
const privacyComponent = await componentSvc.getComponentInstance({
|
|
245
|
+
path: 'ibgib-privacy-policy',
|
|
246
|
+
ibGibAddr: ROOT_ADDR, // Virtual address for initial render
|
|
247
|
+
useRegExpPrefilter: true,
|
|
248
|
+
});
|
|
249
|
+
if (!privacyComponent) { throw new Error(`(UNEXPECTED) privacyComponent falsy? (E: 74b8742dee3b6c19a1784ec99cf1d526)`); }
|
|
250
|
+
|
|
251
|
+
// get a ref to the parent container
|
|
252
|
+
const centerPanel = document.getElementById(ID_CENTER_PANEL_CONTENT);
|
|
253
|
+
if (!centerPanel) { throw new Error(`(UNEXPECTED) centerPanel falsy? (E: 786a1373bc0fa22bc83f1fdaeab3b126)`); }
|
|
254
|
+
|
|
255
|
+
// inject via componentSvc
|
|
256
|
+
await componentSvc.inject({
|
|
257
|
+
parentEl: centerPanel,
|
|
258
|
+
componentToInject: privacyComponent
|
|
259
|
+
});
|
|
260
|
+
} catch (error) {
|
|
261
|
+
console.error(`${lc} ${extractErrorMsg(error)}`);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
216
265
|
private toggleLeftPanel() {
|
|
217
266
|
this.leftPanelState = this.leftPanelState === 'expanded' ? 'collapsed' : 'expanded';
|
|
218
267
|
const panel = document.getElementById(ID_LEFT_PANEL);
|
|
@@ -275,7 +324,8 @@ export class SpaceGibShellService {
|
|
|
275
324
|
private async registerComponents(): Promise<void> {
|
|
276
325
|
const lc = `${this.lc}[${this.registerComponents.name}]`;
|
|
277
326
|
try {
|
|
278
|
-
registerStandardIdentityComponents();
|
|
327
|
+
await registerStandardIdentityComponents();
|
|
328
|
+
await registerPrivacyPolicyComponent();
|
|
279
329
|
} catch (error) {
|
|
280
330
|
console.error(`${lc} ${extractErrorMsg(error)}`);
|
|
281
331
|
}
|
package/src/server/server.mts
CHANGED
|
@@ -40,7 +40,7 @@ async function main(): Promise<void> {
|
|
|
40
40
|
|
|
41
41
|
const custodianPrimaryProfile = (process.env.KEYSTONE_PROFILE_CUSTODIAN_PRIMARY || '').trim();
|
|
42
42
|
if (!custodianPrimaryProfile) {
|
|
43
|
-
throw new Error(`${lc} Fatal Error: KEYSTONE_PROFILE_CUSTODIAN_PRIMARY environment variable is missing or blank. (E:
|
|
43
|
+
throw new Error(`${lc} Fatal Error: KEYSTONE_PROFILE_CUSTODIAN_PRIMARY environment variable is missing or blank. (E: genuuid)`);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
const isProdEnv = process.env.NODE_ENV === 'production';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{E as I,Ua as A,a as l,bc as S,gd as _,j as o,ja as i,ka as G,md as D,nd as T,v as u}from"./chunk-XZM4L3U6.mjs";var L={undefined:"undefined",preparing:"preparing",started:"started",inserted:"inserted",updated:"updated",merged_dna:"merged_dna",merged_state:"merged_state",already_synced:"already_synced",completed:"completed"},O={...G},U={...O,sync:"sync"};var v=" ";var C=!1;function x({sagaId:c,statusCode:e,spaceType:t,spaceSubtype:r,delimiter:s}){let n=`[${x.name}]`;try{if(!c)throw new Error("sagaId required. (E: cfc923bb29ee4aa788e947b6416740e6)");if(e==null)throw new Error("status code required. (E: 4e0d232a9955496695012623c2e17ca2)");if(!Object.values(L).includes(e))throw new Error(`invalid status code (${e}) (E: 91d7655424c44d9680fff099ee2b54d2)`);if(!t)throw new Error("spaceType required. (E: 86e98694a56a4f599e98e50abf0eed43)");if(!r)throw new Error("spaceSubtype required. (E: 4857d4677ee34e95aeb2251dd633909e)");return s=s||v,`status ${c} ${e} ${t} ${r}`}catch(a){throw console.error(`${n} ${o(a)}`),a}}l(x,"getStatusIb");function j({participants:c}){let e=`[${j.name}]`;try{C&&console.log(`${e} starting... (I: 43c9a4f1fa1bbc944b98f8eed2f81924)`);let t=c.filter(r=>r.s_d==="src");if(t.length!==1)throw new Error("(UNEXPECTED) participants_src.length !== 1? atow (03/2024) only one src participant is expected. (E: ed4b3ae15f5da34c77655553aaf82224)");return t.at(0).id}catch(t){throw console.error(`${e} ${o(t)}`),t}finally{C&&console.log(`${e} complete.`)}}l(j,"getSrcLocalSpaceId");var d=!1,P=class c extends _{static{l(this,"SpaceBase_V1")}lc=`[${c.name}]`;cacheSvc;constructor(e,t){super(e,t),this.initialized=this.initialize()}async witnessImpl(e){let t=`${this.lc}[${this.witnessImpl.name}]`;return d&&console.log(`${t}`),await this.routeAndDoCommand({cmd:e.data.cmd,cmdModifiers:e.data.cmdModifiers??[],arg:e})}routeAndDoCommand({cmd:e,cmdModifiers:t,arg:r}){let s=`${this.lc}[${this.routeAndDoCommand.name}]`;switch(e){case i.get:return(t??[]).length===0?this.get(r):t.includes("can")?this.canGet(r):t.includes("latest")?t.includes("addrs")?this.getLatestAddrs(r):this.getLatestIbGibs(r):t.includes("tjps")?t.includes("addrs")?this.getTjpAddrs(r):this.getTjpIbGibs(r):t.includes("addrs")?this.getAddrs(r):t.includes("dependency-graph")?this.getDependencyGraph(r):this.get(r);case i.put:return(t??[]).length===0?this.put(r):t.includes("can")?this.canPut(r):this.put(r);case i.delete:return(t??[]).length===0?this.delete(r):t.includes("can")?this.canDelete(r):this.delete(r);default:throw new Error(`${s} unknown cmd: ${e}. cmdModifiers: ${t}`)}}get(e){return this.getImpl(e)}put(e){return this.putImpl(e)}delete(e){return this.deleteImpl(e)}deleteImpl(e){let t=`${this.lc}[${this.deleteImpl.name}]`;throw new Error(`${t} not implemented in base class`)}getAddrs(e){return this.getAddrsImpl(e)}getAddrsImpl(e){let t=`${this.lc}[${this.getAddrsImpl.name}]`;throw new Error(`${t} not implemented in base class`)}getLatestIbGibs(e){return this.getLatestIbGibsImpl(e)}getLatestIbGibsImpl(e){let t=`${this.lc}[${this.getLatestIbGibsImpl.name}]`;throw new Error(`${t} not implemented in base class`)}getLatestAddrs(e){return this.getLatestAddrsImpl(e)}getLatestAddrsImpl(e){let t=`${this.lc}[${this.getLatestAddrsImpl.name}]`;throw new Error(`${t} not implemented in base class`)}getTjpIbGibs(e){return this.getTjpIbGibsImpl(e)}getTjpIbGibsImpl(e){let t=`${this.lc}[${this.getTjpIbGibsImpl.name}]`;throw new Error(`${t} not implemented in base class`)}getTjpAddrs(e){return this.getTjpAddrsImpl(e)}getTjpAddrsImpl(e){let t=`${this.lc}[${this.getTjpAddrsImpl.name}]`;throw new Error(`${t} not implemented in base class`)}canGet(e){return this.canGetImpl(e)}canGetImpl(e){let t=`${this.lc}[${this.canGetImpl.name}]`;throw new Error(`${t} not implemented in base class`)}canPut(e){return this.canPutImpl(e)}canPutImpl(e){let t=`${this.lc}[${this.canPutImpl.name}]`;throw new Error(`${t} not implemented in base class`)}canDelete(e){return this.canPutImpl(e)}canDeleteImpl(e){let t=`${this.lc}[${this.canDeleteImpl.name}]`;throw new Error(`${t} not implemented in base class`)}getDependencyGraph(e){return this.getDependencyGraphImpl(e)}async getDependencyGraphImpl(e){let t=`${this.lc}[${this.getDependencyGraphImpl.name}]`;try{if(d&&console.log(`${t} starting... (I: 0e5fe807a0169224781f6c2833f34826)`),!e.data)throw new Error("(UNEXPECTED) arg.data falsy? (E: 45eba816295a97a0e55f981861a03f26)");if((e.data.ibGibAddrs??[]).length===0)throw new Error("arg.data.ibGibAddrs is falsy/empty (E: 70adc939c7b80c9938d8fa18fd7c5826)");let r={space:this,ibGibAddrs:e.data.ibGibAddrs,live:e.data.live||!0},s=await S(r),n=Object.values(s),a={optsAddr:u({ibGib:e}),count:n.length,addrs:Object.keys(s)};return this.resulty({resultData:a,ibGibs:n})}catch(r){throw console.error(`${t} ${o(r)}`),r}finally{d&&console.log(`${t} complete.`)}}async validateWitnessArg(e){let t=`${this.lc}[${this.validateWitnessArg.name}]`,r=[];try{if(r=await super.validateWitnessArg(e),!e.data)return r.push("arg.data required (E: 8ee544d7d88a45c6adcbc15838a283a7)"),r;if(!this.data)return r.push("this.data required (E: 64f80642d7de44329355d6f907e272c8)"),r;let{cmd:s,ibGibAddrs:n}=e.data,a=e.data.cmdModifiers??[],f=e.ibGibs;s||r.push("arg.data.cmd required (E: 72a11ee87a0d4896bcacd65a9c0284d9)"),Object.values(i).includes(s)||r.push(`unknown arg.data.cmd: ${s}. (E: 95282ce61e97429f8049e61ec9f14f0b)`);let w=n?.length??0;if(s===i.get&&!a?.includes("addrs")&&!a?.includes("latest")&&w===0&&r.push(`ibGibAddrs required when cmd is ${s}. (E: ee55a3f60b90423cbe054f27c34ab7d5)`),s===i.put){d&&console.log(`${t} validate put cmd`);let g=f?.length??0;if(g===0)r.push(`ibGibs required when cmd is ${s}. (E: b3a422169f7344a48a1d44e7ad1ba44e)`);else if(this.data.validateIbGibAddrsMatchIbGibs)if(d&&console.log(`${t} validateIbGibAddrsMatchIbGibs true, so doing so.`),g!==w)r.push("ibGibsLength !== ibGibAddrsLength and this.data.validateIbGibAddrsMatchIbGibs is true. (E: 6c6bf824ab32443aa4d6b8bf4f8113dd)");else{d&&console.log(`${t} validateIbGibAddrsMatchIbGibs, lengths match. validating intrinsically`);let $=n.concat();for(let h=0;h<f.length;h++){let m=f[h],y=await I({ibGib:m});if(y?.length??!1){let p=u({ibGib:m});y.forEach(b=>r.push(`(${p}) ERROR: ${b}`))}else{let p=u({ibGib:m}),b=$.indexOf(p);if(b===-1){r.push(`ibGibAddrs don't map to calculated ibGib addrs. calculated Addr: (${p}) (E: b21b3a7a74db43e5a8722acc97274646)`);break}else $.splice(b,1)}}}}return r}catch(s){throw console.error(`${t} ${o(s)}`),s}finally{r?.length>0&&console.error(`${t} errors: ${r}`)}}async argy({argData:e,ibMetadata:t,noTimestamp:r,ibGibs:s}){let n=await D({argData:e,ibMetadata:t,noTimestamp:r});return s&&(n.ibGibs=s),n}async resulty({resultData:e,ibGibs:t}){let r=await T({ibMetadata:A({space:this}),resultData:e});return t&&(r.ibGibs=t),r}};export{P as a,L as b,x as c,j as d};
|