@javierfrancoleal/compas 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 +25 -2
- package/assets/compas.md +43 -0
- package/assets/fanal-optimize.sh +56 -0
- package/cordis.patch.yml +4 -0
- package/icon.svg +7 -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 +52 -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,26 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
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.
|
package/assets/compas.md
ADDED
|
@@ -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,56 @@
|
|
|
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 installers (mac + windows), ready to build:"
|
|
37
|
+
chk "appId without the old brand" "[ -n \"$(grep -l 'ca.trasunto.fanal' "$APP/package.json" 2>/dev/null)\" ]"
|
|
38
|
+
chk "win targets nsis + portable" "[ -n \"$(grep -l 'nsis' "$APP/package.json" 2>/dev/null)\" ]"
|
|
39
|
+
chk "bundled runtime spawn (process.execPath)" "[ -n \"$(grep -l process.execPath "$APP/main.js" 2>/dev/null)\" ]"
|
|
40
|
+
chk "runtime pack renamed (trasunto-runtime)" "[ -d "$ROOT/dist/trasunto-runtime" ]"
|
|
41
|
+
|
|
42
|
+
echo "— The one warning that matters for client machines:"
|
|
43
|
+
if [ -n "$(grep -l 'require("http")\|createServer' "$SV/server.js" 2>/dev/null)" ]; then
|
|
44
|
+
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)."
|
|
45
|
+
warn=$((warn+1))
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
echo ""
|
|
49
|
+
echo "— Intentionally EXCLUDED from Fanal (DSH pieces that do not apply):"
|
|
50
|
+
echo " · the client plugin ecosystem (ModuleLoader) — Fanal has no third-party UI plugins"
|
|
51
|
+
echo " · the Cordis runtime inside the product — Fanal is a product, not a harness"
|
|
52
|
+
echo " · chat/GitHub/Feishu sources — Fanal is the silo, not the factory"
|
|
53
|
+
echo " · profiles-per-purpose — one silo per install is simpler and sovereign"
|
|
54
|
+
echo ""
|
|
55
|
+
echo "== Result: $ok ok · $warn to review =="
|
|
56
|
+
[ "$warn" -eq 0 ]
|
package/cordis.patch.yml
ADDED
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
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,54 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@javierfrancoleal/compas",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.1",
|
|
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": {
|
|
10
|
+
".": "./lib/index.js",
|
|
11
|
+
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
12
|
+
"./package.json": "./package.json",
|
|
13
|
+
"./locale/*.json": "./locale/*.json"
|
|
14
|
+
},
|
|
15
|
+
"icon": "./icon.svg",
|
|
16
|
+
"files": [
|
|
17
|
+
"icon.svg",
|
|
18
|
+
"locale/*.json",
|
|
19
|
+
"lib/index.js",
|
|
20
|
+
"assets",
|
|
21
|
+
"cordis.patch.yml",
|
|
22
|
+
"README.md"
|
|
23
|
+
],
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">=24",
|
|
26
|
+
"dsh": ">=0.2.1-rc.0"
|
|
27
|
+
},
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "git+https://github.com/JavierFrancoLeal/jfranco-agentic-suite.git",
|
|
31
|
+
"directory": "jfranco-compas"
|
|
32
|
+
},
|
|
33
|
+
"keywords": [
|
|
34
|
+
"deepseek-harness",
|
|
35
|
+
"agentic-workflow",
|
|
36
|
+
"optimization",
|
|
37
|
+
"electron",
|
|
38
|
+
"pwa",
|
|
39
|
+
"sovereign"
|
|
40
|
+
],
|
|
41
|
+
"dsh": {
|
|
42
|
+
"manifestVersion": 1,
|
|
43
|
+
"bundle": {
|
|
44
|
+
"patch": "./cordis.patch.yml"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"publishConfig": {
|
|
48
|
+
"access": "public"
|
|
49
|
+
},
|
|
50
|
+
"peerDependencies": {
|
|
51
|
+
"@deepseek-ai/cordis": "~4.0.5",
|
|
52
|
+
"@deepseek-ai/dsh-skill": ">=0.2.1-rc.5"
|
|
53
|
+
}
|
|
54
|
+
}
|