lumera 0.44.0__tar.gz → 0.45.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.
- {lumera-0.44.0 → lumera-0.45.0}/PKG-INFO +1 -1
- {lumera-0.44.0 → lumera-0.45.0}/lumera/functions/_context.py +1 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/releases/__main__.py +32 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/releases/_projection.py +3 -5
- {lumera-0.44.0 → lumera-0.45.0}/lumera/releases/_rpc_event.py +1 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera.egg-info/PKG-INFO +1 -1
- {lumera-0.44.0 → lumera-0.45.0}/pyproject.toml +1 -1
- {lumera-0.44.0 → lumera-0.45.0}/lumera/__init__.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/_live.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/_utils.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/agents.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/automations.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/documents.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/email.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/exceptions.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/files.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/flags.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/function_resources.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/functions/__init__.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/functions/__main__.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/functions/_artifacts.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/functions/_config.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/functions/_contract.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/functions/_dependencies.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/functions/_errors.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/functions/_execution.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/functions/_jsonschema.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/functions/_registry.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/functions/_remote.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/functions/_runner.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/functions/_runtime.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/functions/testing.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/google.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/integrations/__init__.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/integrations/bill.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/integrations/finch.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/integrations/google.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/integrations/kafka.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/integrations/netsuite.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/integrations/salesforce.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/integrations/slack.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/integrations/snowflake.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/llm.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/pb.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/releases/__init__.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/releases/_api_child.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/releases/_archive.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/releases/_automation_event.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/releases/_builder.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/releases/_config.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/releases/_contracts.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/releases/_errors.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/releases/_rpc_process.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/releases/_runtime.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/releases/_runtime_child.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/releases/_schemas.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/releases/_target.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/sdk.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/storage.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera/webhooks.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera.egg-info/SOURCES.txt +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera.egg-info/dependency_links.txt +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera.egg-info/requires.txt +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/lumera.egg-info/top_level.txt +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/setup.cfg +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/tests/test_agents_live.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/tests/test_automations.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/tests/test_documents.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/tests/test_flags.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/tests/test_function_resources.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/tests/test_integrations_bill.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/tests/test_integrations_finch.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/tests/test_integrations_google.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/tests/test_integrations_kafka.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/tests/test_integrations_netsuite.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/tests/test_integrations_salesforce.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/tests/test_integrations_slack.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/tests/test_integrations_snowflake.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/tests/test_lazy_imports.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/tests/test_sdk.py +0 -0
- {lumera-0.44.0 → lumera-0.45.0}/tests/test_webhooks.py +0 -0
|
@@ -5,6 +5,7 @@ from __future__ import annotations
|
|
|
5
5
|
import argparse
|
|
6
6
|
import json
|
|
7
7
|
import sys
|
|
8
|
+
import tempfile
|
|
8
9
|
import uuid
|
|
9
10
|
from pathlib import Path
|
|
10
11
|
from typing import Any, cast
|
|
@@ -71,6 +72,9 @@ def _parser() -> argparse.ArgumentParser:
|
|
|
71
72
|
runtime = commands.add_parser("deploy-runtime")
|
|
72
73
|
runtime.add_argument("release")
|
|
73
74
|
runtime.add_argument("--project", required=True)
|
|
75
|
+
|
|
76
|
+
project = commands.add_parser("deploy-project")
|
|
77
|
+
project.add_argument("--project", required=True)
|
|
74
78
|
return parser
|
|
75
79
|
|
|
76
80
|
|
|
@@ -156,6 +160,34 @@ def _run(args: argparse.Namespace) -> dict[str, Any]:
|
|
|
156
160
|
if args.command == "deploy-runtime":
|
|
157
161
|
result = deploy_runtime(args.project, args.release)
|
|
158
162
|
return _success("deploy-runtime", deployment=result)
|
|
163
|
+
if args.command == "deploy-project":
|
|
164
|
+
with tempfile.TemporaryDirectory(prefix="lumera-project-release-") as temporary:
|
|
165
|
+
built = build_target_release(project_root, Path(temporary))
|
|
166
|
+
contract_results = [
|
|
167
|
+
contract_test_release(
|
|
168
|
+
built.archive_path,
|
|
169
|
+
mode=mode,
|
|
170
|
+
expected_digest=built.release_digest,
|
|
171
|
+
)
|
|
172
|
+
for mode in _declared_contract_modes(built.release_manifest)
|
|
173
|
+
]
|
|
174
|
+
uploaded = deploy_release(
|
|
175
|
+
args.project,
|
|
176
|
+
built.archive_path,
|
|
177
|
+
expected_digest=built.release_digest,
|
|
178
|
+
)
|
|
179
|
+
release = uploaded.get("release")
|
|
180
|
+
release_id = str(release.get("id", "")) if isinstance(release, dict) else ""
|
|
181
|
+
if not release_id:
|
|
182
|
+
raise ValueError("release upload returned no release ID")
|
|
183
|
+
deployment = deploy_runtime(args.project, release_id)
|
|
184
|
+
return _success(
|
|
185
|
+
"deploy-project",
|
|
186
|
+
release_digest=built.release_digest,
|
|
187
|
+
contract_modes=[result.mode for result in contract_results],
|
|
188
|
+
release=uploaded,
|
|
189
|
+
deployment=deployment,
|
|
190
|
+
)
|
|
159
191
|
raise ValueError(f"unsupported release command: {args.command}")
|
|
160
192
|
|
|
161
193
|
|
|
@@ -37,11 +37,7 @@ def create_release_runtime(
|
|
|
37
37
|
) -> ReleaseRuntime:
|
|
38
38
|
entrypoints = manifest.get("entrypoints", {})
|
|
39
39
|
modules = entrypoints.get("function_modules", []) if isinstance(entrypoints, Mapping) else []
|
|
40
|
-
registry = (
|
|
41
|
-
FunctionRegistry.discover(modules)
|
|
42
|
-
if modules and load_function_projections
|
|
43
|
-
else None
|
|
44
|
-
)
|
|
40
|
+
registry = FunctionRegistry.discover(modules) if modules and load_function_projections else None
|
|
45
41
|
routes = _projection_routes(registry)
|
|
46
42
|
|
|
47
43
|
async def app(scope: dict[str, Any], receive: ASGIReceive, send: ASGISend) -> None:
|
|
@@ -167,6 +163,7 @@ def _actor_from_headers(headers: Mapping[str, str]) -> ActorIdentity:
|
|
|
167
163
|
id=headers.get("x-lumera-membership-id", "runtime"),
|
|
168
164
|
email=_optional_header(headers, "x-lumera-user-email", "x-lumera-app-user-email"),
|
|
169
165
|
role=_optional_header(headers, "x-lumera-user-role", "x-lumera-app-user-role"),
|
|
166
|
+
name=_optional_header(headers, "x-lumera-user-name", "x-lumera-app-user-name"),
|
|
170
167
|
)
|
|
171
168
|
if subject_type == "public_app_user":
|
|
172
169
|
return ActorIdentity(
|
|
@@ -175,6 +172,7 @@ def _actor_from_headers(headers: Mapping[str, str]) -> ActorIdentity:
|
|
|
175
172
|
email=_optional_header(headers, "x-lumera-app-user-email"),
|
|
176
173
|
role=_optional_header(headers, "x-lumera-app-user-role"),
|
|
177
174
|
is_external=True,
|
|
175
|
+
name=_optional_header(headers, "x-lumera-app-user-name"),
|
|
178
176
|
)
|
|
179
177
|
if subject_type == "anonymous":
|
|
180
178
|
return ActorIdentity(type=subject_type, id="", is_external=True)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|