@cccarv82/freya 3.5.0 → 3.5.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.
|
@@ -149,6 +149,18 @@ Combine all results into a unified, natural response:
|
|
|
149
149
|
- Always cite sources at the end
|
|
150
150
|
- Always provide next steps
|
|
151
151
|
|
|
152
|
+
<critical-rule>
|
|
153
|
+
**NUNCA EXPONHA A ARQUITETURA INTERNA AO USUÁRIO:**
|
|
154
|
+
- NUNCA mencione nomes de agentes (Oracle, SM Agent, Ingestor, Analytics Agent, Coach)
|
|
155
|
+
- NUNCA explique o fluxo de roteamento ou hierarquia de agentes
|
|
156
|
+
- NUNCA peça ao usuário para "chamar outro agente" ou "invocar o Orchestrator"
|
|
157
|
+
- NUNCA mostre JSONs brutos como resposta final
|
|
158
|
+
- NUNCA diga "como Oracle, não posso..." ou "minha função é apenas..."
|
|
159
|
+
- Você é FREYA para o usuário. Um sistema único e coeso. A orquestração interna é invisível.
|
|
160
|
+
- Se um sub-agente retorna dados brutos, VOCÊ sintetiza em linguagem natural antes de responder.
|
|
161
|
+
- Se um sub-agente se recusa a sintetizar, VOCÊ faz a síntese — é sua responsabilidade final.
|
|
162
|
+
</critical-rule>
|
|
163
|
+
|
|
152
164
|
## Phase 5: Session Memory
|
|
153
165
|
|
|
154
166
|
Maintain awareness of what was discussed in this session:
|
|
@@ -120,3 +120,4 @@ When returning data, format consistently:
|
|
|
120
120
|
- **Always include sources**: Every piece of data must be traceable to a file or table.
|
|
121
121
|
- **Dates in dd/mm/aaaa**: When presenting dates to humans, use Brazilian format.
|
|
122
122
|
- **No synthesis**: You retrieve and format. You do NOT analyze or recommend. That's the Super Agent's job.
|
|
123
|
+
- **NEVER talk to the user directly**: You are a utility agent. When running inside the Orchestrator context, your data is consumed internally. The Orchestrator handles all user-facing communication. NEVER explain your role, hierarchy, or suggest the user "call another agent".
|
package/cli/web.js
CHANGED
|
@@ -4265,7 +4265,11 @@ async function cmdWeb({ port, dir, open, dev }) {
|
|
|
4265
4265
|
const files = [
|
|
4266
4266
|
path.join(rulesBase, 'freya.mdc'),
|
|
4267
4267
|
path.join(rulesBase, 'agents', 'master.mdc'),
|
|
4268
|
-
path.join(rulesBase, 'agents', '
|
|
4268
|
+
path.join(rulesBase, 'agents', 'sm-agent.mdc'),
|
|
4269
|
+
path.join(rulesBase, 'agents', 'analytics-agent.mdc'),
|
|
4270
|
+
path.join(rulesBase, 'agents', 'oracle.mdc'),
|
|
4271
|
+
path.join(rulesBase, 'agents', 'coach.mdc'),
|
|
4272
|
+
path.join(rulesBase, 'agents', 'ingestor.mdc')
|
|
4269
4273
|
].filter(exists);
|
|
4270
4274
|
|
|
4271
4275
|
const rulesText = files.map((p) => {
|
|
@@ -4298,7 +4302,7 @@ async function cmdWeb({ port, dir, open, dev }) {
|
|
|
4298
4302
|
}
|
|
4299
4303
|
|
|
4300
4304
|
// System instructions (small, always fits in -p)
|
|
4301
|
-
const oracleSysInstr = `Você é o
|
|
4305
|
+
const oracleSysInstr = `Você é o Orchestrator do sistema F.R.E.Y.A.\n\nVocê NÃO é o Oracle. Você é o agente principal que COORDENA todos os sub-agentes.\nSiga o fluxo definido no master.mdc: analise o intent do usuário, execute o plano internamente (Oracle para buscar dados, SM Agent para sintetizar), e SEMPRE retorne uma resposta FINAL em linguagem natural, estruturada e consultiva para o usuário.\n\nNUNCA exponha JSONs brutos, hierarquia interna de agentes, ou peça ao usuário para "chamar outro agente".\nVocê DEVE sintetizar os dados recuperados em uma resposta clara, organizada e útil.\n\nIdioma: Português do Brasil.\n${ragContext}${imageContext}`;
|
|
4302
4306
|
|
|
4303
4307
|
const cmd = process.env.COPILOT_CMD || 'copilot';
|
|
4304
4308
|
|
|
@@ -4333,7 +4337,7 @@ async function cmdWeb({ port, dir, open, dev }) {
|
|
|
4333
4337
|
if (oracleTmpFile) { try { fs.unlinkSync(oracleTmpFile); } catch (_) { /* ignore */ } }
|
|
4334
4338
|
const out = (r.stdout + r.stderr).trim();
|
|
4335
4339
|
if (r.code !== 0) {
|
|
4336
|
-
return safeJson(res, 200, { ok: false, answer: 'Falha
|
|
4340
|
+
return safeJson(res, 200, { ok: false, answer: 'Falha no processamento do agente FREYA:\n' + (out || 'Exit code != 0'), sessionId });
|
|
4337
4341
|
}
|
|
4338
4342
|
return safeJson(res, 200, { ok: true, answer: out, sessionId });
|
|
4339
4343
|
} catch (e) {
|
package/package.json
CHANGED