@javierfrancoleal/compas 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,26 @@
1
- # Temporary Holding Version
1
+ ---
2
+ description: "Compás — the platform optimizer organ: audits Fanal against DSH-derived optimizations, applies only what makes sense."
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/compas
7
+
8
+ Created by **J.Franco**.
9
+
10
+ ## Summary
11
+
12
+ When the model audits or optimizes Fanal for a platform, this skill runs
13
+ the DSH-derived checklist (one brain many skins, electron hardening, PWA
14
+ cache, token gate, batched state, client key silo, bundled runtime) and
15
+ applies ONLY what makes sense for a sovereign agentic orchestration
16
+ layer. It never over-engineers: DSH pieces that do not apply are
17
+ explicitly excluded.
18
+
19
+ ## Use
20
+
21
+ Ask "compas" before shipping Fanal to any platform. The skill runs the
22
+ checker in the assets and reports `N ok · M to review` with the fixes.
23
+
24
+ ## License
25
+
26
+ MIT.
@@ -0,0 +1,43 @@
1
+ # Compás — the platform optimizer organ
2
+
3
+ Use this skill when Fanal must be audited or optimized for a platform
4
+ (macOS, Windows, Linux, browser, PWA). The rule: optimize LIKE DeepSeek
5
+ Harness, but ONLY what makes sense for a sovereign agentic orchestration
6
+ layer — never over-engineer.
7
+
8
+ ## The method
9
+
10
+ 1. Run the checker shipped in the assets:
11
+ `sh <assets>/fanal-optimize.sh` inside the Fanal workspace
12
+ (or `sh tools/fanal-optimize.sh`).
13
+ 2. Every ✔ item is fine. Every ⚠ item is a REAL gap to review.
14
+ 3. Fix only the ⚠ items that matter for the deployment target.
15
+ 4. Never touch the EXCLUDED list (below) just to imitate DSH.
16
+
17
+ ## The checklist (distilled from DeepSeek Harness)
18
+
19
+ - One brain × many skins (browser, Electron, PWA, panel, wallboard).
20
+ - Electron hardening: single-instance lock, kiosk mode for the kitchen
21
+ tablet, win/linux targets configured.
22
+ - PWA: manifest + service worker with an offline cache.
23
+ - Token gate for LAN exposure (SUPERVISOR_TOKEN, like DSH's ?token=).
24
+ - Batched state (one /api/state instead of many polls).
25
+ - Client key silo (the API key lives in the client's settings file).
26
+ - Bundled runtime for production installs (DSH ships its own Node —
27
+ the client host must not need a system Node).
28
+ - Guard gates (check.sh + verify-app) before any artifact ships.
29
+
30
+ ## Intentionally EXCLUDED (DSH pieces that do not apply to Fanal)
31
+
32
+ - The client plugin ecosystem (window.__ModuleLoader__): Fanal has no
33
+ third-party UI plugins.
34
+ - The Cordis runtime inside the product: Fanal is a product, not a
35
+ harness.
36
+ - Chat/GitHub/Feishu sources: Fanal is the silo; the factory lives at
37
+ Trasunto.
38
+ - Profiles-per-purpose: one silo per install is simpler and sovereign.
39
+
40
+ ## Report format
41
+
42
+ Always report: `N ok · M to review`, the concrete ⚠ items with the fix,
43
+ and nothing else. Do not propose changes from the EXCLUDED list.
@@ -0,0 +1,50 @@
1
+ #!/bin/sh
2
+ # fanal-optimize.sh — the COMPÁS audit: Fanal × DSH optimizations, filtered.
3
+ # Compares Fanal against the optimization checklist distilled from DeepSeek
4
+ # Harness, and reports ONLY what makes sense for a sovereign agentic
5
+ # orchestration layer. Never over-engineers: DSH pieces that do not apply
6
+ # (client plugin ecosystem, Cordis runtime inside the product, chat
7
+ # sources) are listed as INTENTIONALLY EXCLUDED, not as warnings.
8
+ set -u
9
+ ROOT="$(cd "$(dirname "$0")/.." && pwd)"
10
+ SV="$ROOT/supervisor"; APP="$ROOT/apps/desktop"
11
+ pass=0; warn=0; ok=0
12
+
13
+ chk() { # chk <label> <condition-expr>
14
+ if eval "$2"; then ok=$((ok+1)); echo " ✔ $1"; else warn=$((warn+1)); echo " ⚠ $1"; fi
15
+ }
16
+
17
+ echo "== COMPÁS — Fanal optimization audit (DSH-derived, filtered) =="
18
+
19
+ echo "— The one brain × many skins (DSH pattern):"
20
+ chk "Electron single-instance lock" "[ -n \"$(grep -l requestSingleInstanceLock "$APP/main.js" 2>/dev/null)\" ]"
21
+ chk "Electron kiosk mode (kitchen tablet)" "[ -n \"$(grep -l -- '--kiosk' "$APP/main.js" 2>/dev/null)\" ]"
22
+ chk "win/linux electron targets" "[ -n \"$(grep -l '\"win\"' "$APP/package.json" 2>/dev/null)\" ]"
23
+ chk "PWA manifest + service worker" "[ -f "$ROOT/ui/manifest.webmanifest" ] && [ -f "$ROOT/ui/sw.js" ]"
24
+ chk "offline cache in sw" "[ -n \"$(grep -l caches "$ROOT/ui/sw.js" 2>/dev/null)\" ]"
25
+
26
+ echo "— Production hardening (DSH token gate pattern):"
27
+ chk "token gate (SUPERVISOR_TOKEN)" "[ -n \"$(grep -l SUPERVISOR_TOKEN "$SV/server.js" 2>/dev/null)\" ]"
28
+ chk "batched /api/state" "[ -n \"$(grep -l 'api/state' "$SV/server.js" 2>/dev/null)\" ]"
29
+ chk "client key silo (settings.json)" "[ -n \"$(grep -l settings.json "$SV/server.js" 2>/dev/null)\" ]"
30
+
31
+ echo "— The sovereignty layer (Fanal specifics):"
32
+ chk "sector packs present" "[ -f "$ROOT/docs/sector-packs/restaurant.json" ]"
33
+ chk "guard gates (check.sh + verify-app)" "[ -f "$ROOT/tools/check.sh" ] && [ -f "$ROOT/tools/verify-app.sh" ]"
34
+ chk "routing table + telemetry in server" "[ -n \"$(grep -l 'const ROUTES' "$SV/server.js" 2>/dev/null)\" ]"
35
+
36
+ echo "— The one warning that matters for client machines:"
37
+ if [ -n "$(grep -l 'require("http")\|createServer' "$SV/server.js" 2>/dev/null)" ]; then
38
+ echo " ⚠ The supervisor is a Node script: the CLIENT host needs Node ≥18. DSH ships its own runtime — for production Fanal, bundle a node runtime in the installer (the desktop app already does)."
39
+ warn=$((warn+1))
40
+ fi
41
+
42
+ echo ""
43
+ echo "— Intentionally EXCLUDED from Fanal (DSH pieces that do not apply):"
44
+ echo " · the client plugin ecosystem (ModuleLoader) — Fanal has no third-party UI plugins"
45
+ echo " · the Cordis runtime inside the product — Fanal is a product, not a harness"
46
+ echo " · chat/GitHub/Feishu sources — Fanal is the silo, not the factory"
47
+ echo " · profiles-per-purpose — one silo per install is simpler and sovereign"
48
+ echo ""
49
+ echo "== Result: $ok ok · $warn to review =="
50
+ [ "$warn" -eq 0 ]
@@ -0,0 +1,4 @@
1
+ # @javierfrancoleal/compas — the platform optimizer organ.
2
+ - insert:
3
+ - id: compas
4
+ name: '@javierfrancoleal/compas'
package/icon.svg ADDED
@@ -0,0 +1,7 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64">
2
+ <rect width="64" height="64" rx="14" fill="#7C5CFF"/>
3
+ <circle cx="32" cy="32" r="16" fill="none" stroke="#ffffff" stroke-width="3"/>
4
+ <circle cx="32" cy="32" r="2.5" fill="#ffffff"/>
5
+ <line x1="32" y1="32" x2="43" y2="21" stroke="#ffffff" stroke-width="3" stroke-linecap="round"/>
6
+ <circle cx="10" cy="12" r="3" fill="#FACC15"/>
7
+ </svg>
package/lib/index.js ADDED
@@ -0,0 +1,45 @@
1
+ // @javierfrancoleal/compas — an organ of the J.Franco agentic workflow.
2
+ // Created by J.Franco. Registers the compas 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-compas";
8
+ const SKILL_BODY_URL = new URL("../assets/compas.md", import.meta.url);
9
+ const RESOURCE_BASE = { kind: "directory", path: fileURLToPath(new URL("../assets/", import.meta.url)) };
10
+
11
+ const CANDIDATE = {
12
+ name: "compas",
13
+ description: "The platform optimizer organ of the J.Franco agentic workflow: audits Fanal against the optimization checklist distilled from DeepSeek Harness (one brain many skins, token gate, batched state, PWA cache, electron hardening, bundled runtime) and applies ONLY what makes sense for a sovereign agentic orchestration layer — never over-engineers.",
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 = "compas";
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": "تدقق Fanal وفق تحسينات DSH وتطبق ما له معنى فقط."
5
+ }
6
+ }
package/locale/de.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Kompass",
4
+ "description": "Prüft Fanal gegen DSH-Optimierungen und wendet nur Sinnvolles an."
5
+ }
6
+ }
package/locale/en.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Compass",
4
+ "description": "Audits Fanal against DSH-derived optimizations and applies only what makes sense."
5
+ }
6
+ }
package/locale/es.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Compás",
4
+ "description": "Audita Fanal contra las optimizaciones derivadas de DSH y aplica solo lo que tiene sentido."
5
+ }
6
+ }
package/locale/fr.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Compas",
4
+ "description": "Audite Fanal selon les optimisations issues de DSH et n'applique que ce qui a du sens."
5
+ }
6
+ }
package/locale/it.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Bussola",
4
+ "description": "Verifica Fanal rispetto alle ottimizzazioni DSH e applica solo ciò che ha senso."
5
+ }
6
+ }
package/locale/ja.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "羅針盤",
4
+ "description": "DSH 由来の最適化で Fanal を監査し、意味のあるものだけ適用します。"
5
+ }
6
+ }
package/locale/ko.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "나침반",
4
+ "description": "DSH 기반 최적화로 Fanal을 감사하고 의미 있는 것만 적용합니다."
5
+ }
6
+ }
package/locale/pt.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Bússola",
4
+ "description": "Audita Fanal contra as otimizações DSH e aplica apenas o que faz sentido."
5
+ }
6
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "罗盘",
4
+ "description": "对照 DSH 优化审计 Fanal,只应用有意义的部分。"
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,6 +1,18 @@
1
1
  {
2
2
  "name": "@javierfrancoleal/compas",
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": "Compás — the platform optimizer organ of the J.Franco agentic workflow: audits Fanal against the optimization checklist distilled from DeepSeek Harness (one brain many skins, token gate, batched state, PWA cache, electron hardening) and applies ONLY what makes sense for a sovereign agentic orchestration layer. Never over-engineers. 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
+ "icon": "./icon.svg",
11
+ "files": ["icon.svg", "locale/*.json", "lib/index.js", "assets", "cordis.patch.yml", "README.md"],
12
+ "engines": { "node": ">=24", "dsh": ">=0.2.1-rc.0" },
13
+ "repository": { "type": "git", "url": "git+https://github.com/JavierFrancoLeal/jfranco-agentic-suite.git", "directory": "jfranco-compas" },
14
+ "keywords": ["deepseek-harness", "agentic-workflow", "optimization", "electron", "pwa", "sovereign"],
15
+ "dsh": { "manifestVersion": 1, "bundle": { "patch": "./cordis.patch.yml" } },
16
+ "publishConfig": { "access": "public" },
17
+ "peerDependencies": { "@deepseek-ai/cordis": "~4.0.5", "@deepseek-ai/dsh-skill": ">=0.2.1-rc.5" }
18
+ }