aindy-runtime 2.34.0__tar.gz → 2.35.0__tar.gz
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.
- aindy_runtime-2.35.0/AINDY/_version.py +1 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/auth/api_key_auth.py +35 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/system_event_retention.py +1 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/system_event_types.py +4 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/alembic_head.py +1 -1
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/model_registry.py +1 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/models/__init__.py +3 -0
- aindy_runtime-2.35.0/AINDY/db/models/mcp_oauth.py +78 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/schema_contract.py +1 -1
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/kernel/syscall_dispatcher.py +16 -3
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/kernel/syscall_registry.py +23 -1
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/memory/memory_address_space.py +14 -2
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/memory/native/memory_bridge_rs/Cargo.lock +4 -4
- aindy_runtime-2.35.0/AINDY/platform/dist/assets/AdminApiErrorBoundary-ZZFtFtMg.js +1 -0
- aindy_runtime-2.34.0/AINDY/platform/dist/assets/AdminUsersPanel-BUlTE9Y-.js → aindy_runtime-2.35.0/AINDY/platform/dist/assets/AdminUsersPanel-BpWcdcle.js +1 -1
- aindy_runtime-2.34.0/AINDY/platform/dist/assets/AgentApprovalInbox-BpjmqlH0.js → aindy_runtime-2.35.0/AINDY/platform/dist/assets/AgentApprovalInbox-BP_nj7sv.js +1 -1
- aindy_runtime-2.34.0/AINDY/platform/dist/assets/AgentConsole-CoahvZo1.js → aindy_runtime-2.35.0/AINDY/platform/dist/assets/AgentConsole-DuxbV8oj.js +1 -1
- aindy_runtime-2.34.0/AINDY/platform/dist/assets/AgentRegistry-DlhiRy7t.js → aindy_runtime-2.35.0/AINDY/platform/dist/assets/AgentRegistry-CHPaBpi_.js +1 -1
- aindy_runtime-2.34.0/AINDY/platform/dist/assets/BarChart-BARu4anf.js → aindy_runtime-2.35.0/AINDY/platform/dist/assets/BarChart-C26XXXJz.js +1 -1
- aindy_runtime-2.35.0/AINDY/platform/dist/assets/ConnectedAppsPanel-DVSLgF7v.js +1 -0
- aindy_runtime-2.34.0/AINDY/platform/dist/assets/DeadLetterQueuePanel-D-YmUULx.js → aindy_runtime-2.35.0/AINDY/platform/dist/assets/DeadLetterQueuePanel-DRWIvwE9.js +1 -1
- aindy_runtime-2.35.0/AINDY/platform/dist/assets/EmptyState-ZZFtFtMg.js +1 -0
- aindy_runtime-2.35.0/AINDY/platform/dist/assets/ExecutionConsole-C4EkmQB8.js +1 -0
- aindy_runtime-2.35.0/AINDY/platform/dist/assets/FlowEngineConsole-DIwXjdQb.js +3 -0
- aindy_runtime-2.34.0/AINDY/platform/dist/assets/HealthDashboard-CMnm3vy9.js → aindy_runtime-2.35.0/AINDY/platform/dist/assets/HealthDashboard-CfMMZaTB.js +1 -1
- aindy_runtime-2.35.0/AINDY/platform/dist/assets/LoadingPanel-ZZFtFtMg.js +1 -0
- aindy_runtime-2.35.0/AINDY/platform/dist/assets/ObservabilityDashboard-BNfk5OMn.js +1 -0
- aindy_runtime-2.34.0/AINDY/platform/dist/assets/RippleTraceViewer-Bl97x1HW.js → aindy_runtime-2.35.0/AINDY/platform/dist/assets/RippleTraceViewer-VRiFH9Xc.js +1 -1
- aindy_runtime-2.34.0/AINDY/platform/dist/assets/SurfacePrimitives-Hxo830zO.js → aindy_runtime-2.35.0/AINDY/platform/dist/assets/SurfacePrimitives-Dx01hQJJ.js +1 -1
- aindy_runtime-2.35.0/AINDY/platform/dist/assets/Toast-ZZFtFtMg.js +1 -0
- aindy_runtime-2.34.0/AINDY/platform/dist/assets/WebhooksPanel-BipVUPG4.js → aindy_runtime-2.35.0/AINDY/platform/dist/assets/WebhooksPanel-CTA8KZI4.js +1 -1
- aindy_runtime-2.35.0/AINDY/platform/dist/assets/_core-ZZFtFtMg.js +1 -0
- aindy_runtime-2.34.0/AINDY/platform/dist/assets/agent-0UTI_rvD.js → aindy_runtime-2.35.0/AINDY/platform/dist/assets/agent-CZCF88Ul.js +1 -1
- aindy_runtime-2.34.0/AINDY/platform/dist/assets/index-CX2b1AQf.js → aindy_runtime-2.35.0/AINDY/platform/dist/assets/index-CWtNaCr_.js +2 -2
- aindy_runtime-2.35.0/AINDY/platform/dist/assets/index-DKsw729Y.css +2 -0
- aindy_runtime-2.34.0/AINDY/platform/dist/assets/operator-DYpSxaty.js → aindy_runtime-2.35.0/AINDY/platform/dist/assets/operator-DIIeGlZE.js +1 -1
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform/dist/index.html +2 -2
- aindy_runtime-2.35.0/AINDY/platform_layer/mcp_oauth.py +1015 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/mcp_server.py +222 -19
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/watcher_service.py +5 -8
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/route_inventory.json +15 -1
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routes/__init__.py +2 -0
- aindy_runtime-2.35.0/AINDY/routes/mcp_grants_router.py +76 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routes/platform/platform_ops_router.py +5 -12
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime_only.py +90 -12
- {aindy_runtime-2.34.0/aindy_runtime.egg-info → aindy_runtime-2.35.0}/PKG-INFO +7 -7
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0/aindy_runtime.egg-info}/PKG-INFO +7 -7
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/aindy_runtime.egg-info/SOURCES.txt +26 -22
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/aindy_runtime.egg-info/requires.txt +6 -6
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/governance/DECISION_LOG.md +48 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/MCP_INTEGRATION.md +100 -4
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/SANDBOX_ESCAPE_AUDIT.md +31 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/SYSCALL_SYSTEM.md +7 -1
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/UI_CONTRACT.md +2 -1
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/pyproject.toml +8 -6
- aindy_runtime-2.34.0/AINDY/_version.py +0 -1
- aindy_runtime-2.34.0/AINDY/platform/dist/assets/AdminApiErrorBoundary-B5wptpSZ.js +0 -1
- aindy_runtime-2.34.0/AINDY/platform/dist/assets/EmptyState-B5wptpSZ.js +0 -1
- aindy_runtime-2.34.0/AINDY/platform/dist/assets/ExecutionConsole-DtBvEcLo.js +0 -1
- aindy_runtime-2.34.0/AINDY/platform/dist/assets/FlowEngineConsole-DvFeabWY.js +0 -3
- aindy_runtime-2.34.0/AINDY/platform/dist/assets/LoadingPanel-B5wptpSZ.js +0 -1
- aindy_runtime-2.34.0/AINDY/platform/dist/assets/ObservabilityDashboard-D62qwI90.js +0 -1
- aindy_runtime-2.34.0/AINDY/platform/dist/assets/Toast-B5wptpSZ.js +0 -1
- aindy_runtime-2.34.0/AINDY/platform/dist/assets/_core-B5wptpSZ.js +0 -1
- aindy_runtime-2.34.0/AINDY/platform/dist/assets/index-D3fHGGwp.css +0 -2
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/agents/__init__.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/agents/agent_coordinator.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/agents/agent_event_service.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/agents/agent_event_types.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/agents/agent_message_bus.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/agents/agent_runtime/__init__.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/agents/agent_runtime/approvals.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/agents/agent_runtime/creation.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/agents/agent_runtime/execution.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/agents/agent_runtime/planner_backends.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/agents/agent_runtime/planning.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/agents/agent_runtime/presentation.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/agents/agent_runtime/replay.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/agents/agent_runtime/shared.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/agents/agent_runtime.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/agents/agent_tools.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/agents/authority_negotiation.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/agents/autonomous_controller.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/agents/autonomous_window.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/agents/capability_policy.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/agents/capability_service.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/agents/dead_letter_service.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/agents/runtime_api.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/agents/runtime_guardrails.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/agents/step_references.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/agents/stuck_run_service.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/agents/stuck_run_watchdog.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/agents/tool_registry.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/agents/tool_session.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/agents/tool_syscalls.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/agents/tool_worker.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/apscheduler/__init__.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/apscheduler/events.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/apscheduler/executors/__init__.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/apscheduler/executors/pool.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/apscheduler/jobstores/__init__.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/apscheduler/jobstores/base.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/apscheduler/schedulers/__init__.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/apscheduler/schedulers/background.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/apscheduler/triggers/__init__.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/apscheduler/triggers/cron.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/apscheduler/triggers/date.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/apscheduler/triggers/interval.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/auth/__init__.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/cli.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/config.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/__init__.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/agent_continuation.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/agent_run_rehydration.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/distributed_queue.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/effect_compensation.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/execution_dispatcher.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/execution_envelope.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/execution_environment.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/execution_gate.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/execution_guard.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/execution_helper.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/execution_pipeline/__init__.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/execution_pipeline/context.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/execution_pipeline/pipeline.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/execution_pipeline/resources.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/execution_pipeline/runtime_state.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/execution_pipeline/shared.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/execution_pipeline/signals.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/execution_recall.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/execution_record_service.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/execution_score.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/execution_service.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/execution_signal_helper.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/execution_unit_service.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/external_call_user_backfill.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/flow_continuation.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/flow_history_fold.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/flow_run_rehydration.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/health_liveness_signal.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/memory_capture_guard.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/next_action.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/next_action_dispatch.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/observability_events.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/pending_request.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/reasoning_signal.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/request_metric_writer.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/response_adapter.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/result_path.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/resume_reconstruction.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/resume_watchdog.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/retry_policy.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/route_execution_guard.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/router_guard.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/scheduler_queue_signal.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/system_event_service.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/verifier.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/wait_condition.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/core/wait_rehydration.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/__init__.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/base.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/create_all.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/dao/__init__.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/dao/memory_node_dao.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/dao/memory_trace_dao.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/database.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/models/agent.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/models/agent_event.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/models/agent_registry.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/models/agent_run.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/models/api_key.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/models/background_task_lease.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/models/capability.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/models/dynamic_flow.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/models/dynamic_node.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/models/effect_record.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/models/effect_reversal.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/models/event_edge.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/models/execution_unit.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/models/flow_run.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/models/job_log.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/models/memory_metrics.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/models/memory_node_history.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/models/memory_trace.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/models/memory_trace_node.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/models/nodus_scheduled_job.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/models/nodus_workflow.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/models/request_metric.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/models/system_event.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/models/system_health_log.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/models/system_state_snapshot.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/models/user.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/models/user_identity.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/models/user_provider_key.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/models/waiting_flow_run.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/models/webhook_subscription.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/mongo_setup.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/db/schema_ops.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/deepseek_config.json +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/exception_handlers.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/kernel/__init__.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/kernel/cancellation.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/kernel/circuit_breaker.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/kernel/clock.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/kernel/condition_codes.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/kernel/effect_ledger.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/kernel/errors.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/kernel/event_bus.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/kernel/payload_identity.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/kernel/redis_wait_registry.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/kernel/resource_manager.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/kernel/resume_spec.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/kernel/scheduler/__init__.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/kernel/scheduler/common.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/kernel/scheduler/core.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/kernel/scheduler/cross_instance.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/kernel/scheduler/dispatch.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/kernel/scheduler/engine.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/kernel/scheduler/persistence.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/kernel/scheduler/recovery.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/kernel/scheduler/waits.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/kernel/scheduler_engine.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/kernel/syscall_handlers.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/kernel/syscall_outcome.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/kernel/syscall_versioning.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/kernel/tenant_context.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/llms-full.txt +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/llms.txt +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/main.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/memory/__init__.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/memory/bridge.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/memory/cascade_cleanup.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/memory/embedding_jobs.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/memory/embedding_migration.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/memory/embedding_providers.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/memory/embedding_service.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/memory/ingest_queue.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/memory/memory_capture_engine.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/memory/memory_helpers.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/memory/memory_ingest_service.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/memory/memory_path_backfill.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/memory/memory_persistence.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/memory/memory_scoring_service.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/memory/native/memory_bridge_rs/Cargo.toml +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/memory/native/memory_bridge_rs/build.rs +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/memory/native/memory_bridge_rs/src/cpp_bridge.rs +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/memory/native/memory_bridge_rs/src/lib.rs +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/memory/native_bridge.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/memory/nodus_memory_bridge.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/middleware.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/nodus/__init__.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/nodus/runtime/__init__.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/nodus/runtime/aindy_runtime.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/nodus/runtime/embedding.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/nodus/runtime/memory_bridge.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/nodus/stdlib/.nodus/deps.json +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/__init__.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/agent_plugin_contracts.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/anthropic_client.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/api_key_service.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/app_runtime.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/async_execution_context.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/async_job_service.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/azure_openai_client.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/bootstrap_contract.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/bootstrap_graph.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/cache_backend.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/connector_service.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/deepseek_client.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/deployment_contract.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/domain_health.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/egress_guard.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/email_channel.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/event_service.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/event_trace_service.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/extension_abi.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/extension_boundary.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/extension_capabilities.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/extension_execution_model.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/extension_policy.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/extension_provenance.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/extension_provenance_inventory.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/extension_runtime_api.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/extension_runtime_inventory.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/extension_signing.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/extension_worker.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/external_call_service.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/fs_guard.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/genai_telemetry.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/health_service.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/job_recovery.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/kernel_proc_reader.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/leadership.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/llm_budget.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/llm_client.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/log_config.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/mcp_client.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/memory_runtime.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/metrics.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/node_registry.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/nodus_script_store.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/openai_client.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/otel.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/outbound_http.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/platform_loader.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/plugin_artifacts.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/plugin_host.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/provider_keys.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/public_contract.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/rate_limiter.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/recovery_jobs.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/registry.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/registry_contracts.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/response_adapters.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/runtime_agent_defaults.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/runtime_callback_host.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/runtime_callback_worker.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/runtime_compatibility.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/sandbox_certification.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/sandbox_runner.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/scheduler_service.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/secret_broker.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/support_metrics_service.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/system_state_service.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/token_meter.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/trace_context.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/user_ids.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/platform_layer/watcher_contract.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/plugins/nodes/__init__.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routes/agent_router.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routes/auth_router.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routes/automation_router.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routes/coordination_router.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routes/db_verify_router.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routes/flow_router.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routes/health_router.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routes/memory_metrics_router.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routes/memory_router.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routes/memory_trace_router.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routes/observability_router.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routes/path_params.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routes/platform/__init__.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routes/platform/admin_router.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routes/platform/agents_router.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routes/platform/effects_router.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routes/platform/flows_router.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routes/platform/keys_router.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routes/platform/nodes_router.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routes/platform/nodus_flow_router.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routes/platform/nodus_router.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routes/platform/nodus_schedule_router.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routes/platform/nodus_shared.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routes/platform/queue_router.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routes/platform/schemas.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routes/platform/webhooks_router.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routes/platform_router.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routes/provider_keys_router.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routes/version_router.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routes/watcher_router.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/routing.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/__init__.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/agent_plan_compiler.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/execution_loop.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/execution_registry.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/flow_definitions.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/flow_definitions_engine.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/flow_definitions_extended.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/flow_definitions_memory.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/flow_definitions_observability.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/flow_engine/__init__.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/flow_engine/entrypoints.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/flow_engine/event_router.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/flow_engine/fan_out.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/flow_engine/graph_signature.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/flow_engine/node_executor.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/flow_engine/registry.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/flow_engine/runner.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/flow_engine/runner_completion.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/flow_engine/runner_failure.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/flow_engine/runner_steps.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/flow_engine/serialization.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/flow_engine/shared.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/flow_engine/state_merge.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/flow_helpers.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/flow_registry.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/memory/__init__.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/memory/context_builder.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/memory/filters.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/memory/memory_feedback.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/memory/memory_learning.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/memory/memory_metrics.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/memory/metrics_store.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/memory/native_scorer.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/memory/orchestrator.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/memory/query_expander.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/memory/scorer.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/memory/strategies.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/memory/types.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/memory_loop.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/nodus_adapter.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/nodus_execution_service.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/nodus_flow_compiler.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/nodus_runtime_adapter.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/nodus_schedule_service.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/nodus_security.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/nodus_worker.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/nodus_worker_pool.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/nodus_workflow_registry.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime/tool_simulation.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/runtime_plugins.json +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/schemas/__init__.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/schemas/auth_schemas.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/services/auth_service.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/spa_fallback.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/startup.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/system_manifest.json +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/utils/__init__.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/utils/normalize_encoding.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/utils/sanitize_text.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/utils/text_constraints.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/utils/uuid_utils.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/version.json +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/watcher/__init__.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/watcher/constants.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/worker/__init__.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/worker/__main__.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/worker/health_server.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/worker/memory_ingest_worker.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/worker/metric_writer_worker.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/worker/worker_loop.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/worker.py +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/CONTRIBUTORS.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/LICENSE +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/MANIFEST.in +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/README.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/aindy_runtime.egg-info/dependency_links.txt +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/aindy_runtime.egg-info/entry_points.txt +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/aindy_runtime.egg-info/top_level.txt +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/governance/AGENT_WORKING_RULES.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/governance/CHANGE_IMPACT_MATRIX.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/governance/CI_OWNERSHIP.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/governance/COMPARATIVE_RESEARCH_INDEX.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/governance/CROSS_REPO_COMPATIBILITY.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/governance/DOCSET_CHANGELOG.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/governance/ERROR_HANDLING_POLICY.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/governance/GITHUB_SETTINGS_CHECKLIST.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/governance/INVARIANTS.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/governance/INVARIANT_TEST_MAPPING.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/governance/MODEL_OWNERSHIP_POLICY.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/governance/RELEASE_CHECKLIST.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/governance/RELEASE_GATES.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/governance/RELEASE_STAGING.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/governance/REPO_COMPATIBILITY_POLICY.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/governance/RUNTIME_DOCSET_GOVERNANCE.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/governance/SECURITY_POLICY.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/governance/TEST_STRATEGY.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/governance/TRUSTING_A_GREEN_CHECK.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/operations/CONDITION_CODES.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/operations/DEGRADED_MODE_MATRIX.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/operations/DEGRADED_RUNTIME_MODES.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/operations/DEPENDENCY_CRITICALITY_MATRIX.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/operations/DEPLOYMENT_PROFILES.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/operations/DEPLOYMENT_TARGETS.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/operations/INCIDENT_CLASSIFICATION.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/operations/MACOS_CONTAINER_POLICY.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/operations/OPERATOR_RUNBOOK.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/operations/PROFILE_SUPPORT_MATRIX.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/operations/QUICKSTART.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/operations/RUNTIME_ONLY_DEPLOYMENT.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/AGENT_RUNTIME.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/APP_AGENT_REGISTRATION.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/ARCHITECTURE.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/CONNECTOR_CONTRACT.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/DATA_MODEL_MAP.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/DB_OWNERSHIP_CONTRACT.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/DURABLE_STATE_OWNERSHIP_CONTRACT.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/ECOSYSTEM_CAPABILITY_GAPS.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/EXECUTION_CONTRACT.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/EXECUTION_INVARIANTS.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/EXTENSION_ABI.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/EXTENSION_CAPABILITIES.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/EXTENSION_PROVENANCE.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/EXTENSION_TRUST_MODEL.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/FOUNDATIONAL_PATTERN.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/IDEMPOTENCY_CONTRACT.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/MEMORY_ADDRESS_SPACE.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/MEMORY_BRIDGE.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/MEMORY_BRIDGE_CONTRACT.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/NATIVE_MEMORY_BRIDGE.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/NODUS_DEVELOPER_GUIDE.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/NODUS_WORKFLOW_CONTRACT.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/OS_ISOLATION_LAYER.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/PUBLIC_API_CONTRACT.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/PUBLIC_RUNTIME_SURFACES.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/RETRY_POLICY.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/ROUTE_OWNERSHIP_INVENTORY.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/RUNTIME_BEHAVIOR.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/RUNTIME_BOUNDARY.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/RUNTIME_MODULE_MAP.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/RUNTIME_STABILITY_INDEX.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/SANDBOX_CONTRACT.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/SCHEMA_LIFECYCLE.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/SDK_CONTRACT.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/SECURITY_MATRIX.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/SECURITY_POSTURE.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/SYSCALL_REFERENCE.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/docs/runtime/WHAT_THE_RUNTIME_IS.md +0 -0
- {aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/setup.cfg +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.35.0"
|
|
@@ -73,6 +73,41 @@ def is_watcher_only(scopes) -> bool:
|
|
|
73
73
|
PLATFORM_ADMIN_SCOPE = Scopes.PLATFORM_ADMIN
|
|
74
74
|
|
|
75
75
|
|
|
76
|
+
#: Which key scopes authorize a syscall CAPABILITY, for the doors that dispatch a syscall by
|
|
77
|
+
#: name on an API key's behalf: `POST /platform/syscall` and the MCP server. One map, so the same
|
|
78
|
+
#: key gets one answer from both (DEC-126). Read is `read OR write`; a write grant implies read.
|
|
79
|
+
DISPATCH_CAPABILITY_SCOPES: dict[str, frozenset[str]] = {
|
|
80
|
+
"memory.read": frozenset({Scopes.MEMORY_READ, Scopes.MEMORY_WRITE}),
|
|
81
|
+
"memory.search": frozenset({Scopes.MEMORY_READ, Scopes.MEMORY_WRITE}),
|
|
82
|
+
"memory.write": frozenset({Scopes.MEMORY_WRITE}),
|
|
83
|
+
"memory.delete": frozenset({Scopes.MEMORY_DELETE}),
|
|
84
|
+
"execution.read": frozenset({Scopes.EXECUTION_READ}),
|
|
85
|
+
"flow.run": frozenset({Scopes.FLOW_EXECUTE}),
|
|
86
|
+
"event.emit": frozenset({Scopes.EVENT_EMIT}),
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def key_scopes_authorize(capability: str | None, scopes, *, exact_capability: bool = False) -> bool:
|
|
91
|
+
"""Whether an API key holding ``scopes`` may call a syscall that declares ``capability``.
|
|
92
|
+
|
|
93
|
+
``platform.admin`` authorizes everything. Otherwise the capability must be in
|
|
94
|
+
`DISPATCH_CAPABILITY_SCOPES` and the key must hold one of its authorizing scopes.
|
|
95
|
+
|
|
96
|
+
``exact_capability=True`` also accepts a scope that names the capability exactly (DEC-130).
|
|
97
|
+
Only an MCP OAuth grant passes it: its consent page offers a tool's own capability name when no
|
|
98
|
+
scope names it (an app's ``work.context``). Platform keys never do. One key scope,
|
|
99
|
+
``flow.execute``, equals an unmapped capability (``sys.v1.flow.execute_intent``), and the rule
|
|
100
|
+
would have widened what such a key reaches.
|
|
101
|
+
"""
|
|
102
|
+
held = set(scopes or [])
|
|
103
|
+
if PLATFORM_ADMIN_SCOPE in held:
|
|
104
|
+
return True
|
|
105
|
+
if exact_capability and capability and capability in held:
|
|
106
|
+
return True
|
|
107
|
+
authorizing = DISPATCH_CAPABILITY_SCOPES.get(capability or "")
|
|
108
|
+
return bool(authorizing and authorizing & held)
|
|
109
|
+
|
|
110
|
+
|
|
76
111
|
def grantable_scopes(current_user: dict) -> set[str]:
|
|
77
112
|
"""What scopes this caller may put on a **new** API key (`KEY-SCOPE-ESCALATION-1`).
|
|
78
113
|
|
|
@@ -89,6 +89,7 @@ RUNTIME_RETENTION_SEED: dict[str, str] = {
|
|
|
89
89
|
"capability.*": RETENTION_AUDIT,
|
|
90
90
|
"auth.*": RETENTION_AUDIT,
|
|
91
91
|
"provider_key.*": RETENTION_AUDIT, # FR-59: a user set or removed their own key
|
|
92
|
+
"mcp_grant.*": RETENTION_AUDIT, # FR-66: an MCP OAuth grant made or ended, and why
|
|
92
93
|
"platform.*": RETENTION_AUDIT,
|
|
93
94
|
"effect.*": RETENTION_AUDIT, # an operator's reconciliation of an unknown effect
|
|
94
95
|
"dlq.drained": RETENTION_AUDIT,
|
|
@@ -7,6 +7,10 @@ class SystemEventTypes:
|
|
|
7
7
|
# FR-59 (DEC-121) — a user set or deleted their own provider key. Provider and hint only.
|
|
8
8
|
PROVIDER_KEY_SET = "provider_key.set"
|
|
9
9
|
PROVIDER_KEY_DELETED = "provider_key.deleted"
|
|
10
|
+
# FR-66 — an MCP OAuth grant was made (consent) or ended, with why it ended. Ids, client,
|
|
11
|
+
# scopes and reason only; never a code, a token or a secret.
|
|
12
|
+
MCP_GRANT_CREATED = "mcp_grant.created"
|
|
13
|
+
MCP_GRANT_REVOKED = "mcp_grant.revoked"
|
|
10
14
|
STARTUP_RECOVERY_FAILED = "startup.recovery.failed"
|
|
11
15
|
STARTUP_RECOVERY_COMPLETED = "startup.recovery.completed"
|
|
12
16
|
|
|
@@ -22,7 +22,7 @@ from sqlalchemy.engine import Engine
|
|
|
22
22
|
RUNTIME_ALEMBIC_VERSION_TABLE = "alembic_version_runtime"
|
|
23
23
|
|
|
24
24
|
# The current head of the runtime migration chain (alembic/versions/0001..NNNN).
|
|
25
|
-
RUNTIME_ALEMBIC_HEAD_REVISION = "
|
|
25
|
+
RUNTIME_ALEMBIC_HEAD_REVISION = "0022"
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
def read_runtime_alembic_revision(engine: Engine) -> str | None:
|
|
@@ -21,6 +21,7 @@ import AINDY.db.models.agent_registry # noqa: F401
|
|
|
21
21
|
import AINDY.db.models.agent_run # noqa: F401
|
|
22
22
|
import AINDY.db.models.api_key # noqa: F401
|
|
23
23
|
import AINDY.db.models.user_provider_key # noqa: F401
|
|
24
|
+
import AINDY.db.models.mcp_oauth # noqa: F401
|
|
24
25
|
import AINDY.db.models.background_task_lease # noqa: F401
|
|
25
26
|
import AINDY.db.models.capability # noqa: F401
|
|
26
27
|
import AINDY.db.models.dynamic_flow # noqa: F401
|
|
@@ -25,6 +25,7 @@ from .job_log import JobLog
|
|
|
25
25
|
from .nodus_scheduled_job import NodusScheduledJob
|
|
26
26
|
from .api_key import PlatformAPIKey
|
|
27
27
|
from .user_provider_key import UserProviderKey
|
|
28
|
+
from .mcp_oauth import McpOAuthClient, McpOAuthGrant
|
|
28
29
|
from .dynamic_flow import DynamicFlow
|
|
29
30
|
from .dynamic_node import DynamicNode
|
|
30
31
|
from .waiting_flow_run import WaitingFlowRun
|
|
@@ -65,6 +66,8 @@ __all__ = [
|
|
|
65
66
|
"NodusScheduledJob",
|
|
66
67
|
"PlatformAPIKey",
|
|
67
68
|
"UserProviderKey",
|
|
69
|
+
"McpOAuthClient",
|
|
70
|
+
"McpOAuthGrant",
|
|
68
71
|
"DynamicFlow",
|
|
69
72
|
"DynamicNode",
|
|
70
73
|
"WaitingFlowRun",
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"""
|
|
2
|
+
db/models/mcp_oauth.py — OAuth for the MCP endpoint (FR-66 phase 2, DEC-129).
|
|
3
|
+
|
|
4
|
+
Two tables, read and written only by ``AINDY/platform_layer/mcp_oauth.py``:
|
|
5
|
+
|
|
6
|
+
* ``mcp_oauth_clients`` — dynamic client registrations (RFC 7591). The client's metadata, and
|
|
7
|
+
its client secret only as ciphertext.
|
|
8
|
+
* ``mcp_oauth_grants`` — one row per consent: which user let which client do what. It holds the
|
|
9
|
+
pending authorization code and the current refresh token as SHA-256 hashes only, never the
|
|
10
|
+
value. Revoking a grant ends every token issued under it.
|
|
11
|
+
|
|
12
|
+
Nothing here is read unless ``AINDY_MCP_OAUTH`` is on. Design:
|
|
13
|
+
docs/design/MCP_REMOTE_TRANSPORT_DESIGN.md §5–§6.
|
|
14
|
+
"""
|
|
15
|
+
import uuid
|
|
16
|
+
from datetime import datetime, timezone
|
|
17
|
+
|
|
18
|
+
from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, String, Text
|
|
19
|
+
from sqlalchemy.dialects.postgresql import UUID
|
|
20
|
+
|
|
21
|
+
from AINDY.db.database import Base
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _now() -> datetime:
|
|
25
|
+
return datetime.now(timezone.utc)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class McpOAuthClient(Base):
|
|
29
|
+
__tablename__ = "mcp_oauth_clients"
|
|
30
|
+
|
|
31
|
+
client_id = Column(String(64), primary_key=True)
|
|
32
|
+
# OAuthClientInformationFull as JSON, without the client secret.
|
|
33
|
+
client_info = Column(Text, nullable=False)
|
|
34
|
+
# The client secret, sealed (MultiFernet over keys derived from the signing keys); null for a
|
|
35
|
+
# public client (token_endpoint_auth_method "none").
|
|
36
|
+
client_secret_ciphertext = Column(Text, nullable=True)
|
|
37
|
+
created_at = Column(DateTime(timezone=True), default=_now, nullable=False)
|
|
38
|
+
last_used_at = Column(DateTime(timezone=True), nullable=True)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class McpOAuthGrant(Base):
|
|
42
|
+
__tablename__ = "mcp_oauth_grants"
|
|
43
|
+
|
|
44
|
+
id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
|
|
45
|
+
user_id = Column(
|
|
46
|
+
UUID(as_uuid=True),
|
|
47
|
+
ForeignKey("users.id", ondelete="CASCADE"),
|
|
48
|
+
nullable=False,
|
|
49
|
+
index=True,
|
|
50
|
+
)
|
|
51
|
+
client_id = Column(
|
|
52
|
+
String(64),
|
|
53
|
+
ForeignKey("mcp_oauth_clients.client_id", ondelete="CASCADE"),
|
|
54
|
+
nullable=False,
|
|
55
|
+
index=True,
|
|
56
|
+
)
|
|
57
|
+
# Space-separated, as OAuth writes them (portable across Postgres and SQLite).
|
|
58
|
+
scopes = Column(Text, nullable=False, default="")
|
|
59
|
+
resource = Column(Text, nullable=True)
|
|
60
|
+
# The user's token_version at consent; a password change moves it and ends the grant.
|
|
61
|
+
token_version = Column(Integer, nullable=False, default=0)
|
|
62
|
+
|
|
63
|
+
# The pending authorization code: single-use, 60 seconds.
|
|
64
|
+
code_hash = Column(String(64), nullable=True, unique=True)
|
|
65
|
+
code_challenge = Column(String(128), nullable=True)
|
|
66
|
+
code_redirect_uri = Column(Text, nullable=True)
|
|
67
|
+
code_redirect_explicit = Column(Boolean, nullable=False, default=True)
|
|
68
|
+
code_expires_at = Column(DateTime(timezone=True), nullable=True)
|
|
69
|
+
|
|
70
|
+
# The current refresh token (rotates on use) and the one it replaced, so a replay of the
|
|
71
|
+
# old one is recognised and revokes the grant.
|
|
72
|
+
refresh_token_hash = Column(String(64), nullable=True, unique=True)
|
|
73
|
+
previous_refresh_token_hash = Column(String(64), nullable=True, index=True)
|
|
74
|
+
refresh_expires_at = Column(DateTime(timezone=True), nullable=True)
|
|
75
|
+
|
|
76
|
+
created_at = Column(DateTime(timezone=True), default=_now, nullable=False)
|
|
77
|
+
last_used_at = Column(DateTime(timezone=True), nullable=True)
|
|
78
|
+
revoked_at = Column(DateTime(timezone=True), nullable=True)
|
|
@@ -23,7 +23,7 @@ logger = logging.getLogger(__name__)
|
|
|
23
23
|
|
|
24
24
|
_RUNTIME_MODEL_PREFIXES = ("AINDY.db.models.",)
|
|
25
25
|
_RUNTIME_MODEL_MODULES = {"AINDY.memory.memory_persistence"}
|
|
26
|
-
SCHEMA_CONTRACT_VERSION = "2026-11-
|
|
26
|
+
SCHEMA_CONTRACT_VERSION = "2026-11-09"
|
|
27
27
|
SCHEMA_INSPECT_MODULE = "python -m AINDY.db.schema_ops inspect --format json"
|
|
28
28
|
|
|
29
29
|
SCHEMA_STATE_BLANK_DATABASE = "blank_database"
|
|
@@ -500,6 +500,15 @@ class SyscallContractViolation(Exception):
|
|
|
500
500
|
# docs/design/MEDIATED_EFFECT_BOUNDARY_PROGRAM.md.
|
|
501
501
|
|
|
502
502
|
|
|
503
|
+
def _exception_failure_class(exc: BaseException) -> Optional[str]:
|
|
504
|
+
"""The failure class a handler's exception declares as its ``failure_class`` attribute, if
|
|
505
|
+
it is one of ``FAILURE_CLASSES``; ``None`` leaves the decision to the fallback table."""
|
|
506
|
+
from AINDY.core.retry_policy import FAILURE_CLASSES
|
|
507
|
+
|
|
508
|
+
declared = getattr(exc, "failure_class", None)
|
|
509
|
+
return declared if isinstance(declared, str) and declared in FAILURE_CLASSES else None
|
|
510
|
+
|
|
511
|
+
|
|
503
512
|
def _classified_failure_class(name: str, message: str, declared: Optional[str]) -> str:
|
|
504
513
|
"""Resolve a refusal's failure class and count the classification (RETRY-CLASSIFY-1)."""
|
|
505
514
|
from AINDY.core.retry_policy import FAILURE_CLASS_KEY, classify_failure, record_retry_classification
|
|
@@ -1080,9 +1089,13 @@ class SyscallDispatcher:
|
|
|
1080
1089
|
message = f"HTTP_503:{message}"
|
|
1081
1090
|
return self._error_envelope(
|
|
1082
1091
|
name, context, message, t_start, version=parsed_version, already_logged=True,
|
|
1083
|
-
#
|
|
1084
|
-
#
|
|
1085
|
-
|
|
1092
|
+
# A tripped breaker is the one handler failure the dispatcher KNOWS is transient.
|
|
1093
|
+
# Otherwise the class the exception DECLARED wins (the convention the tool seam
|
|
1094
|
+
# already honours, RETRY-CLASSIFY-1); an undeclared one is left to the fallback
|
|
1095
|
+
# table, which defaults to `transient`.
|
|
1096
|
+
failure_class=(
|
|
1097
|
+
"transient" if isinstance(exc, CircuitOpenError) else _exception_failure_class(exc)
|
|
1098
|
+
),
|
|
1086
1099
|
)
|
|
1087
1100
|
|
|
1088
1101
|
# Step 3b — output type check.
|
|
@@ -218,7 +218,7 @@ class SyscallEntry:
|
|
|
218
218
|
"handler", "capability", "description",
|
|
219
219
|
"input_schema", "output_schema",
|
|
220
220
|
"stable", "deprecated", "deprecated_since", "replacement",
|
|
221
|
-
"compensate", "execution_guarantee",
|
|
221
|
+
"compensate", "execution_guarantee", "read_only",
|
|
222
222
|
)
|
|
223
223
|
|
|
224
224
|
def __init__(
|
|
@@ -234,8 +234,13 @@ class SyscallEntry:
|
|
|
234
234
|
replacement: str | None = None,
|
|
235
235
|
compensate: Callable[[dict, "SyscallContext"], dict | None] | None = None,
|
|
236
236
|
execution_guarantee: str = "AT_LEAST_ONCE",
|
|
237
|
+
read_only: bool = False,
|
|
237
238
|
) -> None:
|
|
238
239
|
self.handler = handler
|
|
240
|
+
# DEC-128: the syscall changes nothing a user would call data (it reads). Declared,
|
|
241
|
+
# never inferred: undeclared counts as a write, and the MCP server refuses to expose a
|
|
242
|
+
# write unless AINDY_MCP_SERVER_ALLOW_WRITES is set.
|
|
243
|
+
self.read_only = bool(read_only)
|
|
239
244
|
self.capability = capability
|
|
240
245
|
self.description = description
|
|
241
246
|
self.input_schema: dict = input_schema or {}
|
|
@@ -1553,6 +1558,7 @@ SYSCALL_REGISTRY: VersionedSyscallRegistry = VersionedSyscallRegistry()
|
|
|
1553
1558
|
# ── v1 built-in syscalls ──────────────────────────────────────────────────────
|
|
1554
1559
|
|
|
1555
1560
|
SYSCALL_REGISTRY["sys.v1.memory.read"] = SyscallEntry(
|
|
1561
|
+
read_only=True, # DEC-128
|
|
1556
1562
|
handler=_handle_memory_read,
|
|
1557
1563
|
capability="memory.read",
|
|
1558
1564
|
description="Recall memory nodes for the calling user.",
|
|
@@ -1632,6 +1638,7 @@ SYSCALL_REGISTRY["sys.v1.memory.delete"] = SyscallEntry(
|
|
|
1632
1638
|
},
|
|
1633
1639
|
)
|
|
1634
1640
|
SYSCALL_REGISTRY["sys.v1.memory.search"] = SyscallEntry(
|
|
1641
|
+
read_only=True, # DEC-128
|
|
1635
1642
|
handler=_handle_memory_search,
|
|
1636
1643
|
capability="memory.read",
|
|
1637
1644
|
description="Semantic search over user memory nodes.",
|
|
@@ -1649,6 +1656,7 @@ SYSCALL_REGISTRY["sys.v1.memory.search"] = SyscallEntry(
|
|
|
1649
1656
|
},
|
|
1650
1657
|
)
|
|
1651
1658
|
SYSCALL_REGISTRY["sys.v1.memory.list"] = SyscallEntry(
|
|
1659
|
+
read_only=True, # DEC-128
|
|
1652
1660
|
handler=_handle_memory_list,
|
|
1653
1661
|
capability="memory.read",
|
|
1654
1662
|
description="List nodes at a MAS path prefix.",
|
|
@@ -1663,6 +1671,7 @@ SYSCALL_REGISTRY["sys.v1.memory.list"] = SyscallEntry(
|
|
|
1663
1671
|
stable=False,
|
|
1664
1672
|
)
|
|
1665
1673
|
SYSCALL_REGISTRY["sys.v1.memory.tree"] = SyscallEntry(
|
|
1674
|
+
read_only=True, # DEC-128
|
|
1666
1675
|
handler=_handle_memory_tree,
|
|
1667
1676
|
capability="memory.read",
|
|
1668
1677
|
description="Return a hierarchical tree of nodes under a path.",
|
|
@@ -1677,6 +1686,7 @@ SYSCALL_REGISTRY["sys.v1.memory.tree"] = SyscallEntry(
|
|
|
1677
1686
|
stable=False,
|
|
1678
1687
|
)
|
|
1679
1688
|
SYSCALL_REGISTRY["sys.v1.memory.trace"] = SyscallEntry(
|
|
1689
|
+
read_only=True, # DEC-128
|
|
1680
1690
|
handler=_handle_memory_trace,
|
|
1681
1691
|
capability="memory.read",
|
|
1682
1692
|
description="Follow the causal chain from a node at a path.",
|
|
@@ -1727,6 +1737,7 @@ SYSCALL_REGISTRY["sys.v1.event.emit"] = SyscallEntry(
|
|
|
1727
1737
|
# v2 extends v1 capabilities without removing or changing existing fields.
|
|
1728
1738
|
|
|
1729
1739
|
SYSCALL_REGISTRY["sys.v2.memory.read"] = SyscallEntry(
|
|
1740
|
+
read_only=True, # DEC-128
|
|
1730
1741
|
handler=_handle_memory_read_v2,
|
|
1731
1742
|
capability="memory.read",
|
|
1732
1743
|
description="Enhanced memory recall with structured field filters (v2).",
|
|
@@ -1836,6 +1847,7 @@ SYSCALL_REGISTRY["sys.v1.agent.execute"] = SyscallEntry(
|
|
|
1836
1847
|
},
|
|
1837
1848
|
)
|
|
1838
1849
|
SYSCALL_REGISTRY["sys.v1.agent.count_runs"] = SyscallEntry(
|
|
1850
|
+
read_only=True, # DEC-128
|
|
1839
1851
|
handler=_handle_agent_count_runs,
|
|
1840
1852
|
capability="agent.read",
|
|
1841
1853
|
description="Count AgentRun rows for a user, optionally filtered by status.",
|
|
@@ -1852,6 +1864,7 @@ SYSCALL_REGISTRY["sys.v1.agent.count_runs"] = SyscallEntry(
|
|
|
1852
1864
|
stable=False,
|
|
1853
1865
|
)
|
|
1854
1866
|
SYSCALL_REGISTRY["sys.v1.agent.list_recent_runs"] = SyscallEntry(
|
|
1867
|
+
read_only=True, # DEC-128
|
|
1855
1868
|
handler=_handle_agent_list_recent_runs,
|
|
1856
1869
|
capability="agent.read",
|
|
1857
1870
|
description="List recent AgentRun rows for a user as plain dicts.",
|
|
@@ -1952,6 +1965,7 @@ SYSCALL_REGISTRY["sys.v1.agent.simulate"] = SyscallEntry(
|
|
|
1952
1965
|
},
|
|
1953
1966
|
)
|
|
1954
1967
|
SYSCALL_REGISTRY["sys.v1.execution.get"] = SyscallEntry(
|
|
1968
|
+
read_only=True, # DEC-128
|
|
1955
1969
|
handler=_handle_execution_get,
|
|
1956
1970
|
capability="execution.read",
|
|
1957
1971
|
description="Return status and resource metrics for an execution unit.",
|
|
@@ -1971,6 +1985,7 @@ SYSCALL_REGISTRY["sys.v1.execution.get"] = SyscallEntry(
|
|
|
1971
1985
|
|
|
1972
1986
|
|
|
1973
1987
|
SYSCALL_REGISTRY["sys.v1.observability.support_metrics"] = SyscallEntry(
|
|
1988
|
+
read_only=True, # DEC-128
|
|
1974
1989
|
handler=_handle_observability_support_metrics,
|
|
1975
1990
|
capability="execution.read",
|
|
1976
1991
|
description=(
|
|
@@ -2017,6 +2032,7 @@ def register_syscall(
|
|
|
2017
2032
|
replacement: str | None = None,
|
|
2018
2033
|
compensate: Callable[[dict, SyscallContext], dict | None] | None = None,
|
|
2019
2034
|
execution_guarantee: str = "AT_LEAST_ONCE",
|
|
2035
|
+
read_only: bool = False,
|
|
2020
2036
|
) -> None:
|
|
2021
2037
|
"""Register a syscall at runtime.
|
|
2022
2038
|
|
|
@@ -2068,6 +2084,11 @@ def register_syscall(
|
|
|
2068
2084
|
|
|
2069
2085
|
Declaring this is inert unless the gate is engaged: ``AINDY_SYSCALL_IDEMPOTENCY``
|
|
2070
2086
|
must be on, or the run must be a durable continuation.
|
|
2087
|
+
read_only: **DEC-128.** ``True`` when the syscall only reads: it creates,
|
|
2088
|
+
changes and deletes nothing a user would call their data. Default ``False``, so an
|
|
2089
|
+
undeclared syscall counts as a write. The MCP server refuses to start with a write
|
|
2090
|
+
in its tool list unless ``AINDY_MCP_SERVER_ALLOW_WRITES`` is set, so a read-only
|
|
2091
|
+
tool you expose over MCP must say so here.
|
|
2071
2092
|
|
|
2072
2093
|
Raises:
|
|
2073
2094
|
ValueError: If name does not start with ``"sys."``, is already registered
|
|
@@ -2098,6 +2119,7 @@ def register_syscall(
|
|
|
2098
2119
|
deprecated_since=deprecated_since,
|
|
2099
2120
|
replacement=replacement,
|
|
2100
2121
|
compensate=compensate,
|
|
2122
|
+
read_only=read_only,
|
|
2101
2123
|
)
|
|
2102
2124
|
logger.debug(
|
|
2103
2125
|
"[syscall_registry] registered '%s' (capability=%s, deprecated=%s)",
|
|
@@ -56,6 +56,18 @@ MAX_PATH_DEPTH = 6
|
|
|
56
56
|
LEGACY_NAMESPACE = "_legacy"
|
|
57
57
|
|
|
58
58
|
_DOUBLE_SLASH = re.compile(r"/+")
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
class InvalidMemoryPath(ValueError):
|
|
62
|
+
"""A path that can never name a memory node, whatever is retried.
|
|
63
|
+
|
|
64
|
+
A ``ValueError`` so every existing ``except ValueError`` keeps catching it. It declares its
|
|
65
|
+
failure class (RETRY-CLASSIFY-1) because the syscall dispatcher otherwise classifies a
|
|
66
|
+
handler's exception by its message, and this one matched nothing, so it went out as
|
|
67
|
+
``transient``: an MCP client was told to retry a call that cannot succeed (FR-66).
|
|
68
|
+
"""
|
|
69
|
+
|
|
70
|
+
failure_class = "invalid"
|
|
59
71
|
_SAFE_SEGMENT = re.compile(r"^[A-Za-z0-9_\-\.]+$")
|
|
60
72
|
|
|
61
73
|
|
|
@@ -75,13 +87,13 @@ def normalize_path(path: str) -> str:
|
|
|
75
87
|
ValueError: If path does not start with /memory/.
|
|
76
88
|
"""
|
|
77
89
|
if not path:
|
|
78
|
-
raise
|
|
90
|
+
raise InvalidMemoryPath("MAS path must not be empty")
|
|
79
91
|
|
|
80
92
|
# Collapse duplicate slashes (but not in **)
|
|
81
93
|
cleaned = _DOUBLE_SLASH.sub("/", path.strip())
|
|
82
94
|
|
|
83
95
|
if not cleaned.startswith(MAS_ROOT):
|
|
84
|
-
raise
|
|
96
|
+
raise InvalidMemoryPath(
|
|
85
97
|
f"MAS path must start with {MAS_ROOT!r}; got {path!r}"
|
|
86
98
|
)
|
|
87
99
|
|
{aindy_runtime-2.34.0 → aindy_runtime-2.35.0}/AINDY/memory/native/memory_bridge_rs/Cargo.lock
RENAMED
|
@@ -37,9 +37,9 @@ checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510"
|
|
|
37
37
|
|
|
38
38
|
[[package]]
|
|
39
39
|
name = "cc"
|
|
40
|
-
version = "1.
|
|
40
|
+
version = "1.11.1"
|
|
41
41
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
42
|
-
checksum = "
|
|
42
|
+
checksum = "4ff2a8126fff0f8c839080d619675a585e61720bb12d2baceae45769fd66f155"
|
|
43
43
|
dependencies = [
|
|
44
44
|
"find-msvc-tools",
|
|
45
45
|
"shlex",
|
|
@@ -431,9 +431,9 @@ checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
|
|
|
431
431
|
|
|
432
432
|
[[package]]
|
|
433
433
|
name = "uuid"
|
|
434
|
-
version = "1.29.
|
|
434
|
+
version = "1.29.1"
|
|
435
435
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
436
|
-
checksum = "
|
|
436
|
+
checksum = "4a06f08a856b009bc7bbaf7d3e79808595d032dd19074c0c2ef26e49e03e6bdc"
|
|
437
437
|
dependencies = [
|
|
438
438
|
"getrandom",
|
|
439
439
|
"js-sys",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./index-CWtNaCr_.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,f as t,i as n,p as r,u as i,v as a,w as o,x as s}from"./index-
|
|
1
|
+
import{a as e,f as t,i as n,p as r,u as i,v as a,w as o,x as s}from"./index-CWtNaCr_.js";import"./AdminApiErrorBoundary-ZZFtFtMg.js";import"./LoadingPanel-ZZFtFtMg.js";var c=o(s(),1),l=`/platform/admin`;function u(){return t(`${l}/users`,{method:`GET`}).then(e)}function d(n){return t(`${l}/users/${n}/promote`,{method:`POST`}).then(e)}var f=a(),p={bg0:`#0d1117`,bg1:`#161b22`,border0:`#21262d`,border1:`#30363d`,text0:`#c9d1d9`,text1:`#8b949e`,accent:`#6cf`};function m(e){return e?new Date(e).toLocaleDateString(void 0,{year:`numeric`,month:`short`,day:`numeric`}):`—`}function h(){let{isAdmin:e,user:t}=n();if(!e)return(0,f.jsx)(i,{});let[a,o]=(0,c.useState)(null),[s,l]=(0,c.useState)(!1),[h,g]=(0,c.useState)(null),[_,v]=(0,c.useState)(null),[y,b]=(0,c.useState)(null),x=(0,c.useCallback)(()=>{l(!0),g(null),u().then(e=>o(e?.users??[])).catch(e=>g(e?.message||`Failed to load users.`)).finally(()=>l(!1))},[]);(0,c.useEffect)(()=>{x()},[x]);let S=async(e,t)=>{v(e);try{await d(e),b(`${t} promoted to admin.`),setTimeout(()=>b(null),3500),x()}catch(e){g(e?.message||`Promotion failed.`)}finally{v(null)}};return(0,f.jsxs)(`div`,{style:{padding:20,color:p.text0,fontFamily:`sans-serif`,maxWidth:900},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:20},children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`h2`,{style:{margin:0,color:`#fff`},children:`Users`}),(0,f.jsx)(`p`,{style:{margin:`4px 0 0`,fontSize:12,color:p.text1},children:`Registered accounts. Admin promotion is grant-only — privileges are never revoked here.`})]}),(0,f.jsx)(`button`,{onClick:x,style:{padding:`6px 14px`,background:`none`,border:`1px solid ${p.border1}`,borderRadius:6,color:p.text1,fontSize:12,cursor:`pointer`},children:`Refresh`})]}),y&&(0,f.jsx)(`div`,{style:{marginBottom:12,padding:`8px 14px`,background:`#0d2a1a`,border:`1px solid #1a5c33`,borderRadius:6,fontSize:12,color:`#4ade80`},children:y}),h&&(0,f.jsx)(`div`,{style:{marginBottom:12,padding:`8px 14px`,background:`#1a0d0d`,border:`1px solid #5c1a1a`,borderRadius:6,fontSize:12,color:`#f87171`},children:h}),s&&(0,f.jsx)(r,{label:`Loading users...`}),!s&&a&&(0,f.jsxs)(`table`,{style:{width:`100%`,borderCollapse:`collapse`,fontSize:13},children:[(0,f.jsx)(`thead`,{children:(0,f.jsx)(`tr`,{style:{borderBottom:`1px solid ${p.border0}`},children:[`Email`,`Joined`,`Status`,``].map(e=>(0,f.jsx)(`th`,{style:{textAlign:`left`,padding:`8px 12px`,color:p.text1,fontWeight:600,fontSize:11,textTransform:`uppercase`,letterSpacing:`0.05em`},children:e},e))})}),(0,f.jsx)(`tbody`,{children:a.map(e=>{let n=e.email===t?.email;return(0,f.jsxs)(`tr`,{style:{borderBottom:`1px solid ${p.border0}`},children:[(0,f.jsxs)(`td`,{style:{padding:`10px 12px`,color:p.text0},children:[e.email,n&&(0,f.jsx)(`span`,{style:{marginLeft:8,fontSize:10,color:p.text1,border:`1px solid ${p.border1}`,borderRadius:4,padding:`1px 5px`},children:`you`})]}),(0,f.jsx)(`td`,{style:{padding:`10px 12px`,color:p.text1,fontSize:12},children:m(e.created_at)}),(0,f.jsx)(`td`,{style:{padding:`10px 12px`},children:e.is_admin?(0,f.jsx)(`span`,{style:{fontSize:11,color:p.accent,border:`1px solid ${p.accent}33`,borderRadius:4,padding:`2px 7px`},children:`admin`}):(0,f.jsx)(`span`,{style:{fontSize:11,color:p.text1,border:`1px solid ${p.border1}`,borderRadius:4,padding:`2px 7px`},children:e.is_active?`active`:`inactive`})}),(0,f.jsx)(`td`,{style:{padding:`10px 12px`,textAlign:`right`},children:!e.is_admin&&!n&&(0,f.jsx)(`button`,{disabled:_===e.id,onClick:()=>S(e.id,e.email),style:{padding:`4px 12px`,background:`none`,border:`1px solid ${p.accent}66`,borderRadius:5,color:p.accent,fontSize:11,cursor:_===e.id?`not-allowed`:`pointer`,opacity:_===e.id?.5:1},children:_===e.id?`Promoting…`:`Promote to admin`})})]},e.id)})})]}),!s&&a?.length===0&&(0,f.jsx)(`p`,{style:{color:p.text1,fontSize:13},children:`No registered users found.`})]})}export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,l as t,s as n,u as r,v as i,w as a,x as o,y as s}from"./index-
|
|
1
|
+
import{i as e,l as t,s as n,u as r,v as i,w as a,x as o,y as s}from"./index-CWtNaCr_.js";import{a as c,f as l,t as u}from"./agent-CZCF88Ul.js";import"./AdminApiErrorBoundary-ZZFtFtMg.js";import{a as d,c as f,d as p,f as m,i as h,l as g,m as _,n as v,o as y,p as b,r as x,s as S,t as C}from"./SurfacePrimitives-Dx01hQJJ.js";var w=a(o(),1),T=i();function E(){window.dispatchEvent(new Event(t))}function D(e){let t=e?.plan?.steps||[];return t.length?n(t.slice(0,3),e=>e.description||e.tool||`Unnamed step`).join(` • `):`No plan steps were provided.`}function O({run:e,pendingAction:t,onApprove:r,onReject:i}){let a=e?.plan?.steps||[],o=e?.allowed_capabilities||[],s=e?.granted_tools||[];return(0,T.jsxs)(`article`,{className:`rounded-[22px] border p-5`,style:{background:`rgba(255,255,255,0.02)`,borderColor:`rgba(255,255,255,0.08)`},children:[(0,T.jsxs)(`div`,{className:`flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between`,children:[(0,T.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,T.jsx)(h,{tone:b(e.status),children:e.status.replaceAll(`_`,` `)}),(0,T.jsxs)(h,{tone:b(e.overall_risk),children:[e.overall_risk,` risk`]}),(0,T.jsxs)(h,{tone:`info`,children:[a.length,` steps`]}),e.agent_type?(0,T.jsx)(h,{children:e.agent_type}):null]}),(0,T.jsx)(`h3`,{className:`mt-4 text-xl font-semibold tracking-[-0.03em]`,style:{color:_.text},children:e.goal}),(0,T.jsx)(`p`,{className:`mt-2 text-sm leading-7`,style:{color:_.muted},children:e.executive_summary||D(e)})]}),(0,T.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,T.jsx)(C,{onClick:()=>r(e.run_id),disabled:t===e.run_id,children:t===e.run_id?`Applying`:`Approve`}),(0,T.jsx)(C,{tone:`danger`,onClick:()=>i(e.run_id),disabled:t===e.run_id,children:`Reject`})]})]}),(0,T.jsxs)(`div`,{className:`mt-5 grid gap-4 lg:grid-cols-[minmax(0,1.5fr)_minmax(320px,1fr)]`,children:[(0,T.jsxs)(`div`,{className:`rounded-[18px] border p-4`,style:{borderColor:_.border},children:[(0,T.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-[0.22em]`,style:{color:_.muted},children:`Planned Steps`}),(0,T.jsx)(`div`,{className:`mt-3 space-y-3`,children:n(a,(t,n)=>(0,T.jsxs)(`div`,{className:`rounded-2xl border p-3`,style:{borderColor:_.border},children:[(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,T.jsxs)(h,{tone:`info`,children:[`Step `,n+1]}),(0,T.jsx)(h,{children:t.tool}),(0,T.jsx)(h,{tone:b(t.risk_level),children:t.risk_level})]}),(0,T.jsx)(`div`,{className:`mt-3 text-sm font-medium`,style:{color:_.text},children:t.description||`No description provided.`}),t.args?(0,T.jsx)(`pre`,{className:`mt-3 overflow-x-auto rounded-2xl p-3 text-xs`,style:{background:`rgba(4, 17, 13, 0.9)`,color:`#8fffd0`},children:JSON.stringify(t.args,null,2)}):null]},`${e.run_id}-${n}`))})]}),(0,T.jsxs)(`div`,{className:`space-y-4`,children:[(0,T.jsxs)(`div`,{className:`rounded-[18px] border p-4`,style:{borderColor:_.border},children:[(0,T.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-[0.22em]`,style:{color:_.muted},children:`Review Metadata`}),(0,T.jsxs)(`dl`,{className:`mt-4 grid grid-cols-1 gap-3 text-sm`,children:[(0,T.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,T.jsx)(`dt`,{style:{color:_.muted},children:`Created`}),(0,T.jsx)(`dd`,{style:{color:_.text},children:p(e.created_at)})]}),(0,T.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,T.jsx)(`dt`,{style:{color:_.muted},children:`Age`}),(0,T.jsx)(`dd`,{style:{color:_.text},children:m(e.created_at)})]}),(0,T.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,T.jsx)(`dt`,{style:{color:_.muted},children:`Run ID`}),(0,T.jsx)(`dd`,{className:`truncate font-mono text-xs`,style:{color:_.text},children:e.run_id})]})]})]}),(0,T.jsxs)(`div`,{className:`rounded-[18px] border p-4`,style:{borderColor:_.border},children:[(0,T.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-[0.22em]`,style:{color:_.muted},children:`Granted Capabilities`}),(0,T.jsx)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:o.length?n(o,e=>(0,T.jsx)(h,{tone:`success`,children:e},e)):(0,T.jsx)(`span`,{className:`text-sm`,style:{color:_.muted},children:`No capabilities embedded yet.`})})]}),(0,T.jsxs)(`div`,{className:`rounded-[18px] border p-4`,style:{borderColor:_.border},children:[(0,T.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-[0.22em]`,style:{color:_.muted},children:`Tool Access`}),(0,T.jsx)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:s.length?n(s,e=>(0,T.jsx)(h,{children:e},e)):(0,T.jsx)(`span`,{className:`text-sm`,style:{color:_.muted},children:`No tools auto-granted.`})})]})]})]})]})}function k(){let{isAdmin:t}=e();if(!t)return(0,T.jsx)(r,{});let[i,a]=(0,w.useState)([]),[o,p]=(0,w.useState)(!0),[m,h]=(0,w.useState)(``),[b,D]=(0,w.useState)(``),k=(0,w.useCallback)(async()=>{p(!0),h(``);try{let e=await c(`pending_approval`,50);a(Array.isArray(e)?e:[]),E()}catch(e){h(e instanceof Error?e.message:`Failed to load approvals.`)}finally{p(!1)}},[]);(0,w.useEffect)(()=>{k()},[k]);let A=(0,w.useCallback)(async(e,t)=>{D(e),h(``);try{t===`approve`?await u(e):await l(e),a(t=>t.filter(t=>t.run_id!==e)),E()}catch(e){h(e instanceof Error?e.message:`Failed to ${t} run.`)}finally{D(``)}},[]),j=(0,w.useMemo)(()=>{let e=i.filter(e=>e.overall_risk===`high`).length,t=i.reduce((e,t)=>e+(t.allowed_capabilities?.length||0),0);return{total:i.length,highRisk:e,queuedCapabilities:t}},[i]);return(0,T.jsxs)(S,{eyebrow:`Agent Governance`,title:`Approval Inbox`,description:`Review every queued agent run before execution. Risk, capability scope, and planned steps are visible inline so approval stays operational instead of ceremonial.`,actions:(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(C,{tone:`ghost`,onClick:k,children:`Refresh Queue`}),(0,T.jsx)(s,{to:`/agent`,className:`rounded-full border px-4 py-2 text-xs font-semibold uppercase tracking-[0.18em]`,style:{borderColor:_.border,color:_.text},children:`Open Agent Console`})]}),children:[(0,T.jsxs)(f,{children:[(0,T.jsx)(`div`,{className:`lg:col-span-4`,children:(0,T.jsx)(y,{label:`Pending Reviews`,value:j.total,hint:`Runs waiting for a human decision.`,tone:`warning`})}),(0,T.jsx)(`div`,{className:`lg:col-span-4`,children:(0,T.jsx)(y,{label:`High-Risk Plans`,value:j.highRisk,hint:`These runs include high-risk operations.`,tone:j.highRisk?`danger`:`neutral`})}),(0,T.jsx)(`div`,{className:`lg:col-span-4`,children:(0,T.jsx)(y,{label:`Queued Capabilities`,value:j.queuedCapabilities,hint:`Capability grants embedded across the queue.`,tone:`info`})})]}),(0,T.jsxs)(g,{title:`Pending Agent Runs`,subtitle:`Approval is required before these runs can execute. Approve to start execution immediately or reject to discard the plan.`,children:[o?(0,T.jsx)(d,{label:`Loading pending approvals`}):null,!o&&m?(0,T.jsx)(x,{message:m,onRetry:k}):null,!o&&!m&&i.length===0?(0,T.jsx)(v,{title:`Approval queue is clear`,description:`No runs are currently waiting for review. New high-risk or gated plans will land here automatically.`}):null,!o&&!m?(0,T.jsx)(`div`,{className:`space-y-4`,children:n(i,e=>(0,T.jsx)(O,{run:e,pendingAction:b,onApprove:e=>A(e,`approve`),onReject:e=>A(e,`reject`)},e.run_id))}):null]})]})}export{t as APPROVAL_EVENT,k as default,E as emitApprovalCountChanged};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,a as t,c as n,d as r,f as i,g as a,h as o,i as s,m as c,o as l,p as u,s as d,u as f,v as p,w as m,x as h}from"./index-CX2b1AQf.js";import"./AdminApiErrorBoundary-B5wptpSZ.js";import"./LoadingPanel-B5wptpSZ.js";import"./_core-B5wptpSZ.js";import{a as g,c as ee,f as te,i as _,n as ne,o as re,p as ie,r as ae,s as oe,t as v}from"./agent-0UTI_rvD.js";import"./EmptyState-B5wptpSZ.js";import"./Toast-B5wptpSZ.js";var y=m(h(),1);l(`analytics`,e=>i(a.ANALYTICS.LINKEDIN_MANUAL,{method:`POST`,body:JSON.stringify(e)}).then(t)),l(`analytics`,(e,n=null)=>{let r=n?`?group_by=${encodeURIComponent(n)}`:``;return i(`${a.ANALYTICS.MASTERPLAN_SUMMARY(e)}${r}`,{method:`GET`}).then(t)}),l(`analytics`,e=>i(a.ANALYTICS.CALCULATE_TWR,{method:`POST`,body:JSON.stringify(e)}).then(t)),l(`analytics`,e=>i(a.ANALYTICS.CALCULATE_ENGAGEMENT,{method:`POST`,body:JSON.stringify(e)}).then(t)),l(`analytics`,e=>i(a.ANALYTICS.CALCULATE_AI_EFFICIENCY,{method:`POST`,body:JSON.stringify(e)}).then(t)),l(`analytics`,e=>i(a.ANALYTICS.CALCULATE_IMPACT_SCORE,{method:`POST`,body:JSON.stringify(e)}).then(t)),l(`analytics`,e=>i(a.ANALYTICS.CALCULATE_INCOME_EFFICIENCY,{method:`POST`,body:JSON.stringify(e)}).then(t)),l(`analytics`,e=>i(a.ANALYTICS.CALCULATE_REVENUE_SCALING,{method:`POST`,body:JSON.stringify(e)}).then(t)),l(`analytics`,e=>i(a.ANALYTICS.CALCULATE_EXECUTION_SPEED,{method:`POST`,body:JSON.stringify(e)}).then(t)),l(`analytics`,e=>i(a.ANALYTICS.CALCULATE_ATTENTION_VALUE,{method:`POST`,body:JSON.stringify(e)}).then(t)),l(`analytics`,e=>i(a.ANALYTICS.CALCULATE_ENGAGEMENT_RATE,{method:`POST`,body:JSON.stringify(e)}).then(t)),l(`analytics`,e=>i(a.ANALYTICS.CALCULATE_BUSINESS_GROWTH,{method:`POST`,body:JSON.stringify(e)}).then(t)),l(`analytics`,e=>i(a.ANALYTICS.CALCULATE_MONETIZATION_EFFICIENCY,{method:`POST`,body:JSON.stringify(e)}).then(t)),l(`analytics`,e=>i(a.ANALYTICS.CALCULATE_AI_PRODUCTIVITY_BOOST,{method:`POST`,body:JSON.stringify(e)}).then(t)),l(`analytics`,e=>i(a.ANALYTICS.CALCULATE_DECISION_EFFICIENCY,{method:`POST`,body:JSON.stringify(e)}).then(t)),l(`analytics`,e=>i(a.ANALYTICS.CALCULATE_LOST_POTENTIAL,{method:`POST`,body:JSON.stringify(e)}).then(t)),l(`analytics`,()=>i(a.ANALYTICS.SCORES_ME,{method:`GET`}).then(t)),l(`analytics`,()=>i(a.ANALYTICS.SCORES_RECALCULATE,{method:`POST`}).then(t)),l(`analytics`,(e=30)=>i(`${a.ANALYTICS.SCORES_HISTORY}?limit=${e}`,{method:`GET`}).then(t));var b=l(`analytics`,e=>i(a.ANALYTICS.SCORES_FEEDBACK,{method:`POST`,body:JSON.stringify(e)}).then(t));l(`analytics`,(e=50)=>i(`${a.ANALYTICS.SCORES_FEEDBACK}?limit=${e}`,{method:`GET`}).then(t));var x=p(),S=({risk:e})=>{let t={low:`bg-emerald-500/10 text-emerald-400 border border-emerald-500/20`,medium:`bg-yellow-500/10 text-yellow-400 border border-yellow-500/20`,high:`bg-red-500/10 text-red-400 border border-red-500/20`};return(0,x.jsx)(`span`,{className:`px-2 py-0.5 rounded text-[10px] font-bold uppercase tracking-wider ${t[e]||t.high}`,children:e||`?`})},C=({status:e})=>(0,x.jsx)(`span`,{className:`px-2 py-0.5 rounded text-[10px] font-bold uppercase tracking-wider ${{pending_approval:`bg-yellow-500/10 text-yellow-300 border border-yellow-500/20`,approved:`bg-blue-500/10 text-blue-300 border border-blue-500/20`,executing:`bg-[#00ffaa]/10 text-[#00ffaa] border border-[#00ffaa]/20`,completed:`bg-emerald-500/10 text-emerald-400 border border-emerald-500/20`,failed:`bg-red-500/10 text-red-400 border border-red-500/20`,rejected:`bg-zinc-500/10 text-zinc-400 border border-zinc-500/20`}[e]||``}`,children:{pending_approval:`Awaiting Approval`,approved:`Approved`,executing:`Executing`,completed:`Completed`,failed:`Failed`,rejected:`Rejected`}[e]||e}),w=({step:e,index:t})=>{let[n,r]=(0,y.useState)(!1);return(0,x.jsxs)(`div`,{className:`border border-zinc-800/60 rounded-lg overflow-hidden mb-2`,children:[(0,x.jsxs)(`button`,{onClick:()=>r(!n),className:`w-full flex items-center gap-3 px-4 py-3 text-left hover:bg-zinc-800/30 transition-colors`,children:[(0,x.jsx)(`span`,{className:`text-xs font-mono text-zinc-500 w-5`,children:t+1}),(0,x.jsx)(`span`,{className:`font-mono text-xs text-[#00ffaa] w-36 truncate`,children:e.tool_name}),(0,x.jsx)(S,{risk:e.risk_level}),(0,x.jsx)(`span`,{className:`flex-1 text-xs text-zinc-300 truncate`,children:e.description}),e.status&&(0,x.jsx)(C,{status:e.status}),e.execution_ms&&(0,x.jsxs)(`span`,{className:`text-[10px] text-zinc-500`,children:[e.execution_ms,`ms`]}),(0,x.jsx)(`span`,{className:`text-zinc-500 text-[10px]`,children:n?`▲`:`▼`})]}),n&&(0,x.jsxs)(`div`,{className:`px-4 pb-3 border-t border-zinc-800/60 bg-zinc-950/50`,children:[e.result&&(0,x.jsx)(`pre`,{className:`text-[10px] text-zinc-300 mt-2 overflow-x-auto whitespace-pre-wrap`,children:JSON.stringify(e.result,null,2)}),e.error_message&&(0,x.jsx)(`p`,{className:`text-xs text-red-400 mt-2`,children:e.error_message})]})]})},se=({run:e,onApprove:t,onReject:n,onSelect:r,isSelected:i})=>{let a=e.status===`pending_approval`,o=e.plan?.steps||[];return(0,x.jsxs)(`div`,{className:`border rounded-xl p-4 cursor-pointer transition-all ${i?`border-[#00ffaa]/40 bg-[#00ffaa]/5`:`border-zinc-800/60 hover:border-zinc-700/60 bg-zinc-950/30`}`,onClick:()=>r(e),children:[(0,x.jsxs)(`div`,{className:`flex items-start justify-between gap-3 mb-2`,children:[(0,x.jsx)(`p`,{className:`text-sm font-medium text-zinc-100 leading-snug flex-1 line-clamp-2`,children:e.goal}),(0,x.jsxs)(`div`,{className:`flex items-center gap-2 flex-shrink-0`,children:[(0,x.jsx)(S,{risk:e.overall_risk}),(0,x.jsx)(C,{status:e.status})]})]}),e.executive_summary&&(0,x.jsx)(`p`,{className:`text-xs text-zinc-400 mb-3 line-clamp-2`,children:e.executive_summary}),(0,x.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,x.jsxs)(`div`,{className:`flex items-center gap-3 text-[10px] text-zinc-500`,children:[(0,x.jsxs)(`span`,{children:[o.length,` step`,o.length===1?``:`s`]}),e.steps_completed>0&&(0,x.jsxs)(`span`,{children:[e.steps_completed,`/`,e.steps_total,` done`]}),(0,x.jsx)(`span`,{children:e.created_at?new Date(e.created_at).toLocaleString():``})]}),a&&(0,x.jsxs)(`div`,{className:`flex gap-2`,children:[(0,x.jsx)(`button`,{onClick:n=>{n.stopPropagation(),t(e.run_id)},className:`px-3 py-1 text-[10px] font-bold uppercase tracking-wider rounded bg-[#00ffaa] text-black hover:bg-[#00ffaa]/80 transition-colors`,children:`Approve`}),(0,x.jsx)(`button`,{onClick:t=>{t.stopPropagation(),n(e.run_id)},className:`px-3 py-1 text-[10px] font-bold uppercase tracking-wider rounded border border-zinc-700 text-zinc-400 hover:bg-zinc-800 transition-colors`,children:`Reject`})]})]})]})},T=({runId:e})=>{let[t,n]=(0,y.useState)(null),[r,i]=(0,y.useState)(!1),a=async t=>{i(!0);try{await b({source_type:`agent`,source_id:e,feedback_value:t}),n(t)}finally{i(!1)}};return(0,x.jsxs)(`div`,{className:`mt-4 flex items-center gap-2`,children:[(0,x.jsx)(`span`,{className:`text-[10px] uppercase tracking-wider text-zinc-500`,children:`Run Outcome`}),(0,x.jsx)(`button`,{onClick:()=>a(1),disabled:r,className:`px-3 py-1 rounded-full border text-[10px] font-bold uppercase tracking-wider transition-colors ${t===1?`border-emerald-500 bg-emerald-500/20 text-emerald-300`:`border-zinc-700 text-zinc-400 hover:bg-zinc-800`}`,children:`Helpful`}),(0,x.jsx)(`button`,{onClick:()=>a(-1),disabled:r,className:`px-3 py-1 rounded-full border text-[10px] font-bold uppercase tracking-wider transition-colors ${t===-1?`border-red-500 bg-red-500/20 text-red-300`:`border-zinc-700 text-zinc-400 hover:bg-zinc-800`}`,children:`Not Helpful`})]})},E=({run:e,steps:t,loading:n,runtimeOnly:r=!1,onApprove:i,onReject:a})=>{if(!e)return null;let o=e.plan?.steps||[],s=e.status===`pending_approval`,[c,l]=(0,y.useState)(!1),[u,f]=(0,y.useState)(null);return(0,x.jsxs)(`div`,{className:`flex flex-col h-full`,children:[(0,x.jsxs)(`div`,{className:`mb-4`,children:[(0,x.jsxs)(`div`,{className:`flex items-center gap-3 mb-2`,children:[(0,x.jsx)(`h3`,{className:`text-sm font-bold text-zinc-100`,children:`Execution Plan`}),(0,x.jsx)(S,{risk:e.overall_risk}),(0,x.jsx)(C,{status:e.status})]}),(0,x.jsx)(`p`,{className:`text-xs text-zinc-400`,children:e.goal})]}),e.executive_summary&&(0,x.jsxs)(`div`,{className:`bg-zinc-900/50 border border-zinc-800/60 rounded-lg p-3 mb-4`,children:[(0,x.jsx)(`p`,{className:`text-[10px] text-zinc-500 uppercase tracking-wider mb-1`,children:`Executive Summary`}),(0,x.jsx)(`p`,{className:`text-sm text-zinc-200`,children:e.executive_summary})]}),s&&(0,x.jsxs)(`div`,{className:`flex flex-col gap-2 mb-5 p-4 rounded-xl border border-yellow-500/20 bg-yellow-500/5`,children:[(0,x.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,x.jsxs)(`div`,{className:`flex-1`,children:[(0,x.jsx)(`p`,{className:`text-xs font-semibold text-yellow-300 mb-0.5`,children:`Awaiting your approval`}),(0,x.jsx)(`p`,{className:`text-[10px] text-zinc-500`,children:`Review the plan above, then approve or reject.`})]}),(0,x.jsx)(`button`,{onClick:async()=>{l(!0),f(null);try{await i(e.run_id)}catch(e){f(e?.message||`Failed to approve.`)}finally{l(!1)}},disabled:c,className:`px-4 py-2 text-[11px] font-bold uppercase tracking-wider rounded-lg bg-[#00ffaa] text-black hover:bg-[#00ffaa]/80 transition-colors disabled:opacity-50`,children:`Approve`}),(0,x.jsx)(`button`,{onClick:async()=>{l(!0),f(null);try{await a(e.run_id)}catch(e){f(e?.message||`Failed to reject.`)}finally{l(!1)}},disabled:c,className:`px-4 py-2 text-[11px] font-bold uppercase tracking-wider rounded-lg border border-zinc-700 text-zinc-400 hover:bg-zinc-800 transition-colors disabled:opacity-50`,children:`Reject`})]}),u&&(0,x.jsx)(`p`,{className:`text-xs text-red-400`,children:u})]}),(0,x.jsxs)(`div`,{className:`flex-1 overflow-y-auto custom-scrollbar`,children:[n?(0,x.jsx)(`p`,{className:`text-xs text-zinc-500`,children:`Loading steps...`}):t.length>0?(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`p`,{className:`text-[10px] text-zinc-500 uppercase tracking-wider mb-2`,children:`Steps`}),d(t,(e,t)=>(0,x.jsx)(w,{step:e,index:t},t))]}):o.length>0?(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`p`,{className:`text-[10px] text-zinc-500 uppercase tracking-wider mb-2`,children:`Planned Steps`}),d(o,(e,t)=>(0,x.jsxs)(`div`,{className:`flex items-start gap-3 px-4 py-3 border border-zinc-800/60 rounded-lg mb-2`,children:[(0,x.jsx)(`span`,{className:`text-xs font-mono text-zinc-500 w-5 pt-0.5`,children:t+1}),(0,x.jsx)(`span`,{className:`font-mono text-xs text-[#00ffaa] w-36 flex-shrink-0`,children:e.tool}),(0,x.jsx)(S,{risk:e.risk_level}),(0,x.jsx)(`span`,{className:`flex-1 text-xs text-zinc-300`,children:e.description})]},t))]}):e.status===`completed`||e.status===`failed`?(0,x.jsxs)(`div`,{className:`bg-zinc-900/40 border border-zinc-800/60 rounded-lg p-4 text-xs text-zinc-500`,children:[(0,x.jsx)(`p`,{className:`font-semibold text-zinc-400 mb-1`,children:`No execution steps recorded.`}),e.error?(0,x.jsxs)(`p`,{className:`text-red-400 mb-2`,children:[`Error: `,e.error]}):null,(0,x.jsx)(`p`,{children:`Possible causes:`}),(0,x.jsxs)(`ul`,{className:`list-disc list-inside mt-1 space-y-0.5`,children:[(0,x.jsxs)(`li`,{children:[(0,x.jsx)(`code`,{className:`text-zinc-400`,children:`OPENAI_API_KEY`}),` is not set — the planner requires an LLM to generate execution steps.`]}),(0,x.jsx)(`li`,{children:`The planner backend returned an empty plan. Check server logs for detail.`})]})]}):null,e.result&&(0,x.jsxs)(`div`,{className:`mt-4`,children:[(0,x.jsx)(`p`,{className:`text-[10px] text-zinc-500 uppercase tracking-wider mb-2`,children:`Result`}),(0,x.jsx)(`pre`,{className:`text-[10px] text-zinc-300 bg-zinc-900/50 border border-zinc-800/60 rounded-lg p-3 overflow-x-auto whitespace-pre-wrap`,children:JSON.stringify(e.result,null,2)})]}),!r&&(e.status===`completed`||e.status===`failed`)&&(0,x.jsx)(T,{runId:e.run_id})]})]})},D=({trust:e,onUpdate:t,tools:n})=>{let[r,i]=(0,y.useState)(e?.auto_execute_low||!1),[a,o]=(0,y.useState)(e?.auto_execute_medium||!1),[s,c]=(0,y.useState)(e?.allowed_auto_grant_tools||[]),[l,u]=(0,y.useState)(!1);(0,y.useEffect)(()=>{i(e?.auto_execute_low||!1),o(e?.auto_execute_medium||!1),c(e?.allowed_auto_grant_tools||[])},[e]);let f=(n||[]).filter(e=>e.risk===`low`||e.risk===`medium`).sort((e,t)=>e.name.localeCompare(t.name)),p=(n||[]).filter(e=>e.name===`genesis.message`),m=e=>{c(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e].sort())};return(0,x.jsxs)(`div`,{className:`bg-zinc-900/50 border border-zinc-800/60 rounded-xl p-4`,children:[(0,x.jsx)(`h4`,{className:`text-xs font-bold text-zinc-300 uppercase tracking-wider mb-3`,children:`Trust Settings`}),(0,x.jsx)(`p`,{className:`text-[10px] text-zinc-500 mb-4`,children:`High-risk plans always require approval regardless of these settings.`}),(0,x.jsxs)(`div`,{className:`space-y-3`,children:[(0,x.jsxs)(`label`,{className:`flex items-center justify-between`,children:[(0,x.jsx)(`span`,{className:`text-xs text-zinc-300`,children:`Auto-execute low-risk plans`}),(0,x.jsx)(`input`,{type:`checkbox`,checked:r,onChange:e=>i(e.target.checked),className:`accent-[#00ffaa]`})]}),(0,x.jsxs)(`label`,{className:`flex items-center justify-between`,children:[(0,x.jsx)(`span`,{className:`text-xs text-zinc-300`,children:`Auto-execute medium-risk plans`}),(0,x.jsx)(`input`,{type:`checkbox`,checked:a,onChange:e=>o(e.target.checked),className:`accent-yellow-400`})]})]}),(0,x.jsxs)(`div`,{className:`mt-5`,children:[(0,x.jsx)(`p`,{className:`text-[10px] text-zinc-500 uppercase tracking-wider mb-2`,children:`Tool-Level Auto-Grant Policy`}),(0,x.jsxs)(`div`,{className:`space-y-2`,children:[d(f,e=>(0,x.jsxs)(`label`,{className:`flex items-center justify-between gap-3 border border-zinc-800/60 rounded-lg px-3 py-2`,children:[(0,x.jsxs)(`div`,{children:[(0,x.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,x.jsx)(`span`,{className:`text-xs text-zinc-200 font-mono`,children:e.name}),(0,x.jsx)(S,{risk:e.risk})]}),(0,x.jsx)(`p`,{className:`text-[10px] text-zinc-500 mt-1`,children:e.description})]}),(0,x.jsx)(`input`,{type:`checkbox`,checked:s.includes(e.name),onChange:()=>m(e.name),className:`accent-[#00ffaa]`})]},e.name)),d(p,e=>(0,x.jsxs)(`label`,{className:`flex items-center justify-between gap-3 border border-red-500/20 rounded-lg px-3 py-2 opacity-80`,children:[(0,x.jsxs)(`div`,{children:[(0,x.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,x.jsx)(`span`,{className:`text-xs text-zinc-200 font-mono`,children:e.name}),(0,x.jsx)(S,{risk:e.risk})]}),(0,x.jsx)(`p`,{className:`text-[10px] text-zinc-500 mt-1`,children:`Locked. High-risk tools cannot be auto-granted.`})]}),(0,x.jsx)(`input`,{type:`checkbox`,checked:!1,disabled:!0,className:`accent-red-500`})]},e.name))]})]}),(0,x.jsx)(`button`,{onClick:async()=>{u(!0);try{await t({auto_execute_low:r,auto_execute_medium:a,allowed_auto_grant_tools:s})}finally{u(!1)}},disabled:l,className:`mt-4 w-full py-2 text-[10px] font-bold uppercase tracking-wider rounded bg-zinc-800 text-zinc-300 hover:bg-zinc-700 transition-colors disabled:opacity-50`,children:l?`Saving...`:`Save Settings`})]})},O=[{title:`Summarize recent activity`,goal:`Summarize what you remember about recent activity and surface any open items`,description:`A safe first run — the agent reads its memory and reports back.`},{title:`Create a follow-up task`,goal:`Create a follow-up task to review the current system configuration`,description:`Creates a trackable item in your workflow using the task tool.`},{title:`Recall a topic from memory`,goal:`Recall everything you know about the current project goals and status`,description:`Tests the memory system — works best after prior runs have built up context.`},{title:`Audit available tools`,goal:`List the tools available to you and describe what each one can do`,description:`Read-only inspection — safe to approve with no side effects.`}],k=({onSelect:e})=>(0,x.jsxs)(`div`,{className:`mb-5`,children:[(0,x.jsx)(`p`,{className:`text-[10px] text-zinc-600 uppercase tracking-wider mb-3`,children:`Start with a template`}),(0,x.jsx)(`div`,{className:`grid grid-cols-2 gap-2`,children:O.map(t=>(0,x.jsxs)(`button`,{onClick:()=>e(t.goal),className:`text-left border border-zinc-800/60 hover:border-zinc-700 rounded-xl px-4 py-3 bg-zinc-950/40 hover:bg-zinc-900/60 transition-all group`,children:[(0,x.jsx)(`p`,{className:`text-xs font-semibold text-zinc-300 group-hover:text-zinc-100 mb-1`,children:t.title}),(0,x.jsx)(`p`,{className:`text-[10px] text-zinc-600 leading-relaxed`,children:t.description})]},t.title))})]}),A={"memory.recall":`border-blue-500/30 text-blue-300 hover:bg-blue-500/10`,"task.create":`border-[#00ffaa]/30 text-[#00ffaa] hover:bg-[#00ffaa]/10`,"arm.analyze":`border-purple-500/30 text-purple-300 hover:bg-purple-500/10`,"genesis.message":`border-yellow-500/30 text-yellow-300 hover:bg-yellow-500/10`},ce=({suggestions:e,onSelect:t})=>!e||e.length===0?null:(0,x.jsxs)(`div`,{className:`mb-4`,children:[(0,x.jsx)(`p`,{className:`text-[10px] text-zinc-600 uppercase tracking-wider mb-2`,children:`Suggested Actions`}),(0,x.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:d(e,(e,n)=>(0,x.jsxs)(`button`,{title:e.reason,onClick:()=>t(e.suggested_goal),className:`inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full border text-[11px] font-medium transition-colors ${A[e.tool]||`border-zinc-700 text-zinc-400 hover:bg-zinc-800`}`,children:[(0,x.jsx)(`span`,{className:`font-mono text-[10px] opacity-70`,children:e.tool}),(0,x.jsx)(`span`,{className:`truncate max-w-[180px]`,children:e.suggested_goal})]},n))})]});function le(e){return{PLAN_CREATED:`#6366f1`,APPROVED:`#10b981`,REJECTED:`#ef4444`,EXECUTION_STARTED:`#3b82f6`,COMPLETED:`#059669`,EXECUTION_FAILED:`#dc2626`,CAPABILITY_DENIED:`#ea580c`,RECOVERED:`#f59e0b`,REPLAY_CREATED:`#8b5cf6`,STEP_EXECUTED:`#64748b`,STEP_FAILED:`#b91c1c`}[e]||`#6b7280`}function j(){let{isAdmin:t}=s();if(!t)return(0,x.jsx)(f,{});let{system:i}=c(),a=i?.runtime?.boot_mode===`runtime-only`,[l,p]=(0,y.useState)(``),[m,h]=(0,y.useState)(!1),[b,C]=(0,y.useState)(i?.runs||[]),[w,T]=(0,y.useState)(null),[O,A]=(0,y.useState)([]),[j,M]=(0,y.useState)(!1),[N,ue]=(0,y.useState)([]),[de,P]=(0,y.useState)(null),[fe,pe]=(0,y.useState)([]),[F,I]=(0,y.useState)(`runs`),[L,R]=(0,y.useState)(null),[z,B]=(0,y.useState)([]),[V,H]=(0,y.useState)(`steps`),[U,W]=(0,y.useState)(!0),{toast:me,showToast:G,clearToast:he}=o(),K=(0,y.useCallback)(async()=>{W(!0);try{let e=await g()||[];return C(e),e}catch(e){return console.error(`Failed to load runs`,e),G(e?.message||`Failed to load agent runs.`),[]}finally{W(!1)}},[]),q=(0,y.useCallback)(async()=>{try{let e=await oe();ue(e||[])}catch(e){console.error(`Failed to load tools`,e),G(e?.message||`Failed to load agent tools.`)}},[]),J=(0,y.useCallback)(async()=>{try{let e=await ee();P(e)}catch(e){console.error(`Failed to load trust`,e),G(e?.message||`Failed to load trust settings.`)}},[]),Y=(0,y.useCallback)(async()=>{try{let e=await re();pe(e||[])}catch{}},[]);(0,y.useEffect)(()=>{K(),q(),J(),Y()},[K,q,J,Y]),(0,y.useEffect)(()=>{(i?.runs||[]).length>0&&C(i.runs)},[i]);let ge=async e=>{if(T(e),A([]),B([]),H(`steps`),e.status===`completed`||e.status===`failed`){M(!0);try{let t=await _(e.run_id);A(t||[])}catch(e){console.error(`Failed to load steps`,e),G(e?.message||`Failed to load run steps.`)}finally{M(!1)}}ae(e.run_id).then(e=>B(e?.events||[])).catch(()=>B([]))},X=async()=>{if(l.trim()){h(!0),R(null);try{await ne({goal:l.trim()}),p(``);let e=(await K())[0]||null;T(e),A([]),B([]),H(`steps`)}catch(e){R(e.message||`Failed to create agent run`)}finally{h(!1)}}},Z=async e=>{try{let t=await v(e);if(await K(),T(t),t.status===`completed`||t.status===`failed`){let t=await _(e);A(t||[])}}catch(e){R(e.message||`Failed to approve run`)}},Q=async e=>{try{let t=await te(e);await K(),w?.run_id===e&&T(t)}catch(e){R(e.message||`Failed to reject run`)}},_e=async e=>{let t=await ie(e);P(t)},$=b.filter(e=>e.status===`pending_approval`);return(0,x.jsxs)(`div`,{className:`flex flex-col h-full`,children:[(0,x.jsxs)(`div`,{className:`mb-6`,children:[(0,x.jsx)(`h2`,{className:`text-xl font-black text-zinc-100 tracking-tight`,children:`Agent Console`}),(0,x.jsx)(`p`,{className:`text-xs text-zinc-500 mt-1`,children:a?`Runtime-only mode. The baseline agent stays available with memory tools and approval controls.`:`Type a goal. A.I.N.D.Y. generates a plan and executes it with your approval.`})]}),(0,x.jsx)(ce,{suggestions:fe,onSelect:e=>p(e)}),b.length===0&&!l&&!U&&(0,x.jsx)(k,{onSelect:e=>p(e)}),(0,x.jsxs)(`div`,{className:`mb-6`,children:[(0,x.jsxs)(`div`,{className:`flex gap-3`,children:[(0,x.jsx)(`input`,{type:`text`,value:l,onChange:e=>p(e.target.value),onKeyDown:e=>e.key===`Enter`&&!m&&X(),placeholder:`e.g. Find leads in the AI consulting space and create a follow-up task`,className:`flex-1 bg-zinc-900 border border-zinc-800 rounded-xl px-4 py-3 text-sm text-zinc-100 placeholder-zinc-600 focus:outline-none focus:border-[#00ffaa]/50 transition-colors`}),(0,x.jsx)(`button`,{onClick:X,disabled:m||!l.trim(),className:`px-6 py-3 bg-[#00ffaa] text-black font-bold text-sm rounded-xl hover:bg-[#00ffaa]/80 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex-shrink-0`,children:m?`Planning...`:`Run Agent`})]}),L&&(0,x.jsx)(`p`,{className:`text-xs text-red-400 mt-2`,children:L})]}),$.length>0&&(0,x.jsx)(`div`,{className:`mb-4 bg-yellow-500/5 border border-yellow-500/20 rounded-xl px-4 py-3`,children:(0,x.jsxs)(`p`,{className:`text-xs text-yellow-300 font-medium`,children:[$.length,` plan`,$.length>1?`s`:``,` awaiting your approval`]})}),(0,x.jsxs)(`div`,{className:`flex gap-6 flex-1 min-h-0`,children:[(0,x.jsxs)(`div`,{className:`w-80 flex flex-col flex-shrink-0`,children:[(0,x.jsx)(`div`,{className:`flex gap-1 mb-4 bg-zinc-900/50 rounded-lg p-1`,children:d([`runs`,`tools`,`trust`],e=>(0,x.jsx)(`button`,{onClick:()=>I(e),className:`flex-1 py-1.5 text-[10px] font-bold uppercase tracking-wider rounded transition-colors ${F===e?`bg-zinc-800 text-zinc-100`:`text-zinc-500 hover:text-zinc-300`}`,children:e===`runs`?(0,x.jsxs)(`span`,{children:[`Runs${b.length?` (${b.length})`:``}`,$.length>0&&(0,x.jsx)(`span`,{style:{background:`#f59e0b`,color:`#fff`,borderRadius:`10px`,padding:`1px 6px`,fontSize:`10px`,marginLeft:`5px`,fontWeight:700},children:$.length})]}):e===`tools`?`Tools`:`Trust`},e))}),F===`runs`&&(0,x.jsx)(`div`,{className:`flex-1 overflow-y-auto custom-scrollbar space-y-2`,children:U?(0,x.jsx)(u,{label:`Loading agent runs...`}):b.length===0?(0,x.jsx)(r,{message:`No agent runs yet.`,hint:`Type a goal above or pick a starter template to begin.`}):d(b,e=>(0,x.jsx)(se,{run:e,onApprove:Z,onReject:Q,onSelect:ge,isSelected:w?.run_id===e.run_id},e.run_id))}),F===`tools`&&(0,x.jsx)(`div`,{className:`flex-1 overflow-y-auto custom-scrollbar space-y-2`,children:d(N,e=>(0,x.jsxs)(`div`,{className:`border border-zinc-800/60 rounded-lg px-4 py-3`,children:[(0,x.jsxs)(`div`,{className:`flex items-center gap-2 mb-1`,children:[(0,x.jsx)(`span`,{className:`font-mono text-xs text-[#00ffaa]`,children:e.name}),(0,x.jsx)(S,{risk:e.risk})]}),(0,x.jsx)(`p`,{className:`text-[10px] text-zinc-500`,children:e.description})]},e.name))}),F===`trust`&&(0,x.jsx)(D,{trust:de,onUpdate:_e,tools:N})]}),(0,x.jsx)(`div`,{className:`flex-1 min-w-0 border border-zinc-800/60 rounded-xl p-5 overflow-y-auto custom-scrollbar`,children:w?(0,x.jsxs)(`div`,{className:`flex flex-col h-full`,children:[(0,x.jsxs)(`div`,{style:{display:`flex`,gap:`8px`,marginBottom:`12px`},children:[(0,x.jsx)(`button`,{onClick:()=>H(`steps`),style:{padding:`4px 12px`,borderRadius:`4px`,border:`1px solid #3f3f46`,background:V===`steps`?`#3b82f6`:`transparent`,color:V===`steps`?`#fff`:`#a1a1aa`,cursor:`pointer`,fontSize:`12px`,fontWeight:600},children:`Steps`}),(0,x.jsxs)(`button`,{onClick:()=>H(`timeline`),style:{padding:`4px 12px`,borderRadius:`4px`,border:`1px solid #3f3f46`,background:V===`timeline`?`#3b82f6`:`transparent`,color:V===`timeline`?`#fff`:`#a1a1aa`,cursor:`pointer`,fontSize:`12px`,fontWeight:600},children:[`Timeline `,z.length>0&&`(${z.length})`]})]}),V===`steps`&&(0,x.jsx)(e,{name:`Agent Steps`,children:(0,x.jsx)(E,{run:w,steps:O,loading:j,runtimeOnly:a,onApprove:Z,onReject:Q})}),V===`timeline`&&(0,x.jsx)(e,{name:`Agent Timeline`,children:(0,x.jsx)(`div`,{children:z.length===0?(0,x.jsx)(`p`,{style:{color:`#6b7280`,fontStyle:`italic`,fontSize:`12px`},children:`No events recorded (run may predate N+8).`}):(0,x.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`8px`},children:d(z,(e,t)=>(0,x.jsxs)(`div`,{style:{padding:`8px 12px`,borderRadius:`6px`,border:`1px solid #27272a`,background:`#09090b`},children:[(0,x.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,x.jsx)(`span`,{style:{background:le(e.event_type),color:`#fff`,borderRadius:`4px`,padding:`2px 8px`,fontSize:`11px`,fontWeight:600,letterSpacing:`0.05em`},children:e.event_type}),(0,x.jsx)(`span`,{style:{color:`#6b7280`,fontSize:`12px`},children:e.occurred_at?new Date(e.occurred_at).toLocaleTimeString():``})]}),e.payload&&Object.keys(e.payload).length>0&&(0,x.jsx)(`div`,{style:{marginTop:`4px`,fontSize:`12px`,color:`#a1a1aa`},children:e.event_type===`STEP_EXECUTED`||e.event_type===`STEP_FAILED`?(0,x.jsxs)(`span`,{children:[`Step `,e.payload.step_index,` · `,e.payload.tool_name,e.payload.execution_ms?` · ${e.payload.execution_ms}ms`:``,e.payload.error_message?` · ${e.payload.error_message}`:``]}):(0,x.jsx)(`span`,{children:d(Object.entries(e.payload).filter(([,e])=>e!=null&&e!==``),([e,t])=>`${e}: ${t}`).join(` · `)})})]},e.id||t))})})})]}):(0,x.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,x.jsx)(`p`,{className:`text-xs text-zinc-600`,children:`Select a run to view its plan`})})})]}),(0,x.jsx)(n,{toast:me,onDismiss:he})]})}export{j as default};
|
|
1
|
+
import{_ as e,a as t,c as n,d as r,f as i,g as a,h as o,i as s,m as c,o as l,p as u,s as d,u as f,v as p,w as m,x as h}from"./index-CWtNaCr_.js";import{a as g,c as ee,f as te,i as _,n as ne,o as re,p as ie,r as ae,s as oe,t as v}from"./agent-CZCF88Ul.js";import"./_core-ZZFtFtMg.js";import"./AdminApiErrorBoundary-ZZFtFtMg.js";import"./LoadingPanel-ZZFtFtMg.js";import"./EmptyState-ZZFtFtMg.js";import"./Toast-ZZFtFtMg.js";var y=m(h(),1);l(`analytics`,e=>i(a.ANALYTICS.LINKEDIN_MANUAL,{method:`POST`,body:JSON.stringify(e)}).then(t)),l(`analytics`,(e,n=null)=>{let r=n?`?group_by=${encodeURIComponent(n)}`:``;return i(`${a.ANALYTICS.MASTERPLAN_SUMMARY(e)}${r}`,{method:`GET`}).then(t)}),l(`analytics`,e=>i(a.ANALYTICS.CALCULATE_TWR,{method:`POST`,body:JSON.stringify(e)}).then(t)),l(`analytics`,e=>i(a.ANALYTICS.CALCULATE_ENGAGEMENT,{method:`POST`,body:JSON.stringify(e)}).then(t)),l(`analytics`,e=>i(a.ANALYTICS.CALCULATE_AI_EFFICIENCY,{method:`POST`,body:JSON.stringify(e)}).then(t)),l(`analytics`,e=>i(a.ANALYTICS.CALCULATE_IMPACT_SCORE,{method:`POST`,body:JSON.stringify(e)}).then(t)),l(`analytics`,e=>i(a.ANALYTICS.CALCULATE_INCOME_EFFICIENCY,{method:`POST`,body:JSON.stringify(e)}).then(t)),l(`analytics`,e=>i(a.ANALYTICS.CALCULATE_REVENUE_SCALING,{method:`POST`,body:JSON.stringify(e)}).then(t)),l(`analytics`,e=>i(a.ANALYTICS.CALCULATE_EXECUTION_SPEED,{method:`POST`,body:JSON.stringify(e)}).then(t)),l(`analytics`,e=>i(a.ANALYTICS.CALCULATE_ATTENTION_VALUE,{method:`POST`,body:JSON.stringify(e)}).then(t)),l(`analytics`,e=>i(a.ANALYTICS.CALCULATE_ENGAGEMENT_RATE,{method:`POST`,body:JSON.stringify(e)}).then(t)),l(`analytics`,e=>i(a.ANALYTICS.CALCULATE_BUSINESS_GROWTH,{method:`POST`,body:JSON.stringify(e)}).then(t)),l(`analytics`,e=>i(a.ANALYTICS.CALCULATE_MONETIZATION_EFFICIENCY,{method:`POST`,body:JSON.stringify(e)}).then(t)),l(`analytics`,e=>i(a.ANALYTICS.CALCULATE_AI_PRODUCTIVITY_BOOST,{method:`POST`,body:JSON.stringify(e)}).then(t)),l(`analytics`,e=>i(a.ANALYTICS.CALCULATE_DECISION_EFFICIENCY,{method:`POST`,body:JSON.stringify(e)}).then(t)),l(`analytics`,e=>i(a.ANALYTICS.CALCULATE_LOST_POTENTIAL,{method:`POST`,body:JSON.stringify(e)}).then(t)),l(`analytics`,()=>i(a.ANALYTICS.SCORES_ME,{method:`GET`}).then(t)),l(`analytics`,()=>i(a.ANALYTICS.SCORES_RECALCULATE,{method:`POST`}).then(t)),l(`analytics`,(e=30)=>i(`${a.ANALYTICS.SCORES_HISTORY}?limit=${e}`,{method:`GET`}).then(t));var b=l(`analytics`,e=>i(a.ANALYTICS.SCORES_FEEDBACK,{method:`POST`,body:JSON.stringify(e)}).then(t));l(`analytics`,(e=50)=>i(`${a.ANALYTICS.SCORES_FEEDBACK}?limit=${e}`,{method:`GET`}).then(t));var x=p(),S=({risk:e})=>{let t={low:`bg-emerald-500/10 text-emerald-400 border border-emerald-500/20`,medium:`bg-yellow-500/10 text-yellow-400 border border-yellow-500/20`,high:`bg-red-500/10 text-red-400 border border-red-500/20`};return(0,x.jsx)(`span`,{className:`px-2 py-0.5 rounded text-[10px] font-bold uppercase tracking-wider ${t[e]||t.high}`,children:e||`?`})},C=({status:e})=>(0,x.jsx)(`span`,{className:`px-2 py-0.5 rounded text-[10px] font-bold uppercase tracking-wider ${{pending_approval:`bg-yellow-500/10 text-yellow-300 border border-yellow-500/20`,approved:`bg-blue-500/10 text-blue-300 border border-blue-500/20`,executing:`bg-[#00ffaa]/10 text-[#00ffaa] border border-[#00ffaa]/20`,completed:`bg-emerald-500/10 text-emerald-400 border border-emerald-500/20`,failed:`bg-red-500/10 text-red-400 border border-red-500/20`,rejected:`bg-zinc-500/10 text-zinc-400 border border-zinc-500/20`}[e]||``}`,children:{pending_approval:`Awaiting Approval`,approved:`Approved`,executing:`Executing`,completed:`Completed`,failed:`Failed`,rejected:`Rejected`}[e]||e}),w=({step:e,index:t})=>{let[n,r]=(0,y.useState)(!1);return(0,x.jsxs)(`div`,{className:`border border-zinc-800/60 rounded-lg overflow-hidden mb-2`,children:[(0,x.jsxs)(`button`,{onClick:()=>r(!n),className:`w-full flex items-center gap-3 px-4 py-3 text-left hover:bg-zinc-800/30 transition-colors`,children:[(0,x.jsx)(`span`,{className:`text-xs font-mono text-zinc-500 w-5`,children:t+1}),(0,x.jsx)(`span`,{className:`font-mono text-xs text-[#00ffaa] w-36 truncate`,children:e.tool_name}),(0,x.jsx)(S,{risk:e.risk_level}),(0,x.jsx)(`span`,{className:`flex-1 text-xs text-zinc-300 truncate`,children:e.description}),e.status&&(0,x.jsx)(C,{status:e.status}),e.execution_ms&&(0,x.jsxs)(`span`,{className:`text-[10px] text-zinc-500`,children:[e.execution_ms,`ms`]}),(0,x.jsx)(`span`,{className:`text-zinc-500 text-[10px]`,children:n?`▲`:`▼`})]}),n&&(0,x.jsxs)(`div`,{className:`px-4 pb-3 border-t border-zinc-800/60 bg-zinc-950/50`,children:[e.result&&(0,x.jsx)(`pre`,{className:`text-[10px] text-zinc-300 mt-2 overflow-x-auto whitespace-pre-wrap`,children:JSON.stringify(e.result,null,2)}),e.error_message&&(0,x.jsx)(`p`,{className:`text-xs text-red-400 mt-2`,children:e.error_message})]})]})},se=({run:e,onApprove:t,onReject:n,onSelect:r,isSelected:i})=>{let a=e.status===`pending_approval`,o=e.plan?.steps||[];return(0,x.jsxs)(`div`,{className:`border rounded-xl p-4 cursor-pointer transition-all ${i?`border-[#00ffaa]/40 bg-[#00ffaa]/5`:`border-zinc-800/60 hover:border-zinc-700/60 bg-zinc-950/30`}`,onClick:()=>r(e),children:[(0,x.jsxs)(`div`,{className:`flex items-start justify-between gap-3 mb-2`,children:[(0,x.jsx)(`p`,{className:`text-sm font-medium text-zinc-100 leading-snug flex-1 line-clamp-2`,children:e.goal}),(0,x.jsxs)(`div`,{className:`flex items-center gap-2 flex-shrink-0`,children:[(0,x.jsx)(S,{risk:e.overall_risk}),(0,x.jsx)(C,{status:e.status})]})]}),e.executive_summary&&(0,x.jsx)(`p`,{className:`text-xs text-zinc-400 mb-3 line-clamp-2`,children:e.executive_summary}),(0,x.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,x.jsxs)(`div`,{className:`flex items-center gap-3 text-[10px] text-zinc-500`,children:[(0,x.jsxs)(`span`,{children:[o.length,` step`,o.length===1?``:`s`]}),e.steps_completed>0&&(0,x.jsxs)(`span`,{children:[e.steps_completed,`/`,e.steps_total,` done`]}),(0,x.jsx)(`span`,{children:e.created_at?new Date(e.created_at).toLocaleString():``})]}),a&&(0,x.jsxs)(`div`,{className:`flex gap-2`,children:[(0,x.jsx)(`button`,{onClick:n=>{n.stopPropagation(),t(e.run_id)},className:`px-3 py-1 text-[10px] font-bold uppercase tracking-wider rounded bg-[#00ffaa] text-black hover:bg-[#00ffaa]/80 transition-colors`,children:`Approve`}),(0,x.jsx)(`button`,{onClick:t=>{t.stopPropagation(),n(e.run_id)},className:`px-3 py-1 text-[10px] font-bold uppercase tracking-wider rounded border border-zinc-700 text-zinc-400 hover:bg-zinc-800 transition-colors`,children:`Reject`})]})]})]})},T=({runId:e})=>{let[t,n]=(0,y.useState)(null),[r,i]=(0,y.useState)(!1),a=async t=>{i(!0);try{await b({source_type:`agent`,source_id:e,feedback_value:t}),n(t)}finally{i(!1)}};return(0,x.jsxs)(`div`,{className:`mt-4 flex items-center gap-2`,children:[(0,x.jsx)(`span`,{className:`text-[10px] uppercase tracking-wider text-zinc-500`,children:`Run Outcome`}),(0,x.jsx)(`button`,{onClick:()=>a(1),disabled:r,className:`px-3 py-1 rounded-full border text-[10px] font-bold uppercase tracking-wider transition-colors ${t===1?`border-emerald-500 bg-emerald-500/20 text-emerald-300`:`border-zinc-700 text-zinc-400 hover:bg-zinc-800`}`,children:`Helpful`}),(0,x.jsx)(`button`,{onClick:()=>a(-1),disabled:r,className:`px-3 py-1 rounded-full border text-[10px] font-bold uppercase tracking-wider transition-colors ${t===-1?`border-red-500 bg-red-500/20 text-red-300`:`border-zinc-700 text-zinc-400 hover:bg-zinc-800`}`,children:`Not Helpful`})]})},E=({run:e,steps:t,loading:n,runtimeOnly:r=!1,onApprove:i,onReject:a})=>{if(!e)return null;let o=e.plan?.steps||[],s=e.status===`pending_approval`,[c,l]=(0,y.useState)(!1),[u,f]=(0,y.useState)(null);return(0,x.jsxs)(`div`,{className:`flex flex-col h-full`,children:[(0,x.jsxs)(`div`,{className:`mb-4`,children:[(0,x.jsxs)(`div`,{className:`flex items-center gap-3 mb-2`,children:[(0,x.jsx)(`h3`,{className:`text-sm font-bold text-zinc-100`,children:`Execution Plan`}),(0,x.jsx)(S,{risk:e.overall_risk}),(0,x.jsx)(C,{status:e.status})]}),(0,x.jsx)(`p`,{className:`text-xs text-zinc-400`,children:e.goal})]}),e.executive_summary&&(0,x.jsxs)(`div`,{className:`bg-zinc-900/50 border border-zinc-800/60 rounded-lg p-3 mb-4`,children:[(0,x.jsx)(`p`,{className:`text-[10px] text-zinc-500 uppercase tracking-wider mb-1`,children:`Executive Summary`}),(0,x.jsx)(`p`,{className:`text-sm text-zinc-200`,children:e.executive_summary})]}),s&&(0,x.jsxs)(`div`,{className:`flex flex-col gap-2 mb-5 p-4 rounded-xl border border-yellow-500/20 bg-yellow-500/5`,children:[(0,x.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,x.jsxs)(`div`,{className:`flex-1`,children:[(0,x.jsx)(`p`,{className:`text-xs font-semibold text-yellow-300 mb-0.5`,children:`Awaiting your approval`}),(0,x.jsx)(`p`,{className:`text-[10px] text-zinc-500`,children:`Review the plan above, then approve or reject.`})]}),(0,x.jsx)(`button`,{onClick:async()=>{l(!0),f(null);try{await i(e.run_id)}catch(e){f(e?.message||`Failed to approve.`)}finally{l(!1)}},disabled:c,className:`px-4 py-2 text-[11px] font-bold uppercase tracking-wider rounded-lg bg-[#00ffaa] text-black hover:bg-[#00ffaa]/80 transition-colors disabled:opacity-50`,children:`Approve`}),(0,x.jsx)(`button`,{onClick:async()=>{l(!0),f(null);try{await a(e.run_id)}catch(e){f(e?.message||`Failed to reject.`)}finally{l(!1)}},disabled:c,className:`px-4 py-2 text-[11px] font-bold uppercase tracking-wider rounded-lg border border-zinc-700 text-zinc-400 hover:bg-zinc-800 transition-colors disabled:opacity-50`,children:`Reject`})]}),u&&(0,x.jsx)(`p`,{className:`text-xs text-red-400`,children:u})]}),(0,x.jsxs)(`div`,{className:`flex-1 overflow-y-auto custom-scrollbar`,children:[n?(0,x.jsx)(`p`,{className:`text-xs text-zinc-500`,children:`Loading steps...`}):t.length>0?(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`p`,{className:`text-[10px] text-zinc-500 uppercase tracking-wider mb-2`,children:`Steps`}),d(t,(e,t)=>(0,x.jsx)(w,{step:e,index:t},t))]}):o.length>0?(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`p`,{className:`text-[10px] text-zinc-500 uppercase tracking-wider mb-2`,children:`Planned Steps`}),d(o,(e,t)=>(0,x.jsxs)(`div`,{className:`flex items-start gap-3 px-4 py-3 border border-zinc-800/60 rounded-lg mb-2`,children:[(0,x.jsx)(`span`,{className:`text-xs font-mono text-zinc-500 w-5 pt-0.5`,children:t+1}),(0,x.jsx)(`span`,{className:`font-mono text-xs text-[#00ffaa] w-36 flex-shrink-0`,children:e.tool}),(0,x.jsx)(S,{risk:e.risk_level}),(0,x.jsx)(`span`,{className:`flex-1 text-xs text-zinc-300`,children:e.description})]},t))]}):e.status===`completed`||e.status===`failed`?(0,x.jsxs)(`div`,{className:`bg-zinc-900/40 border border-zinc-800/60 rounded-lg p-4 text-xs text-zinc-500`,children:[(0,x.jsx)(`p`,{className:`font-semibold text-zinc-400 mb-1`,children:`No execution steps recorded.`}),e.error?(0,x.jsxs)(`p`,{className:`text-red-400 mb-2`,children:[`Error: `,e.error]}):null,(0,x.jsx)(`p`,{children:`Possible causes:`}),(0,x.jsxs)(`ul`,{className:`list-disc list-inside mt-1 space-y-0.5`,children:[(0,x.jsxs)(`li`,{children:[(0,x.jsx)(`code`,{className:`text-zinc-400`,children:`OPENAI_API_KEY`}),` is not set — the planner requires an LLM to generate execution steps.`]}),(0,x.jsx)(`li`,{children:`The planner backend returned an empty plan. Check server logs for detail.`})]})]}):null,e.result&&(0,x.jsxs)(`div`,{className:`mt-4`,children:[(0,x.jsx)(`p`,{className:`text-[10px] text-zinc-500 uppercase tracking-wider mb-2`,children:`Result`}),(0,x.jsx)(`pre`,{className:`text-[10px] text-zinc-300 bg-zinc-900/50 border border-zinc-800/60 rounded-lg p-3 overflow-x-auto whitespace-pre-wrap`,children:JSON.stringify(e.result,null,2)})]}),!r&&(e.status===`completed`||e.status===`failed`)&&(0,x.jsx)(T,{runId:e.run_id})]})]})},D=({trust:e,onUpdate:t,tools:n})=>{let[r,i]=(0,y.useState)(e?.auto_execute_low||!1),[a,o]=(0,y.useState)(e?.auto_execute_medium||!1),[s,c]=(0,y.useState)(e?.allowed_auto_grant_tools||[]),[l,u]=(0,y.useState)(!1);(0,y.useEffect)(()=>{i(e?.auto_execute_low||!1),o(e?.auto_execute_medium||!1),c(e?.allowed_auto_grant_tools||[])},[e]);let f=(n||[]).filter(e=>e.risk===`low`||e.risk===`medium`).sort((e,t)=>e.name.localeCompare(t.name)),p=(n||[]).filter(e=>e.name===`genesis.message`),m=e=>{c(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e].sort())};return(0,x.jsxs)(`div`,{className:`bg-zinc-900/50 border border-zinc-800/60 rounded-xl p-4`,children:[(0,x.jsx)(`h4`,{className:`text-xs font-bold text-zinc-300 uppercase tracking-wider mb-3`,children:`Trust Settings`}),(0,x.jsx)(`p`,{className:`text-[10px] text-zinc-500 mb-4`,children:`High-risk plans always require approval regardless of these settings.`}),(0,x.jsxs)(`div`,{className:`space-y-3`,children:[(0,x.jsxs)(`label`,{className:`flex items-center justify-between`,children:[(0,x.jsx)(`span`,{className:`text-xs text-zinc-300`,children:`Auto-execute low-risk plans`}),(0,x.jsx)(`input`,{type:`checkbox`,checked:r,onChange:e=>i(e.target.checked),className:`accent-[#00ffaa]`})]}),(0,x.jsxs)(`label`,{className:`flex items-center justify-between`,children:[(0,x.jsx)(`span`,{className:`text-xs text-zinc-300`,children:`Auto-execute medium-risk plans`}),(0,x.jsx)(`input`,{type:`checkbox`,checked:a,onChange:e=>o(e.target.checked),className:`accent-yellow-400`})]})]}),(0,x.jsxs)(`div`,{className:`mt-5`,children:[(0,x.jsx)(`p`,{className:`text-[10px] text-zinc-500 uppercase tracking-wider mb-2`,children:`Tool-Level Auto-Grant Policy`}),(0,x.jsxs)(`div`,{className:`space-y-2`,children:[d(f,e=>(0,x.jsxs)(`label`,{className:`flex items-center justify-between gap-3 border border-zinc-800/60 rounded-lg px-3 py-2`,children:[(0,x.jsxs)(`div`,{children:[(0,x.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,x.jsx)(`span`,{className:`text-xs text-zinc-200 font-mono`,children:e.name}),(0,x.jsx)(S,{risk:e.risk})]}),(0,x.jsx)(`p`,{className:`text-[10px] text-zinc-500 mt-1`,children:e.description})]}),(0,x.jsx)(`input`,{type:`checkbox`,checked:s.includes(e.name),onChange:()=>m(e.name),className:`accent-[#00ffaa]`})]},e.name)),d(p,e=>(0,x.jsxs)(`label`,{className:`flex items-center justify-between gap-3 border border-red-500/20 rounded-lg px-3 py-2 opacity-80`,children:[(0,x.jsxs)(`div`,{children:[(0,x.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,x.jsx)(`span`,{className:`text-xs text-zinc-200 font-mono`,children:e.name}),(0,x.jsx)(S,{risk:e.risk})]}),(0,x.jsx)(`p`,{className:`text-[10px] text-zinc-500 mt-1`,children:`Locked. High-risk tools cannot be auto-granted.`})]}),(0,x.jsx)(`input`,{type:`checkbox`,checked:!1,disabled:!0,className:`accent-red-500`})]},e.name))]})]}),(0,x.jsx)(`button`,{onClick:async()=>{u(!0);try{await t({auto_execute_low:r,auto_execute_medium:a,allowed_auto_grant_tools:s})}finally{u(!1)}},disabled:l,className:`mt-4 w-full py-2 text-[10px] font-bold uppercase tracking-wider rounded bg-zinc-800 text-zinc-300 hover:bg-zinc-700 transition-colors disabled:opacity-50`,children:l?`Saving...`:`Save Settings`})]})},O=[{title:`Summarize recent activity`,goal:`Summarize what you remember about recent activity and surface any open items`,description:`A safe first run — the agent reads its memory and reports back.`},{title:`Create a follow-up task`,goal:`Create a follow-up task to review the current system configuration`,description:`Creates a trackable item in your workflow using the task tool.`},{title:`Recall a topic from memory`,goal:`Recall everything you know about the current project goals and status`,description:`Tests the memory system — works best after prior runs have built up context.`},{title:`Audit available tools`,goal:`List the tools available to you and describe what each one can do`,description:`Read-only inspection — safe to approve with no side effects.`}],k=({onSelect:e})=>(0,x.jsxs)(`div`,{className:`mb-5`,children:[(0,x.jsx)(`p`,{className:`text-[10px] text-zinc-600 uppercase tracking-wider mb-3`,children:`Start with a template`}),(0,x.jsx)(`div`,{className:`grid grid-cols-2 gap-2`,children:O.map(t=>(0,x.jsxs)(`button`,{onClick:()=>e(t.goal),className:`text-left border border-zinc-800/60 hover:border-zinc-700 rounded-xl px-4 py-3 bg-zinc-950/40 hover:bg-zinc-900/60 transition-all group`,children:[(0,x.jsx)(`p`,{className:`text-xs font-semibold text-zinc-300 group-hover:text-zinc-100 mb-1`,children:t.title}),(0,x.jsx)(`p`,{className:`text-[10px] text-zinc-600 leading-relaxed`,children:t.description})]},t.title))})]}),A={"memory.recall":`border-blue-500/30 text-blue-300 hover:bg-blue-500/10`,"task.create":`border-[#00ffaa]/30 text-[#00ffaa] hover:bg-[#00ffaa]/10`,"arm.analyze":`border-purple-500/30 text-purple-300 hover:bg-purple-500/10`,"genesis.message":`border-yellow-500/30 text-yellow-300 hover:bg-yellow-500/10`},ce=({suggestions:e,onSelect:t})=>!e||e.length===0?null:(0,x.jsxs)(`div`,{className:`mb-4`,children:[(0,x.jsx)(`p`,{className:`text-[10px] text-zinc-600 uppercase tracking-wider mb-2`,children:`Suggested Actions`}),(0,x.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:d(e,(e,n)=>(0,x.jsxs)(`button`,{title:e.reason,onClick:()=>t(e.suggested_goal),className:`inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full border text-[11px] font-medium transition-colors ${A[e.tool]||`border-zinc-700 text-zinc-400 hover:bg-zinc-800`}`,children:[(0,x.jsx)(`span`,{className:`font-mono text-[10px] opacity-70`,children:e.tool}),(0,x.jsx)(`span`,{className:`truncate max-w-[180px]`,children:e.suggested_goal})]},n))})]});function le(e){return{PLAN_CREATED:`#6366f1`,APPROVED:`#10b981`,REJECTED:`#ef4444`,EXECUTION_STARTED:`#3b82f6`,COMPLETED:`#059669`,EXECUTION_FAILED:`#dc2626`,CAPABILITY_DENIED:`#ea580c`,RECOVERED:`#f59e0b`,REPLAY_CREATED:`#8b5cf6`,STEP_EXECUTED:`#64748b`,STEP_FAILED:`#b91c1c`}[e]||`#6b7280`}function j(){let{isAdmin:t}=s();if(!t)return(0,x.jsx)(f,{});let{system:i}=c(),a=i?.runtime?.boot_mode===`runtime-only`,[l,p]=(0,y.useState)(``),[m,h]=(0,y.useState)(!1),[b,C]=(0,y.useState)(i?.runs||[]),[w,T]=(0,y.useState)(null),[O,A]=(0,y.useState)([]),[j,M]=(0,y.useState)(!1),[N,ue]=(0,y.useState)([]),[de,P]=(0,y.useState)(null),[fe,pe]=(0,y.useState)([]),[F,I]=(0,y.useState)(`runs`),[L,R]=(0,y.useState)(null),[z,B]=(0,y.useState)([]),[V,H]=(0,y.useState)(`steps`),[U,W]=(0,y.useState)(!0),{toast:me,showToast:G,clearToast:he}=o(),K=(0,y.useCallback)(async()=>{W(!0);try{let e=await g()||[];return C(e),e}catch(e){return console.error(`Failed to load runs`,e),G(e?.message||`Failed to load agent runs.`),[]}finally{W(!1)}},[]),q=(0,y.useCallback)(async()=>{try{let e=await oe();ue(e||[])}catch(e){console.error(`Failed to load tools`,e),G(e?.message||`Failed to load agent tools.`)}},[]),J=(0,y.useCallback)(async()=>{try{let e=await ee();P(e)}catch(e){console.error(`Failed to load trust`,e),G(e?.message||`Failed to load trust settings.`)}},[]),Y=(0,y.useCallback)(async()=>{try{let e=await re();pe(e||[])}catch{}},[]);(0,y.useEffect)(()=>{K(),q(),J(),Y()},[K,q,J,Y]),(0,y.useEffect)(()=>{(i?.runs||[]).length>0&&C(i.runs)},[i]);let ge=async e=>{if(T(e),A([]),B([]),H(`steps`),e.status===`completed`||e.status===`failed`){M(!0);try{let t=await _(e.run_id);A(t||[])}catch(e){console.error(`Failed to load steps`,e),G(e?.message||`Failed to load run steps.`)}finally{M(!1)}}ae(e.run_id).then(e=>B(e?.events||[])).catch(()=>B([]))},X=async()=>{if(l.trim()){h(!0),R(null);try{await ne({goal:l.trim()}),p(``);let e=(await K())[0]||null;T(e),A([]),B([]),H(`steps`)}catch(e){R(e.message||`Failed to create agent run`)}finally{h(!1)}}},Z=async e=>{try{let t=await v(e);if(await K(),T(t),t.status===`completed`||t.status===`failed`){let t=await _(e);A(t||[])}}catch(e){R(e.message||`Failed to approve run`)}},Q=async e=>{try{let t=await te(e);await K(),w?.run_id===e&&T(t)}catch(e){R(e.message||`Failed to reject run`)}},_e=async e=>{let t=await ie(e);P(t)},$=b.filter(e=>e.status===`pending_approval`);return(0,x.jsxs)(`div`,{className:`flex flex-col h-full`,children:[(0,x.jsxs)(`div`,{className:`mb-6`,children:[(0,x.jsx)(`h2`,{className:`text-xl font-black text-zinc-100 tracking-tight`,children:`Agent Console`}),(0,x.jsx)(`p`,{className:`text-xs text-zinc-500 mt-1`,children:a?`Runtime-only mode. The baseline agent stays available with memory tools and approval controls.`:`Type a goal. A.I.N.D.Y. generates a plan and executes it with your approval.`})]}),(0,x.jsx)(ce,{suggestions:fe,onSelect:e=>p(e)}),b.length===0&&!l&&!U&&(0,x.jsx)(k,{onSelect:e=>p(e)}),(0,x.jsxs)(`div`,{className:`mb-6`,children:[(0,x.jsxs)(`div`,{className:`flex gap-3`,children:[(0,x.jsx)(`input`,{type:`text`,value:l,onChange:e=>p(e.target.value),onKeyDown:e=>e.key===`Enter`&&!m&&X(),placeholder:`e.g. Find leads in the AI consulting space and create a follow-up task`,className:`flex-1 bg-zinc-900 border border-zinc-800 rounded-xl px-4 py-3 text-sm text-zinc-100 placeholder-zinc-600 focus:outline-none focus:border-[#00ffaa]/50 transition-colors`}),(0,x.jsx)(`button`,{onClick:X,disabled:m||!l.trim(),className:`px-6 py-3 bg-[#00ffaa] text-black font-bold text-sm rounded-xl hover:bg-[#00ffaa]/80 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex-shrink-0`,children:m?`Planning...`:`Run Agent`})]}),L&&(0,x.jsx)(`p`,{className:`text-xs text-red-400 mt-2`,children:L})]}),$.length>0&&(0,x.jsx)(`div`,{className:`mb-4 bg-yellow-500/5 border border-yellow-500/20 rounded-xl px-4 py-3`,children:(0,x.jsxs)(`p`,{className:`text-xs text-yellow-300 font-medium`,children:[$.length,` plan`,$.length>1?`s`:``,` awaiting your approval`]})}),(0,x.jsxs)(`div`,{className:`flex gap-6 flex-1 min-h-0`,children:[(0,x.jsxs)(`div`,{className:`w-80 flex flex-col flex-shrink-0`,children:[(0,x.jsx)(`div`,{className:`flex gap-1 mb-4 bg-zinc-900/50 rounded-lg p-1`,children:d([`runs`,`tools`,`trust`],e=>(0,x.jsx)(`button`,{onClick:()=>I(e),className:`flex-1 py-1.5 text-[10px] font-bold uppercase tracking-wider rounded transition-colors ${F===e?`bg-zinc-800 text-zinc-100`:`text-zinc-500 hover:text-zinc-300`}`,children:e===`runs`?(0,x.jsxs)(`span`,{children:[`Runs${b.length?` (${b.length})`:``}`,$.length>0&&(0,x.jsx)(`span`,{style:{background:`#f59e0b`,color:`#fff`,borderRadius:`10px`,padding:`1px 6px`,fontSize:`10px`,marginLeft:`5px`,fontWeight:700},children:$.length})]}):e===`tools`?`Tools`:`Trust`},e))}),F===`runs`&&(0,x.jsx)(`div`,{className:`flex-1 overflow-y-auto custom-scrollbar space-y-2`,children:U?(0,x.jsx)(u,{label:`Loading agent runs...`}):b.length===0?(0,x.jsx)(r,{message:`No agent runs yet.`,hint:`Type a goal above or pick a starter template to begin.`}):d(b,e=>(0,x.jsx)(se,{run:e,onApprove:Z,onReject:Q,onSelect:ge,isSelected:w?.run_id===e.run_id},e.run_id))}),F===`tools`&&(0,x.jsx)(`div`,{className:`flex-1 overflow-y-auto custom-scrollbar space-y-2`,children:d(N,e=>(0,x.jsxs)(`div`,{className:`border border-zinc-800/60 rounded-lg px-4 py-3`,children:[(0,x.jsxs)(`div`,{className:`flex items-center gap-2 mb-1`,children:[(0,x.jsx)(`span`,{className:`font-mono text-xs text-[#00ffaa]`,children:e.name}),(0,x.jsx)(S,{risk:e.risk})]}),(0,x.jsx)(`p`,{className:`text-[10px] text-zinc-500`,children:e.description})]},e.name))}),F===`trust`&&(0,x.jsx)(D,{trust:de,onUpdate:_e,tools:N})]}),(0,x.jsx)(`div`,{className:`flex-1 min-w-0 border border-zinc-800/60 rounded-xl p-5 overflow-y-auto custom-scrollbar`,children:w?(0,x.jsxs)(`div`,{className:`flex flex-col h-full`,children:[(0,x.jsxs)(`div`,{style:{display:`flex`,gap:`8px`,marginBottom:`12px`},children:[(0,x.jsx)(`button`,{onClick:()=>H(`steps`),style:{padding:`4px 12px`,borderRadius:`4px`,border:`1px solid #3f3f46`,background:V===`steps`?`#3b82f6`:`transparent`,color:V===`steps`?`#fff`:`#a1a1aa`,cursor:`pointer`,fontSize:`12px`,fontWeight:600},children:`Steps`}),(0,x.jsxs)(`button`,{onClick:()=>H(`timeline`),style:{padding:`4px 12px`,borderRadius:`4px`,border:`1px solid #3f3f46`,background:V===`timeline`?`#3b82f6`:`transparent`,color:V===`timeline`?`#fff`:`#a1a1aa`,cursor:`pointer`,fontSize:`12px`,fontWeight:600},children:[`Timeline `,z.length>0&&`(${z.length})`]})]}),V===`steps`&&(0,x.jsx)(e,{name:`Agent Steps`,children:(0,x.jsx)(E,{run:w,steps:O,loading:j,runtimeOnly:a,onApprove:Z,onReject:Q})}),V===`timeline`&&(0,x.jsx)(e,{name:`Agent Timeline`,children:(0,x.jsx)(`div`,{children:z.length===0?(0,x.jsx)(`p`,{style:{color:`#6b7280`,fontStyle:`italic`,fontSize:`12px`},children:`No events recorded (run may predate N+8).`}):(0,x.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`8px`},children:d(z,(e,t)=>(0,x.jsxs)(`div`,{style:{padding:`8px 12px`,borderRadius:`6px`,border:`1px solid #27272a`,background:`#09090b`},children:[(0,x.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,x.jsx)(`span`,{style:{background:le(e.event_type),color:`#fff`,borderRadius:`4px`,padding:`2px 8px`,fontSize:`11px`,fontWeight:600,letterSpacing:`0.05em`},children:e.event_type}),(0,x.jsx)(`span`,{style:{color:`#6b7280`,fontSize:`12px`},children:e.occurred_at?new Date(e.occurred_at).toLocaleTimeString():``})]}),e.payload&&Object.keys(e.payload).length>0&&(0,x.jsx)(`div`,{style:{marginTop:`4px`,fontSize:`12px`,color:`#a1a1aa`},children:e.event_type===`STEP_EXECUTED`||e.event_type===`STEP_FAILED`?(0,x.jsxs)(`span`,{children:[`Step `,e.payload.step_index,` · `,e.payload.tool_name,e.payload.execution_ms?` · ${e.payload.execution_ms}ms`:``,e.payload.error_message?` · ${e.payload.error_message}`:``]}):(0,x.jsx)(`span`,{children:d(Object.entries(e.payload).filter(([,e])=>e!=null&&e!==``),([e,t])=>`${e}: ${t}`).join(` · `)})})]},e.id||t))})})})]}):(0,x.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,x.jsx)(`p`,{className:`text-xs text-zinc-600`,children:`Select a run to view its plan`})})})]}),(0,x.jsx)(n,{toast:me,onDismiss:he})]})}export{j as default};
|