ltcai 9.9.9 → 10.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -38
- package/docs/CHANGELOG.md +197 -0
- package/docs/COMMUNITY_AND_PLUGINS.md +1 -1
- package/docs/DEVELOPMENT.md +1 -1
- package/docs/HYBRID_CLOUD_KG_STREAMING.md +101 -0
- package/docs/ONBOARDING.md +1 -1
- package/docs/OPERATIONS.md +1 -1
- package/docs/TRUST_MODEL.md +1 -1
- package/docs/WHY_LATTICE.md +1 -1
- package/docs/kg-schema.md +1 -1
- package/lattice_brain/__init__.py +1 -1
- package/lattice_brain/archive.py +5 -4
- package/lattice_brain/conversations.py +14 -3
- package/lattice_brain/embeddings.py +12 -2
- package/lattice_brain/graph/_kg_common.py +5 -5
- package/lattice_brain/graph/_kg_fsutil.py +4 -3
- package/lattice_brain/graph/discovery.py +4 -3
- package/lattice_brain/graph/discovery_index.py +0 -1
- package/lattice_brain/graph/documents.py +3 -2
- package/lattice_brain/graph/fusion.py +4 -0
- package/lattice_brain/graph/ingest.py +12 -2
- package/lattice_brain/graph/projection.py +3 -2
- package/lattice_brain/graph/provenance.py +5 -3
- package/lattice_brain/graph/rerank.py +4 -1
- package/lattice_brain/graph/retrieval.py +0 -1
- package/lattice_brain/graph/retrieval_docgen.py +0 -1
- package/lattice_brain/graph/retrieval_reads.py +0 -1
- package/lattice_brain/graph/retrieval_vector.py +0 -1
- package/lattice_brain/graph/schema.py +4 -3
- package/lattice_brain/graph/store.py +18 -4
- package/lattice_brain/graph/write_master.py +46 -1
- package/lattice_brain/ingestion.py +4 -1
- package/lattice_brain/portability.py +5 -2
- package/lattice_brain/quality.py +12 -5
- package/lattice_brain/quiet.py +43 -0
- package/lattice_brain/runtime/agent_runtime.py +12 -8
- package/lattice_brain/runtime/hooks.py +2 -1
- package/lattice_brain/runtime/multi_agent.py +2 -3
- package/lattice_brain/sensitivity.py +94 -0
- package/lattice_brain/storage/base.py +30 -2
- package/lattice_brain/storage/migration.py +3 -2
- package/lattice_brain/storage/postgres.py +2 -2
- package/lattice_brain/storage/sqlite.py +6 -4
- package/lattice_brain/workflow.py +4 -2
- package/latticeai/__init__.py +1 -1
- package/latticeai/api/admin.py +1 -1
- package/latticeai/api/agents.py +4 -2
- package/latticeai/api/auth.py +5 -1
- package/latticeai/api/automation_intelligence.py +2 -1
- package/latticeai/api/browser.py +3 -2
- package/latticeai/api/chat.py +28 -17
- package/latticeai/api/chat_agent_http.py +22 -8
- package/latticeai/api/chat_contracts.py +4 -0
- package/latticeai/api/chat_documents.py +6 -2
- package/latticeai/api/chat_hybrid.py +82 -0
- package/latticeai/api/computer_use.py +8 -3
- package/latticeai/api/knowledge_graph.py +1 -1
- package/latticeai/api/mcp.py +4 -4
- package/latticeai/api/models.py +5 -2
- package/latticeai/api/network_boundary.py +220 -0
- package/latticeai/api/permissions.py +0 -1
- package/latticeai/api/realtime.py +1 -1
- package/latticeai/api/security_dashboard.py +1 -1
- package/latticeai/api/setup.py +16 -3
- package/latticeai/api/static_routes.py +2 -1
- package/latticeai/api/tools.py +12 -8
- package/latticeai/api/voice_capture.py +3 -1
- package/latticeai/api/workflow_designer.py +1 -1
- package/latticeai/api/workspace.py +1 -2
- package/latticeai/app_factory.py +131 -78
- package/latticeai/cli/entrypoint.py +6 -4
- package/latticeai/core/agent.py +55 -495
- package/latticeai/core/agent_eval.py +2 -2
- package/latticeai/core/agent_helpers.py +493 -0
- package/latticeai/core/agent_prompts.py +0 -1
- package/latticeai/core/agent_registry.py +3 -1
- package/latticeai/core/agent_state.py +41 -0
- package/latticeai/core/audit.py +1 -1
- package/latticeai/core/builtin_hooks.py +2 -1
- package/latticeai/core/config.py +0 -1
- package/latticeai/core/embedding_providers.py +12 -1
- package/latticeai/core/file_generation.py +3 -0
- package/latticeai/core/invitations.py +4 -1
- package/latticeai/core/io_utils.py +3 -1
- package/latticeai/core/legacy_compatibility.py +1 -2
- package/latticeai/core/local_embeddings.py +12 -1
- package/latticeai/core/marketplace.py +1 -2
- package/latticeai/core/mcp_registry.py +0 -1
- package/latticeai/core/model_compat.py +1 -1
- package/latticeai/core/model_resolution.py +1 -1
- package/latticeai/core/network_boundary.py +168 -0
- package/latticeai/core/oidc.py +3 -0
- package/latticeai/core/permission_mode.py +6 -6
- package/latticeai/core/plugins.py +3 -2
- package/latticeai/core/policy.py +0 -1
- package/latticeai/core/quiet.py +84 -0
- package/latticeai/core/realtime.py +3 -2
- package/latticeai/core/run_store.py +4 -2
- package/latticeai/core/security.py +4 -0
- package/latticeai/core/users.py +5 -3
- package/latticeai/core/workspace_graph_trace.py +3 -0
- package/latticeai/core/workspace_os.py +65 -273
- package/latticeai/core/workspace_os_constants.py +126 -0
- package/latticeai/core/workspace_os_state.py +180 -0
- package/latticeai/core/workspace_os_utils.py +3 -1
- package/latticeai/core/workspace_permissions.py +1 -0
- package/latticeai/core/workspace_snapshots.py +3 -1
- package/latticeai/core/workspace_timeline.py +3 -1
- package/latticeai/integrations/telegram_bot.py +25 -16
- package/latticeai/models/router.py +6 -3
- package/latticeai/runtime/access_runtime.py +3 -1
- package/latticeai/runtime/audit_runtime.py +3 -2
- package/latticeai/runtime/chat_wiring.py +4 -1
- package/latticeai/runtime/history_runtime.py +1 -1
- package/latticeai/runtime/lifespan_runtime.py +3 -1
- package/latticeai/runtime/network_boundary_wiring.py +124 -0
- package/latticeai/runtime/persistence_runtime.py +3 -1
- package/latticeai/runtime/router_registration.py +11 -1
- package/latticeai/services/architecture_readiness.py +1 -2
- package/latticeai/services/change_proposals.py +2 -1
- package/latticeai/services/cloud_egress_audit.py +85 -0
- package/latticeai/services/cloud_extraction.py +129 -0
- package/latticeai/services/cloud_streaming.py +266 -0
- package/latticeai/services/cloud_token_guard.py +84 -0
- package/latticeai/services/command_center.py +2 -1
- package/latticeai/services/folder_watch.py +3 -0
- package/latticeai/services/funnel_metrics.py +3 -1
- package/latticeai/services/hybrid_chat.py +265 -0
- package/latticeai/services/hybrid_context.py +228 -0
- package/latticeai/services/hybrid_policy.py +178 -0
- package/latticeai/services/memory_service.py +1 -1
- package/latticeai/services/model_catalog.py +10 -1
- package/latticeai/services/model_engines.py +35 -14
- package/latticeai/services/model_loading.py +3 -2
- package/latticeai/services/model_runtime.py +68 -17
- package/latticeai/services/multimodal_streaming.py +123 -0
- package/latticeai/services/network_boundary_service.py +154 -0
- package/latticeai/services/openai_compatible_adapter.py +100 -0
- package/latticeai/services/p_reinforce.py +4 -0
- package/latticeai/services/platform_runtime.py +9 -4
- package/latticeai/services/process_audit.py +0 -1
- package/latticeai/services/product_readiness.py +1 -1
- package/latticeai/services/run_executor.py +3 -2
- package/latticeai/services/search_service.py +1 -4
- package/latticeai/services/setup_detection.py +2 -1
- package/latticeai/services/tool_dispatch.py +7 -2
- package/latticeai/services/upload_service.py +2 -1
- package/latticeai/setup/auto_setup.py +10 -7
- package/latticeai/setup/wizard.py +15 -11
- package/latticeai/tools/__init__.py +3 -3
- package/latticeai/tools/commands.py +7 -7
- package/latticeai/tools/computer.py +3 -2
- package/latticeai/tools/documents.py +10 -9
- package/latticeai/tools/filesystem.py +7 -4
- package/latticeai/tools/knowledge.py +2 -0
- package/latticeai/tools/local_files.py +1 -1
- package/latticeai/tools/network.py +2 -1
- package/package.json +6 -4
- package/scripts/bench_agent_smoke.py +0 -1
- package/scripts/bench_models.py +0 -1
- package/scripts/brain_quality_eval.py +7 -2
- package/scripts/bump_version.py +2 -1
- package/scripts/check_current_release_docs.mjs +1 -1
- package/scripts/migrate_brain_storage.py +5 -1
- package/scripts/profile_kg.py +2 -7
- package/scripts/verify_hf_model_registry.py +2 -2
- package/src-tauri/Cargo.lock +1 -1
- package/src-tauri/Cargo.toml +1 -1
- package/src-tauri/tauri.conf.json +1 -1
- package/static/app/asset-manifest.json +37 -37
- package/static/app/assets/Act-CbdGD-2i.js +1 -0
- package/static/app/assets/AdminConsole-LgCkXpnf.js +1 -0
- package/static/app/assets/Brain-CoPGJI1L.js +321 -0
- package/static/app/assets/BrainHome-gVnaxSwp.js +2 -0
- package/static/app/assets/BrainSignals-ChxAYHtj.js +1 -0
- package/static/app/assets/Capture-DBtgkHZg.js +1 -0
- package/static/app/assets/CommandPalette-Ovtv5I0Y.js +1 -0
- package/static/app/assets/Library-CBia2Fvm.js +1 -0
- package/static/app/assets/LivingBrain-CNz-6NSd.js +1 -0
- package/static/app/assets/{ProductFlow-cB3EFinZ.js → ProductFlow-ePX-Y73J.js} +1 -1
- package/static/app/assets/ReviewCard-C4mpvkwH.js +3 -0
- package/static/app/assets/System-BvWNK1zc.js +1 -0
- package/static/app/assets/activity-CiauPV_3.js +1 -0
- package/static/app/assets/{bot-DtKkLfXj.js → bot-Dwct-Q1x.js} +1 -1
- package/static/app/assets/brain-BKDW1F0T.js +1 -0
- package/static/app/assets/{button-BTxZDMFJ.js → button-CCB9Kuw7.js} +1 -1
- package/static/app/assets/{circle-pause--qxF9-EO.js → circle-pause-DNa8WHC5.js} +1 -1
- package/static/app/assets/{circle-play-89x3S6jm.js → circle-play-8jmxn5mf.js} +1 -1
- package/static/app/assets/{cpu-DTUI63vo.js → cpu-mxvF3V1I.js} +1 -1
- package/static/app/assets/{download-EJS5_O0f.js → download--SmCcx0p.js} +1 -1
- package/static/app/assets/{folder-open-BL9zYTnc.js → folder-open-D4Wy5roo.js} +1 -1
- package/static/app/assets/{hard-drive-BFnwi1Lu.js → hard-drive-BwQcSPlS.js} +1 -1
- package/static/app/assets/index-CQWdDU3z.css +2 -0
- package/static/app/assets/index-DDV2YZwM.js +10 -0
- package/static/app/assets/input-DFhSjmLS.js +1 -0
- package/static/app/assets/{network-zKa3jAwl.js → network-Bts7VO94.js} +1 -1
- package/static/app/assets/primitives-BuSMEJY8.js +1 -0
- package/static/app/assets/search-DZzxhWaQ.js +1 -0
- package/static/app/assets/{shield-alert-CpHeCsaF.js → shield-alert-BfTO6X_G.js} +1 -1
- package/static/app/assets/textarea-BjctW1oh.js +1 -0
- package/static/app/assets/{useFocusTrap-58TNCONM.js → useFocusTrap-CE43-LrA.js} +1 -1
- package/static/app/assets/{useQuery-CcVlXlBd.js → useQuery-Bv3ejLL5.js} +1 -1
- package/static/app/assets/{users-C0cFMj6o.js → users-CsNqLZAj.js} +1 -1
- package/static/app/assets/utils-KFFdVG_t.js +7 -0
- package/static/app/assets/workspace-wdCvdyPF.js +1 -0
- package/static/app/index.html +4 -4
- package/static/sw.js +1 -1
- package/static/app/assets/Act-BFbpl2_Y.js +0 -1
- package/static/app/assets/AdminConsole-DaZPha9Y.js +0 -1
- package/static/app/assets/Brain-DGrV0heZ.js +0 -321
- package/static/app/assets/BrainHome-Re6Zxh_W.js +0 -2
- package/static/app/assets/BrainSignals-BQ11jDpJ.js +0 -1
- package/static/app/assets/Capture-DRaf1zLH.js +0 -1
- package/static/app/assets/CommandPalette-DAKPm4uJ.js +0 -1
- package/static/app/assets/LanguageSwitcher-BgTwHoWv.js +0 -1
- package/static/app/assets/Library-BVtrSt12.js +0 -1
- package/static/app/assets/LivingBrain-7glOmK0R.js +0 -1
- package/static/app/assets/ReviewCard-CShhHS-w.js +0 -3
- package/static/app/assets/System-B4nQDy8a.js +0 -1
- package/static/app/assets/brain-wVV63_1z.js +0 -1
- package/static/app/assets/index-BFtDYI6l.js +0 -10
- package/static/app/assets/index-BY9bpxyx.css +0 -2
- package/static/app/assets/input-DEz5UjBz.js +0 -1
- package/static/app/assets/primitives-jNrZm2O9.js +0 -1
- package/static/app/assets/search-ku6-_6wY.js +0 -1
- package/static/app/assets/textarea-DpcQkn75.js +0 -1
- package/static/app/assets/utils-DYf7pqrR.js +0 -7
- package/static/app/assets/workspace-CjthHsLN.js +0 -1
package/latticeai/app_factory.py
CHANGED
|
@@ -18,7 +18,9 @@ import threading
|
|
|
18
18
|
from dataclasses import dataclass
|
|
19
19
|
from typing import TYPE_CHECKING, Any, Dict, List, Optional
|
|
20
20
|
|
|
21
|
+
from latticeai.core.quiet import quiet
|
|
21
22
|
from latticeai.runtime.access_runtime import build_access_runtime
|
|
23
|
+
from latticeai.runtime.audit_runtime import build_audit_runtime
|
|
22
24
|
from latticeai.runtime.bootstrap import build_session_runtime
|
|
23
25
|
from latticeai.runtime.brain_runtime import build_brain_runtime
|
|
24
26
|
from latticeai.runtime.chat_wiring import (
|
|
@@ -28,38 +30,37 @@ from latticeai.runtime.chat_wiring import (
|
|
|
28
30
|
)
|
|
29
31
|
from latticeai.runtime.config_runtime import build_config_runtime
|
|
30
32
|
from latticeai.runtime.context_runtime import build_context_runtime
|
|
33
|
+
from latticeai.runtime.history_runtime import build_history_query_runtime
|
|
31
34
|
from latticeai.runtime.hooks_runtime import (
|
|
32
35
|
bind_builtin_hook_runners,
|
|
33
36
|
bind_trigger_hook_runner,
|
|
34
37
|
build_hooks_runtime,
|
|
35
38
|
)
|
|
36
|
-
from latticeai.runtime.history_runtime import build_history_query_runtime
|
|
37
39
|
from latticeai.runtime.lifespan_runtime import build_lifespan_runtime
|
|
38
|
-
from latticeai.runtime.network_config_runtime import build_vpc_runtime
|
|
39
40
|
from latticeai.runtime.model_wiring import (
|
|
40
41
|
configure_model_runtime_from_context,
|
|
41
42
|
register_model_runtime_routers,
|
|
42
43
|
)
|
|
43
44
|
from latticeai.runtime.namespace_runtime import RuntimeBundle, build_runtime_namespace
|
|
45
|
+
from latticeai.runtime.network_config_runtime import build_vpc_runtime
|
|
46
|
+
from latticeai.runtime.persistence_runtime import build_persistence_runtime
|
|
47
|
+
from latticeai.runtime.platform_runtime_wiring import build_platform_automation_runtime
|
|
44
48
|
from latticeai.runtime.platform_services_runtime import (
|
|
45
49
|
build_brain_network,
|
|
46
50
|
)
|
|
47
|
-
from latticeai.runtime.platform_runtime_wiring import build_platform_automation_runtime
|
|
48
|
-
from latticeai.runtime.persistence_runtime import build_persistence_runtime
|
|
49
51
|
from latticeai.runtime.review_wiring import build_review_run_now_runner
|
|
50
|
-
from latticeai.runtime.sso_config_runtime import build_sso_config_runtime
|
|
51
|
-
from latticeai.runtime.audit_runtime import build_audit_runtime
|
|
52
52
|
from latticeai.runtime.router_registration import (
|
|
53
53
|
build_auth_admin_security_router_bundle,
|
|
54
54
|
build_router_bundle,
|
|
55
55
|
build_static_routes_bundle,
|
|
56
|
-
register_health_and_model_routers,
|
|
57
56
|
register_foundation_routers,
|
|
57
|
+
register_health_and_model_routers,
|
|
58
58
|
register_interaction_routers,
|
|
59
59
|
register_platform_feature_routers,
|
|
60
60
|
register_review_and_brain_tail_routers,
|
|
61
61
|
)
|
|
62
62
|
from latticeai.runtime.security_runtime import build_security_runtime
|
|
63
|
+
from latticeai.runtime.sso_config_runtime import build_sso_config_runtime
|
|
63
64
|
from latticeai.runtime.user_key_runtime import build_user_key_runtime
|
|
64
65
|
from latticeai.runtime.web_runtime import build_web_runtime
|
|
65
66
|
|
|
@@ -92,47 +93,120 @@ def _build(config: "Optional[Config]" = None) -> Dict[str, Any]:
|
|
|
92
93
|
from fastapi import HTTPException, Request
|
|
93
94
|
from pydantic import BaseModel
|
|
94
95
|
|
|
95
|
-
from latticeai.models.router import LLMRouter, normalize_branding
|
|
96
96
|
from lattice_brain.graph.runtime import set_llm_router
|
|
97
97
|
from lattice_brain.graph.schema import set_embed_dim
|
|
98
|
-
from
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
98
|
+
from lattice_brain.ingestion import IngestionItem
|
|
99
|
+
from lattice_brain.storage import storage_from_env
|
|
100
|
+
from latticeai.api.admin import create_admin_router
|
|
101
|
+
from latticeai.api.agent_registry import create_agent_registry_router
|
|
102
|
+
from latticeai.api.agents import create_agents_router
|
|
103
|
+
from latticeai.api.auth import create_auth_router
|
|
104
|
+
from latticeai.api.automation_intelligence import (
|
|
105
|
+
create_automation_intelligence_router,
|
|
106
|
+
)
|
|
107
|
+
from latticeai.api.brain_intelligence import create_brain_intelligence_router
|
|
108
|
+
from latticeai.api.browser import create_browser_router
|
|
109
|
+
from latticeai.api.change_proposals import create_change_proposals_router
|
|
110
|
+
from latticeai.api.chat import build_recent_chat_context, create_chat_router
|
|
111
|
+
from latticeai.api.command_center import create_command_center_router
|
|
112
|
+
from latticeai.api.garden import create_garden_router
|
|
113
|
+
from latticeai.api.health import create_health_router
|
|
114
|
+
from latticeai.api.hooks import create_hooks_router
|
|
115
|
+
from latticeai.api.invitations import create_invitations_router
|
|
116
|
+
from latticeai.api.marketplace import create_marketplace_router
|
|
117
|
+
from latticeai.api.memory import create_memory_router
|
|
118
|
+
from latticeai.api.models import create_models_router
|
|
119
|
+
from latticeai.api.network import create_network_router
|
|
120
|
+
|
|
121
|
+
# ── v2 Agentic Workspace Platform layers ─────────────────────────────────────
|
|
122
|
+
from latticeai.api.plugins import create_plugins_router
|
|
123
|
+
from latticeai.api.portability import create_portability_router
|
|
124
|
+
from latticeai.api.realtime import create_realtime_router
|
|
125
|
+
from latticeai.api.search import create_search_router
|
|
126
|
+
from latticeai.api.security_dashboard import (
|
|
127
|
+
create_security_router as _create_security_router,
|
|
128
|
+
)
|
|
129
|
+
from latticeai.api.setup import create_setup_router
|
|
130
|
+
from latticeai.api.static_routes import create_static_routes_router
|
|
131
|
+
from latticeai.api.tools import create_tools_router
|
|
132
|
+
from latticeai.api.workflow_designer import create_workflow_designer_router
|
|
133
|
+
from latticeai.api.workspace import (
|
|
134
|
+
_workspace_scope_from_request,
|
|
135
|
+
create_workspace_router,
|
|
107
136
|
)
|
|
108
137
|
from latticeai.core.audit import (
|
|
109
|
-
get_audit_log as _get_audit_log, # noqa: F401 - explicit legacy server_app export
|
|
110
|
-
classify_sensitive_message as _classify_sensitive_message,
|
|
111
|
-
build_sensitivity_report as _build_sensitivity_report,
|
|
112
138
|
build_admin_audit_report as _build_admin_audit_report,
|
|
113
139
|
)
|
|
114
|
-
from latticeai.
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
from latticeai.core.
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
140
|
+
from latticeai.core.audit import (
|
|
141
|
+
build_sensitivity_report as _build_sensitivity_report,
|
|
142
|
+
)
|
|
143
|
+
from latticeai.core.audit import (
|
|
144
|
+
classify_sensitive_message as _classify_sensitive_message,
|
|
145
|
+
)
|
|
146
|
+
from latticeai.core.audit import (
|
|
147
|
+
get_audit_log as _get_audit_log, # noqa: F401 - explicit legacy server_app export
|
|
148
|
+
)
|
|
149
|
+
from latticeai.core.embedding_providers import (
|
|
150
|
+
resolve_embedder,
|
|
151
|
+
resolve_embedding_profile,
|
|
121
152
|
)
|
|
122
153
|
from latticeai.core.enterprise import (
|
|
123
154
|
capability_registry,
|
|
124
155
|
)
|
|
156
|
+
from latticeai.core.mcp_registry import (
|
|
157
|
+
SKILLS_DIR,
|
|
158
|
+
_fetch_skills_marketplace,
|
|
159
|
+
create_mcp_install_state,
|
|
160
|
+
install_skill,
|
|
161
|
+
)
|
|
162
|
+
from latticeai.core.model_compat import (
|
|
163
|
+
list_cached_profiles as _list_compat_profiles,
|
|
164
|
+
)
|
|
125
165
|
from latticeai.core.policy import policy_matrix
|
|
166
|
+
from latticeai.core.product_hardening import build_product_hardening_status
|
|
167
|
+
from latticeai.core.security import (
|
|
168
|
+
bytes_match_extension as _bytes_match_extension_impl,
|
|
169
|
+
)
|
|
170
|
+
from latticeai.core.security import (
|
|
171
|
+
check_ip_rate_limit as _check_ip_rate_limit,
|
|
172
|
+
)
|
|
173
|
+
from latticeai.core.security import (
|
|
174
|
+
client_ip as _client_ip_impl,
|
|
175
|
+
)
|
|
176
|
+
from latticeai.core.security import (
|
|
177
|
+
enforce_rate_limit as _enforce_rate_limit,
|
|
178
|
+
)
|
|
179
|
+
from latticeai.core.security import (
|
|
180
|
+
hash_password,
|
|
181
|
+
verify_password,
|
|
182
|
+
)
|
|
183
|
+
from latticeai.core.security import (
|
|
184
|
+
host_is_loopback as _host_is_loopback_impl,
|
|
185
|
+
)
|
|
186
|
+
from latticeai.core.security import (
|
|
187
|
+
redact_secret_text as _redact_secret_text,
|
|
188
|
+
)
|
|
189
|
+
from latticeai.core.tool_registry import (
|
|
190
|
+
TOOL_CATALOG_BRIEF as _TOOL_CATALOG_BRIEF, # noqa: F401
|
|
191
|
+
)
|
|
126
192
|
from latticeai.core.users import (
|
|
127
193
|
ensure_user_identity,
|
|
128
194
|
load_users_file,
|
|
129
195
|
migrate_knowledge_graph_identity,
|
|
130
196
|
save_users_file,
|
|
197
|
+
)
|
|
198
|
+
from latticeai.core.users import (
|
|
131
199
|
user_id_for_email as _user_id_for_email,
|
|
132
200
|
)
|
|
133
|
-
from latticeai.
|
|
201
|
+
from latticeai.core.workspace_os import (
|
|
202
|
+
WORKSPACE_OS_VERSION,
|
|
203
|
+
remove_skill_directory,
|
|
204
|
+
)
|
|
205
|
+
from latticeai.models.router import LLMRouter, normalize_branding
|
|
134
206
|
from latticeai.services.app_context import AppContext
|
|
135
|
-
from latticeai.
|
|
207
|
+
from latticeai.services.change_proposals import ChangeProposalService
|
|
208
|
+
from latticeai.services.chat_service import ChatService
|
|
209
|
+
from latticeai.services.command_center import CommandCenterService
|
|
136
210
|
from latticeai.services.model_runtime import (
|
|
137
211
|
CLOUD_VERIFY_TTL_SECONDS,
|
|
138
212
|
ENGINE_MODEL_CATALOG,
|
|
@@ -140,68 +214,44 @@ def _build(config: "Optional[Config]" = None) -> Dict[str, Any]:
|
|
|
140
214
|
MODEL_ENGINE_ALIASES,
|
|
141
215
|
build_model_runtime,
|
|
142
216
|
download_hf_model,
|
|
217
|
+
ensure_ollama_server,
|
|
143
218
|
filter_lower_family_versions,
|
|
144
219
|
local_binary,
|
|
145
220
|
normalize_local_model_request,
|
|
146
221
|
sse_event,
|
|
147
|
-
ensure_ollama_server,
|
|
148
222
|
)
|
|
149
|
-
from latticeai.
|
|
150
|
-
|
|
151
|
-
# ── v2 Agentic Workspace Platform layers ─────────────────────────────────────
|
|
152
|
-
from latticeai.api.plugins import create_plugins_router
|
|
153
|
-
from latticeai.api.workflow_designer import create_workflow_designer_router
|
|
154
|
-
from latticeai.api.agents import create_agents_router
|
|
155
|
-
from latticeai.api.realtime import create_realtime_router
|
|
156
|
-
from latticeai.api.invitations import create_invitations_router
|
|
157
|
-
from latticeai.api.marketplace import create_marketplace_router
|
|
158
|
-
from latticeai.api.models import create_models_router
|
|
159
|
-
from latticeai.api.chat import build_recent_chat_context, create_chat_router
|
|
160
|
-
from latticeai.api.search import create_search_router
|
|
161
|
-
from latticeai.api.tools import create_tools_router
|
|
162
|
-
from latticeai.api.static_routes import create_static_routes_router
|
|
163
|
-
from latticeai.api.garden import create_garden_router
|
|
164
|
-
from latticeai.api.setup import create_setup_router
|
|
165
|
-
from latticeai.api.hooks import create_hooks_router
|
|
166
|
-
from latticeai.core.product_hardening import build_product_hardening_status
|
|
167
|
-
from latticeai.api.agent_registry import create_agent_registry_router
|
|
168
|
-
from latticeai.api.automation_intelligence import create_automation_intelligence_router
|
|
169
|
-
from latticeai.api.brain_intelligence import create_brain_intelligence_router
|
|
170
|
-
from latticeai.api.command_center import create_command_center_router
|
|
171
|
-
from latticeai.services.command_center import CommandCenterService
|
|
172
|
-
from latticeai.api.change_proposals import create_change_proposals_router
|
|
173
|
-
from latticeai.services.change_proposals import ChangeProposalService
|
|
174
|
-
from latticeai.tools import resolve_workspace_path
|
|
175
|
-
from latticeai.api.memory import create_memory_router
|
|
176
|
-
from latticeai.api.browser import create_browser_router
|
|
177
|
-
from latticeai.api.portability import create_portability_router
|
|
178
|
-
from lattice_brain.ingestion import IngestionItem
|
|
179
|
-
from lattice_brain.storage import storage_from_env
|
|
180
|
-
from latticeai.api.network import create_network_router
|
|
223
|
+
from latticeai.services.p_reinforce import PReinforceGardener
|
|
224
|
+
|
|
181
225
|
# The aliased names below form the explicit, allowlisted compatibility
|
|
182
226
|
# surface consumed by historical ``server_app`` callers.
|
|
183
227
|
from latticeai.services.tool_dispatch import ( # noqa: F401
|
|
184
228
|
LOCAL_WRITE_BLOCKED_PREFIXES as _LOCAL_WRITE_BLOCKED_PREFIXES,
|
|
229
|
+
)
|
|
230
|
+
from latticeai.services.tool_dispatch import (
|
|
185
231
|
TOOL_GOVERNANCE,
|
|
232
|
+
build_agent_runtime,
|
|
233
|
+
configure_tool_dispatch,
|
|
234
|
+
get_tool_permission,
|
|
235
|
+
)
|
|
236
|
+
from latticeai.services.tool_dispatch import (
|
|
186
237
|
TOOL_GOVERNANCE_DEFAULT as _TOOL_GOVERNANCE_DEFAULT,
|
|
238
|
+
)
|
|
239
|
+
from latticeai.services.tool_dispatch import (
|
|
187
240
|
agent_risk as _agent_risk,
|
|
241
|
+
)
|
|
242
|
+
from latticeai.services.tool_dispatch import (
|
|
188
243
|
check_tool_role as _check_tool_role,
|
|
189
|
-
configure_tool_dispatch,
|
|
190
|
-
get_tool_permission,
|
|
191
|
-
list_tool_permissions,
|
|
192
|
-
build_agent_runtime,
|
|
193
|
-
tool_response as _tool_response,
|
|
194
244
|
)
|
|
195
|
-
from latticeai.
|
|
196
|
-
|
|
197
|
-
_fetch_skills_marketplace,
|
|
198
|
-
install_skill,
|
|
199
|
-
SKILLS_DIR,
|
|
200
|
-
create_mcp_install_state,
|
|
245
|
+
from latticeai.services.tool_dispatch import (
|
|
246
|
+
tool_response as _tool_response,
|
|
201
247
|
)
|
|
202
|
-
from latticeai.services.p_reinforce import PReinforceGardener
|
|
203
248
|
from latticeai.setup.wizard import get_recommendations, scan_environment
|
|
204
|
-
from latticeai.tools import
|
|
249
|
+
from latticeai.tools import (
|
|
250
|
+
ensure_agent_root,
|
|
251
|
+
execute_tool,
|
|
252
|
+
knowledge_save,
|
|
253
|
+
resolve_workspace_path,
|
|
254
|
+
)
|
|
205
255
|
|
|
206
256
|
try:
|
|
207
257
|
import keyring
|
|
@@ -302,7 +352,7 @@ def _build(config: "Optional[Config]" = None) -> Dict[str, Any]:
|
|
|
302
352
|
try:
|
|
303
353
|
DATA_DIR.chmod(0o700)
|
|
304
354
|
except OSError:
|
|
305
|
-
|
|
355
|
+
quiet()
|
|
306
356
|
STATIC_DIR = CONFIG.static_dir
|
|
307
357
|
|
|
308
358
|
USERS_FILE = DATA_DIR / "users.json"
|
|
@@ -649,7 +699,7 @@ def _build(config: "Optional[Config]" = None) -> Dict[str, Any]:
|
|
|
649
699
|
if ENABLE_GRAPH and KNOWLEDGE_GRAPH:
|
|
650
700
|
graph_stats = KNOWLEDGE_GRAPH.stats()
|
|
651
701
|
except Exception:
|
|
652
|
-
|
|
702
|
+
quiet()
|
|
653
703
|
return _build_admin_audit_report(
|
|
654
704
|
AUDIT_FILE, users,
|
|
655
705
|
get_user_role=get_user_role,
|
|
@@ -1135,7 +1185,10 @@ def _build(config: "Optional[Config]" = None) -> Dict[str, Any]:
|
|
|
1135
1185
|
# ── Chat / Completion ──────────────────────────────────────────────────────────
|
|
1136
1186
|
|
|
1137
1187
|
def _embedding_info() -> dict:
|
|
1138
|
-
from latticeai.core.embedding_providers import
|
|
1188
|
+
from latticeai.core.embedding_providers import (
|
|
1189
|
+
PROVIDER_TYPES,
|
|
1190
|
+
embedding_provider_profiles,
|
|
1191
|
+
)
|
|
1139
1192
|
info = EMBEDDER.as_dict()
|
|
1140
1193
|
info["available_providers"] = list(PROVIDER_TYPES)
|
|
1141
1194
|
info["profile"] = CONFIG.embedding_profile or ""
|
|
@@ -21,6 +21,8 @@ from latticeai.cli.runtime import (
|
|
|
21
21
|
_has_module,
|
|
22
22
|
_load_env_file,
|
|
23
23
|
)
|
|
24
|
+
from latticeai.core.quiet import quiet
|
|
25
|
+
|
|
24
26
|
|
|
25
27
|
def _local_ips() -> list[str]:
|
|
26
28
|
ips: list[str] = []
|
|
@@ -32,7 +34,7 @@ def _local_ips() -> list[str]:
|
|
|
32
34
|
if addr not in ips:
|
|
33
35
|
ips.append(addr)
|
|
34
36
|
except Exception:
|
|
35
|
-
|
|
37
|
+
quiet()
|
|
36
38
|
if not ips:
|
|
37
39
|
try:
|
|
38
40
|
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
|
@@ -40,7 +42,7 @@ def _local_ips() -> list[str]:
|
|
|
40
42
|
ips.append(s.getsockname()[0])
|
|
41
43
|
s.close()
|
|
42
44
|
except Exception:
|
|
43
|
-
|
|
45
|
+
quiet()
|
|
44
46
|
return ips
|
|
45
47
|
|
|
46
48
|
|
|
@@ -145,7 +147,7 @@ def _send_telegram(token: str, chat_id: str, text: str) -> None:
|
|
|
145
147
|
)
|
|
146
148
|
urllib.request.urlopen(req, timeout=10)
|
|
147
149
|
except Exception:
|
|
148
|
-
|
|
150
|
+
quiet()
|
|
149
151
|
|
|
150
152
|
|
|
151
153
|
def _start_tunnel(port: int) -> str | None:
|
|
@@ -178,7 +180,7 @@ def _start_tunnel(port: int) -> str | None:
|
|
|
178
180
|
url = m.group(0)
|
|
179
181
|
break
|
|
180
182
|
except Exception:
|
|
181
|
-
|
|
183
|
+
quiet()
|
|
182
184
|
|
|
183
185
|
if not url:
|
|
184
186
|
return None
|