From fff249aa05a935a467eb126facd2644349ce832d Mon Sep 17 00:00:00 2001 From: "Luis Guzman (AppDevForAll)" Date: Wed, 28 Oct 2026 15:29:49 -0600 Subject: [PATCH] chore(conex-core): rename the content-exchange cx abbreviation to conex Rename "cx" to "conex" across the content-exchange subsystem: conex-core service, the conex_core module and role, the conex-proxy relay, the ConexCore* Android sources, the CONEX_* env vars and the .conex-staging dir. Behavior unchanged; dash-node bumped to 1.4.6. --- .../data/BoxImportStaging.java | 12 ++-- ...taSource.java => ConexCoreDataSource.java} | 28 ++++----- ...Source.java => ConexCoreDeleteSource.java} | 10 ++-- ...Source.java => ConexCoreExportSource.java} | 14 ++--- ...Source.java => ConexCoreImportSource.java} | 10 ++-- .../data/ContentRepositoryImpl.java | 8 +-- .../data/NetworkImportCarrier.java | 6 +- .../domain/ShareInviteValidator.java | 4 +- .../domain/ShareTransport.java | 4 +- .../presentation/ContentDeleteService.java | 6 +- .../presentation/ContentExportService.java | 8 +-- .../presentation/ContentImportService.java | 6 +- .../ContentManagerViewModelFactory.java | 4 +- .../presentation/ContentReceiveFragment.java | 2 +- .../presentation/ContentShareService.java | 18 +++--- .../ImportReviewViewModelFactory.java | 8 +-- .../presentation/ShareSession.java | 6 +- .../layout/fragment_k2go_content_share.xml | 2 +- .../main/res/xml/network_security_config.xml | 4 +- ...posure.md => conex-core-share-exposure.md} | 56 ++++++++--------- iiab-android | 18 +++--- static/{cx-core => conex-core}/.gitignore | 0 static/{cx-core => conex-core}/CHANGELOG.md | 6 +- static/{cx-core => conex-core}/README.md | 34 +++++------ .../conex_core}/__init__.py | 2 +- .../conex_core}/__main__.py | 2 +- .../conex_core}/adapters/__init__.py | 0 .../conex_core}/adapters/calibre.py | 2 +- .../conex_core}/adapters/calibreweb.py | 2 +- .../conex_core}/adapters/kiwix.py | 0 .../conex_core}/adapters/kolibri.py | 6 +- .../conex_core}/config.py | 22 +++---- .../conex_core}/export.py | 0 .../conex_core}/export_ops.py | 2 +- .../conex_core}/importing.py | 0 .../conex_core}/model.py | 0 .../conex_core}/ports.py | 0 .../conex_core}/registry.py | 2 +- .../conex_core}/router.py | 0 .../conex_core}/server.py | 4 +- .../conex_core}/share_ops.py | 2 +- .../{cx-core => conex-core}/tests/__init__.py | 0 .../tests/test_calibre.py | 6 +- .../tests/test_calibreweb.py | 2 +- .../tests/test_config.py | 10 ++-- .../tests/test_export.py | 2 +- .../tests/test_export_ops.py | 8 +-- .../tests/test_importing.py | 2 +- .../tests/test_kiwix.py | 6 +- .../tests/test_kolibri.py | 6 +- .../tests/test_model.py | 2 +- .../tests/test_router.py | 14 ++--- .../tests/test_server.py | 10 ++-- .../tests/test_share_ops.py | 14 ++--- static/dashboard/CHANGELOG.md | 3 +- static/dashboard/package.json | 4 +- static/dashboard/routes.ts | 8 +-- .../{cx-proxy.test.ts => conex-proxy.test.ts} | 24 ++++---- .../sockets/{cx-proxy.ts => conex-proxy.ts} | 20 +++---- static/pdsm/{cx-core => conex-core} | 30 +++++----- tools/rootfs-builder/build-iiab-rootfs.sh | 4 +- .../{cx_core => conex_core}/defaults/main.yml | 28 ++++----- .../tasks/enable-or-disable.yml | 50 ++++++++-------- .../{cx_core => conex_core}/tasks/install.yml | 46 +++++++------- .../overlays/roles/conex_core/tasks/main.yml | 60 +++++++++++++++++++ .../templates/conex-core-share-nginx.conf.j2} | 20 +++---- .../templates/conex-core.service.j2} | 8 +-- .../overlays/roles/cx_core/tasks/main.yml | 60 ------------------- 68 files changed, 384 insertions(+), 383 deletions(-) rename controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/{CxCoreDataSource.java => ConexCoreDataSource.java} (94%) rename controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/{CxCoreDeleteSource.java => ConexCoreDeleteSource.java} (82%) rename controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/{CxCoreExportSource.java => ConexCoreExportSource.java} (92%) rename controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/{CxCoreImportSource.java => ConexCoreImportSource.java} (91%) rename controller/docs/{cx-core-share-exposure.md => conex-core-share-exposure.md} (82%) rename static/{cx-core => conex-core}/.gitignore (100%) rename static/{cx-core => conex-core}/CHANGELOG.md (78%) rename static/{cx-core => conex-core}/README.md (83%) rename static/{cx-core/cx_core => conex-core/conex_core}/__init__.py (83%) rename static/{cx-core/cx_core => conex-core/conex_core}/__main__.py (66%) rename static/{cx-core/cx_core => conex-core/conex_core}/adapters/__init__.py (100%) rename static/{cx-core/cx_core => conex-core/conex_core}/adapters/calibre.py (99%) rename static/{cx-core/cx_core => conex-core/conex_core}/adapters/calibreweb.py (99%) rename static/{cx-core/cx_core => conex-core/conex_core}/adapters/kiwix.py (100%) rename static/{cx-core/cx_core => conex-core/conex_core}/adapters/kolibri.py (98%) rename static/{cx-core/cx_core => conex-core/conex_core}/config.py (67%) rename static/{cx-core/cx_core => conex-core/conex_core}/export.py (100%) rename static/{cx-core/cx_core => conex-core/conex_core}/export_ops.py (99%) rename static/{cx-core/cx_core => conex-core/conex_core}/importing.py (100%) rename static/{cx-core/cx_core => conex-core/conex_core}/model.py (100%) rename static/{cx-core/cx_core => conex-core/conex_core}/ports.py (100%) rename static/{cx-core/cx_core => conex-core/conex_core}/registry.py (98%) rename static/{cx-core/cx_core => conex-core/conex_core}/router.py (100%) rename static/{cx-core/cx_core => conex-core/conex_core}/server.py (98%) rename static/{cx-core/cx_core => conex-core/conex_core}/share_ops.py (99%) rename static/{cx-core => conex-core}/tests/__init__.py (100%) rename static/{cx-core => conex-core}/tests/test_calibre.py (98%) rename static/{cx-core => conex-core}/tests/test_calibreweb.py (95%) rename static/{cx-core => conex-core}/tests/test_config.py (75%) rename static/{cx-core => conex-core}/tests/test_export.py (96%) rename static/{cx-core => conex-core}/tests/test_export_ops.py (98%) rename static/{cx-core => conex-core}/tests/test_importing.py (97%) rename static/{cx-core => conex-core}/tests/test_kiwix.py (98%) rename static/{cx-core => conex-core}/tests/test_kolibri.py (98%) rename static/{cx-core => conex-core}/tests/test_model.py (98%) rename static/{cx-core => conex-core}/tests/test_router.py (97%) rename static/{cx-core => conex-core}/tests/test_server.py (95%) rename static/{cx-core => conex-core}/tests/test_share_ops.py (98%) rename static/dashboard/sockets/{cx-proxy.test.ts => conex-proxy.test.ts} (87%) rename static/dashboard/sockets/{cx-proxy.ts => conex-proxy.ts} (77%) rename static/pdsm/{cx-core => conex-core} (77%) rename tools/upstream-patches/overlays/roles/{cx_core => conex_core}/defaults/main.yml (79%) rename tools/upstream-patches/overlays/roles/{cx_core => conex_core}/tasks/enable-or-disable.yml (55%) rename tools/upstream-patches/overlays/roles/{cx_core => conex_core}/tasks/install.yml (51%) create mode 100644 tools/upstream-patches/overlays/roles/conex_core/tasks/main.yml rename tools/upstream-patches/overlays/roles/{cx_core/templates/cx-core-share-nginx.conf.j2 => conex_core/templates/conex-core-share-nginx.conf.j2} (69%) rename tools/upstream-patches/overlays/roles/{cx_core/templates/cx-core.service.j2 => conex_core/templates/conex-core.service.j2} (56%) delete mode 100644 tools/upstream-patches/overlays/roles/cx_core/tasks/main.yml diff --git a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/BoxImportStaging.java b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/BoxImportStaging.java index bdb492f72..5d81b3a08 100644 --- a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/BoxImportStaging.java +++ b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/BoxImportStaging.java @@ -6,9 +6,9 @@ * Description : K2GO-427. Bridges one SAF-read archive to a box-visible path the core can ingest. * proot runs with -r and no separate bind for /library, so box /library maps * to host /library (EnvironmentControl.rootfs = filesDir/rootfs/installed-rootfs/ - * iiab). This writes the staged archive under host /library/.cx-staging and - * reports the matching box path /library/.cx-staging/ for POST /v1/import/item. - * The core default CX_STAGING_DIR is /library/.cx-staging (its is_within_dir guard). + * iiab). This writes the staged archive under host /library/.conex-staging and + * reports the matching box path /library/.conex-staging/ for POST /v1/import/item. + * The core default CONEX_STAGING_DIR is /library/.conex-staging (its is_within_dir guard). * ============================================================================ */ package org.appdevforall.k2go.contentexchange.data; @@ -25,9 +25,9 @@ public final class BoxImportStaging { - /** The box-side import area, matching the core's default {@code CX_STAGING_DIR}. */ - private static final String BOX_STAGING_DIR = "/library/.cx-staging"; - private static final String HOST_STAGING_SUBPATH = "library/.cx-staging"; + /** The box-side import area, matching the core's default {@code CONEX_STAGING_DIR}. */ + private static final String BOX_STAGING_DIR = "/library/.conex-staging"; + private static final String HOST_STAGING_SUBPATH = "library/.conex-staging"; private final File hostDir; diff --git a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/CxCoreDataSource.java b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/ConexCoreDataSource.java similarity index 94% rename from controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/CxCoreDataSource.java rename to controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/ConexCoreDataSource.java index 38318bc7e..332a3cf42 100644 --- a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/CxCoreDataSource.java +++ b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/ConexCoreDataSource.java @@ -1,9 +1,9 @@ /* * ============================================================================ - * Name : CxCoreDataSource.java + * Name : ConexCoreDataSource.java * Author : AppDevForAll * Copyright : Copyright (c) 2026 AppDevForAll - * Description : K2GO-427 / K2GO-507. App-side client of the content-exchange core (cx-core) + * Description : K2GO-427 / K2GO-507. App-side client of the content-exchange core (conex-core) * through dash-node's relay (/k2go-api/v1/*). Read side (list + storage) * plus the export long operation (prepare / status / fetch / abort) and the * import calls. Same HttpURLConnection shape as content/RestContentClient. The @@ -28,14 +28,14 @@ /** * The one place in this feature that touches {@link HttpURLConnection}. It issues - * GETs to the cx-core read endpoints and returns the parsed JSON object; mapping + * GETs to the conex-core read endpoints and returns the parsed JSON object; mapping * to domain entities lives in {@link ContentRepositoryImpl}. * *

Must be called off the main thread. */ -public final class CxCoreDataSource { +public final class ConexCoreDataSource { - /** cx-core API root behind dash-node's relay: {@code http://localhost:8085/k2go-api/v1}. */ + /** conex-core API root behind dash-node's relay: {@code http://localhost:8085/k2go-api/v1}. */ private static final String V1 = BoxEndpoints.API + "/v1"; private static final int CONNECT_TIMEOUT_MS = 5000; @@ -100,7 +100,7 @@ public JSONObject postExportPrepare(String app, String localRef) throws Exceptio /** * {@code GET /v1/export/status/{opId}} -> {@code {state, stagedBytes, totalBytes, error?}}. A 404 - * means the op was swept; it surfaces as {@link CxHttpException} with {@code code() == 404} so the + * means the op was swept; it surfaces as {@link ConexHttpException} with {@code code() == 404} so the * caller can re-prepare rather than keep polling a dead id. K2GO-507. */ public JSONObject getExportStatus(String opId) throws Exception { @@ -126,7 +126,7 @@ public Stream openExportFetch(String opId) throws Exception { if (code < 200 || code >= 400) { String text = readAll(c.getErrorStream()); c.disconnect(); - throw new CxHttpException(code, text); + throw new ConexHttpException(code, text); } String filename = parseContentDispositionFilename(c.getHeaderField("Content-Disposition")); return new Stream(c, c.getInputStream(), filename); @@ -142,13 +142,13 @@ public JSONObject deleteExportOp(String opId) throws Exception { } // ---- share gate (K2GO-376) ----------------------------------------------------------------- - // These hit the sender's OWN cx-core over the loopback relay. The receiver reaches the same + // These hit the sender's OWN conex-core over the loopback relay. The receiver reaches the same // session over the hotspot (a separate off-loopback exposure); the app never copies bytes. The // token minted here is the session's only auth and travels in the X-Share-Token header. /** * {@code POST /v1/share} with {@code {items:[{app,localRef}]}} -> {@code {sessionId, token, - * manifestUrl}}. Opens a scoped share session on the local cx-core and returns the token the + * manifestUrl}}. Opens a scoped share session on the local conex-core and returns the token the * sender puts in the QR; no token header (this call mints it). K2GO-376. */ public ShareCreated postShareCreate(List items) throws Exception { @@ -221,7 +221,7 @@ private static JSONObject postJson(String urlStr, JSONObject body, String shareT boolean ok = code >= 200 && code < 400; String text = readAll(ok ? c.getInputStream() : c.getErrorStream()); if (!ok) { - throw new CxHttpException(code, text); + throw new ConexHttpException(code, text); } return new JSONObject(text.isEmpty() ? "{}" : text); } finally { @@ -249,7 +249,7 @@ private static JSONObject deleteJson(String urlStr, String shareToken) throws Ex boolean ok = code >= 200 && code < 400; String text = readAll(ok ? c.getInputStream() : c.getErrorStream()); if (!ok) { - throw new CxHttpException(code, text); + throw new ConexHttpException(code, text); } return new JSONObject(text.isEmpty() ? "{}" : text); } finally { @@ -269,7 +269,7 @@ private static JSONObject getJson(String urlStr) throws Exception { boolean ok = code >= 200 && code < 400; String text = readAll(ok ? c.getInputStream() : c.getErrorStream()); if (!ok) { - throw new CxHttpException(code, text); + throw new ConexHttpException(code, text); } return new JSONObject(text.isEmpty() ? "{}" : text); } finally { @@ -323,10 +323,10 @@ private static String parseContentDispositionFilename(String header) { * status poll treats {@code code() == 404} as "operation swept" and re-prepares. Extends * {@link Exception}, so callers that only {@code catch (Exception)} keep working. K2GO-507. */ - public static final class CxHttpException extends Exception { + public static final class ConexHttpException extends Exception { private final int code; - CxHttpException(int code, String message) { + ConexHttpException(int code, String message) { super("HTTP " + code + ": " + message); this.code = code; } diff --git a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/CxCoreDeleteSource.java b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/ConexCoreDeleteSource.java similarity index 82% rename from controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/CxCoreDeleteSource.java rename to controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/ConexCoreDeleteSource.java index 5a673899f..77a41764d 100644 --- a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/CxCoreDeleteSource.java +++ b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/ConexCoreDeleteSource.java @@ -1,10 +1,10 @@ /* * ============================================================================ - * Name : CxCoreDeleteSource.java + * Name : ConexCoreDeleteSource.java * Author : AppDevForAll * Copyright : Copyright (c) 2026 AppDevForAll * Description : K2GO-427. Data-layer implementation of the delete source port against - * cx-core (through dash-node's /v1 relay): DELETE /v1/content/{app}/{localRef}. + * conex-core (through dash-node's /v1 relay): DELETE /v1/content/{app}/{localRef}. * Maps the core JSON {ok, freedBytes} | {ok:false, reason} onto the domain * DeleteResult, so the domain stays JSON-free. * ============================================================================ @@ -23,11 +23,11 @@ * 4xx/5xx) throws; a reached box that could not delete the item returns {@code {ok:false, reason}}, * which maps to {@link DeleteResult#failure}. */ -public final class CxCoreDeleteSource implements ContentDeleteSource { +public final class ConexCoreDeleteSource implements ContentDeleteSource { - private final CxCoreDataSource dataSource; + private final ConexCoreDataSource dataSource; - public CxCoreDeleteSource(CxCoreDataSource dataSource) { + public ConexCoreDeleteSource(ConexCoreDataSource dataSource) { this.dataSource = dataSource; } diff --git a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/CxCoreExportSource.java b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/ConexCoreExportSource.java similarity index 92% rename from controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/CxCoreExportSource.java rename to controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/ConexCoreExportSource.java index 06a6acbc7..2929b5de8 100644 --- a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/CxCoreExportSource.java +++ b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/ConexCoreExportSource.java @@ -1,10 +1,10 @@ /* * ============================================================================ - * Name : CxCoreExportSource.java + * Name : ConexCoreExportSource.java * Author : AppDevForAll * Copyright : Copyright (c) 2026 AppDevForAll * Description : K2GO-427 / K2GO-507. Data-layer implementation of the export source port against - * cx-core (through dash-node's /v1 relay): POST /v1/export/plan, the export long + * conex-core (through dash-node's /v1 relay): POST /v1/export/plan, the export long * operation (prepare / status / fetch / abort), and the collection-manifest assembly. * ============================================================================ */ @@ -34,14 +34,14 @@ * *

Instances are single-run and used off the main thread; the capture is not shared. */ -public final class CxCoreExportSource implements ContentExportSource { +public final class ConexCoreExportSource implements ContentExportSource { - private final CxCoreDataSource dataSource; + private final ConexCoreDataSource dataSource; /** Captured plan entries for the manifest, by item, preserving request order. */ private final Map entries = new LinkedHashMap<>(); - public CxCoreExportSource(CxCoreDataSource dataSource) { + public ConexCoreExportSource(ConexCoreDataSource dataSource) { this.dataSource = dataSource; } @@ -110,7 +110,7 @@ public ExportStatus status(String opId) throws Exception { JSONObject r; try { r = dataSource.getExportStatus(opId); - } catch (CxCoreDataSource.CxHttpException e) { + } catch (ConexCoreDataSource.ConexHttpException e) { if (e.code() == 404) { return ExportStatus.gone(); // the op was swept: the caller re-prepares } @@ -134,7 +134,7 @@ public ExportStatus status(String opId) throws Exception { @Override public ItemPayload fetch(String opId) throws Exception { - CxCoreDataSource.Stream stream = dataSource.openExportFetch(opId); + ConexCoreDataSource.Stream stream = dataSource.openExportFetch(opId); return new ItemPayload(stream.body(), stream.filename(), stream); } diff --git a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/CxCoreImportSource.java b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/ConexCoreImportSource.java similarity index 91% rename from controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/CxCoreImportSource.java rename to controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/ConexCoreImportSource.java index 85fad674f..baba59194 100644 --- a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/CxCoreImportSource.java +++ b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/ConexCoreImportSource.java @@ -1,9 +1,9 @@ /* * ============================================================================ - * Name : CxCoreImportSource.java + * Name : ConexCoreImportSource.java * Author : AppDevForAll * Copyright : Copyright (c) 2026 AppDevForAll - * Description : K2GO-427. Data-layer implementation of the import source port against cx-core + * Description : K2GO-427. Data-layer implementation of the import source port against conex-core * (through dash-node's /v1 relay): POST /v1/import/validate (per-item verdict), * POST /v1/import/item (ingest one staged item), and DELETE /v1/content (reclaim). * The manifest entries are passed to the core unchanged; the core owns the shape. @@ -21,11 +21,11 @@ import java.util.ArrayList; import java.util.List; -public final class CxCoreImportSource implements ImportSource { +public final class ConexCoreImportSource implements ImportSource { - private final CxCoreDataSource dataSource; + private final ConexCoreDataSource dataSource; - public CxCoreImportSource(CxCoreDataSource dataSource) { + public ConexCoreImportSource(ConexCoreDataSource dataSource) { this.dataSource = dataSource; } diff --git a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/ContentRepositoryImpl.java b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/ContentRepositoryImpl.java index 3b2336f24..bde29b773 100644 --- a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/ContentRepositoryImpl.java +++ b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/ContentRepositoryImpl.java @@ -14,7 +14,7 @@ /** * Data-layer implementation of the domain {@link ContentRepository} port. Maps the - * cx-core JSON (via {@link CxCoreDataSource}) into domain entities. + * conex-core JSON (via {@link ConexCoreDataSource}) into domain entities. * *

Per the port contract: {@link #fetchApps()} / {@link #fetchContent()} throw on * a real failure (box unreachable); {@link #fetchStorage()} never throws and returns @@ -23,11 +23,11 @@ */ public final class ContentRepositoryImpl implements ContentRepository { - private static final String TAG = "CxContentRepository"; + private static final String TAG = "ConexContentRepository"; - private final CxCoreDataSource dataSource; + private final ConexCoreDataSource dataSource; - public ContentRepositoryImpl(CxCoreDataSource dataSource) { + public ContentRepositoryImpl(ConexCoreDataSource dataSource) { this.dataSource = dataSource; } diff --git a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/NetworkImportCarrier.java b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/NetworkImportCarrier.java index bd5a09fe2..4539d47fe 100644 --- a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/NetworkImportCarrier.java +++ b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/data/NetworkImportCarrier.java @@ -4,11 +4,11 @@ * Author : AppDevForAll * Copyright : Copyright (c) 2026 AppDevForAll * Description : K2GO-376. The network ImportCarrier: the mirror of SafImportCarrier, but each item is - * read over HTTP from the sender's live cx-core gate on the shared hotspot, not from a + * read over HTTP from the sender's live conex-core gate on the shared hotspot, not from a * SAF drive. readManifest() GETs the invite's manifest URL; openPayload(itemRef) GETs * /v1/share//fetch/, retrying while the sender stages the item; the token * rides the X-Share-Token header, never the URL. Everything downstream (stage to - * /library/.cx-staging, POST /v1/import/item) is unchanged from the disk path, so the + * /library/.conex-staging, POST /v1/import/item) is unchanged from the disk path, so the * carrier is the only sender-specific dependency of the import service. On a clean finish * the carrier POSTs /complete so the gate releases the session (the receiver-driven close). * ============================================================================ @@ -51,7 +51,7 @@ */ public final class NetworkImportCarrier implements ImportCarrier { - private static final String TAG = "IIAB-CxNetCarrier"; + private static final String TAG = "IIAB-ConexNetCarrier"; private static final int CONNECT_TIMEOUT_MS = 8000; /** Small JSON reads (manifest, complete response). */ diff --git a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/domain/ShareInviteValidator.java b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/domain/ShareInviteValidator.java index 8e1ae6231..d56d916f4 100644 --- a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/domain/ShareInviteValidator.java +++ b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/domain/ShareInviteValidator.java @@ -16,7 +16,7 @@ /** * Pure validation of a Share invite (ADR "Pillar Share"). The invite carries the sender's reachable * address and port, a session token, and the manifest path. On the sender these come from trusted - * local sources (the hotspot owner and the sender's own cx-core), but the RECEIVER scans the same + * local sources (the hotspot owner and the sender's own conex-core), but the RECEIVER scans the same * QR as untrusted input, and both forks build against this one rule so the contract cannot drift. * *

The receiver later composes URLs from these fields ({@code http://host:port} + a share path), @@ -25,7 +25,7 @@ */ public final class ShareInviteValidator { - /** The cx-core token is {@code secrets.token_urlsafe(32)}: url-safe base64, ~43 chars. */ + /** The conex-core token is {@code secrets.token_urlsafe(32)}: url-safe base64, ~43 chars. */ private static final int MAX_TOKEN_LEN = 256; /** The manifest path is short ({@code /v1/share//manifest}); cap it well above that. */ private static final int MAX_PATH_LEN = 512; diff --git a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/domain/ShareTransport.java b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/domain/ShareTransport.java index a090fd628..0f1c65ee6 100644 --- a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/domain/ShareTransport.java +++ b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/domain/ShareTransport.java @@ -14,7 +14,7 @@ /** * Transport settings for granular wireless Share (K2GO-376). * - *

Share is the network twin of Export: the receiver PULLS from the sender's live cx-core + *

Share is the network twin of Export: the receiver PULLS from the sender's live conex-core * (ADR "Pillar Share"). On the sender the share session is created over the loopback relay, but * the RECEIVER reaches the gate over the hotspot at {@code http://:SHARE_PORT}. * That off-loopback exposure is a separate server-side slice (plain HTTP, v1 only); this is the @@ -26,7 +26,7 @@ private ShareTransport() { } /** - * TCP port the sender's cx-core is exposed on, off loopback, for the paired receiver. Must + * TCP port the sender's conex-core is exposed on, off loopback, for the paired receiver. Must * match the scoped-exposure slice (candidate 8095, plain HTTP for v1). The loopback relay the * sender uses to CREATE the session is unrelated to this port. */ diff --git a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/presentation/ContentDeleteService.java b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/presentation/ContentDeleteService.java index 61dbce284..05d406ec8 100644 --- a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/presentation/ContentDeleteService.java +++ b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/presentation/ContentDeleteService.java @@ -28,8 +28,8 @@ import androidx.core.content.ContextCompat; import org.appdevforall.k2go.R; -import org.appdevforall.k2go.contentexchange.data.CxCoreDataSource; -import org.appdevforall.k2go.contentexchange.data.CxCoreDeleteSource; +import org.appdevforall.k2go.contentexchange.data.ConexCoreDataSource; +import org.appdevforall.k2go.contentexchange.data.ConexCoreDeleteSource; import org.appdevforall.k2go.contentexchange.domain.ContentDeleteSource; import org.appdevforall.k2go.contentexchange.domain.DeleteJob; import org.appdevforall.k2go.contentexchange.domain.DeleteResult; @@ -172,7 +172,7 @@ public int onStartCommand(Intent intent, int flags, int startId) { * in flight finishes. */ private void drain() { - ContentDeleteSource source = new CxCoreDeleteSource(new CxCoreDataSource()); + ContentDeleteSource source = new ConexCoreDeleteSource(new ConexCoreDataSource()); DeleteJob job = SESSION.job(); for (int i = job.firstPending(); i >= 0; i = job.firstPending()) { diff --git a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/presentation/ContentExportService.java b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/presentation/ContentExportService.java index 42aad3243..5d2dbc1eb 100644 --- a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/presentation/ContentExportService.java +++ b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/presentation/ContentExportService.java @@ -4,7 +4,7 @@ * Author : AppDevForAll * Copyright : Copyright (c) 2026 AppDevForAll * Description : K2GO-427. Foreground service that drains the export queue: plan the selected - * items, then per item pull the streaming archive from cx-core and write it to the + * items, then per item pull the streaming archive from conex-core and write it to the * SAF destination, writing the collection manifest last over the items that landed. * Reuses the download-service pattern (foreground specialUse + per-item queue + * retry + notification), but the bytes flow phone <- box -> drive here, so it is a @@ -31,8 +31,8 @@ import androidx.core.content.ContextCompat; import org.appdevforall.k2go.R; -import org.appdevforall.k2go.contentexchange.data.CxCoreDataSource; -import org.appdevforall.k2go.contentexchange.data.CxCoreExportSource; +import org.appdevforall.k2go.contentexchange.data.ConexCoreDataSource; +import org.appdevforall.k2go.contentexchange.data.ConexCoreExportSource; import org.appdevforall.k2go.contentexchange.data.SafExportCarrier; import org.appdevforall.k2go.contentexchange.domain.ContentExportSource; import org.appdevforall.k2go.contentexchange.domain.ExportCarrier; @@ -216,7 +216,7 @@ public int onStartCommand(Intent intent, int flags, int startId) { */ private void drain(boolean fresh) { ExportCarrier carrier; - ContentExportSource source = new CxCoreExportSource(new CxCoreDataSource()); + ContentExportSource source = new ConexCoreExportSource(new ConexCoreDataSource()); try { carrier = new SafExportCarrier(getApplicationContext(), Uri.parse(SESSION.treeUri())); } catch (Exception e) { diff --git a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/presentation/ContentImportService.java b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/presentation/ContentImportService.java index 2b6c545fb..df3325bb4 100644 --- a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/presentation/ContentImportService.java +++ b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/presentation/ContentImportService.java @@ -32,8 +32,8 @@ import org.appdevforall.k2go.R; import org.appdevforall.k2go.contentexchange.data.BoxImportStaging; -import org.appdevforall.k2go.contentexchange.data.CxCoreDataSource; -import org.appdevforall.k2go.contentexchange.data.CxCoreImportSource; +import org.appdevforall.k2go.contentexchange.data.ConexCoreDataSource; +import org.appdevforall.k2go.contentexchange.data.ConexCoreImportSource; import org.appdevforall.k2go.contentexchange.data.NetworkImportCarrier; import org.appdevforall.k2go.contentexchange.data.SafImportCarrier; import org.appdevforall.k2go.contentexchange.domain.ExportJob; @@ -263,7 +263,7 @@ public int onStartCommand(Intent intent, int flags, int startId) { * v1 does within-run per-item retry only. Durable op-state and byte-resume are v1.x. */ private void drain() { - ImportSource source = new CxCoreImportSource(new CxCoreDataSource()); + ImportSource source = new ConexCoreImportSource(new ConexCoreDataSource()); BoxImportStaging staging = new BoxImportStaging(getApplicationContext()); ImportCarrier carrier; try { diff --git a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/presentation/ContentManagerViewModelFactory.java b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/presentation/ContentManagerViewModelFactory.java index a6be4cbf6..a0668942e 100644 --- a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/presentation/ContentManagerViewModelFactory.java +++ b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/presentation/ContentManagerViewModelFactory.java @@ -5,7 +5,7 @@ import androidx.lifecycle.ViewModelProvider; import org.appdevforall.k2go.contentexchange.data.ContentRepositoryImpl; -import org.appdevforall.k2go.contentexchange.data.CxCoreDataSource; +import org.appdevforall.k2go.contentexchange.data.ConexCoreDataSource; import org.appdevforall.k2go.contentexchange.domain.ContentRepository; import org.appdevforall.k2go.contentexchange.domain.GetStorageStatusUseCase; import org.appdevforall.k2go.contentexchange.domain.ListManagedContentUseCase; @@ -21,7 +21,7 @@ public class ContentManagerViewModelFactory implements ViewModelProvider.Factory @SuppressWarnings("unchecked") public T create(@NonNull Class modelClass) { if (modelClass.isAssignableFrom(ContentManagerViewModel.class)) { - ContentRepository repository = new ContentRepositoryImpl(new CxCoreDataSource()); + ContentRepository repository = new ContentRepositoryImpl(new ConexCoreDataSource()); return (T) new ContentManagerViewModel( new ListManagedContentUseCase(repository), new GetStorageStatusUseCase(repository)); diff --git a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/presentation/ContentReceiveFragment.java b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/presentation/ContentReceiveFragment.java index ee6c6519a..4c8d9507d 100644 --- a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/presentation/ContentReceiveFragment.java +++ b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/presentation/ContentReceiveFragment.java @@ -176,7 +176,7 @@ private void fetchManifest() { appContext, host, port, token, manifestUrl, () -> false); parsed = ShareManifestReader.parse(carrier.readManifest()); } catch (Exception e) { - Log.w("IIAB-CxReceive", "manifest fetch failed host=" + host + " port=" + port + Log.w("IIAB-ConexReceive", "manifest fetch failed host=" + host + " port=" + port + " manifestUrl=" + manifestUrl, e); post(() -> showError()); return; diff --git a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/presentation/ContentShareService.java b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/presentation/ContentShareService.java index 11baee4d7..56f9c2654 100644 --- a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/presentation/ContentShareService.java +++ b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/presentation/ContentShareService.java @@ -4,10 +4,10 @@ * Author : AppDevForAll * Copyright : Copyright (c) 2026 AppDevForAll * Description : K2GO-376. Sender foreground service for granular wireless Share. Over the current - * content-manager selection it opens a scoped share session on the LOCAL cx-core + * content-manager selection it opens a scoped share session on the LOCAL conex-core * (loopback), brings the hotspot up (only if it was off), holds both the hotspot and * the gate open with CPU + Wi-Fi locks, and on teardown closes the gate (DELETE) and - * stops the hotspot only if it started it. It copies NO bytes: cx-core streams to the + * stops the hotspot only if it started it. It copies NO bytes: conex-core streams to the * receiver that pulls over the hotspot. The invite/QR fragment observes SESSION. * ============================================================================ */ @@ -30,7 +30,7 @@ import androidx.core.content.ContextCompat; import org.appdevforall.k2go.R; -import org.appdevforall.k2go.contentexchange.data.CxCoreDataSource; +import org.appdevforall.k2go.contentexchange.data.ConexCoreDataSource; import org.appdevforall.k2go.contentexchange.domain.ItemRef; import org.appdevforall.k2go.hotspot.HotspotPermissions; import org.appdevforall.k2go.hotspot.LocalHotspotManager; @@ -61,7 +61,7 @@ static ShareSession session() { private final ExecutorService worker = Executors.newSingleThreadExecutor(); - // The open session on the local cx-core, held so onDestroy can close the gate. Set by the worker. + // The open session on the local conex-core, held so onDestroy can close the gate. Set by the worker. private volatile String sessionId; private volatile String token; // True only when THIS service started the hotspot, so teardown never yanks a hotspot that Connect @@ -152,14 +152,14 @@ public int onStartCommand(Intent intent, int flags, int startId) { // ---- the run ------------------------------------------------------------------------------- - /** Open the scoped share session on the local cx-core and publish the invite. Copies no bytes. */ + /** Open the scoped share session on the local conex-core and publish the invite. Copies no bytes. */ private void openSession(ItemRef[] refs) { List items = new ArrayList<>(); for (ItemRef ref : refs) { items.add(ref); } try { - CxCoreDataSource.ShareCreated created = new CxCoreDataSource().postShareCreate(items); + ConexCoreDataSource.ShareCreated created = new ConexCoreDataSource().postShareCreate(items); if (created.sessionId.isEmpty() || created.token.isEmpty() || created.manifestUrl.isEmpty()) { SESSION.fail(getString(R.string.k2go_cx_share_error)); return; @@ -227,15 +227,15 @@ public void onDestroy() { } // Close the gate (the app-side closer, ADR "Pillar Share"). Off the main thread; the process // usually outlives this service (the app is still open). A rare race where the id is not stored - // yet, or a process kill, is covered by cx-core's safety cap and the receiver's complete. + // yet, or a process kill, is covered by conex-core's safety cap and the receiver's complete. final String id = sessionId; final String tok = token; if (id != null && tok != null) { new Thread(() -> { try { - new CxCoreDataSource().deleteShare(id, tok); + new ConexCoreDataSource().deleteShare(id, tok); } catch (Exception ignored) { - // best-effort close; cx-core's safety cap reclaims an abandoned session + // best-effort close; conex-core's safety cap reclaims an abandoned session } }, "content-share-close").start(); } diff --git a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/presentation/ImportReviewViewModelFactory.java b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/presentation/ImportReviewViewModelFactory.java index be0e3cdf8..7d7b8f151 100644 --- a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/presentation/ImportReviewViewModelFactory.java +++ b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/presentation/ImportReviewViewModelFactory.java @@ -4,7 +4,7 @@ * Author : AppDevForAll * Copyright : Copyright (c) 2026 AppDevForAll * Description : K2GO-427. Hand-wires the import-review ViewModel (no DI framework): the manifest reader - * and the cx-core import source, plus the app context and the picked drive tree. + * and the conex-core import source, plus the app context and the picked drive tree. * ============================================================================ */ package org.appdevforall.k2go.contentexchange.presentation; @@ -16,8 +16,8 @@ import androidx.lifecycle.ViewModel; import androidx.lifecycle.ViewModelProvider; -import org.appdevforall.k2go.contentexchange.data.CxCoreDataSource; -import org.appdevforall.k2go.contentexchange.data.CxCoreImportSource; +import org.appdevforall.k2go.contentexchange.data.ConexCoreDataSource; +import org.appdevforall.k2go.contentexchange.data.ConexCoreImportSource; import org.appdevforall.k2go.contentexchange.data.ImportManifestReader; public final class ImportReviewViewModelFactory implements ViewModelProvider.Factory { @@ -36,7 +36,7 @@ public ImportReviewViewModelFactory(Context context, Uri treeUri) { public T create(@NonNull Class modelClass) { if (modelClass.isAssignableFrom(ImportReviewViewModel.class)) { return (T) new ImportReviewViewModel(appContext, treeUri, - new ImportManifestReader(), new CxCoreImportSource(new CxCoreDataSource())); + new ImportManifestReader(), new ConexCoreImportSource(new ConexCoreDataSource())); } throw new IllegalArgumentException("Unknown ViewModel class: " + modelClass.getName()); } diff --git a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/presentation/ShareSession.java b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/presentation/ShareSession.java index d4b62ad43..17837dada 100644 --- a/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/presentation/ShareSession.java +++ b/controller/app/src/main/java/org/appdevforall/k2go/contentexchange/presentation/ShareSession.java @@ -21,7 +21,7 @@ interface Listener { void onUpdate(); } - /** PREPARING: creating the session on the local cx-core. READY: the invite exists; show the QR. */ + /** PREPARING: creating the session on the local conex-core. READY: the invite exists; show the QR. */ enum Phase { PREPARING, READY, ERROR } private final Handler main = new Handler(Looper.getMainLooper()); @@ -42,7 +42,7 @@ void setListener(Listener l) { // ---- service-side mutation ----------------------------------------------------------------- - /** Start a run: the item count is fixed now; the invite arrives once cx-core opens the session. */ + /** Start a run: the item count is fixed now; the invite arrives once conex-core opens the session. */ void beginPreparing(int itemCount) { this.itemCount = itemCount; this.sessionId = null; @@ -54,7 +54,7 @@ void beginPreparing(int itemCount) { publish(); } - /** The local cx-core opened the session: the invite is ready to render. */ + /** The local conex-core opened the session: the invite is ready to render. */ void setReady(String sessionId, String token, String manifestUrl) { this.sessionId = sessionId; this.token = token; diff --git a/controller/app/src/main/res/layout/fragment_k2go_content_share.xml b/controller/app/src/main/res/layout/fragment_k2go_content_share.xml index 77f9b58d6..ee6396eab 100644 --- a/controller/app/src/main/res/layout/fragment_k2go_content_share.xml +++ b/controller/app/src/main/res/layout/fragment_k2go_content_share.xml @@ -1,5 +1,5 @@ - diff --git a/controller/app/src/main/res/xml/network_security_config.xml b/controller/app/src/main/res/xml/network_security_config.xml index 5eed2a612..381c73e22 100644 --- a/controller/app/src/main/res/xml/network_security_config.xml +++ b/controller/app/src/main/res/xml/network_security_config.xml @@ -2,8 +2,8 @@