@openlife/cli 1.7.3 → 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/dist/index.js +10 -1
- 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,170 +0,0 @@
|
|
|
1
|
-
# OpenLife — Auditoria Geral (2026-05-06)
|
|
2
|
-
|
|
3
|
-
## Escopo
|
|
4
|
-
|
|
5
|
-
Auditoria executada em `D:\\VSCODDE-DEV\\openlife-core-main` (`/mnt/d/VSCODDE-DEV/openlife-core-main`).
|
|
6
|
-
|
|
7
|
-
Sem ações destrutivas, sem commit/push/deploy.
|
|
8
|
-
|
|
9
|
-
## Estado geral
|
|
10
|
-
|
|
11
|
-
- Repo correto: `https://github.com/GOOODZ/openlife-core.git`
|
|
12
|
-
- Branch: `main`
|
|
13
|
-
- Build TypeScript: OK
|
|
14
|
-
- CLI principal: operacional via `node bin/openlife.js`
|
|
15
|
-
- Testes oficiais de package:
|
|
16
|
-
- `npm run test:distribution`: OK
|
|
17
|
-
- `npm run test:orchestration`: OK
|
|
18
|
-
- Skill `design-extractor`: instalada e reconhecida pelo OpenLife runtime.
|
|
19
|
-
|
|
20
|
-
## Correções aplicadas após a auditoria
|
|
21
|
-
|
|
22
|
-
- Runtime-source truth corrigido: `agents list` e `squads list` agora usam `.catalog/agents` e `.catalog/squads` por padrão.
|
|
23
|
-
- `FileAgentProvider` e `FileSquadProvider` aceitam estrutura recursiva `.catalog/<tipo>/<id>/AGENT.md|SQUAD.md`.
|
|
24
|
-
- `phase1-check` não falha mais falsamente quando a fixture de imagem não existe; o check multimodal vira skip explícito.
|
|
25
|
-
- README atualizado para comandos reais (`install`, `system setup`, `up`, `start --daemon`, `chat`).
|
|
26
|
-
- `npm audit fix` aplicado para `axios`/`follow-redirects`; resta apenas advisory moderado de `@anthropic-ai/sdk` com fix breaking.
|
|
27
|
-
- `postinstall-check.sh` atualizado para npm moderno (`npm prefix -g`).
|
|
28
|
-
- Adicionados `test:runtime-source` e `test:all`.
|
|
29
|
-
- Material extra de referência encontrado em `LARA/OPEN-LIFE`; continua tratado como estratégia/documentação, não runtime.
|
|
30
|
-
|
|
31
|
-
## Achados críticos remanescentes
|
|
32
|
-
|
|
33
|
-
### 1. Railway último deploy falhou
|
|
34
|
-
|
|
35
|
-
`railway status` aponta:
|
|
36
|
-
|
|
37
|
-
- Project: `openlife-01`
|
|
38
|
-
- Environment: `production`
|
|
39
|
-
- Service: `openlife-01`
|
|
40
|
-
|
|
41
|
-
Último deploy listado: `FAILED` (`efaa3b3f-97b4-4012-a4a2-d6f2f826dec6`).
|
|
42
|
-
|
|
43
|
-
Logs via CLI não retornaram conteúdo útil nesta auditoria.
|
|
44
|
-
|
|
45
|
-
Recomendação: investigar pelo Railway UI ou redeploy controlado somente com aprovação explícita.
|
|
46
|
-
|
|
47
|
-
### 3. `phase1-check` falha em gateway-image
|
|
48
|
-
|
|
49
|
-
Resultado:
|
|
50
|
-
|
|
51
|
-
- `gateway-image`: falha por imagem de teste ausente em `.temp_images`.
|
|
52
|
-
|
|
53
|
-
Recomendação: criar fixture estável de imagem de teste ou tornar o check opcional/skip explícito quando fixture não existir.
|
|
54
|
-
|
|
55
|
-
### 4. Vulnerabilidades npm
|
|
56
|
-
|
|
57
|
-
`npm audit --omit=dev` reportou:
|
|
58
|
-
|
|
59
|
-
- `axios`: high
|
|
60
|
-
- `follow-redirects`: moderate
|
|
61
|
-
- `@anthropic-ai/sdk`: moderate, fix com breaking change
|
|
62
|
-
|
|
63
|
-
Recomendação: aplicar `npm audit fix` para axios/follow-redirects e avaliar upgrade controlado do Anthropic SDK.
|
|
64
|
-
|
|
65
|
-
## Achados importantes
|
|
66
|
-
|
|
67
|
-
### 5. README tem drift de comandos
|
|
68
|
-
|
|
69
|
-
README documenta:
|
|
70
|
-
|
|
71
|
-
- `openlife agent start`
|
|
72
|
-
|
|
73
|
-
Mas o CLI atual não lista comando `agent`; o caminho real é:
|
|
74
|
-
|
|
75
|
-
- `openlife start --daemon`
|
|
76
|
-
- `openlife up`
|
|
77
|
-
|
|
78
|
-
Recomendação: atualizar README/INSTALL/docs/commands para superfície real.
|
|
79
|
-
|
|
80
|
-
### 6. Doctor textual `system doctor` mostra Anthropic ausente como ❌
|
|
81
|
-
|
|
82
|
-
Mesmo com `OPENLIFE_RUNTIME_PROFILE=oauth-only`, o comando textual `system doctor` ainda imprime `❌ env:ANTHROPIC_API_KEY`.
|
|
83
|
-
|
|
84
|
-
O doctor universal (`openlife doctor`) classifica corretamente como `severity: info`.
|
|
85
|
-
|
|
86
|
-
Recomendação: alinhar `system doctor` com severidade do doctor universal para não assustar operador.
|
|
87
|
-
|
|
88
|
-
### 7. Railway variables parecem incompletas vs local
|
|
89
|
-
|
|
90
|
-
Railway mostrou `GEMINI_API_KEY`, `TELEGRAM_BOT_TOKEN`, Nixpacks commands e Railway vars. Não apareceram no recorte:
|
|
91
|
-
|
|
92
|
-
- `OPENLIFE_TELEGRAM_ALLOWED_USER_ID`
|
|
93
|
-
- `OPENLIFE_RUNTIME_PROFILE`
|
|
94
|
-
- `OPENLIFE_ALLOWED_LLM_EXECUTORS`
|
|
95
|
-
- `OPENAI_API_KEY`
|
|
96
|
-
|
|
97
|
-
Recomendação: validar vars de produção antes de redeploy/start.
|
|
98
|
-
|
|
99
|
-
### 8. Não há daemon OpenLife local rodando
|
|
100
|
-
|
|
101
|
-
Processos locais não mostram `openlife.js start --daemon`; só `telegram-proxy.js`.
|
|
102
|
-
|
|
103
|
-
Recomendação: se a operação local for desejada, iniciar com `openlife up` após confirmar single-poller e token correto.
|
|
104
|
-
|
|
105
|
-
## Pontos positivos
|
|
106
|
-
|
|
107
|
-
- `npm run build`: OK
|
|
108
|
-
- `node bin/openlife.js --help`: OK
|
|
109
|
-
- `node bin/openlife.js status`: OK
|
|
110
|
-
- `node bin/openlife.js doctor`: JSON com severidade e sem blocker de Anthropic no perfil oauth-only
|
|
111
|
-
- Telegram token local valida com `getMe` para `@openlife_master_bot`
|
|
112
|
-
- MCP real detecta `mcporter`, `claude`, `codex`
|
|
113
|
-
- Inventário determinístico existe:
|
|
114
|
-
- 323 agentes
|
|
115
|
-
- 47 squads
|
|
116
|
-
- 71 skills
|
|
117
|
-
- `design-extractor` aparece em `skills list` via `/home/rafaleao/skills/design-extractor/SKILL.md`
|
|
118
|
-
- Segurança de delete tem testes dedicados.
|
|
119
|
-
- `Procfile` e `NIXPACKS_START_CMD` usam `node dist/index.js start --daemon`.
|
|
120
|
-
|
|
121
|
-
## Plano de ação recomendado
|
|
122
|
-
|
|
123
|
-
### P0 — Estabilização operacional
|
|
124
|
-
|
|
125
|
-
1. Remover dependência runtime de Obsidian/LARA para agents/squads.
|
|
126
|
-
2. Corrigir Railway vars e investigar último deploy falho.
|
|
127
|
-
3. Atualizar README/INSTALL para comandos reais (`install`, `up`, `start --daemon`).
|
|
128
|
-
4. Corrigir `phase1-check gateway-image` com fixture ou skip controlado.
|
|
129
|
-
|
|
130
|
-
### P1 — Segurança e governança
|
|
131
|
-
|
|
132
|
-
1. Rodar upgrade controlado de `axios`/`follow-redirects`.
|
|
133
|
-
2. Avaliar upgrade do `@anthropic-ai/sdk` sem reintroduzir Anthropic obrigatório.
|
|
134
|
-
3. Trocar `execSync(curl ... token ...)` por `fetch`/axios sem interpolar token em shell em `InstallModules.ts`.
|
|
135
|
-
4. Garantir que Railway usa `OPENLIFE_TELEGRAM_ALLOWED_USER_ID`.
|
|
136
|
-
|
|
137
|
-
### P2 — Produto/UX
|
|
138
|
-
|
|
139
|
-
1. Consolidar doctor único com severidade clara.
|
|
140
|
-
2. Criar comando `openlife audit` ou `system audit`.
|
|
141
|
-
3. Criar `media route-status` como alias de status, pois `media status` falha.
|
|
142
|
-
4. Documentar separação Hermes vs OpenLife no README principal.
|
|
143
|
-
|
|
144
|
-
### P3 — Qualidade contínua
|
|
145
|
-
|
|
146
|
-
1. Criar script `test:all` para os 44 testes `src/test_*.ts`.
|
|
147
|
-
2. Separar testes mutantes dos testes puros.
|
|
148
|
-
3. Criar CI com build + audit + testes essenciais.
|
|
149
|
-
4. Adicionar smoke Railway pós-deploy.
|
|
150
|
-
|
|
151
|
-
## Comandos usados
|
|
152
|
-
|
|
153
|
-
```bash
|
|
154
|
-
npm run build
|
|
155
|
-
node bin/openlife.js --help
|
|
156
|
-
node bin/openlife.js system status
|
|
157
|
-
OPENLIFE_RUNTIME_PROFILE=oauth-only node bin/openlife.js system doctor
|
|
158
|
-
node bin/openlife.js doctor
|
|
159
|
-
node bin/openlife.js status
|
|
160
|
-
node bin/openlife.js agents list
|
|
161
|
-
node bin/openlife.js squads list
|
|
162
|
-
node bin/openlife.js skills list
|
|
163
|
-
node bin/openlife.js mcp status --real
|
|
164
|
-
node bin/openlife.js phase1-check
|
|
165
|
-
npm run test:distribution
|
|
166
|
-
npm run test:orchestration
|
|
167
|
-
npm audit --omit=dev
|
|
168
|
-
railway status
|
|
169
|
-
railway deployment list
|
|
170
|
-
```
|
|
@@ -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
|