predators-protocol 0.5.2-beta.0 → 0.5.4-beta.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/bin/predators-cli.js +2 -1
- package/lib/access-token-client.js +12 -1
- package/lib/heartbeat-animation.js +19 -16
- package/package.json +1 -1
package/bin/predators-cli.js
CHANGED
|
@@ -9,7 +9,7 @@ const fs = require("fs");
|
|
|
9
9
|
const path = require("path");
|
|
10
10
|
const { spawnSync } = require("child_process");
|
|
11
11
|
|
|
12
|
-
const CLI_VERSION_CANON = "predators-cli-canon-0.5.
|
|
12
|
+
const CLI_VERSION_CANON = "predators-cli-canon-0.5.4-beta.0-heartbeat-cinematic-perceptivel-2026-05-27";
|
|
13
13
|
|
|
14
14
|
const PACKAGE_ROOT = path.resolve(__dirname, "..");
|
|
15
15
|
const BUNDLE_DIR = path.join(PACKAGE_ROOT, "bundle");
|
|
@@ -88,6 +88,7 @@ COMANDOS canon vigentes (16 comandos):
|
|
|
88
88
|
|
|
89
89
|
-- fase UX (additive · Lei #4 byte-canon preserve · 5 comandos) --
|
|
90
90
|
init Polimórfico · sem arg = splash cinematográfico · com <name> = scaffolda projeto novo + sync
|
|
91
|
+
Flags: --force (sempre cinemático · ignora cache) · --minimal (1-linha)
|
|
91
92
|
config Preferências user (theme · audio · splash · telemetry)
|
|
92
93
|
show Renderiza ASCII art predator card OR The Eye logo
|
|
93
94
|
sync Sincroniza canon files (predators/ + docs/ + .claude/ + CLAUDE.md) do bundle NPX para CWD
|
|
@@ -216,10 +216,21 @@ async function runUnlock(plaintext) {
|
|
|
216
216
|
* Retorna true se autorizado · process.exit se bloqueado
|
|
217
217
|
*/
|
|
218
218
|
async function requireValidAccess(commandName) {
|
|
219
|
-
// Comandos sempre abertos (introspecção pública
|
|
219
|
+
// Comandos sempre abertos canon (introspecção pública · UX onboarding · admin owner-key)
|
|
220
|
+
// FIX 0.5.3-beta.0 honest UPFRONT: 0.5.2 bloqueou init/tour/list-* incorretamente
|
|
221
|
+
// → toda introspecção read-only canon é PÚBLICA (sócios + colaboradores + visitantes)
|
|
222
|
+
// → sync exige acesso (baixa canon proprietary)
|
|
223
|
+
// → invoke/execute futuros exigem acesso
|
|
220
224
|
const PUBLIC_COMMANDS = new Set([
|
|
225
|
+
// Introspecção básica
|
|
221
226
|
"version", "help", "--help", "-h",
|
|
222
227
|
"status", "config", "show",
|
|
228
|
+
// UX onboarding cinemático (animações canon · introspecção pública)
|
|
229
|
+
"init", "tour",
|
|
230
|
+
// Listagens canon read-only
|
|
231
|
+
"list-predators", "list-workflows", "workflow-states", "story-states",
|
|
232
|
+
"layers-list", "benchmark-info", "metrics-list",
|
|
233
|
+
// Token canon (unlock obtém · gen-token tem owner-key próprio)
|
|
223
234
|
"unlock", // unlock é o caminho de OBTER acesso · não pode exigir acesso
|
|
224
235
|
"gen-token", // gen-token usa PREDATORS_OWNER_KEY_BACKEND próprio (Apex T7)
|
|
225
236
|
]);
|
|
@@ -79,16 +79,18 @@ function cursorUp(n) {
|
|
|
79
79
|
/**
|
|
80
80
|
* Heartbeat Sangue canon animation
|
|
81
81
|
*
|
|
82
|
-
* Sequência:
|
|
83
|
-
* 1. render dim red (resting)
|
|
84
|
-
* 2. SISTOLE 1: bright gold
|
|
85
|
-
* 3. diástole: dim red
|
|
86
|
-
* 4. SISTOLE 2: bright gold
|
|
87
|
-
* 5. diástole: dim red
|
|
88
|
-
* 6. SISTOLE 3: bright gold
|
|
89
|
-
* 7. resting final: gold normal
|
|
82
|
+
* Sequência canon (calibração 0.5.4 · cinematic perceptível):
|
|
83
|
+
* 1. render dim red (resting baseline) 500ms
|
|
84
|
+
* 2. SISTOLE 1: bright gold 700ms (BUM)
|
|
85
|
+
* 3. diástole 1: dim red 600ms
|
|
86
|
+
* 4. SISTOLE 2: bright gold 700ms (BUM)
|
|
87
|
+
* 5. diástole 2: dim red 600ms
|
|
88
|
+
* 6. SISTOLE 3: bright gold 700ms (BUM)
|
|
89
|
+
* 7. resting final: gold normal held
|
|
90
90
|
*
|
|
91
|
-
* Total: ~
|
|
91
|
+
* Total: ~3.8s + final resting (versus 1.7s 0.5.3 · 2.2× mais perceptível)
|
|
92
|
+
* Apex T7 reportou empírico 0.5.3 fast-flicker invisível em PowerShell + MINGW64.
|
|
93
|
+
* Calibração 0.5.4 alvo: cada frame >=500ms · visível em qualquer terminal real.
|
|
92
94
|
*
|
|
93
95
|
* @param {WritableStream} stream process.stdout default
|
|
94
96
|
* @returns {Promise<void>}
|
|
@@ -107,28 +109,29 @@ async function renderHeartbeat(stream = process.stdout) {
|
|
|
107
109
|
stream.write(CURSOR_HIDE);
|
|
108
110
|
|
|
109
111
|
try {
|
|
110
|
-
// Frame 1: dim red (resting baseline)
|
|
112
|
+
// Frame 1: dim red (resting baseline) · longa pra estabelecer estado
|
|
111
113
|
renderName(BLOOD_DIM, stream);
|
|
112
|
-
await sleep(
|
|
114
|
+
await sleep(500);
|
|
113
115
|
|
|
114
|
-
// 3 batidas
|
|
116
|
+
// 3 batidas cardíacas: sistole bright → diástole dim → repeat
|
|
115
117
|
for (let beat = 0; beat < 3; beat++) {
|
|
116
|
-
// SISTOLE: bright gold (BUM)
|
|
118
|
+
// SISTOLE: bright gold (BUM) · longa pra impacto visual
|
|
117
119
|
stream.write(cursorUp(NAME_HEIGHT));
|
|
118
120
|
renderName(GOLD_BRIGHT, stream);
|
|
119
|
-
await sleep(
|
|
121
|
+
await sleep(700);
|
|
120
122
|
|
|
121
123
|
if (beat < 2) {
|
|
122
124
|
// diástole: dim red (entre batidas · não no fim)
|
|
123
125
|
stream.write(cursorUp(NAME_HEIGHT));
|
|
124
126
|
renderName(BLOOD_DIM, stream);
|
|
125
|
-
await sleep(
|
|
127
|
+
await sleep(600);
|
|
126
128
|
}
|
|
127
129
|
}
|
|
128
130
|
|
|
129
|
-
// Resting final: gold normal (não bright · não dim)
|
|
131
|
+
// Resting final: gold normal (não bright · não dim) · breve pausa
|
|
130
132
|
stream.write(cursorUp(NAME_HEIGHT));
|
|
131
133
|
renderName(GOLD_NORMAL, stream);
|
|
134
|
+
await sleep(300);
|
|
132
135
|
} finally {
|
|
133
136
|
stream.write(CURSOR_SHOW);
|
|
134
137
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "predators-protocol",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4-beta.0",
|
|
4
4
|
"description": "Predators Protocol \u00b7 multi-agent predatory framework \u00b7 64 predators in 10 layers \u00b7 canon Lei #14 PERFEITO OU FIX-GERAL \u00b7 FASE 7 COMPLETA: RuntimeRouter + Synapse Engine + LLM Real Production + v1 \u2192 H\u00edbrida full transition \u00b7 proprietary",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"predators-protocol",
|