@javierfrancoleal/cifra 0.0.0-stage → 1.0.1
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 +21 -0
- package/README.md +18 -2
- package/assets/cifra.md +33 -0
- package/assets/host-detect.js +27 -0
- package/cordis.patch.yml +4 -0
- package/lib/index.js +45 -0
- package/locale/ar.json +6 -0
- package/locale/de.json +6 -0
- package/locale/en.json +6 -0
- package/locale/es.json +6 -0
- package/locale/fr.json +6 -0
- package/locale/it.json +6 -0
- package/locale/ja.json +6 -0
- package/locale/ko.json +6 -0
- package/locale/pt.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +57 -4
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
|
-
|
|
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
|
-
|
|
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.
|
package/assets/cifra.md
ADDED
|
@@ -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
|
+
})();
|
package/cordis.patch.yml
ADDED
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
package/locale/de.json
ADDED
package/locale/en.json
ADDED
package/locale/es.json
ADDED
package/locale/fr.json
ADDED
package/locale/it.json
ADDED
package/locale/ja.json
ADDED
package/locale/ko.json
ADDED
package/locale/pt.json
ADDED
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,59 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@javierfrancoleal/cifra",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.1",
|
|
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": {
|
|
10
|
+
".": "./lib/index.js",
|
|
11
|
+
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
12
|
+
"./package.json": "./package.json",
|
|
13
|
+
"./locale/*.json": "./locale/*.json"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"lib/index.js",
|
|
17
|
+
"assets",
|
|
18
|
+
"cordis.patch.yml",
|
|
19
|
+
"README.md",
|
|
20
|
+
"locale/*.json"
|
|
21
|
+
],
|
|
22
|
+
"engines": {
|
|
23
|
+
"node": ">=24",
|
|
24
|
+
"dsh": ">=0.2.1-rc.0"
|
|
25
|
+
},
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git+https://github.com/JavierFrancoLeal/jfranco-agentic-suite.git",
|
|
29
|
+
"directory": "jfranco-cifra"
|
|
30
|
+
},
|
|
31
|
+
"keywords": [
|
|
32
|
+
"deepseek-harness",
|
|
33
|
+
"host-detection",
|
|
34
|
+
"cross-platform",
|
|
35
|
+
"sovereign"
|
|
36
|
+
],
|
|
37
|
+
"dsh": {
|
|
38
|
+
"manifestVersion": 1,
|
|
39
|
+
"bundle": {
|
|
40
|
+
"patch": "./cordis.patch.yml"
|
|
41
|
+
},
|
|
42
|
+
"compatibility": {
|
|
43
|
+
"nodejsRange": ">=20",
|
|
44
|
+
"dshRange": ">=0.2.1-rc.0",
|
|
45
|
+
"dshReleases": {
|
|
46
|
+
"0.2.2-alpha.2": "unknown",
|
|
47
|
+
"0.2.2-alpha.3": "unknown",
|
|
48
|
+
"0.2.2-rc.1": "unknown"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"publishConfig": {
|
|
53
|
+
"access": "public"
|
|
54
|
+
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"@deepseek-ai/cordis": "~4.0.5",
|
|
57
|
+
"@deepseek-ai/dsh-skill": ">=0.2.1-rc.5"
|
|
58
|
+
}
|
|
59
|
+
}
|