@javierfrancoleal/cifra 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 J.Franco
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,19 @@
1
- # Temporary Holding Version
1
+ ---
2
+ description: "Cifra — the host-signature organ: detects the host, adapts text/instructions/layout per OS and form factor."
3
+ kind: "package-bundle"
4
+ ---
2
5
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
6
+ # @javierfrancoleal/cifra
7
+
8
+ Created by **J.Franco**.
9
+
10
+ ## Summary
11
+
12
+ When a Fanal skin must adapt to its host (macOS, Windows, Linux, iOS,
13
+ Android; laptop, tablet, smartphone), this skill applies the canonical
14
+ host signature (assets/host-detect.js), the OS-adaptive text matrix, and
15
+ the audit rule: the signature is always visible to the operator.
16
+
17
+ ## License
18
+
19
+ MIT.
@@ -0,0 +1,33 @@
1
+ # Cifra — the host signature and its adaptations
2
+
3
+ Use this skill when a Fanal skin must adapt to the HOST it runs on:
4
+ operating system (macOS, Windows, Linux, iOS, Android), form factor
5
+ (laptop, tablet, smartphone), touch, Electron/kiosk, PWA standalone.
6
+
7
+ ## The signature
8
+
9
+ Embed the canonical snippet (assets/host-detect.js) in the skin. It
10
+ exposes `window.CIFRA = { os, form, touch, electron, kiosk, standalone }`
11
+ and adds body classes: os-*, form-*, touch, standalone, electron, kiosk.
12
+
13
+ ## What must adapt per host
14
+
15
+ 1. TEXT: permission instructions. "Nothing leaves this Mac" becomes
16
+ "Nothing leaves this PC" on Windows. Finder becomes File Explorer.
17
+ The OS-adaptive matrix keys: home, permMic, permFinder.
18
+ 2. INSTRUCTIONS: the permission step of the installation wizard shows
19
+ the real path of each OS (System Settings vs Settings vs Android
20
+ runtime permissions), including the "try it" triggers.
21
+ 3. PROGRAMMING: CSS by body classes (os-win .foot, form-phone layout,
22
+ touch targets ≥ 44px); the panel's dictation hint per OS; the kiosk
23
+ class locks the kitchen tablet fullscreen.
24
+ 4. AUDIT: every skin shows its signature (🖥️ os · form · electron/touch)
25
+ in the Supervision card — the host can never lie about itself to the
26
+ operator.
27
+
28
+ ## Rules
29
+
30
+ - Detect, never guess: the signature comes from real APIs only.
31
+ - Adapt text and layout; never change the flow (the traffic light and
32
+ the silo are the same on every host).
33
+ - New OSes: extend the matrix, do not branch the business logic.
@@ -0,0 +1,27 @@
1
+ // Cifra — the host signature (canonical snippet for Fanal and its skins).
2
+ // Detects the operating system and the form factor, exposes body classes
3
+ // and the OS-adaptive text matrix. Embed this in any Fanal skin.
4
+ (function () {
5
+ const ua = navigator.userAgent || "";
6
+ const touch = ("ontouchstart" in window) || navigator.maxTouchPoints > 2;
7
+ let os = "other";
8
+ if (/iPhone|iPad|iPod/.test(ua)) os = "ios";
9
+ else if (/Android/.test(ua)) os = "android";
10
+ else if (/Mac|Macintosh/.test(ua)) os = "mac";
11
+ else if (/Windows/.test(ua)) os = "win";
12
+ else if (/Linux/.test(ua)) os = "linux";
13
+ let form = "desktop";
14
+ if (os === "ios" || os === "android") form = "phone";
15
+ else if (touch && Math.min(screen.width, screen.height) > 700) form = "tablet";
16
+ const electron = !!(window.process && window.process.versions && window.process.versions.electron);
17
+ const kiosk = electron && /kiosk/.test(ua);
18
+ const standalone = navigator.standalone === true || (window.matchMedia && window.matchMedia("(display-mode: standalone)").matches);
19
+ const HOST = { os, form, touch, electron, kiosk, standalone };
20
+ document.body.classList.add("os-" + os, "form-" + form);
21
+ if (touch) document.body.classList.add("touch");
22
+ if (standalone) document.body.classList.add("standalone");
23
+ if (electron) document.body.classList.add("electron");
24
+ if (kiosk) document.body.classList.add("kiosk");
25
+ window.CIFRA = HOST;
26
+ return HOST;
27
+ })();
@@ -0,0 +1,4 @@
1
+ # @javierfrancoleal/cifra — the host-signature organ.
2
+ - insert:
3
+ - id: cifra
4
+ name: '@javierfrancoleal/cifra'
package/lib/index.js ADDED
@@ -0,0 +1,45 @@
1
+ // @javierfrancoleal/cifra — an organ of the J.Franco agentic workflow.
2
+ // Created by J.Franco. Registers the cifra skill provider.
3
+ import { readFile } from "node:fs/promises";
4
+ import { fileURLToPath } from "node:url";
5
+ import { BUNDLED_SKILL_RANK } from "@deepseek-ai/dsh-skill";
6
+
7
+ const PROVIDER_NAME = "javierfrancoleal-cifra";
8
+ const SKILL_BODY_URL = new URL("../assets/cifra.md", import.meta.url);
9
+ const RESOURCE_BASE = { kind: "directory", path: fileURLToPath(new URL("../assets/", import.meta.url)) };
10
+
11
+ const CANDIDATE = {
12
+ name: "cifra",
13
+ description: "The host-signature organ of the J.Franco agentic workflow: detects the host (operating system and form factor) where Fanal runs, adapts texts, instructions and layout per host (macOS/Windows/Linux/iOS/Android, laptop/tablet/phone), and audits the signature visibly — never changes the flow.",
14
+ invocation: { modelInvocable: true, userInvocable: true },
15
+ provider: PROVIDER_NAME,
16
+ source: "bundled",
17
+ resourceBase: RESOURCE_BASE,
18
+ rank: BUNDLED_SKILL_RANK,
19
+ locator: SKILL_BODY_URL,
20
+ };
21
+
22
+ const provider = {
23
+ name: PROVIDER_NAME,
24
+ list: () => Promise.resolve([CANDIDATE]),
25
+ async get() {
26
+ return {
27
+ name: CANDIDATE.name,
28
+ description: CANDIDATE.description,
29
+ invocation: CANDIDATE.invocation,
30
+ provider: CANDIDATE.provider,
31
+ source: CANDIDATE.source,
32
+ resourceBase: RESOURCE_BASE,
33
+ content: await readFile(SKILL_BODY_URL, "utf8"),
34
+ };
35
+ },
36
+ };
37
+
38
+ const name = "cifra";
39
+ const inject = ["skills"];
40
+
41
+ function apply(ctx) {
42
+ ctx.skills.registerProvider(() => provider);
43
+ }
44
+
45
+ export { apply, inject, name };
package/locale/ar.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "التشفير",
4
+ "description": "يكشف المضيف ويكيّف النصوص والتعليمات والتخطيط حسب نظام التشغيل وعامل الشكل."
5
+ }
6
+ }
package/locale/de.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Ziffer",
4
+ "description": "Erkennt den Host und passt Texte, Anweisungen und Layout je nach System und Geräteform an."
5
+ }
6
+ }
package/locale/en.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Cipher",
4
+ "description": "Detects the host and adapts texts, instructions and layout per operating system and form factor."
5
+ }
6
+ }
package/locale/es.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Cifra",
4
+ "description": "Detecta el host y adapta textos, instrucciones y diseño según el sistema operativo y el factor de forma."
5
+ }
6
+ }
package/locale/fr.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Cifre",
4
+ "description": "Détecte l'hôte et adapte textes, instructions et mise en page selon le système et le format de l'appareil."
5
+ }
6
+ }
package/locale/it.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Cifra",
4
+ "description": "Rileva l'host e adatta testi, istruzioni e layout per sistema operativo e formato dispositivo."
5
+ }
6
+ }
package/locale/ja.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "暗号",
4
+ "description": "ホストを検出し、OS と形状に応じてテキスト・手順・レイアウトを適応します。"
5
+ }
6
+ }
package/locale/ko.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "암호",
4
+ "description": "호스트를 감지하고 OS와 폼팩터에 따라 텍스트·안내·레이아웃을 적용합니다."
5
+ }
6
+ }
package/locale/pt.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Cifra",
4
+ "description": "Detecta o host e adapta textos, instruções e layout por sistema operacional e formato."
5
+ }
6
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "密码",
4
+ "description": "检测主机并按操作系统和形态适配文本、说明与布局。"
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,6 +1,17 @@
1
1
  {
2
2
  "name": "@javierfrancoleal/cifra",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0",
4
+ "description": "Cifra — the host-signature organ of the J.Franco agentic workflow: detects the host (OS + form factor), adapts texts/instructions/layout per platform, and audits the signature visibly. Created by J.Franco.",
5
+ "author": "J.Franco",
6
+ "license": "MIT",
7
+ "type": "module",
8
+ "main": "lib/index.js",
9
+ "exports": { ".": "./lib/index.js", "./cordis.patch.yml": "./cordis.patch.yml", "./package.json": "./package.json", "./locale/*.json": "./locale/*.json" },
10
+ "files": ["lib/index.js", "assets", "cordis.patch.yml", "README.md", "locale/*.json"],
11
+ "engines": { "node": ">=24", "dsh": ">=0.2.1-rc.0" },
12
+ "repository": { "type": "git", "url": "git+https://github.com/JavierFrancoLeal/jfranco-agentic-suite.git", "directory": "jfranco-cifra" },
13
+ "keywords": ["deepseek-harness", "host-detection", "cross-platform", "sovereign"],
14
+ "dsh": { "manifestVersion": 1, "bundle": { "patch": "./cordis.patch.yml" } },
15
+ "publishConfig": { "access": "public" },
16
+ "peerDependencies": { "@deepseek-ai/cordis": "~4.0.5", "@deepseek-ai/dsh-skill": ">=0.2.1-rc.5" }
17
+ }