@cccarv82/freya 1.0.65 → 2.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/README.md +15 -34
- package/bin/freya.js +83 -1
- package/cli/index.js +24 -45
- package/cli/init.js +25 -15
- package/cli/web-ui.js +26 -6
- package/cli/web.js +15 -19
- package/package.json +2 -1
- package/templates/base/README.md +15 -34
- package/templates/base/USER_GUIDE.md +14 -21
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# F.R.E.Y.A. - Fully Responsive Enhanced Yield Assistant
|
|
2
2
|
|
|
3
|
-
> **Sua Assistente de Produtividade Local-First
|
|
3
|
+
> **Sua Assistente de Produtividade Local-First no navegador.**
|
|
4
4
|
|
|
5
|
-
F.R.E.Y.A. é um sistema de agentes de IA projetado para organizar seu trabalho, gerenciar status de projetos, rastrear tarefas e registrar sua evolução de carreira, tudo através de uma interface de chat simples e direta.
|
|
5
|
+
F.R.E.Y.A. é um sistema de agentes de IA projetado para organizar seu trabalho, gerenciar status de projetos, rastrear tarefas e registrar sua evolução de carreira, tudo através de uma interface de chat simples e direta no navegador.
|
|
6
6
|
|
|
7
7
|
## 🌟 Principais Recursos
|
|
8
8
|
|
|
@@ -16,9 +16,9 @@ F.R.E.Y.A. é um sistema de agentes de IA projetado para organizar seu trabalho,
|
|
|
16
16
|
* **Git Automation:** Gere commits inteligentes automaticamente. A Freya analisa suas mudanças e escreve a mensagem para você.
|
|
17
17
|
* **Privacidade Total:** Seus dados (JSON e Markdown) ficam 100% locais na sua máquina.
|
|
18
18
|
|
|
19
|
-
## 📦 Instalação (
|
|
19
|
+
## 📦 Instalação (Web UI)
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
A FREYA agora roda como um app web local. Basta iniciar o servidor e abrir o navegador.
|
|
22
22
|
|
|
23
23
|
## 🚢 Publicação no npm (maintainers)
|
|
24
24
|
|
|
@@ -40,50 +40,31 @@ git push --follow-tags
|
|
|
40
40
|
|
|
41
41
|
### Via npx (recomendado)
|
|
42
42
|
```bash
|
|
43
|
-
npx @cccarv82/freya
|
|
44
|
-
# cria ./freya
|
|
43
|
+
npx @cccarv82/freya
|
|
45
44
|
```
|
|
46
45
|
|
|
47
46
|
### Via instalação global
|
|
48
47
|
```bash
|
|
49
48
|
npm i -g @cccarv82/freya
|
|
50
|
-
freya
|
|
51
|
-
# cria ./freya
|
|
49
|
+
freya
|
|
52
50
|
```
|
|
53
51
|
|
|
54
|
-
###
|
|
52
|
+
### Opções úteis
|
|
55
53
|
```bash
|
|
56
|
-
freya
|
|
57
|
-
freya
|
|
58
|
-
freya
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
### Atualizar uma workspace existente (sem perder dados)
|
|
62
|
-
Por padrão, ao rodar `init` em uma pasta existente, o CLI **preserva**:
|
|
63
|
-
- `data/**`
|
|
64
|
-
- `logs/**`
|
|
65
|
-
|
|
66
|
-
E atualiza/instala normalmente:
|
|
67
|
-
- `.agent/**`
|
|
68
|
-
- `scripts/**`
|
|
69
|
-
- `README.md`, `USER_GUIDE.md`
|
|
70
|
-
- `package.json` (merge de scripts)
|
|
71
|
-
|
|
72
|
-
Flags (use com cuidado):
|
|
73
|
-
```bash
|
|
74
|
-
freya init --here --force-data # permite sobrescrever data/
|
|
75
|
-
freya init --here --force-logs # permite sobrescrever logs/
|
|
54
|
+
freya --port 4000 # muda a porta (padrão: 3872)
|
|
55
|
+
freya --dir ./freya # define a workspace local (padrão: ./freya)
|
|
56
|
+
freya --no-open # não abre o navegador automaticamente
|
|
57
|
+
freya --dev # cria dados demo em workspace vazia
|
|
76
58
|
```
|
|
77
59
|
|
|
78
60
|
## 🚀 Como Usar
|
|
79
61
|
|
|
80
|
-
1.
|
|
81
|
-
2.
|
|
82
|
-
|
|
83
|
-
3. Siga as instruções da assistente.
|
|
62
|
+
1. Inicie o servidor com `npx @cccarv82/freya` ou `freya`.
|
|
63
|
+
2. O navegador abre em `http://127.0.0.1:3872` (porta padrão).
|
|
64
|
+
3. Se a workspace não existir, a própria UI faz o **auto-init** usando apenas arquivos locais.
|
|
84
65
|
|
|
85
66
|
### Comandos Rápidos
|
|
86
|
-
Você pode pedir para a FREYA executar estas tarefas diretamente
|
|
67
|
+
Você pode pedir para a FREYA executar estas tarefas diretamente na UI, ou rodar via terminal dentro da workspace:
|
|
87
68
|
|
|
88
69
|
* **Checar integridade:** "Verifique a saúde do sistema" (ou `npm run health`)
|
|
89
70
|
* **Migrar dados (se necessário):** `npm run migrate` (adiciona `schemaVersion` em logs antigos)
|
package/bin/freya.js
CHANGED
|
@@ -2,7 +2,89 @@
|
|
|
2
2
|
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const path = require('path');
|
|
6
|
+
const { cmdWeb } = require('../cli/web');
|
|
7
|
+
|
|
8
|
+
const DEFAULT_PORT = 3872;
|
|
9
|
+
|
|
10
|
+
function usage() {
|
|
11
|
+
return `
|
|
12
|
+
FREYA web
|
|
13
|
+
|
|
14
|
+
Usage:
|
|
15
|
+
freya [--port <n>] [--dir <path>] [--no-open] [--dev]
|
|
16
|
+
|
|
17
|
+
Options:
|
|
18
|
+
--port <n> Port to bind (default: ${DEFAULT_PORT})
|
|
19
|
+
--dir <path> Workspace directory (default: ./freya)
|
|
20
|
+
--no-open Do not open the browser automatically
|
|
21
|
+
--dev Seed demo data for a new/empty workspace
|
|
22
|
+
|
|
23
|
+
Examples:
|
|
24
|
+
freya
|
|
25
|
+
freya --port 4000
|
|
26
|
+
freya --dir ./freya
|
|
27
|
+
freya --no-open
|
|
28
|
+
`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function parseArgs(argv) {
|
|
32
|
+
const args = [];
|
|
33
|
+
const flags = new Set();
|
|
34
|
+
const kv = {};
|
|
35
|
+
|
|
36
|
+
for (let i = 0; i < argv.length; i++) {
|
|
37
|
+
const a = argv[i];
|
|
38
|
+
if (a === '-h') {
|
|
39
|
+
flags.add(a);
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
if (a.startsWith('--')) {
|
|
43
|
+
const next = argv[i + 1];
|
|
44
|
+
if (next && !next.startsWith('--')) {
|
|
45
|
+
kv[a] = next;
|
|
46
|
+
i++;
|
|
47
|
+
} else {
|
|
48
|
+
flags.add(a);
|
|
49
|
+
}
|
|
50
|
+
} else {
|
|
51
|
+
args.push(a);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return { args, flags, kv };
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async function run(argv) {
|
|
59
|
+
const { args, flags, kv } = parseArgs(argv);
|
|
60
|
+
const positionals = args.filter((a) => a !== 'web');
|
|
61
|
+
|
|
62
|
+
if (flags.has('--help') || flags.has('-h')) {
|
|
63
|
+
process.stdout.write(usage());
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (positionals.length > 0) {
|
|
68
|
+
process.stderr.write(`Unknown arguments: ${positionals.join(' ')}\n`);
|
|
69
|
+
process.stdout.write(usage());
|
|
70
|
+
process.exitCode = 1;
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const portRaw = kv['--port'];
|
|
75
|
+
const port = portRaw ? Number(portRaw) : DEFAULT_PORT;
|
|
76
|
+
if (!Number.isFinite(port) || port <= 0) {
|
|
77
|
+
process.stderr.write('Invalid --port\n');
|
|
78
|
+
process.exitCode = 1;
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const dir = kv['--dir'] ? path.resolve(process.cwd(), kv['--dir']) : null;
|
|
83
|
+
const open = !flags.has('--no-open');
|
|
84
|
+
const dev = flags.has('--dev');
|
|
85
|
+
|
|
86
|
+
await cmdWeb({ port, dir, open, dev });
|
|
87
|
+
}
|
|
6
88
|
|
|
7
89
|
run(process.argv.slice(2)).catch((err) => {
|
|
8
90
|
const msg = err && err.stack ? err.stack : String(err);
|
package/cli/index.js
CHANGED
|
@@ -3,32 +3,22 @@
|
|
|
3
3
|
const fs = require('fs');
|
|
4
4
|
const path = require('path');
|
|
5
5
|
|
|
6
|
-
const { cmdInit } = require('./init');
|
|
7
6
|
const { cmdWeb } = require('./web');
|
|
8
7
|
|
|
9
8
|
function usage() {
|
|
10
9
|
return `
|
|
11
|
-
freya - F.R.E.Y.A.
|
|
10
|
+
freya - F.R.E.Y.A. Web
|
|
12
11
|
|
|
13
12
|
Usage:
|
|
14
|
-
freya
|
|
15
|
-
freya web [--port <n>] [--dir <path>] [--no-open] [--dev]
|
|
13
|
+
freya [--port <n>] [--dir <path>] [--no-open] [--dev]
|
|
16
14
|
|
|
17
15
|
Defaults:
|
|
18
|
-
-
|
|
19
|
-
- Preserves existing data/ and logs/ by default
|
|
16
|
+
- Workspace defaults to ./freya
|
|
20
17
|
|
|
21
18
|
Examples:
|
|
22
|
-
freya
|
|
23
|
-
freya
|
|
24
|
-
freya
|
|
25
|
-
freya init --here --force # update agents/scripts, keep data/logs
|
|
26
|
-
freya init --here --force-data # overwrite data/ too (danger)
|
|
27
|
-
npx @cccarv82/freya init
|
|
28
|
-
|
|
29
|
-
freya web
|
|
30
|
-
freya web --dir ./freya --port 3872
|
|
31
|
-
freya web --dev # seeds demo data/logs for quick testing
|
|
19
|
+
freya
|
|
20
|
+
freya --dir ./freya --port 3872
|
|
21
|
+
freya --dev # seeds demo data/logs for quick testing
|
|
32
22
|
`;
|
|
33
23
|
}
|
|
34
24
|
|
|
@@ -39,6 +29,10 @@ function parseArgs(argv) {
|
|
|
39
29
|
|
|
40
30
|
for (let i = 0; i < argv.length; i++) {
|
|
41
31
|
const a = argv[i];
|
|
32
|
+
if (a === '-h') {
|
|
33
|
+
flags.add(a);
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
42
36
|
if (a.startsWith('--')) {
|
|
43
37
|
const next = argv[i + 1];
|
|
44
38
|
if (next && !next.startsWith('--')) {
|
|
@@ -57,47 +51,32 @@ function parseArgs(argv) {
|
|
|
57
51
|
|
|
58
52
|
async function run(argv) {
|
|
59
53
|
const { args, flags, kv } = parseArgs(argv);
|
|
60
|
-
const
|
|
54
|
+
const positionals = args.filter((a) => a !== 'web');
|
|
61
55
|
|
|
62
|
-
if (
|
|
56
|
+
if (flags.has('--help') || flags.has('-h')) {
|
|
63
57
|
fs.writeSync(process.stdout.fd, usage());
|
|
64
58
|
return;
|
|
65
59
|
}
|
|
66
60
|
|
|
67
|
-
if (
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
? path.resolve(process.cwd(), args[1])
|
|
72
|
-
: (inPlace ? process.cwd() : defaultDir);
|
|
73
|
-
|
|
74
|
-
const force = flags.has('--force');
|
|
75
|
-
const forceData = flags.has('--force-data');
|
|
76
|
-
const forceLogs = flags.has('--force-logs');
|
|
77
|
-
|
|
78
|
-
await cmdInit({ targetDir, force, forceData, forceLogs });
|
|
61
|
+
if (positionals.length > 0) {
|
|
62
|
+
process.stderr.write(`Unknown arguments: ${positionals.join(' ')}\n`);
|
|
63
|
+
fs.writeSync(process.stdout.fd, usage());
|
|
64
|
+
process.exitCode = 1;
|
|
79
65
|
return;
|
|
80
66
|
}
|
|
81
67
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
const dev = flags.has('--dev');
|
|
87
|
-
|
|
88
|
-
if (!Number.isFinite(port) || port <= 0) {
|
|
89
|
-
process.stderr.write('Invalid --port\n');
|
|
90
|
-
process.exitCode = 1;
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
68
|
+
const port = Number(kv['--port'] || 3872);
|
|
69
|
+
const dir = kv['--dir'] ? path.resolve(process.cwd(), kv['--dir']) : null;
|
|
70
|
+
const open = !flags.has('--no-open');
|
|
71
|
+
const dev = flags.has('--dev');
|
|
93
72
|
|
|
94
|
-
|
|
73
|
+
if (!Number.isFinite(port) || port <= 0) {
|
|
74
|
+
process.stderr.write('Invalid --port\n');
|
|
75
|
+
process.exitCode = 1;
|
|
95
76
|
return;
|
|
96
77
|
}
|
|
97
78
|
|
|
98
|
-
|
|
99
|
-
fs.writeSync(process.stdout.fd, usage());
|
|
100
|
-
process.exitCode = 1;
|
|
79
|
+
await cmdWeb({ port, dir, open, dev });
|
|
101
80
|
}
|
|
102
81
|
|
|
103
82
|
module.exports = { run };
|
package/cli/init.js
CHANGED
|
@@ -118,7 +118,23 @@ function ensurePackageJson(targetDir, force, summary) {
|
|
|
118
118
|
summary.updated.push('package.json');
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
function formatInitSummary(summary, targetDir) {
|
|
122
|
+
const lines = [];
|
|
123
|
+
lines.push('FREYA workspace initialized.');
|
|
124
|
+
lines.push(`Target: ${targetDir}`);
|
|
125
|
+
lines.push('');
|
|
126
|
+
lines.push(`Created: ${summary.created.length}`);
|
|
127
|
+
lines.push(`Updated: ${summary.updated.length}`);
|
|
128
|
+
lines.push(`Copied: ${summary.copied.length}`);
|
|
129
|
+
lines.push(`Skipped: ${summary.skipped.length}`);
|
|
130
|
+
lines.push('');
|
|
131
|
+
lines.push('Next steps:');
|
|
132
|
+
lines.push('- Run: npm run health');
|
|
133
|
+
lines.push('- (If upgrading old data) Run: npm run migrate');
|
|
134
|
+
return lines.join('\n');
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
async function initWorkspace({ targetDir, force, forceData = false, forceLogs = false }) {
|
|
122
138
|
const templateDir = path.join(__dirname, '..', 'templates', 'base');
|
|
123
139
|
if (!exists(templateDir)) throw new Error(`Missing template directory: ${templateDir}`);
|
|
124
140
|
|
|
@@ -135,20 +151,14 @@ async function cmdInit({ targetDir, force, forceData = false, forceLogs = false
|
|
|
135
151
|
// Ensure logs folder exists (no daily file created)
|
|
136
152
|
mkdirp(path.join(targetDir, 'logs', 'daily'));
|
|
137
153
|
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
lines.push('');
|
|
142
|
-
lines.push(`Created: ${summary.created.length}`);
|
|
143
|
-
lines.push(`Updated: ${summary.updated.length}`);
|
|
144
|
-
lines.push(`Copied: ${summary.copied.length}`);
|
|
145
|
-
lines.push(`Skipped: ${summary.skipped.length}`);
|
|
146
|
-
lines.push('');
|
|
147
|
-
lines.push('Next steps:');
|
|
148
|
-
lines.push('- Run: npm run health');
|
|
149
|
-
lines.push('- (If upgrading old data) Run: npm run migrate');
|
|
154
|
+
const output = formatInitSummary(summary, targetDir);
|
|
155
|
+
return { output, summary };
|
|
156
|
+
}
|
|
150
157
|
|
|
151
|
-
|
|
158
|
+
async function cmdInit({ targetDir, force, forceData = false, forceLogs = false }) {
|
|
159
|
+
const { output } = await initWorkspace({ targetDir, force, forceData, forceLogs });
|
|
160
|
+
process.stdout.write(output + '\n');
|
|
161
|
+
return { output };
|
|
152
162
|
}
|
|
153
163
|
|
|
154
|
-
module.exports = { cmdInit };
|
|
164
|
+
module.exports = { cmdInit, initWorkspace };
|
package/cli/web-ui.js
CHANGED
|
@@ -565,6 +565,7 @@
|
|
|
565
565
|
+ '<div class="reportName">' + escapeHtml(item.name) + '</div>'
|
|
566
566
|
+ '<div class="reportMeta">'
|
|
567
567
|
+ '<span class="reportMetaText">' + escapeHtml(item.relPath) + ' • ' + escapeHtml(meta) + '</span>'
|
|
568
|
+
+ '<button class="iconBtn" data-action="copy" title="Copiar">⧉</button>'
|
|
568
569
|
+ '<button class="iconBtn" data-action="pdf" title="Baixar PDF">⬇</button>'
|
|
569
570
|
+ '</div>'
|
|
570
571
|
+ '</div>'
|
|
@@ -611,6 +612,30 @@
|
|
|
611
612
|
};
|
|
612
613
|
}
|
|
613
614
|
|
|
615
|
+
const copyBtn = card.querySelector('[data-action="copy"]');
|
|
616
|
+
if (copyBtn) {
|
|
617
|
+
copyBtn.onclick = async (ev) => {
|
|
618
|
+
ev.stopPropagation();
|
|
619
|
+
try {
|
|
620
|
+
const html = renderMarkdown(state.reportTexts[item.relPath] || '');
|
|
621
|
+
const text = (preview && preview.innerText) ? preview.innerText : (state.reportTexts[item.relPath] || '');
|
|
622
|
+
const blob = new Blob([`<div>${html}</div>`], { type: 'text/html' });
|
|
623
|
+
const data = [new ClipboardItem({ 'text/html': blob, 'text/plain': new Blob([text], { type: 'text/plain' }) })];
|
|
624
|
+
await navigator.clipboard.write(data);
|
|
625
|
+
setPill('ok', 'copiado');
|
|
626
|
+
setTimeout(() => setPill('ok', 'pronto'), 800);
|
|
627
|
+
} catch {
|
|
628
|
+
try {
|
|
629
|
+
await navigator.clipboard.writeText(state.reportTexts[item.relPath] || '');
|
|
630
|
+
setPill('ok', 'copiado');
|
|
631
|
+
setTimeout(() => setPill('ok', 'pronto'), 800);
|
|
632
|
+
} catch {
|
|
633
|
+
setPill('err', 'copy failed');
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
};
|
|
637
|
+
}
|
|
638
|
+
|
|
614
639
|
const pdfBtn = card.querySelector('[data-action="pdf"]');
|
|
615
640
|
if (pdfBtn) {
|
|
616
641
|
pdfBtn.onclick = (ev) => {
|
|
@@ -628,12 +653,7 @@
|
|
|
628
653
|
};
|
|
629
654
|
}
|
|
630
655
|
|
|
631
|
-
grid.appendChild(card);
|
|
632
|
-
|
|
633
|
-
if (expanded && raw) {
|
|
634
|
-
requestAnimationFrame(() => autoGrowTextarea(raw));
|
|
635
|
-
}
|
|
636
|
-
}
|
|
656
|
+
grid.appendChild(card); }
|
|
637
657
|
}
|
|
638
658
|
|
|
639
659
|
async function refreshReportsPage() {
|
package/cli/web.js
CHANGED
|
@@ -7,6 +7,7 @@ const crypto = require('crypto');
|
|
|
7
7
|
const { spawn } = require('child_process');
|
|
8
8
|
const { searchWorkspace } = require('../scripts/lib/search-utils');
|
|
9
9
|
const { searchIndex } = require('../scripts/lib/index-utils');
|
|
10
|
+
const { initWorkspace } = require('./init');
|
|
10
11
|
|
|
11
12
|
function readAppVersion() {
|
|
12
13
|
const pkgPath = path.join(__dirname, '..', 'package.json');
|
|
@@ -41,16 +42,6 @@ function guessNpmCmd() {
|
|
|
41
42
|
return process.platform === 'win32' ? 'npm' : 'npm';
|
|
42
43
|
}
|
|
43
44
|
|
|
44
|
-
function guessNpxCmd() {
|
|
45
|
-
// We'll execute via cmd.exe on Windows for reliability.
|
|
46
|
-
return process.platform === 'win32' ? 'npx' : 'npx';
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function guessNpxYesFlag() {
|
|
50
|
-
// npx supports --yes/-y on modern npm; use -y for broad compatibility
|
|
51
|
-
return '-y';
|
|
52
|
-
}
|
|
53
|
-
|
|
54
45
|
function guessOpenCmd() {
|
|
55
46
|
// Minimal cross-platform opener without extra deps
|
|
56
47
|
if (process.platform === 'win32') return { cmd: 'cmd', args: ['/c', 'start', ''] };
|
|
@@ -2043,18 +2034,23 @@ async function cmdWeb({ port, dir, open, dev }) {
|
|
|
2043
2034
|
}
|
|
2044
2035
|
|
|
2045
2036
|
if (req.url === '/api/init') {
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2037
|
+
try {
|
|
2038
|
+
const { output } = await initWorkspace({ targetDir: workspaceDir, force: false, forceData: false, forceLogs: false });
|
|
2039
|
+
return safeJson(res, 200, { output: String(output || '').trim() });
|
|
2040
|
+
} catch (e) {
|
|
2041
|
+
const message = e && e.message ? e.message : String(e);
|
|
2042
|
+
return safeJson(res, 400, { error: message || 'init failed', output: '' });
|
|
2043
|
+
}
|
|
2050
2044
|
}
|
|
2051
2045
|
|
|
2052
2046
|
if (req.url === '/api/update') {
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2047
|
+
try {
|
|
2048
|
+
const { output } = await initWorkspace({ targetDir: workspaceDir, force: false, forceData: false, forceLogs: false });
|
|
2049
|
+
return safeJson(res, 200, { output: String(output || '').trim() });
|
|
2050
|
+
} catch (e) {
|
|
2051
|
+
const message = e && e.message ? e.message : String(e);
|
|
2052
|
+
return safeJson(res, 400, { error: message || 'update failed', output: '' });
|
|
2053
|
+
}
|
|
2058
2054
|
}
|
|
2059
2055
|
|
|
2060
2056
|
const npmCmd = guessNpmCmd();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cccarv82/freya",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Personal AI Assistant with local-first persistence",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"health": "node scripts/validate-data.js",
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"keywords": [],
|
|
19
19
|
"author": "",
|
|
20
20
|
"license": "ISC",
|
|
21
|
+
"main": "bin/freya.js",
|
|
21
22
|
"bin": {
|
|
22
23
|
"freya": "bin/freya.js"
|
|
23
24
|
},
|
package/templates/base/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# F.R.E.Y.A. - Fully Responsive Enhanced Yield Assistant
|
|
2
2
|
|
|
3
|
-
> **Sua Assistente de Produtividade Local-First
|
|
3
|
+
> **Sua Assistente de Produtividade Local-First no navegador.**
|
|
4
4
|
|
|
5
|
-
F.R.E.Y.A. é um sistema de agentes de IA projetado para organizar seu trabalho, gerenciar status de projetos, rastrear tarefas e registrar sua evolução de carreira, tudo através de uma interface de chat simples e direta.
|
|
5
|
+
F.R.E.Y.A. é um sistema de agentes de IA projetado para organizar seu trabalho, gerenciar status de projetos, rastrear tarefas e registrar sua evolução de carreira, tudo através de uma interface de chat simples e direta no navegador.
|
|
6
6
|
|
|
7
7
|
## 🌟 Principais Recursos
|
|
8
8
|
|
|
@@ -16,9 +16,9 @@ F.R.E.Y.A. é um sistema de agentes de IA projetado para organizar seu trabalho,
|
|
|
16
16
|
* **Git Automation:** Gere commits inteligentes automaticamente. A Freya analisa suas mudanças e escreve a mensagem para você.
|
|
17
17
|
* **Privacidade Total:** Seus dados (JSON e Markdown) ficam 100% locais na sua máquina.
|
|
18
18
|
|
|
19
|
-
## 📦 Instalação (
|
|
19
|
+
## 📦 Instalação (Web UI)
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
A FREYA agora roda como um app web local. Basta iniciar o servidor e abrir o navegador.
|
|
22
22
|
|
|
23
23
|
## 🚢 Publicação no npm (maintainers)
|
|
24
24
|
|
|
@@ -40,50 +40,31 @@ git push --follow-tags
|
|
|
40
40
|
|
|
41
41
|
### Via npx (recomendado)
|
|
42
42
|
```bash
|
|
43
|
-
npx @cccarv82/freya
|
|
44
|
-
# cria ./freya
|
|
43
|
+
npx @cccarv82/freya
|
|
45
44
|
```
|
|
46
45
|
|
|
47
46
|
### Via instalação global
|
|
48
47
|
```bash
|
|
49
48
|
npm i -g @cccarv82/freya
|
|
50
|
-
freya
|
|
51
|
-
# cria ./freya
|
|
49
|
+
freya
|
|
52
50
|
```
|
|
53
51
|
|
|
54
|
-
###
|
|
52
|
+
### Opções úteis
|
|
55
53
|
```bash
|
|
56
|
-
freya
|
|
57
|
-
freya
|
|
58
|
-
freya
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
### Atualizar uma workspace existente (sem perder dados)
|
|
62
|
-
Por padrão, ao rodar `init` em uma pasta existente, o CLI **preserva**:
|
|
63
|
-
- `data/**`
|
|
64
|
-
- `logs/**`
|
|
65
|
-
|
|
66
|
-
E atualiza/instala normalmente:
|
|
67
|
-
- `.agent/**`
|
|
68
|
-
- `scripts/**`
|
|
69
|
-
- `README.md`, `USER_GUIDE.md`
|
|
70
|
-
- `package.json` (merge de scripts)
|
|
71
|
-
|
|
72
|
-
Flags (use com cuidado):
|
|
73
|
-
```bash
|
|
74
|
-
freya init --here --force-data # permite sobrescrever data/
|
|
75
|
-
freya init --here --force-logs # permite sobrescrever logs/
|
|
54
|
+
freya --port 4000 # muda a porta (padrão: 3872)
|
|
55
|
+
freya --dir ./freya # define a workspace local (padrão: ./freya)
|
|
56
|
+
freya --no-open # não abre o navegador automaticamente
|
|
57
|
+
freya --dev # cria dados demo em workspace vazia
|
|
76
58
|
```
|
|
77
59
|
|
|
78
60
|
## 🚀 Como Usar
|
|
79
61
|
|
|
80
|
-
1.
|
|
81
|
-
2.
|
|
82
|
-
|
|
83
|
-
3. Siga as instruções da assistente.
|
|
62
|
+
1. Inicie o servidor com `npx @cccarv82/freya` ou `freya`.
|
|
63
|
+
2. O navegador abre em `http://127.0.0.1:3872` (porta padrão).
|
|
64
|
+
3. Se a workspace não existir, a própria UI faz o **auto-init** usando apenas arquivos locais.
|
|
84
65
|
|
|
85
66
|
### Comandos Rápidos
|
|
86
|
-
Você pode pedir para a FREYA executar estas tarefas diretamente
|
|
67
|
+
Você pode pedir para a FREYA executar estas tarefas diretamente na UI, ou rodar via terminal dentro da workspace:
|
|
87
68
|
|
|
88
69
|
* **Checar integridade:** "Verifique a saúde do sistema" (ou `npm run health`)
|
|
89
70
|
* **Migrar dados (se necessário):** `npm run migrate` (adiciona `schemaVersion` em logs antigos)
|
|
@@ -1,44 +1,37 @@
|
|
|
1
1
|
# Guia do Usuário F.R.E.Y.A. v1.0
|
|
2
2
|
|
|
3
3
|
Bem-vindo à F.R.E.Y.A. (Fully Responsive Enhanced Yield Assistant).
|
|
4
|
-
Este sistema foi projetado para ser seu assistente pessoal de produtividade, operando
|
|
4
|
+
Este sistema foi projetado para ser seu assistente pessoal de produtividade, operando localmente no navegador, com foco total em privacidade (Local-First) e eficiência.
|
|
5
5
|
|
|
6
6
|
## 🚀 Como Iniciar
|
|
7
7
|
|
|
8
|
-
### 1)
|
|
9
|
-
|
|
8
|
+
### 1) Iniciar a Web UI
|
|
9
|
+
Execute o servidor local e abra o navegador.
|
|
10
10
|
|
|
11
11
|
**Via npx (recomendado):**
|
|
12
12
|
```bash
|
|
13
|
-
npx @cccarv82/freya
|
|
14
|
-
# cria ./freya
|
|
13
|
+
npx @cccarv82/freya
|
|
15
14
|
```
|
|
16
15
|
|
|
17
16
|
**Via instalação global:**
|
|
18
17
|
```bash
|
|
19
18
|
npm i -g @cccarv82/freya
|
|
20
|
-
freya
|
|
21
|
-
# cria ./freya
|
|
19
|
+
freya
|
|
22
20
|
```
|
|
23
21
|
|
|
24
|
-
**
|
|
22
|
+
**Opcoes comuns:**
|
|
25
23
|
```bash
|
|
26
|
-
freya
|
|
27
|
-
freya
|
|
28
|
-
freya
|
|
24
|
+
freya --port 4000
|
|
25
|
+
freya --dir ./freya
|
|
26
|
+
freya --no-open
|
|
27
|
+
freya --dev
|
|
29
28
|
```
|
|
30
29
|
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
### 2) Selecionar/Inicializar a workspace
|
|
31
|
+
A primeira execucao abre a UI e, se necessario, faz o auto-init da workspace local (sem banco externo).
|
|
33
32
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
freya init --here --force-data
|
|
37
|
-
freya init --here --force-logs
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### 2) Interagir no chat da IDE
|
|
41
|
-
Para interagir com a assistente, basta chamá-la no chat da sua IDE:
|
|
33
|
+
### 3) Interagir no chat da UI
|
|
34
|
+
Para interagir com a assistente, basta chamá-la no chat da UI:
|
|
42
35
|
|
|
43
36
|
> `@freya [sua mensagem]`
|
|
44
37
|
|