@openlife/cli 1.7.4 → 1.7.5
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/CHANGELOG.md +186 -0
- package/CODE_OF_CONDUCT.md +31 -0
- package/CONTRIBUTING.md +133 -0
- package/README.md +25 -9
- package/package.json +10 -2
- package/docs/CHANGELOG_FEATURE_ROLLOUT_DESIGNMD.md +0 -43
- package/docs/EXTERNAL_SOURCES_AND_SECURITY_GUARD.md +0 -33
- package/docs/OPENLIFE_AUDIT_2026-05-06.md +0 -170
- package/docs/OPENLIFE_CONSOLIDATED_PLAN_2026-05-06.md +0 -299
- package/docs/OPENLIFE_DUAL_MODE_IMPLEMENTATION_PLAN.md +0 -205
- package/docs/OPENLIFE_EVOLUTION_SURFACE_2026-05-07.md +0 -53
- package/docs/OPENLIFE_SKILLS_IMPORT_2026-05-07.json +0 -223
- package/docs/OPENLIFE_SQUADS_IMPORT_2026-05-07.json +0 -184
- package/docs/PAPERCLIP_OPENLIFE_INVESTIGATION.md +0 -85
- package/docs/RELEASE_ORGANIZATION_PLAN.md +0 -164
- package/docs/audit/CLI-EXECUTION-RESULTS.md +0 -113
- package/docs/audit/CLI-MATRIX.md +0 -556
- package/docs/audit/DOC-PARITY-GAPS.md +0 -351
- package/docs/audit/ORCHESTRATOR-MATRIX.md +0 -136
- package/docs/audit/TEST-COVERAGE-GAPS.md +0 -334
- package/docs/audit/integrations/SKIPPED.md +0 -101
- package/docs/autonomous-install.md +0 -79
- package/docs/capability-genesis.md +0 -137
- package/docs/capability-pack-schema.md +0 -157
- package/docs/commands.md +0 -82
- package/docs/deep-research-capability.md +0 -114
- package/docs/development/typescript-conventions.md +0 -95
- package/docs/host-installers.md +0 -68
- package/docs/install/aiobuilder.md +0 -70
- package/docs/install/claude-code.md +0 -83
- package/docs/install/codex.md +0 -64
- package/docs/install/gemini-cli.md +0 -64
- package/docs/install/runtime-profiles.md +0 -83
- package/docs/openlife-agent-os-blueprint.md +0 -114
- package/docs/openlife-install-backlog.md +0 -115
- package/docs/openlife-install-spec.md +0 -306
- package/docs/operations/CLOUD_CUTOVER_AUDIT.md +0 -37
- package/docs/operations/PHASE_PROGRESS_CONTINUATION.md +0 -24
- package/docs/performance-benchmarks.md +0 -83
- package/docs/planning/v1.3-capability-genesis.md +0 -157
- package/docs/plans/2026-05-05-admin-interface-professional-dark-premium-plan.md +0 -84
- package/docs/plans/2026-05-05-openlife-autonomous-domain-marketplace-masterplan.md +0 -122
- package/docs/roadmap/OPENLIFE_MASTER_PLAN_CLOUD_V3.md +0 -97
- package/docs/sandboxing-research.md +0 -117
- package/docs/stories/epic-feature-audit/1.1.story.md +0 -84
- package/docs/stories/epic-feature-audit/1.2.story.md +0 -102
- package/docs/stories/epic-feature-audit/1.3.story.md +0 -93
- package/docs/stories/epic-feature-audit/1.5.story.md +0 -121
- package/docs/stories/epic-feature-audit/1.6.story.md +0 -80
- package/docs/stories/epic-feature-completeness/2.1.story.md +0 -70
- package/docs/stories/epic-feature-completeness/2.2.story.md +0 -49
- package/docs/stories/epic-feature-completeness/2.3.story.md +0 -74
- package/docs/stories/epic-feature-completeness/2.4.story.md +0 -71
- package/docs/stories/epic-feature-completeness/3.1.story.md +0 -56
- package/docs/stories/epic-feature-completeness/3.2.story.md +0 -80
- package/docs/stories/epic-feature-completeness/3.3.story.md +0 -68
- package/docs/stories/epic-feature-completeness/3.4.story.md +0 -71
- package/docs/stories/epic-feature-completeness/3.5.story.md +0 -72
- package/docs/stories/epic-feature-completeness/3.6.story.md +0 -69
- package/docs/stories/epic-feature-completeness/3.7.story.md +0 -68
- package/docs/stories/epic-feature-completeness/3.8.story.md +0 -57
- package/docs/v1.4-changelog.md +0 -159
- package/docs/v1.5-changelog.md +0 -106
- package/docs/v1.5-roadmap.md +0 -121
- package/docs/v1.6-changelog.md +0 -67
- package/docs/v1.6-roadmap.md +0 -89
|
@@ -1,299 +0,0 @@
|
|
|
1
|
-
# OpenLife — Plano Consolidado Pós-Auditoria
|
|
2
|
-
|
|
3
|
-
Data: 2026-05-06
|
|
4
|
-
Repo executável: `D:\\VSCODDE-DEV\\openlife-core-main`
|
|
5
|
-
Referências estratégicas: `OPENLIFE_PRODUCTION/` e `LARA/OPEN-LIFE/`
|
|
6
|
-
|
|
7
|
-
## Princípio operacional
|
|
8
|
-
|
|
9
|
-
OpenLife deve permanecer funcional em dois modos:
|
|
10
|
-
|
|
11
|
-
1. **CLI framework** — comandos determinísticos, instalação local, `openlife chat`, skills/squads/agentes/MCPs como catálogo.
|
|
12
|
-
2. **Agente autônomo** — daemon contínuo, Telegram, governança, execução multi-executor, memória e auditoria.
|
|
13
|
-
|
|
14
|
-
Obsidian é referência estratégica/documental. O runtime usa repo/cloud/catalog, não paths do Obsidian.
|
|
15
|
-
|
|
16
|
-
## Correções já aplicadas nesta rodada
|
|
17
|
-
|
|
18
|
-
### 1. Runtime-source truth
|
|
19
|
-
|
|
20
|
-
Antes, agentes/squads caíam por padrão em:
|
|
21
|
-
|
|
22
|
-
- `LARA/Agentes`
|
|
23
|
-
- `LARA/Squads`
|
|
24
|
-
|
|
25
|
-
Agora o default aponta para:
|
|
26
|
-
|
|
27
|
-
- `.catalog/agents`
|
|
28
|
-
- `.catalog/squads`
|
|
29
|
-
|
|
30
|
-
Validação:
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
node bin/openlife.js agents list
|
|
34
|
-
node bin/openlife.js squads list
|
|
35
|
-
npm run test:runtime-source
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### 2. Providers de catálogo local
|
|
39
|
-
|
|
40
|
-
`FileAgentProvider` agora caminha recursivamente e aceita estrutura:
|
|
41
|
-
|
|
42
|
-
```txt
|
|
43
|
-
.catalog/agents/<id>/AGENT.md
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
`FileSquadProvider` aceita:
|
|
47
|
-
|
|
48
|
-
```txt
|
|
49
|
-
.catalog/squads/<id>/SQUAD.md
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### 3. Phase1-check sem falso bloqueio multimodal
|
|
53
|
-
|
|
54
|
-
`gateway-image` não falha mais quando `.temp_images` não existe. Ele registra skip explícito e mantém o check funcional.
|
|
55
|
-
|
|
56
|
-
### 4. README alinhado aos comandos reais
|
|
57
|
-
|
|
58
|
-
README agora prioriza:
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
|
-
openlife install
|
|
62
|
-
openlife system setup --profile framework
|
|
63
|
-
openlife system setup --profile autonomous
|
|
64
|
-
openlife up
|
|
65
|
-
openlife start --daemon
|
|
66
|
-
openlife chat
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
Remove a dependência em comandos antigos `openlife agent start` como caminho principal.
|
|
70
|
-
|
|
71
|
-
### 5. Segurança npm parcial
|
|
72
|
-
|
|
73
|
-
`axios` / `follow-redirects` foram atualizados via `npm audit fix`.
|
|
74
|
-
|
|
75
|
-
Pendente: `@anthropic-ai/sdk` ainda tem advisory moderado com fix breaking.
|
|
76
|
-
|
|
77
|
-
### 6. Postinstall compatível com npm atual
|
|
78
|
-
|
|
79
|
-
Substituído `npm bin -g` por `npm prefix -g` + `/bin`, evitando aviso falso no npm moderno.
|
|
80
|
-
|
|
81
|
-
### 7. Test suite consolidada
|
|
82
|
-
|
|
83
|
-
Adicionado:
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
npm run test:runtime-source
|
|
87
|
-
npm run test:all
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
## Validação executada
|
|
91
|
-
|
|
92
|
-
```bash
|
|
93
|
-
bash scripts/postinstall-check.sh
|
|
94
|
-
npm run test:all
|
|
95
|
-
node bin/openlife.js phase1-check
|
|
96
|
-
node bin/openlife.js status
|
|
97
|
-
node bin/openlife.js doctor
|
|
98
|
-
node bin/openlife.js agents list
|
|
99
|
-
node bin/openlife.js squads list
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
Resultado: funcional.
|
|
103
|
-
|
|
104
|
-
Observação: Gemini retornou 503 temporário em um check, mas fallback OpenAI funcionou e o phase1 passou.
|
|
105
|
-
|
|
106
|
-
## O que ainda falta — plano priorizado
|
|
107
|
-
|
|
108
|
-
## P0 — Operação confiável agora
|
|
109
|
-
|
|
110
|
-
### P0.1 Railway produção
|
|
111
|
-
|
|
112
|
-
Problema: último deploy Railway visto na auditoria estava `FAILED`.
|
|
113
|
-
|
|
114
|
-
Ações:
|
|
115
|
-
|
|
116
|
-
1. Verificar projeto correto no Railway.
|
|
117
|
-
2. Validar variáveis sem expor segredos:
|
|
118
|
-
- `TELEGRAM_BOT_TOKEN`
|
|
119
|
-
- `OPENLIFE_TELEGRAM_ALLOWED_USER_ID`
|
|
120
|
-
- `OPENLIFE_RUNTIME_PROFILE`
|
|
121
|
-
- `OPENLIFE_ALLOWED_LLM_EXECUTORS`
|
|
122
|
-
- chaves/API ou OAuth conforme política.
|
|
123
|
-
3. Rodar build em clone limpo GitHub.
|
|
124
|
-
4. Redeploy apenas com aprovação explícita.
|
|
125
|
-
5. Smoke pós-deploy:
|
|
126
|
-
- `/health` ou comando equivalente
|
|
127
|
-
- Telegram outbound/inbound
|
|
128
|
-
- `openlife status`
|
|
129
|
-
- `phase1-check` quando aplicável.
|
|
130
|
-
|
|
131
|
-
### P0.2 Telegram autônomo real
|
|
132
|
-
|
|
133
|
-
Ações:
|
|
134
|
-
|
|
135
|
-
1. Garantir single long-poller.
|
|
136
|
-
2. Validar `getMe` antes de iniciar daemon.
|
|
137
|
-
3. Validar `OPENLIFE_TELEGRAM_ALLOWED_USER_ID`.
|
|
138
|
-
4. Smoke Telegram no `@openlife_master_bot`.
|
|
139
|
-
5. Confirmar persona Lara sem fallback mock enganoso.
|
|
140
|
-
|
|
141
|
-
### P0.3 Catálogo mínimo real
|
|
142
|
-
|
|
143
|
-
Hoje `.catalog/agents` e `.catalog/squads` têm exemplos/testes.
|
|
144
|
-
|
|
145
|
-
Ações:
|
|
146
|
-
|
|
147
|
-
1. Promover os agentes reais essenciais para `.catalog/agents`.
|
|
148
|
-
2. Promover squads reais para `.catalog/squads`.
|
|
149
|
-
3. Manter `LARA/OPEN-LIFE` e `OPENLIFE_PRODUCTION` como referência, não leitura runtime.
|
|
150
|
-
4. Criar testes garantindo quantidade mínima real por categoria.
|
|
151
|
-
|
|
152
|
-
## P1 — Agent OS vivo
|
|
153
|
-
|
|
154
|
-
### P1.1 Service-centric architecture
|
|
155
|
-
|
|
156
|
-
Implementar o serviço como verdade operacional contínua:
|
|
157
|
-
|
|
158
|
-
- `service mode`
|
|
159
|
-
- estado contínuo
|
|
160
|
-
- loops de execução
|
|
161
|
-
- missões/tasks como unidades transitórias
|
|
162
|
-
- auditoria de decisões
|
|
163
|
-
|
|
164
|
-
Entregáveis:
|
|
165
|
-
|
|
166
|
-
- `ServiceRuntime`
|
|
167
|
-
- `ServiceStateStore`
|
|
168
|
-
- `service status`
|
|
169
|
-
- `service loop --once`
|
|
170
|
-
- artefato `.openlife/service-state.json`
|
|
171
|
-
|
|
172
|
-
### P1.2 Dynamic Agent Builder real
|
|
173
|
-
|
|
174
|
-
Do plano mestre: agentes temporários/permanentes sob demanda.
|
|
175
|
-
|
|
176
|
-
Ações:
|
|
177
|
-
|
|
178
|
-
1. Criar contrato `AgentSpec` completo.
|
|
179
|
-
2. Gerar agente em `.catalog/agents/<id>/AGENT.md`.
|
|
180
|
-
3. Validar governança antes de ativar.
|
|
181
|
-
4. Registrar origem, motivo, score e expiração.
|
|
182
|
-
|
|
183
|
-
### P1.3 Squads completas
|
|
184
|
-
|
|
185
|
-
Regra de completude:
|
|
186
|
-
|
|
187
|
-
1. agente principal
|
|
188
|
-
2. índice de uso
|
|
189
|
-
3. workflow inicial
|
|
190
|
-
4. nota espelhada no Obsidian `LARA/Squads/`
|
|
191
|
-
|
|
192
|
-
Mas runtime deve ler do repo/cloud, não do Obsidian.
|
|
193
|
-
|
|
194
|
-
## P2 — Marketplace/catalogos seguros
|
|
195
|
-
|
|
196
|
-
Baseado na visão `LARA/OPEN-LIFE`:
|
|
197
|
-
|
|
198
|
-
- Agents
|
|
199
|
-
- Squads
|
|
200
|
-
- Skills
|
|
201
|
-
- MCPs
|
|
202
|
-
- modelos
|
|
203
|
-
- workflows
|
|
204
|
-
|
|
205
|
-
Ações:
|
|
206
|
-
|
|
207
|
-
1. Expandir `sources guard-check`.
|
|
208
|
-
2. Implementar import com scan obrigatório.
|
|
209
|
-
3. Bloquear `.env`, `.git`, scripts perigosos, executáveis, `node_modules`.
|
|
210
|
-
4. Criar `catalog promote` para promover material validado para `.catalog`.
|
|
211
|
-
5. Registrar auditoria em `.artifacts/security-events.jsonl`.
|
|
212
|
-
|
|
213
|
-
## P3 — Memória e aprendizado
|
|
214
|
-
|
|
215
|
-
Do MASTERPLAN V2: memória como infraestrutura.
|
|
216
|
-
|
|
217
|
-
Ações:
|
|
218
|
-
|
|
219
|
-
1. Separar memória curta/média/longa.
|
|
220
|
-
2. Criar promotion loop com score.
|
|
221
|
-
3. Não depender de Obsidian como memória runtime.
|
|
222
|
-
4. Criar `memory promote`, `memory audit`, `memory recall`.
|
|
223
|
-
|
|
224
|
-
## P4 — Mídia, visão e criação
|
|
225
|
-
|
|
226
|
-
Ordem de modelos de imagem definida:
|
|
227
|
-
|
|
228
|
-
1. `gpt-image-2-2026-04-21`
|
|
229
|
-
2. `gemini-3.1-flash-image-preview`
|
|
230
|
-
3. `Qwen Image`
|
|
231
|
-
4. `Nano Banana Pro / Gemini`
|
|
232
|
-
|
|
233
|
-
Ações:
|
|
234
|
-
|
|
235
|
-
1. Criar `ImageModelRouter`.
|
|
236
|
-
2. Criar política de fallback com log.
|
|
237
|
-
3. Integrar com assets/carrosséis/vídeo.
|
|
238
|
-
4. Registrar decisões em `.openlife/media-routing.log.jsonl`.
|
|
239
|
-
5. Usar FFmpeg/Remotion para composição final.
|
|
240
|
-
|
|
241
|
-
## P5 — Segurança e governança enterprise
|
|
242
|
-
|
|
243
|
-
Ações:
|
|
244
|
-
|
|
245
|
-
1. Resolver advisory Anthropic SDK em branch dedicada.
|
|
246
|
-
2. Redação/redaction universal de respostas Telegram.
|
|
247
|
-
3. Consentimento para ações destrutivas/deploy/push.
|
|
248
|
-
4. Policy por executor/modelo/projeto.
|
|
249
|
-
5. Smoke CI obrigatório.
|
|
250
|
-
|
|
251
|
-
## P6 — Produto instalável
|
|
252
|
-
|
|
253
|
-
Ações:
|
|
254
|
-
|
|
255
|
-
1. `openlife install` guiado completo.
|
|
256
|
-
2. `openlife update`, `upgrade`, `restart`, `up` confiáveis.
|
|
257
|
-
3. Instalação Windows/WSL limpa.
|
|
258
|
-
4. Template `.env.example` seguro.
|
|
259
|
-
5. Documentação com comandos reais.
|
|
260
|
-
|
|
261
|
-
## Próximo bloco recomendado
|
|
262
|
-
|
|
263
|
-
**Bloco 1 — Railway + Telegram produção**
|
|
264
|
-
|
|
265
|
-
Motivo: o core local já passa build/test/phase1. Agora o maior risco é produção/daemon.
|
|
266
|
-
|
|
267
|
-
Critérios de pronto:
|
|
268
|
-
|
|
269
|
-
- Railway deploy `SUCCESS`.
|
|
270
|
-
- Bot `@openlife_master_bot` responde via runtime OpenLife.
|
|
271
|
-
- Sem segundo long-poller.
|
|
272
|
-
- `openlife status`/`doctor` coerentes.
|
|
273
|
-
- Sem fallback mock enganoso.
|
|
274
|
-
|
|
275
|
-
**Bloco 2 — Catálogo real mínimo**
|
|
276
|
-
|
|
277
|
-
Migrar do material estratégico para `.catalog`:
|
|
278
|
-
|
|
279
|
-
- Lara core agent
|
|
280
|
-
- AIOBUILDER agents
|
|
281
|
-
- squads principais
|
|
282
|
-
- workflows iniciais
|
|
283
|
-
- skill networks
|
|
284
|
-
|
|
285
|
-
Critérios de pronto:
|
|
286
|
-
|
|
287
|
-
- `agents list` mostra agentes reais, não demos.
|
|
288
|
-
- `squads list` mostra squads reais, não demos.
|
|
289
|
-
- Teste impede fallback Obsidian/LARA.
|
|
290
|
-
|
|
291
|
-
## Notas de fonte
|
|
292
|
-
|
|
293
|
-
Materiais consultados/considerados:
|
|
294
|
-
|
|
295
|
-
- `OPENLIFE_PRODUCTION/OPENLIFE_MASTERPLAN_V2.md`
|
|
296
|
-
- `OPENLIFE_PRODUCTION/open-life-core/*`
|
|
297
|
-
- `LARA/OPEN-LIFE/OPEN-LIFE Platform - Arquitetura Definitiva.md`
|
|
298
|
-
- `LARA/OPEN-LIFE/00_MAPS/OPEN-LIFE - MAPA ESTRUTURAL CANÔNICO.md`
|
|
299
|
-
- auditoria local `docs/OPENLIFE_AUDIT_2026-05-06.md`
|
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
# OpenLife Dual Mode (Task/Service) — Implementation Plan
|
|
2
|
-
|
|
3
|
-
> **For Hermes:** execute in phases with build validation after each phase.
|
|
4
|
-
|
|
5
|
-
**Goal:** Implement explicit user choice between Task and Service execution modes, with Task as default and Service opt-in.
|
|
6
|
-
|
|
7
|
-
**Architecture:** Add a normalized execution intent (`mode`) at ingress, route execution through dedicated paths, and enforce mode-specific governance/observability while preserving current mission/service artifacts.
|
|
8
|
-
|
|
9
|
-
**Tech Stack:** TypeScript, existing OpenLife orchestrator modules, npm build/test.
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## Phase 1 — Intent Contract (explicit mode)
|
|
14
|
-
|
|
15
|
-
### Task 1.1: Add execution mode types
|
|
16
|
-
**Files:**
|
|
17
|
-
- Create: `src/orchestrator/ExecutionIntent.ts`
|
|
18
|
-
|
|
19
|
-
**Changes:**
|
|
20
|
-
- Add `ExecutionMode = 'task' | 'service'`
|
|
21
|
-
- Add `ExecutionIntent` interface with `mode`, `goal`, optional `serviceId`, `riskProfile`, `budgetPolicy`, `origin`.
|
|
22
|
-
|
|
23
|
-
**Verification:**
|
|
24
|
-
- `npm run build`
|
|
25
|
-
|
|
26
|
-
### Task 1.2: Wire mode into mission state
|
|
27
|
-
**Files:**
|
|
28
|
-
- Modify: `src/orchestrator/MissionState.ts`
|
|
29
|
-
|
|
30
|
-
**Changes:**
|
|
31
|
-
- Add `mode: 'task' | 'service'` to mission state schema.
|
|
32
|
-
- Ensure persisted mission JSON includes `mode`.
|
|
33
|
-
|
|
34
|
-
**Verification:**
|
|
35
|
-
- `npm run build`
|
|
36
|
-
|
|
37
|
-
---
|
|
38
|
-
|
|
39
|
-
## Phase 2 — Execution Router and split paths
|
|
40
|
-
|
|
41
|
-
### Task 2.1: Add router
|
|
42
|
-
**Files:**
|
|
43
|
-
- Create: `src/orchestrator/ExecutionRouter.ts`
|
|
44
|
-
|
|
45
|
-
**Changes:**
|
|
46
|
-
- Implement `route(intent)` returning `task` or `service` path handler.
|
|
47
|
-
- Default behavior when mode missing should be injected upstream (not inside router).
|
|
48
|
-
|
|
49
|
-
### Task 2.2: Separate run methods in orchestration loop
|
|
50
|
-
**Files:**
|
|
51
|
-
- Modify: `src/orchestrator/OrchestrationLoop.ts`
|
|
52
|
-
|
|
53
|
-
**Changes:**
|
|
54
|
-
- Extract `runTaskMode(...)` and `runServiceMode(...)` from current monolithic flow.
|
|
55
|
-
- Preserve existing consequence forecast and governance checks.
|
|
56
|
-
- Ensure service path updates `ServiceStateStore`; task path does not require continuous service lifecycle.
|
|
57
|
-
|
|
58
|
-
**Verification:**
|
|
59
|
-
- `npm run build`
|
|
60
|
-
- Existing consequence forecaster test remains green.
|
|
61
|
-
|
|
62
|
-
---
|
|
63
|
-
|
|
64
|
-
## Phase 3 — Ingress normalization (CLI + Telegram)
|
|
65
|
-
|
|
66
|
-
### Task 3.1: Normalize CLI input
|
|
67
|
-
**Files:**
|
|
68
|
-
- Modify: CLI command parser files (identify exact files in `src/` command layer)
|
|
69
|
-
|
|
70
|
-
**Changes:**
|
|
71
|
-
- Parse `--mode task|service`.
|
|
72
|
-
- If absent, set `mode='task'`.
|
|
73
|
-
|
|
74
|
-
### Task 3.2: Normalize Telegram input
|
|
75
|
-
**Files:**
|
|
76
|
-
- Modify: Telegram message handling files in gateway/orchestrator
|
|
77
|
-
|
|
78
|
-
**Changes:**
|
|
79
|
-
- Detect explicit phrases ("como tarefa", "como serviço").
|
|
80
|
-
- If ambiguous, return concise disambiguation prompt.
|
|
81
|
-
- Do not auto-promote task->service.
|
|
82
|
-
|
|
83
|
-
**Verification:**
|
|
84
|
-
- `npm run build`
|
|
85
|
-
- Manual chat simulation for both modes.
|
|
86
|
-
|
|
87
|
-
---
|
|
88
|
-
|
|
89
|
-
## Phase 4 — Governance by mode
|
|
90
|
-
|
|
91
|
-
### Task 4.1: Task policy enforcement
|
|
92
|
-
**Files:**
|
|
93
|
-
- Modify: `src/orchestrator/GovernanceLayer.ts`
|
|
94
|
-
|
|
95
|
-
**Changes:**
|
|
96
|
-
- Apply per-run risk/consent/budget checks for task mode only.
|
|
97
|
-
|
|
98
|
-
### Task 4.2: Service policy enforcement
|
|
99
|
-
**Files:**
|
|
100
|
-
- Modify: `src/orchestrator/GovernanceLayer.ts`
|
|
101
|
-
- Modify: `src/orchestrator/ServiceState.ts`
|
|
102
|
-
|
|
103
|
-
**Changes:**
|
|
104
|
-
- Enforce service status gates (`paused`, `archived`, `critical` policy).
|
|
105
|
-
- Add budget thresholds and hard-stop event emissions.
|
|
106
|
-
|
|
107
|
-
**Verification:**
|
|
108
|
-
- `npm run build`
|
|
109
|
-
- Add targeted tests for hard-stop and paused-service blocking.
|
|
110
|
-
|
|
111
|
-
---
|
|
112
|
-
|
|
113
|
-
## Phase 5 — Observability and control surface
|
|
114
|
-
|
|
115
|
-
### Task 5.1: Service status/events commands
|
|
116
|
-
**Files:**
|
|
117
|
-
- Modify: command router/CLI handlers
|
|
118
|
-
- Modify: Telegram command handlers
|
|
119
|
-
|
|
120
|
-
**Changes:**
|
|
121
|
-
- Add/read:
|
|
122
|
-
- `service status <id>`
|
|
123
|
-
- `service pause <id>`
|
|
124
|
-
- `service resume <id>`
|
|
125
|
-
- `service events <id>`
|
|
126
|
-
- `task status <taskId>`
|
|
127
|
-
|
|
128
|
-
### Task 5.2: Read models for summaries
|
|
129
|
-
**Files:**
|
|
130
|
-
- Create: `src/orchestrator/ServiceReadModel.ts` (optional)
|
|
131
|
-
|
|
132
|
-
**Changes:**
|
|
133
|
-
- Build compact summary object for chat-safe output.
|
|
134
|
-
|
|
135
|
-
**Verification:**
|
|
136
|
-
- `npm run build`
|
|
137
|
-
- Manual command checks.
|
|
138
|
-
|
|
139
|
-
---
|
|
140
|
-
|
|
141
|
-
## Phase 6 — Opt-in conversion only
|
|
142
|
-
|
|
143
|
-
### Task 6.1: Promote task to service (explicit)
|
|
144
|
-
**Files:**
|
|
145
|
-
- Modify: command handling layer
|
|
146
|
-
- Modify: `src/orchestrator/ServiceState.ts`
|
|
147
|
-
|
|
148
|
-
**Changes:**
|
|
149
|
-
- Add explicit promote command path.
|
|
150
|
-
- Record conversion event in service ledger.
|
|
151
|
-
|
|
152
|
-
### Task 6.2: Service run-once
|
|
153
|
-
**Files:**
|
|
154
|
-
- Modify: orchestration command layer + loop
|
|
155
|
-
|
|
156
|
-
**Changes:**
|
|
157
|
-
- Execute one cycle from service context without changing service type.
|
|
158
|
-
|
|
159
|
-
**Verification:**
|
|
160
|
-
- `npm run build`
|
|
161
|
-
- Add tests ensuring no implicit conversion occurs.
|
|
162
|
-
|
|
163
|
-
---
|
|
164
|
-
|
|
165
|
-
## Phase 7 — Validation matrix
|
|
166
|
-
|
|
167
|
-
### Required checks
|
|
168
|
-
1. Build:
|
|
169
|
-
- `npm run build`
|
|
170
|
-
|
|
171
|
-
2. Existing tests:
|
|
172
|
-
- `node dist/test_consequence_forecaster.js`
|
|
173
|
-
|
|
174
|
-
3. New tests to add:
|
|
175
|
-
- mode default = task
|
|
176
|
-
- explicit service route
|
|
177
|
-
- no auto-promotion task->service
|
|
178
|
-
- service paused blocks execution
|
|
179
|
-
- budget hard-stop triggers pause + event
|
|
180
|
-
|
|
181
|
-
4. Artifact checks:
|
|
182
|
-
- Task run writes only mission artifacts.
|
|
183
|
-
- Service run writes mission + service + events.
|
|
184
|
-
|
|
185
|
-
---
|
|
186
|
-
|
|
187
|
-
## Definition of Done
|
|
188
|
-
- Mode is explicit end-to-end (`task|service`).
|
|
189
|
-
- Task is default and remains lightweight.
|
|
190
|
-
- Service is opt-in and lifecycle-managed.
|
|
191
|
-
- No automatic task->service conversion.
|
|
192
|
-
- Governance and observability are mode-aware.
|
|
193
|
-
- CLI and Telegram support equivalent mode operations.
|
|
194
|
-
- Build green + targeted tests passing.
|
|
195
|
-
|
|
196
|
-
---
|
|
197
|
-
|
|
198
|
-
## Execution Order (recommended)
|
|
199
|
-
1. Phase 1
|
|
200
|
-
2. Phase 2
|
|
201
|
-
3. Phase 3
|
|
202
|
-
4. Phase 4
|
|
203
|
-
5. Phase 5
|
|
204
|
-
6. Phase 6
|
|
205
|
-
7. Phase 7
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# OpenLife Evolution Surface — 2026-05-07
|
|
2
|
-
|
|
3
|
-
## O que foi consolidado
|
|
4
|
-
|
|
5
|
-
- O runtime agora lê o catálogo canônico do repo (`.catalog`) e não depende de leitura direta do Obsidian/LARA.
|
|
6
|
-
- Foram espelhados agentes de referência de `LARA/Agentes` para `.catalog/agents/<id>/AGENT.md`.
|
|
7
|
-
- O catálogo passou a conter mais de 300 agentes disponíveis no runtime.
|
|
8
|
-
- Tokens/segredos detectados no material espelhado foram redigidos antes de commit.
|
|
9
|
-
|
|
10
|
-
## Comandos adicionados/fortalecidos
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
openlife catalog doctor
|
|
14
|
-
openlife catalog list
|
|
15
|
-
openlife service list
|
|
16
|
-
openlife service create <serviceId> --objective "..."
|
|
17
|
-
openlife task list
|
|
18
|
-
openlife task run "objetivo" --service <serviceId>
|
|
19
|
-
openlife swarm run "objetivo"
|
|
20
|
-
openlife aiobuilder create-agent <id>
|
|
21
|
-
openlife aiobuilder create-squad <id>
|
|
22
|
-
openlife aiobuilder validate-catalog
|
|
23
|
-
openlife smoke railway
|
|
24
|
-
openlife smoke telegram
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Garantias
|
|
28
|
-
|
|
29
|
-
- `openlife catalog doctor` exige pelo menos 300 agentes.
|
|
30
|
-
- `openlife agents list` deve retornar fonte em `.catalog/agents`.
|
|
31
|
-
- `openlife swarm run` gera `.openlife/swarm-last-run.json`.
|
|
32
|
-
- `openlife aiobuilder validate-catalog` valida que o AIOBUILDER tem catálogo suficiente para operar.
|
|
33
|
-
- `openlife smoke railway` valida endpoint HTTP de produção sem expor segredos.
|
|
34
|
-
- `openlife smoke telegram` usa `getMe` e só retorna metadados seguros do bot.
|
|
35
|
-
|
|
36
|
-
## Teste de regressão
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
npm run test:evolution-surface
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Esse teste cobre:
|
|
43
|
-
|
|
44
|
-
- catálogo com 300+ agentes;
|
|
45
|
-
- runtime agents vindo de `.catalog`;
|
|
46
|
-
- swarm artifact;
|
|
47
|
-
- AIOBUILDER catalog validation;
|
|
48
|
-
- service create/list;
|
|
49
|
-
- task run com serviço associado.
|
|
50
|
-
|
|
51
|
-
## Observação arquitetural
|
|
52
|
-
|
|
53
|
-
`LARA/Agentes` e `LARA/OPEN-LIFE` permanecem referência estratégica/histórica. O runtime operacional do OpenLife deve usar `.catalog` local/cloud como fonte canônica.
|