@openlife/cli 1.7.3
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/INSTALL.md +266 -0
- package/LICENSE +21 -0
- package/README.md +142 -0
- package/bin/openlife.js +3 -0
- package/dist/admin_panel_server.js +66 -0
- package/dist/cli/AgentManager.js +109 -0
- package/dist/cli/AutonomousInstaller.js +134 -0
- package/dist/cli/DreamOrganizer.js +88 -0
- package/dist/cli/HostInstaller.js +426 -0
- package/dist/cli/InstallBanner.js +16 -0
- package/dist/cli/InstallFlow.js +256 -0
- package/dist/cli/InstallHeadless.js +47 -0
- package/dist/cli/InstallModules.js +148 -0
- package/dist/cli/InstallStateStore.js +75 -0
- package/dist/cli/InstallWizard.js +364 -0
- package/dist/cli/ProfileManager.js +163 -0
- package/dist/cli/SystemInstaller.js +89 -0
- package/dist/cli/WorldClassCommands.js +208 -0
- package/dist/design/DesignMdImporter.js +82 -0
- package/dist/design/DesignMdMode.js +93 -0
- package/dist/design/DesignMdRegistry.js +67 -0
- package/dist/index.js +2575 -0
- package/dist/memory/ConversationMemory.js +33 -0
- package/dist/memory/LocalMemoryProvider.js +86 -0
- package/dist/memory/Mem0Provider.js +16 -0
- package/dist/memory/MemoryNamespacePolicy.js +27 -0
- package/dist/memory/MemoryOrchestrator.js +65 -0
- package/dist/memory/MemoryPromotionFlow.js +32 -0
- package/dist/memory/MemoryProvider.js +2 -0
- package/dist/memory/MemoryProviderRegistry.js +27 -0
- package/dist/memory/MemoryRetentionPolicy.js +60 -0
- package/dist/memory/MempalaceProvider.js +72 -0
- package/dist/memory/OmniMemory.js +106 -0
- package/dist/memory/RedisAgentMemoryProvider.js +16 -0
- package/dist/memory/SessionManager.js +86 -0
- package/dist/memory/ZepGraphitiProvider.js +16 -0
- package/dist/orchestrator/AgentRegistry.js +56 -0
- package/dist/orchestrator/AgentScoring.js +82 -0
- package/dist/orchestrator/AgentTeam.js +22 -0
- package/dist/orchestrator/ArbitrationAgent.js +43 -0
- package/dist/orchestrator/ArbitrationScorecard.js +17 -0
- package/dist/orchestrator/AssetPromotionEngine.js +65 -0
- package/dist/orchestrator/AssetReuseRouter.js +63 -0
- package/dist/orchestrator/BenchmarkEngine.js +75 -0
- package/dist/orchestrator/Brain.js +298 -0
- package/dist/orchestrator/CadenceEngine.js +76 -0
- package/dist/orchestrator/CapabilityRouter.js +36 -0
- package/dist/orchestrator/CommandLanguage.js +27 -0
- package/dist/orchestrator/CommandRouter.js +70 -0
- package/dist/orchestrator/ConsequenceForecaster.js +286 -0
- package/dist/orchestrator/CronManager.js +286 -0
- package/dist/orchestrator/DynamicAgentBuilder.js +48 -0
- package/dist/orchestrator/DynamicAgentExecutor.js +15 -0
- package/dist/orchestrator/EnterpriseAgenticCore.js +276 -0
- package/dist/orchestrator/ExecutionBoard.js +86 -0
- package/dist/orchestrator/ExecutionIntent.js +13 -0
- package/dist/orchestrator/ExecutionModePolicy.js +48 -0
- package/dist/orchestrator/ExecutionRouter.js +9 -0
- package/dist/orchestrator/ExecutionState.js +20 -0
- package/dist/orchestrator/ExecutorHealth.js +86 -0
- package/dist/orchestrator/ExternalCatalogRegistry.js +83 -0
- package/dist/orchestrator/Gatekeeper.js +414 -0
- package/dist/orchestrator/Gateway.js +508 -0
- package/dist/orchestrator/GovernanceConsentStore.js +66 -0
- package/dist/orchestrator/GovernanceLayer.js +179 -0
- package/dist/orchestrator/GovernancePolicyStore.js +53 -0
- package/dist/orchestrator/GovernanceScopeLedger.js +134 -0
- package/dist/orchestrator/GovernanceScopePolicy.js +67 -0
- package/dist/orchestrator/IntentClassifier.js +45 -0
- package/dist/orchestrator/JobLifecycle.js +91 -0
- package/dist/orchestrator/LearningRouter.js +24 -0
- package/dist/orchestrator/MediaManager.js +92 -0
- package/dist/orchestrator/MemoryCuratorAgent.js +41 -0
- package/dist/orchestrator/MissionState.js +155 -0
- package/dist/orchestrator/ModelManager.js +84 -0
- package/dist/orchestrator/OperatingSystem.js +71 -0
- package/dist/orchestrator/OperationalMemoryStore.js +94 -0
- package/dist/orchestrator/OptimizationLoop.js +72 -0
- package/dist/orchestrator/OrchestrationLoop.js +905 -0
- package/dist/orchestrator/OrgStructure.js +88 -0
- package/dist/orchestrator/OutcomeSimulator.js +46 -0
- package/dist/orchestrator/ParallelOrchestrationLoop.js +36 -0
- package/dist/orchestrator/PerformanceScorecard.js +105 -0
- package/dist/orchestrator/PlannerAgent.js +46 -0
- package/dist/orchestrator/ProcessSandbox.js +129 -0
- package/dist/orchestrator/PromotionPipeline.js +74 -0
- package/dist/orchestrator/PromotionReviewGate.js +11 -0
- package/dist/orchestrator/QueueScheduler.js +260 -0
- package/dist/orchestrator/ReleaseGate.js +36 -0
- package/dist/orchestrator/ReleaseWorkflow.js +68 -0
- package/dist/orchestrator/RemotePublisher.js +139 -0
- package/dist/orchestrator/ReuseEngine.js +89 -0
- package/dist/orchestrator/ReviewerAgent.js +49 -0
- package/dist/orchestrator/RoleHandoff.js +65 -0
- package/dist/orchestrator/RuntimeHealthMonitor.js +143 -0
- package/dist/orchestrator/RuntimePolicy.js +105 -0
- package/dist/orchestrator/RuntimeProbe.js +97 -0
- package/dist/orchestrator/RuntimeRegistry.js +73 -0
- package/dist/orchestrator/SandboxPolicy.js +22 -0
- package/dist/orchestrator/SecurityDownloadGuard.js +169 -0
- package/dist/orchestrator/SecurityEventStore.js +58 -0
- package/dist/orchestrator/ServiceCompletionPolicy.js +36 -0
- package/dist/orchestrator/ServiceState.js +195 -0
- package/dist/orchestrator/SkillCreator.js +404 -0
- package/dist/orchestrator/SkillLearningLoop.js +57 -0
- package/dist/orchestrator/SkillManager.js +75 -0
- package/dist/orchestrator/SkillNetwork.js +29 -0
- package/dist/orchestrator/SkillRegistryV2.js +28 -0
- package/dist/orchestrator/SkillScoring.js +70 -0
- package/dist/orchestrator/SquadAutoCreator.js +64 -0
- package/dist/orchestrator/SquadCreator.js +727 -0
- package/dist/orchestrator/SquadRegistry.js +28 -0
- package/dist/orchestrator/SquadRouter.js +33 -0
- package/dist/orchestrator/SquadScoring.js +70 -0
- package/dist/orchestrator/SubagentLifecycle.js +90 -0
- package/dist/orchestrator/SynthesizerAgent.js +48 -0
- package/dist/orchestrator/SystemDoctor.js +224 -0
- package/dist/orchestrator/TaskExecutor.js +422 -0
- package/dist/orchestrator/TeammateBoard.js +61 -0
- package/dist/orchestrator/TestHarness.js +184 -0
- package/dist/orchestrator/VoiceManager.js +203 -0
- package/dist/orchestrator/VoiceRouter.js +89 -0
- package/dist/orchestrator/capability/CapabilityGenesisEngine.js +278 -0
- package/dist/orchestrator/capability/CapabilityPackParser.js +223 -0
- package/dist/orchestrator/capability/CapabilityPackSchema.js +62 -0
- package/dist/orchestrator/capability/CapabilityPackState.js +163 -0
- package/dist/orchestrator/providers/AgentProvider.js +2 -0
- package/dist/orchestrator/providers/CapabilityProvider.js +12 -0
- package/dist/orchestrator/providers/CloudAgentProvider.js +55 -0
- package/dist/orchestrator/providers/CloudSkillProvider.js +55 -0
- package/dist/orchestrator/providers/CloudSquadProvider.js +55 -0
- package/dist/orchestrator/providers/CompositeAgentProvider.js +16 -0
- package/dist/orchestrator/providers/CompositeCapabilityProvider.js +25 -0
- package/dist/orchestrator/providers/CompositeSkillProvider.js +16 -0
- package/dist/orchestrator/providers/CompositeSquadProvider.js +16 -0
- package/dist/orchestrator/providers/CompositeWorkflowProvider.js +46 -0
- package/dist/orchestrator/providers/FileAgentProvider.js +105 -0
- package/dist/orchestrator/providers/FileCapabilityProvider.js +106 -0
- package/dist/orchestrator/providers/FileSkillProvider.js +65 -0
- package/dist/orchestrator/providers/FileSquadProvider.js +69 -0
- package/dist/orchestrator/providers/FileWorkflowProvider.js +103 -0
- package/dist/orchestrator/providers/SkillProvider.js +2 -0
- package/dist/orchestrator/providers/SquadProvider.js +2 -0
- package/dist/orchestrator/toolset/ToolsetGuard.js +69 -0
- package/dist/orchestrator/toolset/ToolsetRegistry.js +65 -0
- package/dist/orchestrator/toolset/ToolsetSchema.js +21 -0
- package/dist/orchestrator/util/AtomicWriter.js +204 -0
- package/dist/orchestrator/util/DistributedLock.js +232 -0
- package/dist/orchestrator/util/TemplateRenderer.js +87 -0
- package/dist/orchestrator/util/WatchdogHeartbeat.js +116 -0
- package/dist/orchestrator/workflow/ConditionParser.js +232 -0
- package/dist/orchestrator/workflow/WorkflowEngine.js +379 -0
- package/dist/orchestrator/workflow/WorkflowParser.js +368 -0
- package/dist/orchestrator/workflow/WorkflowSchema.js +65 -0
- package/dist/orchestrator/workflow/WorkflowState.js +11 -0
- package/dist/reversa/ReversaAgent.js +134 -0
- package/dist/reversa/ReversaContracts.js +62 -0
- package/dist/reversa/ReversaExecutors.js +65 -0
- package/dist/skills/SkillRegistry.js +71 -0
- package/dist/squads/SquadManager.js +87 -0
- package/dist/test_admin_teams_networks.js +54 -0
- package/dist/test_agent_team_skill_network.js +15 -0
- package/dist/test_aiobuilder_cli_parity.js +169 -0
- package/dist/test_ask_exit.js +73 -0
- package/dist/test_atomic_writer.js +209 -0
- package/dist/test_autonomous_soak.js +141 -0
- package/dist/test_benchmark_engine.js +41 -0
- package/dist/test_brain_error_diagnostics.js +51 -0
- package/dist/test_brain_fallback_chain.js +93 -0
- package/dist/test_capability_genesis_engine.js +225 -0
- package/dist/test_capability_pack_schema.js +214 -0
- package/dist/test_catalog_quality.js +150 -0
- package/dist/test_cli_crud_roundtrip.js +154 -0
- package/dist/test_cli_diagnostics.js +131 -0
- package/dist/test_cli_doc_parity.js +126 -0
- package/dist/test_cli_help_surface.js +106 -0
- package/dist/test_cli_service_commands.js +83 -0
- package/dist/test_consequence_forecast_brain.js +165 -0
- package/dist/test_consequence_forecaster.js +24 -0
- package/dist/test_conversation_memory.js +36 -0
- package/dist/test_create_entities.js +54 -0
- package/dist/test_creator_placeholders_completed.js +177 -0
- package/dist/test_cron_manager.js +123 -0
- package/dist/test_daemon_sigterm.js +72 -0
- package/dist/test_deep_research_capability.js +87 -0
- package/dist/test_designmd_import_registry.js +16 -0
- package/dist/test_designmd_mode.js +50 -0
- package/dist/test_designmd_mode_workspace.js +13 -0
- package/dist/test_dist_templates_layout.js +135 -0
- package/dist/test_distributed_lock.js +201 -0
- package/dist/test_distribution_installability.js +67 -0
- package/dist/test_doctor_sandbox_check.js +44 -0
- package/dist/test_dream_organizer.js +25 -0
- package/dist/test_dual_mode.js +15 -0
- package/dist/test_enterprise_agentic_core.js +128 -0
- package/dist/test_forecast_brain_wiring.js +87 -0
- package/dist/test_gateway_telegram_guardrails.js +52 -0
- package/dist/test_governance.js +34 -0
- package/dist/test_governance_advanced.js +75 -0
- package/dist/test_governance_scope_ledger.js +147 -0
- package/dist/test_governance_v13_policies.js +44 -0
- package/dist/test_guided_creator_cli.js +100 -0
- package/dist/test_host_install_e2e.js +324 -0
- package/dist/test_host_installer.js +259 -0
- package/dist/test_host_installers_gemini_codex.js +95 -0
- package/dist/test_host_uninstaller.js +295 -0
- package/dist/test_install_flow.js +70 -0
- package/dist/test_install_flow_host_validation.js +143 -0
- package/dist/test_install_wizard.js +272 -0
- package/dist/test_integration_gemini_live.js +95 -0
- package/dist/test_integration_http_trigger_live.js +154 -0
- package/dist/test_integration_telegram_live.js +102 -0
- package/dist/test_job_lifecycle.js +16 -0
- package/dist/test_memory_orchestrator.js +33 -0
- package/dist/test_memory_promotion.js +36 -0
- package/dist/test_memory_retention.js +37 -0
- package/dist/test_mission_checkpoint.js +204 -0
- package/dist/test_multi_host_docs_parity.js +125 -0
- package/dist/test_openlife_auto_creator_routing.js +69 -0
- package/dist/test_openlife_evolution_surface.js +77 -0
- package/dist/test_openlife_gatekeeper_routing.js +15 -0
- package/dist/test_openlife_routing_surface.js +27 -0
- package/dist/test_openlife_runtime_source_truth.js +25 -0
- package/dist/test_operating_system.js +45 -0
- package/dist/test_optimization_loop.js +38 -0
- package/dist/test_orchestration_assets_lifecycle.js +78 -0
- package/dist/test_outcome_simulator.js +38 -0
- package/dist/test_performance_latency.js +215 -0
- package/dist/test_performance_scorecard.js +38 -0
- package/dist/test_phase1_check_exit.js +103 -0
- package/dist/test_phase6_board.js +31 -0
- package/dist/test_phase6_cadence.js +29 -0
- package/dist/test_phase6_ops.js +37 -0
- package/dist/test_post_mission_evaluation.js +190 -0
- package/dist/test_process_sandbox.js +88 -0
- package/dist/test_profile_toolset_mcp.js +125 -0
- package/dist/test_queue_scheduler.js +239 -0
- package/dist/test_release_gate.js +23 -0
- package/dist/test_remote_publish.js +193 -0
- package/dist/test_reversa_contracts_e2e.js +48 -0
- package/dist/test_reversa_export_and_strict.js +51 -0
- package/dist/test_reversa_full_execution.js +12 -0
- package/dist/test_reversa_lite.js +9 -0
- package/dist/test_royal_stack_golden.js +179 -0
- package/dist/test_runtime_health_backoff.js +154 -0
- package/dist/test_runtime_policy.js +26 -0
- package/dist/test_runtime_probe.js +19 -0
- package/dist/test_runtime_profile_oauth_only.js +262 -0
- package/dist/test_runtime_registry.js +11 -0
- package/dist/test_security_download_and_scan.js +103 -0
- package/dist/test_security_download_guard.js +14 -0
- package/dist/test_service_command_surface.js +12 -0
- package/dist/test_service_completion_policy.js +32 -0
- package/dist/test_service_guardrails_delete.js +12 -0
- package/dist/test_service_mode_explicit_only.js +174 -0
- package/dist/test_sources_import_ref.js +46 -0
- package/dist/test_sources_scaffold.js +43 -0
- package/dist/test_squad_skill_creator.js +305 -0
- package/dist/test_squad_skill_design_llm.js +176 -0
- package/dist/test_subsystems_org_state.js +271 -0
- package/dist/test_subsystems_promotion_memory_assets.js +343 -0
- package/dist/test_subsystems_routing_governance.js +234 -0
- package/dist/test_task_executor_sandbox_optin.js +127 -0
- package/dist/test_teammate_learning.js +15 -0
- package/dist/test_telegram_delete_guardrail.js +21 -0
- package/dist/test_toolset_enforcement.js +188 -0
- package/dist/test_trigger_basic_auth.js +112 -0
- package/dist/test_util/doc_parity.js +120 -0
- package/dist/test_v15_e2e_integration.js +207 -0
- package/dist/test_watchdog_heartbeat.js +152 -0
- package/dist/test_workflow_condition_parser.js +63 -0
- package/dist/test_workflow_e2e.js +240 -0
- package/dist/test_workflow_engine.js +330 -0
- package/dist/test_workflow_parser.js +245 -0
- package/dist/test_workflow_schema_backward_compat.js +197 -0
- package/dist-templates/README.md +91 -0
- package/dist-templates/claude-code/agents/openlife-atlas.md +52 -0
- package/dist-templates/claude-code/agents/openlife-forge.md +42 -0
- package/dist-templates/claude-code/agents/openlife-genesis.md +59 -0
- package/dist-templates/claude-code/agents/openlife-lyra.md +40 -0
- package/dist-templates/claude-code/agents/openlife-maestro.md +45 -0
- package/dist-templates/claude-code/commands/openlife/ask.md +14 -0
- package/dist-templates/claude-code/commands/openlife/doctor.md +19 -0
- package/dist-templates/claude-code/commands/openlife/dream.md +20 -0
- package/dist-templates/claude-code/commands/openlife/status.md +14 -0
- package/dist-templates/claude-code/mcp/openlife-orchestrator.json +46 -0
- package/dist-templates/codex/README.md +7 -0
- package/dist-templates/codex/agents/openlife-atlas.md +52 -0
- package/dist-templates/codex/agents/openlife-forge.md +42 -0
- package/dist-templates/codex/agents/openlife-genesis.md +59 -0
- package/dist-templates/codex/agents/openlife-lyra.md +40 -0
- package/dist-templates/codex/agents/openlife-maestro.md +45 -0
- package/dist-templates/codex/commands/openlife/ask.md +14 -0
- package/dist-templates/codex/commands/openlife/doctor.md +19 -0
- package/dist-templates/codex/commands/openlife/dream.md +20 -0
- package/dist-templates/codex/commands/openlife/status.md +14 -0
- package/dist-templates/codex/mcp/openlife-orchestrator.json +46 -0
- package/dist-templates/gemini-cli/README.md +8 -0
- package/dist-templates/gemini-cli/agents/openlife-atlas.md +52 -0
- package/dist-templates/gemini-cli/agents/openlife-forge.md +42 -0
- package/dist-templates/gemini-cli/agents/openlife-genesis.md +59 -0
- package/dist-templates/gemini-cli/agents/openlife-lyra.md +40 -0
- package/dist-templates/gemini-cli/agents/openlife-maestro.md +45 -0
- package/dist-templates/gemini-cli/commands/openlife/ask.md +14 -0
- package/dist-templates/gemini-cli/commands/openlife/doctor.md +19 -0
- package/dist-templates/gemini-cli/commands/openlife/dream.md +20 -0
- package/dist-templates/gemini-cli/commands/openlife/status.md +14 -0
- package/dist-templates/gemini-cli/mcp/openlife-orchestrator.json +46 -0
- package/dist-templates/skill-template/README.md +34 -0
- package/dist-templates/skill-template/SKILL.md.template +59 -0
- package/dist-templates/squad-template/README.md +82 -0
- package/dist-templates/squad-template/SQUAD.md.template +51 -0
- package/dist-templates/squad-template/agent-template.md +51 -0
- package/dist-templates/squad-template/checklist-template.md +25 -0
- package/dist-templates/squad-template/task-template.md +36 -0
- package/dist-templates/workflows/PORTED_WORKFLOWS.md +60 -0
- package/dist-templates/workflows/brownfield-discovery.yaml +137 -0
- package/dist-templates/workflows/greenfield-fullstack.yaml +132 -0
- package/dist-templates/workflows/qa-loop.yaml +125 -0
- package/dist-templates/workflows/story-development-cycle.yaml +80 -0
- package/docs/CHANGELOG_FEATURE_ROLLOUT_DESIGNMD.md +43 -0
- package/docs/EXTERNAL_SOURCES_AND_SECURITY_GUARD.md +33 -0
- package/docs/OPENLIFE_AUDIT_2026-05-06.md +170 -0
- package/docs/OPENLIFE_CONSOLIDATED_PLAN_2026-05-06.md +299 -0
- package/docs/OPENLIFE_DUAL_MODE_IMPLEMENTATION_PLAN.md +205 -0
- package/docs/OPENLIFE_EVOLUTION_SURFACE_2026-05-07.md +53 -0
- package/docs/OPENLIFE_SKILLS_IMPORT_2026-05-07.json +223 -0
- package/docs/OPENLIFE_SQUADS_IMPORT_2026-05-07.json +184 -0
- package/docs/PAPERCLIP_OPENLIFE_INVESTIGATION.md +85 -0
- package/docs/README.md +28 -0
- package/docs/RELEASE_ORGANIZATION_PLAN.md +164 -0
- package/docs/audit/CLI-EXECUTION-RESULTS.md +113 -0
- package/docs/audit/CLI-MATRIX.md +556 -0
- package/docs/audit/DOC-PARITY-GAPS.md +351 -0
- package/docs/audit/ORCHESTRATOR-MATRIX.md +136 -0
- package/docs/audit/TEST-COVERAGE-GAPS.md +334 -0
- package/docs/audit/integrations/SKIPPED.md +101 -0
- package/docs/autonomous-install.md +79 -0
- package/docs/capability-genesis.md +137 -0
- package/docs/capability-pack-schema.md +157 -0
- package/docs/commands.md +82 -0
- package/docs/deep-research-capability.md +114 -0
- package/docs/development/typescript-conventions.md +95 -0
- package/docs/host-installers.md +68 -0
- package/docs/install/aiobuilder.md +70 -0
- package/docs/install/claude-code.md +83 -0
- package/docs/install/codex.md +64 -0
- package/docs/install/gemini-cli.md +64 -0
- package/docs/install/runtime-profiles.md +83 -0
- package/docs/openlife-agent-os-blueprint.md +114 -0
- package/docs/openlife-install-backlog.md +115 -0
- package/docs/openlife-install-spec.md +306 -0
- package/docs/operations/CLOUD_CUTOVER_AUDIT.md +37 -0
- package/docs/operations/PHASE_PROGRESS_CONTINUATION.md +24 -0
- package/docs/performance-benchmarks.md +83 -0
- package/docs/planning/v1.3-capability-genesis.md +157 -0
- package/docs/plans/2026-05-05-admin-interface-professional-dark-premium-plan.md +84 -0
- package/docs/plans/2026-05-05-openlife-autonomous-domain-marketplace-masterplan.md +122 -0
- package/docs/quickstart.md +60 -0
- package/docs/release-process.md +236 -0
- package/docs/roadmap/OPENLIFE_MASTER_PLAN_CLOUD_V3.md +97 -0
- package/docs/sandboxing-research.md +117 -0
- package/docs/stories/epic-feature-audit/1.1.story.md +84 -0
- package/docs/stories/epic-feature-audit/1.2.story.md +102 -0
- package/docs/stories/epic-feature-audit/1.3.story.md +93 -0
- package/docs/stories/epic-feature-audit/1.5.story.md +121 -0
- package/docs/stories/epic-feature-audit/1.6.story.md +80 -0
- package/docs/stories/epic-feature-completeness/2.1.story.md +70 -0
- package/docs/stories/epic-feature-completeness/2.2.story.md +49 -0
- package/docs/stories/epic-feature-completeness/2.3.story.md +74 -0
- package/docs/stories/epic-feature-completeness/2.4.story.md +71 -0
- package/docs/stories/epic-feature-completeness/3.1.story.md +56 -0
- package/docs/stories/epic-feature-completeness/3.2.story.md +80 -0
- package/docs/stories/epic-feature-completeness/3.3.story.md +68 -0
- package/docs/stories/epic-feature-completeness/3.4.story.md +71 -0
- package/docs/stories/epic-feature-completeness/3.5.story.md +72 -0
- package/docs/stories/epic-feature-completeness/3.6.story.md +69 -0
- package/docs/stories/epic-feature-completeness/3.7.story.md +68 -0
- package/docs/stories/epic-feature-completeness/3.8.story.md +57 -0
- package/docs/toolset-enforcement.md +122 -0
- package/docs/v1.4-changelog.md +159 -0
- package/docs/v1.5-changelog.md +106 -0
- package/docs/v1.5-roadmap.md +121 -0
- package/docs/v1.6-changelog.md +67 -0
- package/docs/v1.6-roadmap.md +89 -0
- package/docs/v1.7-changelog.md +98 -0
- package/docs/workflow-schema.md +177 -0
- package/package.json +177 -0
- package/scripts/clean-test-pollution.js +61 -0
- package/scripts/openlife-agent-start.sh +6 -0
- package/scripts/openlife-agent.service.example +13 -0
- package/scripts/openlife-agent.supervisord.conf.example +8 -0
- package/scripts/openlife-autonomous-install.sh +29 -0
- package/scripts/postinstall-check.sh +37 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# OpenLife Autonomous Domain Systems + Marketplace — Masterplan de Execução
|
|
2
|
+
|
|
3
|
+
> Objetivo: construir uma plataforma para operar serviços autônomos por domínio, com times de agentes e redes de skills, contratáveis via marketplace.
|
|
4
|
+
|
|
5
|
+
## 1) Ampliação solicitada (times de agentes + redes de skills)
|
|
6
|
+
|
|
7
|
+
### 1.1 Times de agentes (Agent Teams)
|
|
8
|
+
- Squad runtime por serviço: planner, executor, reviewer, synthesizer, compliance.
|
|
9
|
+
- Escala horizontal por job (parallel branches) com arbitragem.
|
|
10
|
+
- Orquestração por papéis e handoff automático por estado da missão.
|
|
11
|
+
|
|
12
|
+
### 1.2 Redes de skills (Skill Networks)
|
|
13
|
+
- Grafo de skills por capacidade/dominio/dependência.
|
|
14
|
+
- Seleção dinâmica de skillset por tipo de missão e SLA alvo.
|
|
15
|
+
- Reuso e promoção de skills baseado em performance histórica.
|
|
16
|
+
|
|
17
|
+
### 1.3 Resultado esperado
|
|
18
|
+
- Maior precisão: especialização por papel + skill routing.
|
|
19
|
+
- Maior velocidade: paralelismo controlado + fallback inteligente.
|
|
20
|
+
- Maior confiabilidade: revisão e síntese obrigatórias com trilha de execução.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 2) Tese de produto
|
|
25
|
+
OpenLife deve vender serviço completo com accountability, não “chat de IA”.
|
|
26
|
+
|
|
27
|
+
Unidade comercial: Service Instance (serviço contratado) com:
|
|
28
|
+
- objetivo
|
|
29
|
+
- SLA
|
|
30
|
+
- custo e limites
|
|
31
|
+
- governança
|
|
32
|
+
- prova de execução (trace + artefatos)
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## 3) Arquitetura alvo
|
|
37
|
+
|
|
38
|
+
### Núcleo
|
|
39
|
+
- Control API
|
|
40
|
+
- Runtime Orchestrator
|
|
41
|
+
- Governance/Policy Engine
|
|
42
|
+
- Agent Team Manager
|
|
43
|
+
- Skill Network Router
|
|
44
|
+
- Execution Trace Store
|
|
45
|
+
- Billing Meter
|
|
46
|
+
- Marketplace Service
|
|
47
|
+
- Admin UI
|
|
48
|
+
|
|
49
|
+
### Entidades
|
|
50
|
+
- Tenant
|
|
51
|
+
- ServiceTemplate
|
|
52
|
+
- ServiceInstance
|
|
53
|
+
- AgentTeam
|
|
54
|
+
- SkillNetwork
|
|
55
|
+
- MissionJob
|
|
56
|
+
- ExecutionEvent
|
|
57
|
+
- PolicyPack
|
|
58
|
+
- Subscription
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## 4) Roadmap (execução)
|
|
63
|
+
|
|
64
|
+
## Fase 1 — Foundation (P0)
|
|
65
|
+
1. Definir schemas de AgentTeam e SkillNetwork.
|
|
66
|
+
2. Integrar resolução de time/skills ao OrchestrationLoop.
|
|
67
|
+
3. Emitir tool traces estruturadas por missão.
|
|
68
|
+
4. Expor status/config no painel (API primeiro).
|
|
69
|
+
|
|
70
|
+
## Fase 2 — Service Templates (P0/P1)
|
|
71
|
+
1. Template SDK com manifestos por domínio.
|
|
72
|
+
2. Provisionamento 1-clique de ServiceInstance.
|
|
73
|
+
3. Três templates iniciais: sales/social/support.
|
|
74
|
+
|
|
75
|
+
## Fase 3 — Marketplace (P1)
|
|
76
|
+
1. Publicar/instalar templates.
|
|
77
|
+
2. Versionamento e update policy.
|
|
78
|
+
3. Contratação + billing por assinatura/uso.
|
|
79
|
+
|
|
80
|
+
## Fase 4 — Enterprise Hardening (P1/P2)
|
|
81
|
+
1. RBAC avançado e auditoria expandida.
|
|
82
|
+
2. Policy packs por domínio sensível (jurídico/saúde).
|
|
83
|
+
3. SLO/SLA dashboard com alerting.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## 5) Backlog executável inicial
|
|
88
|
+
|
|
89
|
+
### Sprint A (agora)
|
|
90
|
+
- [ ] Criar modelos: AgentTeam.ts, SkillNetwork.ts.
|
|
91
|
+
- [ ] Registrar catálogo de teams e skill networks.
|
|
92
|
+
- [ ] Wiring no OrchestrationLoop para seleção dinâmica.
|
|
93
|
+
- [ ] Testes unitários do roteamento.
|
|
94
|
+
|
|
95
|
+
### Sprint B
|
|
96
|
+
- [ ] Criar endpoints de administração (list/create/update) para teams/networks.
|
|
97
|
+
- [ ] Adicionar trace completo por missão no formato Hermes-style.
|
|
98
|
+
- [ ] Persistência de configuração por tenant.
|
|
99
|
+
|
|
100
|
+
### Sprint C
|
|
101
|
+
- [ ] Service template manifests por domínio.
|
|
102
|
+
- [ ] Provisionamento via CLI/API.
|
|
103
|
+
- [ ] Métricas de precisão, latência e custo.
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## 6) Critérios de aceite
|
|
108
|
+
- Serviço pode selecionar automaticamente time e skills por missão.
|
|
109
|
+
- Execução produz trace operacional antes da resposta (modo always).
|
|
110
|
+
- Admin consegue configurar teams/networks sem editar código.
|
|
111
|
+
- Build + testes verdes.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## 7) Estratégia de execução aprovada
|
|
116
|
+
Com base no seu “pode executar o plano completo”, iniciaremos incrementalmente:
|
|
117
|
+
1) Foundation de times+skills (código + testes + docs)
|
|
118
|
+
2) Admin/API
|
|
119
|
+
3) Marketplace
|
|
120
|
+
4) Hardening enterprise
|
|
121
|
+
|
|
122
|
+
Cada etapa fecha com evidência: build, testes, smoke e commit em main.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# OpenLife Quickstart (Atualizado)
|
|
2
|
+
|
|
3
|
+
## 0) Build local
|
|
4
|
+
```bash
|
|
5
|
+
npm install
|
|
6
|
+
npm run build
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## 1) Verificação inicial
|
|
10
|
+
```bash
|
|
11
|
+
openlife --help
|
|
12
|
+
openlife status
|
|
13
|
+
openlife doctor
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## 2) Fluxo padrão (Task mode)
|
|
17
|
+
```bash
|
|
18
|
+
openlife ask "criar plano de integração" --mode task
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## 3) Fluxo contínuo (Service mode)
|
|
22
|
+
```bash
|
|
23
|
+
openlife ask "monitorar sinais sociais diariamente" --mode service
|
|
24
|
+
# depois consulte o serviceId retornado e opere:
|
|
25
|
+
openlife service status <serviceId>
|
|
26
|
+
openlife service pause <serviceId> --reason "janela de manutenção"
|
|
27
|
+
openlife service resume <serviceId> --reason "retomar operação"
|
|
28
|
+
openlife service events <serviceId> --limit 20
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## 4) Jobs e runtime
|
|
32
|
+
```bash
|
|
33
|
+
openlife job list --limit 20
|
|
34
|
+
openlife runtime probe
|
|
35
|
+
openlife runtime list
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## 5) DesignMD + Reversa
|
|
39
|
+
```bash
|
|
40
|
+
openlife designmd import
|
|
41
|
+
openlife designmd list
|
|
42
|
+
openlife reversa mode --set designmd --profile claude
|
|
43
|
+
openlife reversa run-all --note "baseline contracts"
|
|
44
|
+
openlife reversa export-json
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## 6) AIOBUILDER com contratos estritos
|
|
48
|
+
```bash
|
|
49
|
+
openlife aiobuilder generate-ui dashboard --strict-contracts
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## 7) Smoke test rápido
|
|
53
|
+
```bash
|
|
54
|
+
npm run build && \
|
|
55
|
+
node dist/test_dual_mode.js && \
|
|
56
|
+
node dist/test_service_guardrails_delete.js && \
|
|
57
|
+
node dist/test_telegram_delete_guardrail.js && \
|
|
58
|
+
node dist/test_reversa_contracts_e2e.js && \
|
|
59
|
+
node dist/test_reversa_export_and_strict.js
|
|
60
|
+
```
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
# OpenLife — Release Process
|
|
2
|
+
|
|
3
|
+
> The pattern used for v1.2 → v1.6. Each milestone is a single branch
|
|
4
|
+
> opened from `main`, with one atomic commit per closed story, merged
|
|
5
|
+
> via PR and tagged on the merge commit.
|
|
6
|
+
|
|
7
|
+
## 1. Open the milestone branch
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
git checkout main
|
|
11
|
+
git pull --ff-only origin main
|
|
12
|
+
git checkout -b feat/v<X.Y>-<theme>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Naming: `feat/v1.6-sandbox-rollout`, `feat/v1.5-evaluation`,
|
|
16
|
+
`feat/v1.4-tenten`. The theme is one short hyphenated phrase, not a
|
|
17
|
+
sprint or epic number.
|
|
18
|
+
|
|
19
|
+
## 2. Execute stories as atomic commits
|
|
20
|
+
|
|
21
|
+
Each story = **one commit**. Commit message format:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
<type>(<scope>): <short summary> (Story <N>, v<X.Y>)
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Types in use: `feat`, `fix`, `chore`, `docs`, `test`, `refactor`.
|
|
28
|
+
Examples from the actual history:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
feat(doctor): ProcessSandbox runtime check (Story 18.1, v1.6)
|
|
32
|
+
feat(executor): OPENLIFE_PROCESS_SANDBOX opt-in for runShellCommand (Story 18.2, v1.6)
|
|
33
|
+
chore(types): any 109 → 83 across Gatekeeper, TestHarness, VoiceManager, admin (Story 19.1, v1.6)
|
|
34
|
+
docs(v1.6): consolidated changelog with sprint/story/commit map (Cap)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Co-Author trailer is required:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## 3. Per-commit guardrails (locally)
|
|
44
|
+
|
|
45
|
+
Before each story commit:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npm run build # tsc clean — strict, no any leak
|
|
49
|
+
npm run test:<story> # the test added for the story
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Before merging the milestone:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
npm run test:all # the full canonical suite (~5 min)
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
`prepublishOnly` runs `test:all` automatically, so publish is gated.
|
|
59
|
+
|
|
60
|
+
## 4. Write the changelog
|
|
61
|
+
|
|
62
|
+
One file per milestone: `docs/v<X.Y>-changelog.md`. Sections:
|
|
63
|
+
|
|
64
|
+
- **Header** — branch name, predecessor tag, one-paragraph thesis.
|
|
65
|
+
- **What landed by epic** — sprint × epic × commits table.
|
|
66
|
+
- **Per-epic stories** — table mapping story id → commit sha → surface
|
|
67
|
+
touched → outcome.
|
|
68
|
+
- **Calendar-gated deferrals** — if any (e.g., Story 13.5).
|
|
69
|
+
- **Locked decisions** — explicit defaults that stay opt-in.
|
|
70
|
+
- **Tests added** — markers count, what each new `test_*.ts` covers.
|
|
71
|
+
- **Honest scorecard delta** — vs the previous milestone, no
|
|
72
|
+
inflation.
|
|
73
|
+
|
|
74
|
+
The roadmap file (`docs/v<X.Y>-roadmap.md`) is **optional** and only
|
|
75
|
+
needed when a milestone is multi-sprint with non-obvious sequencing.
|
|
76
|
+
|
|
77
|
+
## 5. Open the PR
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
gh pr create --base main --title "<X.Y>: <theme>" \
|
|
81
|
+
--body "$(cat <<'EOF'
|
|
82
|
+
## Summary
|
|
83
|
+
- <one bullet per epic>
|
|
84
|
+
|
|
85
|
+
## Verification
|
|
86
|
+
- [x] npm run test:all green (<N> markers)
|
|
87
|
+
- [x] docs/v<X.Y>-changelog.md committed
|
|
88
|
+
- [x] No new env vars introduced without docs
|
|
89
|
+
|
|
90
|
+
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
|
91
|
+
EOF
|
|
92
|
+
)"
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## 6. Merge and tag
|
|
96
|
+
|
|
97
|
+
After PR approval:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
gh pr merge <number> --merge # not squash — we keep the per-story commits
|
|
101
|
+
git checkout main
|
|
102
|
+
git pull --ff-only origin main
|
|
103
|
+
git tag -a v<X.Y>.0 -m "v<X.Y>.0 — <theme>"
|
|
104
|
+
git push origin v<X.Y>.0
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Tag the **merge commit**, not the last feature commit. That keeps the
|
|
108
|
+
tag pointing at a stable PR boundary.
|
|
109
|
+
|
|
110
|
+
## 7. Maintenance cuts (rare)
|
|
111
|
+
|
|
112
|
+
Used when a calendar-gate requires a second tag on a line that has
|
|
113
|
+
already moved on. Pattern (see `v1.4.1`):
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
git worktree add /tmp/openlife-v<X.Y>.<Z> v<X.Y>.0
|
|
117
|
+
cd /tmp/openlife-v<X.Y>.<Z>
|
|
118
|
+
git checkout -b maint/v<X.Y>.<Z>
|
|
119
|
+
# touch docs/v<X.Y>-changelog.md with the maintenance section
|
|
120
|
+
git commit -am "docs(maint): v<X.Y>.<Z> lineage marker — <reason>"
|
|
121
|
+
git tag -a v<X.Y>.<Z> -m "..."
|
|
122
|
+
git push origin maint/v<X.Y>.<Z> v<X.Y>.<Z>
|
|
123
|
+
cd -
|
|
124
|
+
git worktree remove /tmp/openlife-v<X.Y>.<Z>
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
The worktree avoids disrupting any in-progress work on the main
|
|
128
|
+
development branch.
|
|
129
|
+
|
|
130
|
+
## 8. npm publish (via GitHub Actions — Story R.2)
|
|
131
|
+
|
|
132
|
+
OpenLife publishes to npm via `.github/workflows/publish.yml`. The
|
|
133
|
+
workflow runs on every `v*.*.*` tag push and can also be fired
|
|
134
|
+
manually via `workflow_dispatch` for retro-publishing older tags.
|
|
135
|
+
|
|
136
|
+
### One-time setup (per repo)
|
|
137
|
+
|
|
138
|
+
The `NPM_TOKEN` GitHub secret must exist before any publish can
|
|
139
|
+
succeed.
|
|
140
|
+
|
|
141
|
+
1. **Create an npm account** if you don't have one
|
|
142
|
+
(https://www.npmjs.com/signup). Enable 2FA.
|
|
143
|
+
2. **Generate a Granular Access Token:**
|
|
144
|
+
- npm web → Account → Access Tokens → Generate New Token →
|
|
145
|
+
**Granular Access Token**
|
|
146
|
+
- Allowed Packages: `@openlife/*`
|
|
147
|
+
- Permissions: `Read and Write`
|
|
148
|
+
- Expiration: ≤365 days (90 days recommended; rotate quarterly)
|
|
149
|
+
- **Copy the token immediately** — it's only shown once.
|
|
150
|
+
3. **Register the token as a GitHub secret:**
|
|
151
|
+
- https://github.com/GOOODZ/openlife-core/settings/secrets/actions
|
|
152
|
+
- New repository secret → Name: `NPM_TOKEN` → Value: the token
|
|
153
|
+
- **Never paste tokens into chat, code, commits, or logs.** If
|
|
154
|
+
a token leaks (committed, posted in chat, exposed in a build
|
|
155
|
+
log), revoke it on npm immediately and generate a replacement.
|
|
156
|
+
|
|
157
|
+
### Per-release publish flow
|
|
158
|
+
|
|
159
|
+
For tags created **after** the workflow lands (v1.7.0 and beyond):
|
|
160
|
+
|
|
161
|
+
1. Cut and push the tag as documented in step 6 of this runbook.
|
|
162
|
+
2. The `Publish to npm` workflow fires automatically.
|
|
163
|
+
3. Track progress at
|
|
164
|
+
https://github.com/GOOODZ/openlife-core/actions/workflows/publish.yml.
|
|
165
|
+
4. On success, verify with `npm view @openlife/cli@<version>`.
|
|
166
|
+
|
|
167
|
+
For tags created **before** the workflow existed (v1.4.0, v1.4.1,
|
|
168
|
+
v1.5.0, v1.6.0):
|
|
169
|
+
|
|
170
|
+
1. https://github.com/GOOODZ/openlife-core/actions/workflows/publish.yml
|
|
171
|
+
→ Run workflow → enter version (e.g. `1.6.0`) → Run.
|
|
172
|
+
2. The workflow checks out the corresponding `v<version>` tag,
|
|
173
|
+
builds, runs `prepublishOnly` (= `test:all`), and publishes.
|
|
174
|
+
|
|
175
|
+
### Version contract
|
|
176
|
+
|
|
177
|
+
The version embedded in `package.json` on `main` intentionally stays
|
|
178
|
+
at `1.0.0`. The workflow uses `npm version --no-git-tag-version` at
|
|
179
|
+
runtime to set the tarball's version from the git tag. This avoids
|
|
180
|
+
the per-release `package.json` bump commit on `main`.
|
|
181
|
+
|
|
182
|
+
### Verification after a successful publish
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
npm view @openlife/cli versions # list all published
|
|
186
|
+
npm view @openlife/cli@1.6.0 # metadata for one
|
|
187
|
+
npm audit signatures @openlife/cli@1.6.0 # verify provenance
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### If a publish fails
|
|
191
|
+
|
|
192
|
+
| Error | Cause | Remedy |
|
|
193
|
+
|---|---|---|
|
|
194
|
+
| 403 Forbidden | Token lacks scope `@openlife/*` | Re-issue token; update `NPM_TOKEN` secret |
|
|
195
|
+
| 402 Payment Required | Scoped pkg default-private | `--access=public` (already in workflow) |
|
|
196
|
+
| 409 Conflict | Version already published | Bump and re-tag |
|
|
197
|
+
| `prepublishOnly` fails | A test in `test:all` doesn't pass on CI runners | Reproduce locally on Node 20, fix the test, push a maintenance tag |
|
|
198
|
+
| ENEEDAUTH | `NPM_TOKEN` secret missing or wrong name | Recreate the GitHub secret with the exact name `NPM_TOKEN` |
|
|
199
|
+
|
|
200
|
+
## 9. Registry announce (post R.1)
|
|
201
|
+
|
|
202
|
+
Once `RemoteCatalogClient` and the canonical registry ship, this step
|
|
203
|
+
will write a manifest pointer for the new milestone. Today this is
|
|
204
|
+
NOT required to release — the milestone is fully usable from npm and
|
|
205
|
+
GitHub without it.
|
|
206
|
+
|
|
207
|
+
## Rollback
|
|
208
|
+
|
|
209
|
+
If a tagged release is broken:
|
|
210
|
+
|
|
211
|
+
1. **Do not delete the tag remotely.** A pushed tag is a public
|
|
212
|
+
contract; deletion creates lineage confusion across consumers.
|
|
213
|
+
2. Cut a maintenance tag with the fix (`v<X.Y>.<Z+1>`) following
|
|
214
|
+
step 7.
|
|
215
|
+
3. Update the milestone changelog with a "Known issue / superseded
|
|
216
|
+
by" callout near the affected story.
|
|
217
|
+
|
|
218
|
+
For pre-tag failures (build broken on merge):
|
|
219
|
+
|
|
220
|
+
1. `git revert <merge-commit>` on `main` via a new PR.
|
|
221
|
+
2. Re-tag is allowed only if the original tag was **not** pushed yet
|
|
222
|
+
(purely local). Otherwise, follow the cut-forward pattern above.
|
|
223
|
+
|
|
224
|
+
## Quick reference
|
|
225
|
+
|
|
226
|
+
| Step | Owner | Command |
|
|
227
|
+
|---|---|---|
|
|
228
|
+
| Branch | dev | `git checkout -b feat/v<X.Y>-<theme>` |
|
|
229
|
+
| Per-story commit | dev | one commit + matching `test_*.ts` |
|
|
230
|
+
| Full suite | dev | `npm run test:all` |
|
|
231
|
+
| Changelog | dev | edit `docs/v<X.Y>-changelog.md` |
|
|
232
|
+
| PR | devops | `gh pr create --base main` |
|
|
233
|
+
| Merge | devops | `gh pr merge --merge` |
|
|
234
|
+
| Tag | devops | `git tag -a v<X.Y>.0 && git push origin v<X.Y>.0` |
|
|
235
|
+
| Maintenance | devops | worktree + `maint/v<X.Y>.<Z>` |
|
|
236
|
+
| npm publish | human | `npm login` then `npm publish` |
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# OPENLIFE MASTER PLAN (Cloud-First, Zero Obsidian Runtime)
|
|
2
|
+
|
|
3
|
+
## Premissas
|
|
4
|
+
- Runtime nunca lê Obsidian.
|
|
5
|
+
- Obsidian é somente fonte de estudo/migração documental.
|
|
6
|
+
- Source of truth operacional: serviços cloud (API + DB + storage).
|
|
7
|
+
- Entregáveis e documentação ficam no repositório `openlife-core-main`.
|
|
8
|
+
|
|
9
|
+
## Sprint S1 — Foundation (sem quebra)
|
|
10
|
+
1. Introduzir interfaces de provider:
|
|
11
|
+
- `AgentProvider`, `SquadProvider`, `SkillProvider`, `WorkflowProvider`, `LearningProvider`.
|
|
12
|
+
2. Implementar adapters:
|
|
13
|
+
- `Cloud*Provider` (primário)
|
|
14
|
+
- `File*Provider` (compatibilidade temporária)
|
|
15
|
+
3. Injetar providers via config/ENV + feature flags.
|
|
16
|
+
4. Garantir default backward compatible para não quebrar runtime atual.
|
|
17
|
+
|
|
18
|
+
## Sprint S2 — Registry Migration
|
|
19
|
+
1. Refatorar `AgentRegistry`, `SquadRegistry`, `SkillRegistryV2` para depender da interface provider.
|
|
20
|
+
2. Remover hardcodes de paths locais como fonte principal.
|
|
21
|
+
3. Habilitar modo dual-read (cloud-first com fallback técnico controlado).
|
|
22
|
+
|
|
23
|
+
## Sprint S3 — Skills Management
|
|
24
|
+
1. Criar `SkillManager` (create, patch, activate, deprecate, audit).
|
|
25
|
+
2. Versionamento + metadata de score.
|
|
26
|
+
3. Validação de schema + testes mínimos por skill.
|
|
27
|
+
|
|
28
|
+
## Sprint S4 — Squad Auto-Creation
|
|
29
|
+
1. Pipeline `squad.autoCreate(goal)`.
|
|
30
|
+
2. Gerar artefatos obrigatórios no storage cloud:
|
|
31
|
+
- agente principal
|
|
32
|
+
- índice de uso
|
|
33
|
+
- workflow inicial
|
|
34
|
+
- nota operacional espelho (cloud docs)
|
|
35
|
+
3. Integrar com roteamento e scoring.
|
|
36
|
+
|
|
37
|
+
## Sprint S5 — Agent/Subagent Lifecycle
|
|
38
|
+
1. Evoluir `DynamicAgentBuilder` para persistência cloud.
|
|
39
|
+
2. Estados: proposed → trial → active → archived.
|
|
40
|
+
3. Métricas e governança por agente/subagente.
|
|
41
|
+
|
|
42
|
+
## Sprint S6 — Learn in Loop
|
|
43
|
+
1. Captura operacional por execução (intenção, rota, fallback, custo, resultado).
|
|
44
|
+
2. Detector de padrões recorrentes.
|
|
45
|
+
3. Promoção automática governada para skill/squad/subagente.
|
|
46
|
+
|
|
47
|
+
## Sprint S7 — Engenharia Reversa AIOBUILDER
|
|
48
|
+
1. Inventário de capacidades e papéis.
|
|
49
|
+
2. Capability graph canônico.
|
|
50
|
+
3. Blueprint executável de reconstrução.
|
|
51
|
+
4. Comando de rebuild validado.
|
|
52
|
+
|
|
53
|
+
## Sprint S8 — Executor Policy (Claude Code como ferramenta)
|
|
54
|
+
1. Regras de roteamento por risco/custo/latência.
|
|
55
|
+
2. Health-check, timeout, retry, fallback.
|
|
56
|
+
3. Observabilidade por execução.
|
|
57
|
+
|
|
58
|
+
## Auditoria Final (gate obrigatório)
|
|
59
|
+
- Arquitetura:
|
|
60
|
+
- [ ] Zero leitura Obsidian em runtime
|
|
61
|
+
- [ ] Zero hardcode local como source of truth
|
|
62
|
+
- Funcional:
|
|
63
|
+
- [ ] Registries usando providers cloud
|
|
64
|
+
- [ ] Skill manager operacional
|
|
65
|
+
- [ ] Auto-criação de squad operacional
|
|
66
|
+
- [ ] Subagentes persistentes
|
|
67
|
+
- [ ] Learn-in-loop ativo
|
|
68
|
+
- [ ] Rebuild AIOBUILDER validado
|
|
69
|
+
- Operação:
|
|
70
|
+
- [ ] Smoke CLI
|
|
71
|
+
- [ ] Smoke Telegram
|
|
72
|
+
- [ ] Logs/auditoria rastreáveis
|
|
73
|
+
|
|
74
|
+
## Testes (mínimos)
|
|
75
|
+
1. Unitários: providers, registries, policy, promoção.
|
|
76
|
+
2. Integração: orquestração fim-a-fim com cloud provider mock/real de staging.
|
|
77
|
+
3. Regressão: intents básicas determinísticas + fallback.
|
|
78
|
+
4. Smoke: `openlife doctor`, `openlife chat`, rota Telegram.
|
|
79
|
+
|
|
80
|
+
## Migração de documentação (Obsidian -> Git)
|
|
81
|
+
- Fonte: notas de estudo OPEN-LIFE no vault (somente leitura para migração).
|
|
82
|
+
- Destino no repo:
|
|
83
|
+
- `docs/roadmap/`
|
|
84
|
+
- `docs/architecture/`
|
|
85
|
+
- `docs/operations/`
|
|
86
|
+
- Processo:
|
|
87
|
+
1. copiar conteúdo relevante
|
|
88
|
+
2. normalizar nomenclatura canônica
|
|
89
|
+
3. remover dependências de vault
|
|
90
|
+
4. vincular aos componentes reais do código
|
|
91
|
+
|
|
92
|
+
## Git flow de entrega
|
|
93
|
+
1. branch de trabalho
|
|
94
|
+
2. commits por sprint (mensagens semânticas)
|
|
95
|
+
3. execução da auditoria + testes
|
|
96
|
+
4. commit final de auditoria
|
|
97
|
+
5. push para GitHub
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Research — Node `--permission` API as a v1.6 sandbox primitive
|
|
2
|
+
|
|
3
|
+
**Status:** v1.5 research-track output. No production wiring yet.
|
|
4
|
+
**Story:** 15.1 (deferred to v1.5; landed in Sprint 3).
|
|
5
|
+
|
|
6
|
+
## What we're looking at
|
|
7
|
+
|
|
8
|
+
Node.js 20 introduced an experimental
|
|
9
|
+
[`--permission`](https://nodejs.org/docs/latest-v20.x/api/permissions.html)
|
|
10
|
+
flag that lets the parent process restrict what a child node process can
|
|
11
|
+
do:
|
|
12
|
+
|
|
13
|
+
- `--allow-fs-read=<path>` / `--allow-fs-write=<path>` — filesystem
|
|
14
|
+
scoping.
|
|
15
|
+
- `--allow-child-process` — gate spawning further children.
|
|
16
|
+
- `--allow-worker` — gate worker threads.
|
|
17
|
+
- `--allow-wasi` — gate WASI.
|
|
18
|
+
- `--allow-addons` — gate native addons.
|
|
19
|
+
|
|
20
|
+
Anything not explicitly allowed raises `ERR_ACCESS_DENIED` inside the
|
|
21
|
+
child. Node 22 stabilised most of this and added more granular fs
|
|
22
|
+
scopes.
|
|
23
|
+
|
|
24
|
+
## Why we care
|
|
25
|
+
|
|
26
|
+
OpenLife's existing governance is **library-boundary** — `ToolsetGuard`,
|
|
27
|
+
`GovernanceLayer`, `SecurityDownloadGuard`. All of those run in the
|
|
28
|
+
*same* process as the executor they protect; a successful prompt
|
|
29
|
+
injection could in principle bypass them by calling the underlying APIs
|
|
30
|
+
directly.
|
|
31
|
+
|
|
32
|
+
A `--permission` boundary moves the enforcement to the **process
|
|
33
|
+
boundary**: even if the in-process guards are bypassed, the Linux/macOS
|
|
34
|
+
process cannot read files outside its allow-list. That's the same
|
|
35
|
+
isolation model Deno ships by default, ported to Node via the new
|
|
36
|
+
runtime flag.
|
|
37
|
+
|
|
38
|
+
## What we're NOT doing in v1.5
|
|
39
|
+
|
|
40
|
+
- We are **not** wiring this into the executor by default. The flag is
|
|
41
|
+
experimental on Node 20, stabilised on Node 22, and OpenLife's
|
|
42
|
+
declared minimum is Node 18. Default-on would break Node 18 users.
|
|
43
|
+
- We are **not** trying to sandbox the parent process. Only spawned
|
|
44
|
+
children get the permission boundary.
|
|
45
|
+
- We are **not** introducing a new toolset category — `terminal` and
|
|
46
|
+
`delegation` already carry the policy intent; the sandbox flag is an
|
|
47
|
+
*implementation* of those policies, not a separate axis.
|
|
48
|
+
|
|
49
|
+
## Proposed v1.6 surface
|
|
50
|
+
|
|
51
|
+
A `ProcessSandbox` utility class (small implementation lands alongside
|
|
52
|
+
this doc in `src/orchestrator/ProcessSandbox.ts`). Surface:
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
const sandbox = new ProcessSandbox({
|
|
56
|
+
allowFsRead: [cwd],
|
|
57
|
+
allowFsWrite: [path.join(cwd, '.artifacts')],
|
|
58
|
+
allowChildProcess: false,
|
|
59
|
+
allowWorker: false,
|
|
60
|
+
});
|
|
61
|
+
const result = await sandbox.spawn('node', ['build-script.js']);
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Behaviour:
|
|
65
|
+
|
|
66
|
+
- Detects Node major version at construction time.
|
|
67
|
+
- Node 20+ → injects `--permission --allow-fs-read=… --allow-fs-write=…`
|
|
68
|
+
ahead of the user's argv.
|
|
69
|
+
- Node 18 → logs a `[sandbox] downgraded — Node 18 lacks --permission`
|
|
70
|
+
warning and spawns plain (no enforcement). The result envelope sets
|
|
71
|
+
`enforced: false`.
|
|
72
|
+
- Node 22+ → uses the stabilised flag names where they differ from
|
|
73
|
+
Node 20.
|
|
74
|
+
|
|
75
|
+
## Migration plan toward v1.6
|
|
76
|
+
|
|
77
|
+
1. **v1.5 (this milestone):** Ship the `ProcessSandbox` class + this
|
|
78
|
+
doc. Not wired anywhere. Opt-in opt-in opt-in.
|
|
79
|
+
2. **v1.5 maintenance release:** Wire `ProcessSandbox` into a single
|
|
80
|
+
non-critical site — `WorldClassCommands.doctor()` script execution
|
|
81
|
+
— so we can observe enforcement behaviour in real installs.
|
|
82
|
+
3. **v1.6:** Add an opt-in `OPENLIFE_PROCESS_SANDBOX=on` flag that
|
|
83
|
+
routes `TaskExecutor.runShellCommand` through `ProcessSandbox` when
|
|
84
|
+
the active profile's `toolsetAllowed` would not have permitted the
|
|
85
|
+
wider filesystem write.
|
|
86
|
+
4. **v1.7:** Flip default to ON on Node 22+ runners; keep OFF on
|
|
87
|
+
Node 18 with a deprecation warning.
|
|
88
|
+
|
|
89
|
+
## Open questions for v1.6 planning
|
|
90
|
+
|
|
91
|
+
- **WSL / Windows behaviour.** Node's permission model is POSIX-tested;
|
|
92
|
+
WSL works but native Windows behavior of `--allow-fs-write` with
|
|
93
|
+
Windows-style paths needs verification.
|
|
94
|
+
- **Performance overhead.** Each permission check is a per-syscall
|
|
95
|
+
lookup. Anecdotally < 5 % for fs-heavy workloads, but we should
|
|
96
|
+
measure with `test_performance_latency.ts` once wired.
|
|
97
|
+
- **Interaction with workflow steps that genuinely need
|
|
98
|
+
child_process.** A workflow that runs `git` will need
|
|
99
|
+
`--allow-child-process`. The profile-level toolset toggle should
|
|
100
|
+
drive this.
|
|
101
|
+
- **Error UX.** `ERR_ACCESS_DENIED` from a deeply nested child can be
|
|
102
|
+
unhelpful. We may want to wrap the executor output with a clearer
|
|
103
|
+
message ("blocked by sandbox: write to /etc/passwd").
|
|
104
|
+
|
|
105
|
+
## Risk register
|
|
106
|
+
|
|
107
|
+
| Risk | Severity | Mitigation |
|
|
108
|
+
|---|---|---|
|
|
109
|
+
| Node 18 EOL pressure forces us to drop it before v1.7 | Low | Track Node's official EOL calendar; OpenLife min-Node bump goes in a major release |
|
|
110
|
+
| Bypass via `vm.runInNewContext` or `eval` | Med | The permission model also restricts vm and eval; we lean on Node's coverage. Document the known gaps. |
|
|
111
|
+
| Operator confusion ("why did my script fail?") | Med | Verbose mode shows the exact flag list applied; doctor command will print effective sandbox config when enforcement is on. |
|
|
112
|
+
|
|
113
|
+
## Decision
|
|
114
|
+
|
|
115
|
+
**Land `ProcessSandbox` in v1.5 as research-track. Defer production
|
|
116
|
+
wiring to v1.6.** This gives OpenLife a tested wrapper to reach for
|
|
117
|
+
when Node 22 becomes the soft floor (likely H2 2026).
|