adhelm 0.1.0__py3-none-any.whl
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.
- adhelm/__init__.py +20 -0
- adhelm/__main__.py +3 -0
- adhelm/_compiled_meta_campaign_pause_approval_bridge_v2.py +317 -0
- adhelm/_generated_installed_approval_bridge_binding.py +14 -0
- adhelm/_generated_meta_campaign_pause_approval_bridge_binding_v2.py +13 -0
- adhelm/_installed_approval_execution_status.py +70 -0
- adhelm/_installed_meta_campaign_pause_approval_bridge_v2.py +978 -0
- adhelm/_installed_native_approval_bridge.py +1254 -0
- adhelm/_meta_ads_token_session.py +931 -0
- adhelm/_meta_campaign_pause_approval_bridge_protocol_v2.py +855 -0
- adhelm/_meta_campaign_pause_approval_bridge_transport_v2.py +198 -0
- adhelm/_native_approval_bridge_protocol.py +842 -0
- adhelm/_native_approval_bridge_transport.py +823 -0
- adhelm/additional_compile_cli.py +120 -0
- adhelm/approval_acceptance.py +859 -0
- adhelm/approval_protocol.py +3232 -0
- adhelm/approval_records.py +172 -0
- adhelm/artifact_cli.py +569 -0
- adhelm/artifact_detail.py +218 -0
- adhelm/artifact_workflows.py +795 -0
- adhelm/artifacts.py +1044 -0
- adhelm/assets.py +413 -0
- adhelm/audit.py +869 -0
- adhelm/audits/__init__.py +734 -0
- adhelm/audits/ga4.py +1144 -0
- adhelm/audits/google_ads.py +2303 -0
- adhelm/audits/gtm_web.py +1177 -0
- adhelm/audits/linkedin_ads.py +1378 -0
- adhelm/audits/meta_ads.py +2280 -0
- adhelm/audits/openai_ads.py +1860 -0
- adhelm/audits/reddit_ads.py +1331 -0
- adhelm/audits/tiktok_ads.py +2041 -0
- adhelm/bundled_skills/ad-program-optimization/SKILL.md +417 -0
- adhelm/bundled_skills/ad-program-optimization/references/program-analysis.md +89 -0
- adhelm/bundled_skills/conversion-optimization/SKILL.md +248 -0
- adhelm/bundled_skills/conversion-optimization/references/funnel-experiments.md +43 -0
- adhelm/bundled_skills/conversion-optimization/references/measurement-workflow.md +246 -0
- adhelm/campaign_joins.py +1047 -0
- adhelm/candidate_cli.py +115 -0
- adhelm/candidate_records.py +347 -0
- adhelm/canonical.py +57 -0
- adhelm/cli.py +1785 -0
- adhelm/compile_cli.py +220 -0
- adhelm/config.py +172 -0
- adhelm/conversion_cli.py +187 -0
- adhelm/conversion_contracts.py +482 -0
- adhelm/creative.py +1793 -0
- adhelm/creative_extraction.py +1298 -0
- adhelm/creative_registration.py +968 -0
- adhelm/creative_registration_closure.py +394 -0
- adhelm/credential_cli.py +164 -0
- adhelm/credential_lock.py +387 -0
- adhelm/credential_setup.py +475 -0
- adhelm/credentials.py +212 -0
- adhelm/directory_access.py +115 -0
- adhelm/egress_permit.py +145 -0
- adhelm/errors.py +45 -0
- adhelm/execution_cli.py +507 -0
- adhelm/execution_plan_history.py +108 -0
- adhelm/execution_plan_records.py +358 -0
- adhelm/execution_plan_views.py +335 -0
- adhelm/execution_planning_session.py +543 -0
- adhelm/ga4_admin_access_workflow.py +220 -0
- adhelm/ga4_admin_edit_cli.py +272 -0
- adhelm/ga4_admin_edit_records.py +129 -0
- adhelm/ga4_admin_edit_workflow.py +163 -0
- adhelm/ga4_admin_execution_observation.py +782 -0
- adhelm/ga4_create_cli.py +567 -0
- adhelm/ga4_create_execution_sources.py +120 -0
- adhelm/ga4_create_execution_workflow.py +331 -0
- adhelm/ga4_create_plan_artifacts.py +934 -0
- adhelm/ga4_create_plan_history.py +203 -0
- adhelm/ga4_create_plan_records.py +101 -0
- adhelm/ga4_create_plan_views.py +100 -0
- adhelm/ga4_create_selection.py +151 -0
- adhelm/ga4_create_workflow.py +255 -0
- adhelm/ga4_key_event_candidate_cli.py +192 -0
- adhelm/ga4_key_event_candidate_views.py +93 -0
- adhelm/ga4_key_event_candidates.py +755 -0
- adhelm/ga4_measurement_workflow.py +231 -0
- adhelm/generic_execution_workflow.py +1215 -0
- adhelm/google_ads_activate_execution.py +877 -0
- adhelm/google_ads_activate_planning_session.py +682 -0
- adhelm/google_ads_activate_readback_records.py +300 -0
- adhelm/google_ads_create_execution.py +765 -0
- adhelm/google_ads_create_planning_session.py +708 -0
- adhelm/google_ads_create_readback_records.py +294 -0
- adhelm/google_ads_edit_session.py +572 -0
- adhelm/google_ads_maintain_execution.py +635 -0
- adhelm/google_ads_maintain_planning_session.py +302 -0
- adhelm/google_ads_maintain_readback_records.py +276 -0
- adhelm/google_ads_pause_artifact_cli.py +275 -0
- adhelm/google_ads_pause_cli.py +704 -0
- adhelm/google_ads_pause_execution.py +422 -0
- adhelm/google_ads_pause_plan_artifacts.py +933 -0
- adhelm/google_ads_pause_plan_history.py +40 -0
- adhelm/google_ads_pause_plan_records.py +123 -0
- adhelm/google_ads_pause_plan_views.py +382 -0
- adhelm/google_ads_pause_planning_session.py +1078 -0
- adhelm/google_ads_pause_readback_records.py +220 -0
- adhelm/google_ads_pause_workflow.py +335 -0
- adhelm/google_oauth_browser.py +305 -0
- adhelm/google_oauth_cli.py +209 -0
- adhelm/google_oauth_credentials.py +2504 -0
- adhelm/google_oauth_execution_binding.py +360 -0
- adhelm/google_oauth_protocol.py +1187 -0
- adhelm/google_oauth_setup.py +307 -0
- adhelm/google_oauth_transport.py +406 -0
- adhelm/google_oauth_workflow.py +301 -0
- adhelm/gtm_dependency_graph.py +926 -0
- adhelm/gtm_inventory.py +1675 -0
- adhelm/gtm_measurement_workflow.py +328 -0
- adhelm/guidance.py +226 -0
- adhelm/guidance_cli.py +124 -0
- adhelm/input_files.py +222 -0
- adhelm/inventory.py +1476 -0
- adhelm/join_cli.py +341 -0
- adhelm/ledger.py +3421 -0
- adhelm/linkedin_token_cli.py +61 -0
- adhelm/linkedin_token_credentials.py +170 -0
- adhelm/linkedin_token_profiles.py +194 -0
- adhelm/linkedin_token_workflow.py +301 -0
- adhelm/measurement.py +733 -0
- adhelm/measurement_chunks.py +327 -0
- adhelm/measurement_cli.py +785 -0
- adhelm/measurement_comparison.py +1627 -0
- adhelm/measurement_comparison_artifacts.py +933 -0
- adhelm/measurement_records.py +343 -0
- adhelm/meta_ads_token_edit_session.py +691 -0
- adhelm/meta_ads_token_read_session.py +188 -0
- adhelm/meta_create_execution.py +1070 -0
- adhelm/meta_create_planning_session.py +903 -0
- adhelm/meta_create_readback_records.py +453 -0
- adhelm/meta_pause_artifact_cli.py +273 -0
- adhelm/meta_pause_cli.py +864 -0
- adhelm/meta_pause_execution_workflow.py +391 -0
- adhelm/meta_pause_plan_artifacts.py +925 -0
- adhelm/meta_pause_plan_history.py +38 -0
- adhelm/meta_pause_plan_records.py +98 -0
- adhelm/meta_pause_plan_views.py +412 -0
- adhelm/meta_pause_readback_records.py +117 -0
- adhelm/meta_pause_workflow.py +397 -0
- adhelm/meta_token_cli.py +632 -0
- adhelm/meta_token_credentials.py +849 -0
- adhelm/meta_token_inspection.py +316 -0
- adhelm/meta_token_observation_records.py +411 -0
- adhelm/meta_token_profiles.py +82 -0
- adhelm/meta_token_workflow.py +56 -0
- adhelm/models.py +491 -0
- adhelm/oauth_enrollment.py +1518 -0
- adhelm/openai_account_key_cli.py +236 -0
- adhelm/openai_account_key_lifecycle.py +667 -0
- adhelm/openai_create_execution.py +909 -0
- adhelm/openai_create_planning_session.py +588 -0
- adhelm/openai_create_readback_records.py +370 -0
- adhelm/openai_measurement_workflow.py +282 -0
- adhelm/openai_pause_execution_workflow.py +218 -0
- adhelm/pause_plan_artifacts.py +547 -0
- adhelm/pause_workflow.py +160 -0
- adhelm/pilot_cli.py +109 -0
- adhelm/pilot_record_files/README.md +110 -0
- adhelm/pilot_records.py +164 -0
- adhelm/pilot_workflow.py +544 -0
- adhelm/plan_cli.py +996 -0
- adhelm/plan_records.py +216 -0
- adhelm/plan_views.py +141 -0
- adhelm/privacy.py +158 -0
- adhelm/private_directories.py +31 -0
- adhelm/projections.py +761 -0
- adhelm/protected_token_cli.py +364 -0
- adhelm/protected_token_lifecycle.py +1188 -0
- adhelm/protected_token_references.py +51 -0
- adhelm/providers/__init__.py +9 -0
- adhelm/providers/_semantic_state.py +415 -0
- adhelm/providers/ga4.py +1506 -0
- adhelm/providers/ga4_admin.py +757 -0
- adhelm/providers/ga4_admin_access.py +119 -0
- adhelm/providers/ga4_admin_compiler.py +271 -0
- adhelm/providers/ga4_admin_create_state.py +945 -0
- adhelm/providers/ga4_admin_edit_inventory.py +975 -0
- adhelm/providers/ga4_admin_edit_preconditions.py +363 -0
- adhelm/providers/ga4_admin_key_event_create_adapter.py +862 -0
- adhelm/providers/ga4_admin_preconditions.py +598 -0
- adhelm/providers/ga4_create_contract.py +1558 -0
- adhelm/providers/google_ads.py +1445 -0
- adhelm/providers/google_ads_activate_adapter.py +937 -0
- adhelm/providers/google_ads_activate_contract.py +1210 -0
- adhelm/providers/google_ads_campaign_state.py +650 -0
- adhelm/providers/google_ads_compiler.py +902 -0
- adhelm/providers/google_ads_create_adapter.py +1044 -0
- adhelm/providers/google_ads_create_contract.py +1305 -0
- adhelm/providers/google_ads_maintain_adapter.py +1042 -0
- adhelm/providers/google_ads_maintain_contract.py +1385 -0
- adhelm/providers/google_ads_pause_adapter.py +766 -0
- adhelm/providers/google_ads_pause_contract.py +1040 -0
- adhelm/providers/gtm_identity.py +416 -0
- adhelm/providers/gtm_read.py +891 -0
- adhelm/providers/linkedin_ads.py +1066 -0
- adhelm/providers/linkedin_compiler.py +713 -0
- adhelm/providers/meta_ads.py +1490 -0
- adhelm/providers/meta_campaign_pause_adapter.py +626 -0
- adhelm/providers/meta_campaign_state.py +449 -0
- adhelm/providers/meta_compiler.py +572 -0
- adhelm/providers/meta_create_adapter.py +1447 -0
- adhelm/providers/meta_create_contract.py +1761 -0
- adhelm/providers/meta_pause_contract.py +965 -0
- adhelm/providers/openai_ads.py +1552 -0
- adhelm/providers/openai_compiler.py +603 -0
- adhelm/providers/openai_conversions.py +554 -0
- adhelm/providers/openai_create_adapter.py +1160 -0
- adhelm/providers/openai_create_contract.py +1467 -0
- adhelm/providers/openai_pause.py +505 -0
- adhelm/providers/openai_pause_contract.py +347 -0
- adhelm/providers/reddit_ads.py +700 -0
- adhelm/providers/reddit_compiler.py +676 -0
- adhelm/providers/tiktok_ads.py +1009 -0
- adhelm/providers/tiktok_compiler.py +702 -0
- adhelm/py.typed +0 -0
- adhelm/recovery_cli.py +345 -0
- adhelm/reddit_token_cli.py +62 -0
- adhelm/reddit_token_credentials.py +157 -0
- adhelm/reddit_token_profiles.py +217 -0
- adhelm/reddit_token_workflow.py +279 -0
- adhelm/release_labels.py +244 -0
- adhelm/release_policy.py +85 -0
- adhelm/reporting.py +1076 -0
- adhelm/safety.py +3041 -0
- adhelm/saved_audit_evidence.py +568 -0
- adhelm/saved_campaign_joins.py +156 -0
- adhelm/saved_candidates.py +258 -0
- adhelm/saved_conversion_contracts.py +85 -0
- adhelm/saved_execution_plans.py +210 -0
- adhelm/saved_ga4_admin_edit_inventories.py +98 -0
- adhelm/saved_ga4_audit_evidence.py +114 -0
- adhelm/saved_ga4_create_plans.py +163 -0
- adhelm/saved_ga4_key_event_candidates.py +170 -0
- adhelm/saved_google_ads_pause_plans.py +132 -0
- adhelm/saved_measurements.py +220 -0
- adhelm/saved_meta_pause_plans.py +124 -0
- adhelm/saved_plans.py +151 -0
- adhelm/saved_reports.py +85 -0
- adhelm/saved_strategies.py +229 -0
- adhelm/schema_views.py +52 -0
- adhelm/storage_cli.py +38 -0
- adhelm/storage_usage.py +406 -0
- adhelm/strategy.py +602 -0
- adhelm/strategy_cli.py +164 -0
- adhelm/strategy_history_cli.py +107 -0
- adhelm/strategy_records.py +190 -0
- adhelm/strict_json.py +47 -0
- adhelm/tiktok_token_cli.py +412 -0
- adhelm/tiktok_token_credentials.py +971 -0
- adhelm/tiktok_token_profiles.py +234 -0
- adhelm/tiktok_token_workflow.py +600 -0
- adhelm/transport.py +359 -0
- adhelm/video_creative.py +437 -0
- adhelm/windows_acl.py +199 -0
- adhelm/windows_filesystem.py +927 -0
- adhelm/workflows.py +507 -0
- adhelm-0.1.0.dist-info/METADATA +230 -0
- adhelm-0.1.0.dist-info/RECORD +265 -0
- adhelm-0.1.0.dist-info/WHEEL +4 -0
- adhelm-0.1.0.dist-info/entry_points.txt +2 -0
- adhelm-0.1.0.dist-info/licenses/LICENSE +202 -0
- adhelm-0.1.0.dist-info/licenses/NOTICE +10 -0
adhelm/__init__.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"""Deterministic local control plane. No startup network or model dependencies."""
|
|
2
|
+
|
|
3
|
+
from typing import Final
|
|
4
|
+
|
|
5
|
+
__version__ = "0.1.0"
|
|
6
|
+
|
|
7
|
+
#: The gate state this build reports in `adhelm version`, `discover` and `doctor` and in
|
|
8
|
+
#: `scripts/check_repository.py`. The states are defined in the "Gate states" table of
|
|
9
|
+
#: `docs/release-0.1.0.md`. Change it here and nowhere else: a test fails on any other module
|
|
10
|
+
#: under `src/adhelm`, or `scripts/check_repository.py`, that spells a gate state. The
|
|
11
|
+
#: development-evidence scripts (`validate_development`, `validate_native_approval`,
|
|
12
|
+
#: `traceability`) report the v1.0.0 definition-of-done state and do not follow this constant.
|
|
13
|
+
#:
|
|
14
|
+
#: Lifecycle: the build session sets `READY_FOR_USER_AUTHORIZATION` and stops there. That is the
|
|
15
|
+
#: value in the tree the owner exports. In the commit the owner tags as `v0.1.0` (owner action 6
|
|
16
|
+
#: in `docs/implementation/oss-0.1.0-plan.md`) they set this to `RELEASED_0_1_0`, so the wheel
|
|
17
|
+
#: published to PyPI reports the released state and not a pre-release one. Doing so changes two
|
|
18
|
+
#: pins to `RELEASED_0_1_0`: `test_the_build_reports_the_state_it_stops_at` in
|
|
19
|
+
#: `tests/test_release_state.py` and the `release_state` assertion in `tests/test_core.py`.
|
|
20
|
+
RELEASE_STATE: Final = "READY_FOR_USER_AUTHORIZATION"
|
adhelm/__main__.py
ADDED
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
"""Private compiled Meta campaign PAUSE approval-bridge V2 binding.
|
|
2
|
+
|
|
3
|
+
The checked-in generated resolver is deliberately absent. A separately
|
|
4
|
+
reviewed artifact may replace only that generated source with static metadata
|
|
5
|
+
facts which this module reconstructs and checks on every use. This does not
|
|
6
|
+
make the existing V1 compiled binding, a retained digest, or a same-process
|
|
7
|
+
object into Meta route readiness.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from __future__ import annotations
|
|
11
|
+
|
|
12
|
+
import hashlib
|
|
13
|
+
from typing import Final
|
|
14
|
+
|
|
15
|
+
from adhelm._installed_meta_campaign_pause_approval_bridge_v2 import (
|
|
16
|
+
_exchange_and_accept_pending_installed_meta_campaign_pause_approval_bridge_v2,
|
|
17
|
+
_make_meta_campaign_pause_approval_bridge_reviewed_metadata_v2,
|
|
18
|
+
_prepare_installed_meta_campaign_pause_approval_bridge_v2,
|
|
19
|
+
)
|
|
20
|
+
from adhelm._installed_native_approval_bridge import (
|
|
21
|
+
_configuration_from_generated_metadata,
|
|
22
|
+
_generated_metadata_fields,
|
|
23
|
+
_rebuild_generated_metadata,
|
|
24
|
+
_require_generated_digest,
|
|
25
|
+
)
|
|
26
|
+
from adhelm._meta_campaign_pause_approval_bridge_transport_v2 import (
|
|
27
|
+
_make_meta_campaign_pause_approval_bridge_pipe_adapter_v2,
|
|
28
|
+
_MetaCampaignPauseApprovalBridgePipeAdapterV2,
|
|
29
|
+
)
|
|
30
|
+
from adhelm._native_approval_bridge_transport import (
|
|
31
|
+
_NativeApprovalBridgeCancellation,
|
|
32
|
+
_SystemNativeApprovalBridgePosixOperations,
|
|
33
|
+
)
|
|
34
|
+
from adhelm.approval_acceptance import AcceptedNativeApproval
|
|
35
|
+
from adhelm.approval_protocol import ApprovalHostConfiguration
|
|
36
|
+
from adhelm.canonical import canonical_bytes
|
|
37
|
+
from adhelm.errors import AdhelmError, ExitCode
|
|
38
|
+
from adhelm.ledger import Ledger
|
|
39
|
+
from adhelm.safety import SafetyKernel
|
|
40
|
+
|
|
41
|
+
_ISSUER: Final = object()
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class _CompiledMetaCampaignPauseApprovalBridgeBindingV2:
|
|
45
|
+
"""Opaque reviewed static facts for the distinct Meta V2 route only."""
|
|
46
|
+
|
|
47
|
+
__slots__ = (
|
|
48
|
+
"__issuer",
|
|
49
|
+
"__configuration",
|
|
50
|
+
"__metadata_fields",
|
|
51
|
+
"__metadata_digest",
|
|
52
|
+
"__protocol_configuration_digest",
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
def __init__(
|
|
56
|
+
self,
|
|
57
|
+
issuer: object,
|
|
58
|
+
*,
|
|
59
|
+
configuration: ApprovalHostConfiguration,
|
|
60
|
+
metadata_fields: tuple[tuple[str, object], ...],
|
|
61
|
+
metadata_digest: str,
|
|
62
|
+
protocol_configuration_digest: str,
|
|
63
|
+
) -> None:
|
|
64
|
+
if issuer is not _ISSUER:
|
|
65
|
+
raise TypeError("Meta campaign PAUSE approval bridge bindings are module-issued only.")
|
|
66
|
+
object.__setattr__(
|
|
67
|
+
self, "_CompiledMetaCampaignPauseApprovalBridgeBindingV2__issuer", issuer
|
|
68
|
+
)
|
|
69
|
+
object.__setattr__(
|
|
70
|
+
self,
|
|
71
|
+
"_CompiledMetaCampaignPauseApprovalBridgeBindingV2__configuration",
|
|
72
|
+
configuration,
|
|
73
|
+
)
|
|
74
|
+
object.__setattr__(
|
|
75
|
+
self,
|
|
76
|
+
"_CompiledMetaCampaignPauseApprovalBridgeBindingV2__metadata_fields",
|
|
77
|
+
metadata_fields,
|
|
78
|
+
)
|
|
79
|
+
object.__setattr__(
|
|
80
|
+
self,
|
|
81
|
+
"_CompiledMetaCampaignPauseApprovalBridgeBindingV2__metadata_digest",
|
|
82
|
+
metadata_digest,
|
|
83
|
+
)
|
|
84
|
+
object.__setattr__(
|
|
85
|
+
self,
|
|
86
|
+
"_CompiledMetaCampaignPauseApprovalBridgeBindingV2__protocol_configuration_digest",
|
|
87
|
+
protocol_configuration_digest,
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
def __setattr__(self, name: str, value: object) -> None:
|
|
91
|
+
del name, value
|
|
92
|
+
raise AttributeError("Meta campaign PAUSE approval bridge bindings are immutable.")
|
|
93
|
+
|
|
94
|
+
def __repr__(self) -> str:
|
|
95
|
+
return "<compiled Meta campaign PAUSE approval bridge V2 binding>"
|
|
96
|
+
|
|
97
|
+
def __reduce__(self) -> str | tuple[object, ...]:
|
|
98
|
+
raise TypeError("Meta campaign PAUSE approval bridge bindings are not serializable.")
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def _compiled_binding_not_installed() -> AdhelmError:
|
|
102
|
+
return AdhelmError(
|
|
103
|
+
"NATIVE_META_CAMPAIGN_PAUSE_APPROVAL_BRIDGE_V2_NOT_INSTALLED",
|
|
104
|
+
"A reviewed compiled Meta campaign PAUSE approval bridge V2 binding is not available.",
|
|
105
|
+
exit_code=ExitCode.PRECONDITION,
|
|
106
|
+
next_action=(
|
|
107
|
+
"Install a reviewed Meta campaign PAUSE approval bridge V2 artifact before "
|
|
108
|
+
"requesting a new review."
|
|
109
|
+
),
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
def _detached_configuration(value: ApprovalHostConfiguration) -> ApprovalHostConfiguration:
|
|
114
|
+
"""Rebuild the exact seven protocol fields without widening metadata access."""
|
|
115
|
+
return ApprovalHostConfiguration(
|
|
116
|
+
host_ref=value.host_ref,
|
|
117
|
+
signing_key_ref=value.signing_key_ref,
|
|
118
|
+
maximum_challenge_bytes=value.maximum_challenge_bytes,
|
|
119
|
+
maximum_challenge_lifetime_seconds=value.maximum_challenge_lifetime_seconds,
|
|
120
|
+
maximum_issued_at_skew_seconds=value.maximum_issued_at_skew_seconds,
|
|
121
|
+
maximum_subplans=value.maximum_subplans,
|
|
122
|
+
maximum_policy_items=value.maximum_policy_items,
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def _issue_compiled_meta_campaign_pause_approval_bridge_binding_v2_from_generated_metadata(
|
|
127
|
+
*,
|
|
128
|
+
metadata_fields: object,
|
|
129
|
+
expected_metadata_digest: object,
|
|
130
|
+
expected_protocol_configuration_digest: object,
|
|
131
|
+
) -> _CompiledMetaCampaignPauseApprovalBridgeBindingV2:
|
|
132
|
+
"""Issue one Meta-only opaque binding from exact generated 18-field metadata.
|
|
133
|
+
|
|
134
|
+
The generated module is a replacement in a reviewed artifact source tree.
|
|
135
|
+
This factory checks static field order, scalar types, full metadata digest,
|
|
136
|
+
and the exact seven-field protocol projection. It does not defend against
|
|
137
|
+
arbitrary same-process rewriting of every private fact and resolver.
|
|
138
|
+
"""
|
|
139
|
+
try:
|
|
140
|
+
metadata = _rebuild_generated_metadata(metadata_fields)
|
|
141
|
+
checked_fields = _generated_metadata_fields(metadata)
|
|
142
|
+
metadata_digest = _require_generated_digest(expected_metadata_digest)
|
|
143
|
+
protocol_digest = _require_generated_digest(expected_protocol_configuration_digest)
|
|
144
|
+
if hashlib.sha256(canonical_bytes(metadata)).hexdigest() != metadata_digest:
|
|
145
|
+
raise ValueError("generated metadata digest")
|
|
146
|
+
configuration = _configuration_from_generated_metadata(metadata)
|
|
147
|
+
if configuration.configuration_digest != protocol_digest:
|
|
148
|
+
raise ValueError("generated protocol digest")
|
|
149
|
+
return _CompiledMetaCampaignPauseApprovalBridgeBindingV2(
|
|
150
|
+
_ISSUER,
|
|
151
|
+
configuration=_detached_configuration(configuration),
|
|
152
|
+
metadata_fields=checked_fields,
|
|
153
|
+
metadata_digest=metadata_digest,
|
|
154
|
+
protocol_configuration_digest=protocol_digest,
|
|
155
|
+
)
|
|
156
|
+
except Exception:
|
|
157
|
+
raise _compiled_binding_not_installed() from None
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
def _checked_compiled_meta_campaign_pause_approval_bridge_binding_v2(
|
|
161
|
+
value: object,
|
|
162
|
+
) -> _CompiledMetaCampaignPauseApprovalBridgeBindingV2:
|
|
163
|
+
"""Revalidate every retained static fact and return a detached binding copy."""
|
|
164
|
+
try:
|
|
165
|
+
if type(value) is not _CompiledMetaCampaignPauseApprovalBridgeBindingV2:
|
|
166
|
+
raise ValueError("binding type")
|
|
167
|
+
issuer = object.__getattribute__(
|
|
168
|
+
value, "_CompiledMetaCampaignPauseApprovalBridgeBindingV2__issuer"
|
|
169
|
+
)
|
|
170
|
+
configuration = object.__getattribute__(
|
|
171
|
+
value, "_CompiledMetaCampaignPauseApprovalBridgeBindingV2__configuration"
|
|
172
|
+
)
|
|
173
|
+
metadata_fields = object.__getattribute__(
|
|
174
|
+
value, "_CompiledMetaCampaignPauseApprovalBridgeBindingV2__metadata_fields"
|
|
175
|
+
)
|
|
176
|
+
metadata_digest = object.__getattribute__(
|
|
177
|
+
value, "_CompiledMetaCampaignPauseApprovalBridgeBindingV2__metadata_digest"
|
|
178
|
+
)
|
|
179
|
+
protocol_digest = object.__getattribute__(
|
|
180
|
+
value,
|
|
181
|
+
"_CompiledMetaCampaignPauseApprovalBridgeBindingV2__protocol_configuration_digest",
|
|
182
|
+
)
|
|
183
|
+
if issuer is not _ISSUER or type(configuration) is not ApprovalHostConfiguration:
|
|
184
|
+
raise ValueError("binding issuer or configuration")
|
|
185
|
+
checked_metadata_digest = _require_generated_digest(metadata_digest)
|
|
186
|
+
checked_protocol_digest = _require_generated_digest(protocol_digest)
|
|
187
|
+
metadata = _rebuild_generated_metadata(metadata_fields)
|
|
188
|
+
if hashlib.sha256(canonical_bytes(metadata)).hexdigest() != checked_metadata_digest:
|
|
189
|
+
raise ValueError("binding metadata digest")
|
|
190
|
+
metadata_configuration = _configuration_from_generated_metadata(metadata)
|
|
191
|
+
checked_configuration = _detached_configuration(configuration)
|
|
192
|
+
if (
|
|
193
|
+
checked_configuration.to_data() != metadata_configuration.to_data()
|
|
194
|
+
or checked_configuration.configuration_digest != checked_protocol_digest
|
|
195
|
+
):
|
|
196
|
+
raise ValueError("binding protocol configuration")
|
|
197
|
+
return _CompiledMetaCampaignPauseApprovalBridgeBindingV2(
|
|
198
|
+
_ISSUER,
|
|
199
|
+
configuration=checked_configuration,
|
|
200
|
+
metadata_fields=_generated_metadata_fields(metadata),
|
|
201
|
+
metadata_digest=checked_metadata_digest,
|
|
202
|
+
protocol_configuration_digest=checked_protocol_digest,
|
|
203
|
+
)
|
|
204
|
+
except Exception:
|
|
205
|
+
raise _compiled_binding_not_installed() from None
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
def _compiled_meta_campaign_pause_approval_bridge_binding_facts_v2(
|
|
209
|
+
value: object,
|
|
210
|
+
) -> tuple[ApprovalHostConfiguration, str]:
|
|
211
|
+
"""Return only detached configuration and metadata-digest facts after recheck."""
|
|
212
|
+
checked = _checked_compiled_meta_campaign_pause_approval_bridge_binding_v2(value)
|
|
213
|
+
try:
|
|
214
|
+
configuration = object.__getattribute__(
|
|
215
|
+
checked, "_CompiledMetaCampaignPauseApprovalBridgeBindingV2__configuration"
|
|
216
|
+
)
|
|
217
|
+
metadata_digest = object.__getattribute__(
|
|
218
|
+
checked, "_CompiledMetaCampaignPauseApprovalBridgeBindingV2__metadata_digest"
|
|
219
|
+
)
|
|
220
|
+
protocol_digest = object.__getattribute__(
|
|
221
|
+
checked,
|
|
222
|
+
"_CompiledMetaCampaignPauseApprovalBridgeBindingV2__protocol_configuration_digest",
|
|
223
|
+
)
|
|
224
|
+
if (
|
|
225
|
+
type(configuration) is not ApprovalHostConfiguration
|
|
226
|
+
or type(metadata_digest) is not str
|
|
227
|
+
or type(protocol_digest) is not str
|
|
228
|
+
or configuration.configuration_digest != protocol_digest
|
|
229
|
+
):
|
|
230
|
+
raise ValueError("binding facts")
|
|
231
|
+
return _detached_configuration(configuration), metadata_digest
|
|
232
|
+
except Exception:
|
|
233
|
+
raise _compiled_binding_not_installed() from None
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
def _resolve_compiled_meta_campaign_pause_approval_bridge_binding_v2() -> (
|
|
237
|
+
_CompiledMetaCampaignPauseApprovalBridgeBindingV2
|
|
238
|
+
):
|
|
239
|
+
"""Resolve only a separately generated Meta V2 binding, failing closed by default."""
|
|
240
|
+
try:
|
|
241
|
+
from adhelm._generated_meta_campaign_pause_approval_bridge_binding_v2 import (
|
|
242
|
+
_resolve_generated_meta_campaign_pause_approval_bridge_binding_v2,
|
|
243
|
+
)
|
|
244
|
+
|
|
245
|
+
return _checked_compiled_meta_campaign_pause_approval_bridge_binding_v2(
|
|
246
|
+
_resolve_generated_meta_campaign_pause_approval_bridge_binding_v2()
|
|
247
|
+
)
|
|
248
|
+
except AdhelmError as error:
|
|
249
|
+
if error.code == "NATIVE_META_CAMPAIGN_PAUSE_APPROVAL_BRIDGE_V2_NOT_INSTALLED":
|
|
250
|
+
raise
|
|
251
|
+
raise _compiled_binding_not_installed() from None
|
|
252
|
+
except Exception:
|
|
253
|
+
raise _compiled_binding_not_installed() from None
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
def _require_compiled_meta_campaign_pause_approval_bridge_v2_ready() -> None:
|
|
257
|
+
"""Fail before source, credential, helper, or native-review activity when absent."""
|
|
258
|
+
_compiled_meta_campaign_pause_approval_bridge_binding_facts_v2(
|
|
259
|
+
_resolve_compiled_meta_campaign_pause_approval_bridge_binding_v2()
|
|
260
|
+
)
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
class _NeverCancelled:
|
|
264
|
+
"""Installed composition never exposes a caller-controlled cancellation handle."""
|
|
265
|
+
|
|
266
|
+
def cancelled(self) -> bool:
|
|
267
|
+
return False
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
def _fixed_meta_campaign_pause_approval_bridge_pipe_adapter_v2() -> (
|
|
271
|
+
_MetaCampaignPauseApprovalBridgePipeAdapterV2
|
|
272
|
+
):
|
|
273
|
+
"""Construct only M47's sealed fixed-system-helper role after binding validation."""
|
|
274
|
+
return _make_meta_campaign_pause_approval_bridge_pipe_adapter_v2(
|
|
275
|
+
_SystemNativeApprovalBridgePosixOperations()
|
|
276
|
+
)
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
def _fixed_meta_campaign_pause_approval_bridge_cancellation_v2() -> (
|
|
280
|
+
_NativeApprovalBridgeCancellation
|
|
281
|
+
):
|
|
282
|
+
return _NeverCancelled()
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
def _request_and_record_installed_meta_campaign_pause_approval_v2(
|
|
286
|
+
kernel: SafetyKernel,
|
|
287
|
+
ledger: Ledger,
|
|
288
|
+
*,
|
|
289
|
+
source_plan_record_digest: str,
|
|
290
|
+
) -> AcceptedNativeApproval:
|
|
291
|
+
"""Run one compiled-bound private Meta V2 pending exchange and local claim.
|
|
292
|
+
|
|
293
|
+
The checked-in generated resolver returns ``None``, so ordinary source
|
|
294
|
+
fails with a fixed precondition before retained-source reads, credential
|
|
295
|
+
work, helper construction, or native activity. No caller can supply
|
|
296
|
+
metadata, key, clock, adapter, receipt, path, candidate, or grantor facts.
|
|
297
|
+
"""
|
|
298
|
+
binding = _resolve_compiled_meta_campaign_pause_approval_bridge_binding_v2()
|
|
299
|
+
configuration, metadata_digest = _compiled_meta_campaign_pause_approval_bridge_binding_facts_v2(
|
|
300
|
+
binding
|
|
301
|
+
)
|
|
302
|
+
reviewed_metadata = _make_meta_campaign_pause_approval_bridge_reviewed_metadata_v2(
|
|
303
|
+
configuration, metadata_digest
|
|
304
|
+
)
|
|
305
|
+
pending = _prepare_installed_meta_campaign_pause_approval_bridge_v2(
|
|
306
|
+
kernel,
|
|
307
|
+
ledger,
|
|
308
|
+
source_plan_record_digest=source_plan_record_digest,
|
|
309
|
+
reviewed_metadata=reviewed_metadata,
|
|
310
|
+
)
|
|
311
|
+
return _exchange_and_accept_pending_installed_meta_campaign_pause_approval_bridge_v2(
|
|
312
|
+
kernel,
|
|
313
|
+
ledger,
|
|
314
|
+
pending=pending,
|
|
315
|
+
adapter=_fixed_meta_campaign_pause_approval_bridge_pipe_adapter_v2(),
|
|
316
|
+
cancellation=_fixed_meta_campaign_pause_approval_bridge_cancellation_v2(),
|
|
317
|
+
)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""Deliberately unconfigured installed-approval bridge build selection.
|
|
2
|
+
|
|
3
|
+
The configured artifact builder may replace this module only in an isolated
|
|
4
|
+
source tree with literals rendered from the closed native metadata contract.
|
|
5
|
+
This checked-in source never loads configuration from a file, environment,
|
|
6
|
+
manifest, package resource, or runtime path.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _resolve_generated_installed_approval_bridge_binding() -> object:
|
|
13
|
+
"""Keep ordinary source and development wheels explicitly unconfigured."""
|
|
14
|
+
return None
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"""Deliberately unconfigured generated Meta campaign PAUSE bridge V2 selection.
|
|
2
|
+
|
|
3
|
+
A reviewed artifact may replace this isolated source with static metadata
|
|
4
|
+
literals. Ordinary source never reads a runtime loader, configuration file,
|
|
5
|
+
environment value, package resource, or manifest to obtain that binding.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def _resolve_generated_meta_campaign_pause_approval_bridge_binding_v2() -> object:
|
|
12
|
+
"""Keep ordinary source and development wheels explicitly unconfigured."""
|
|
13
|
+
return None
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"""Fixed availability facts for the execution commands."""
|
|
2
|
+
|
|
3
|
+
from typing import Final
|
|
4
|
+
|
|
5
|
+
from adhelm.release_policy import UNRELEASED_STATUS
|
|
6
|
+
|
|
7
|
+
# The commands are registered, but the 0.1.0 release policy refuses every one of
|
|
8
|
+
# them (`adhelm.release_policy`), and the ordinary source/wheel binding remains
|
|
9
|
+
# deliberately unconfigured besides. This is not a claim that native
|
|
10
|
+
# installation, signing, enrollment, or live provider execution has been
|
|
11
|
+
# validated.
|
|
12
|
+
INSTALLED_APPROVAL_EXECUTION_COMMAND_STATUS: Final = UNRELEASED_STATUS
|
|
13
|
+
INSTALLED_APPROVAL_EXECUTION_CAPABILITY_STATUS: Final = "DEVELOPMENT_ONLY_NOT_LIVE_VALIDATED"
|
|
14
|
+
|
|
15
|
+
# Google Ads campaign PAUSE executes through the provider-neutral `execute plan`
|
|
16
|
+
# leaf: P03 registered its planner and guarded adapter for ("google_ads", PAUSE),
|
|
17
|
+
# so the pair is no longer unimplemented. It is still not usable in an ordinary
|
|
18
|
+
# build, because the installed approval bridge refuses COMPOSITE_EXECUTION_PLAN,
|
|
19
|
+
# so it shares the generic leaves' status string rather than inventing another
|
|
20
|
+
# one. Published artifacts and `discover` read it from this one place so a
|
|
21
|
+
# future change cannot leave either stale.
|
|
22
|
+
GOOGLE_ADS_PAUSE_EXECUTION_COMMAND_STATUS: Final = INSTALLED_APPROVAL_EXECUTION_COMMAND_STATUS
|
|
23
|
+
|
|
24
|
+
# The generic provider-neutral leaves. `execute plan` and `recover attempt` are
|
|
25
|
+
# registered and refused by the same release-policy gate as the three fixed
|
|
26
|
+
# leaves, so they share its status string rather than inventing a second one.
|
|
27
|
+
# They additionally require a registered execution adapter, which `discover`
|
|
28
|
+
# renders from `CONFIGURED_EXECUTION_ADAPTERS` itself rather than from a
|
|
29
|
+
# constant here.
|
|
30
|
+
GENERIC_EXECUTION_COMMAND_STATUS: Final = INSTALLED_APPROVAL_EXECUTION_COMMAND_STATUS
|
|
31
|
+
ATTEMPT_RECOVERY_COMMAND_STATUS: Final = INSTALLED_APPROVAL_EXECUTION_COMMAND_STATUS
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
# Google Ads paused Search hierarchy CREATE executes through the same
|
|
35
|
+
# provider-neutral `execute plan` leaf: P04 registered its planner and guarded
|
|
36
|
+
# adapter for ("google_ads", CREATE), so the pair is no longer unimplemented. It
|
|
37
|
+
# is still not usable in an ordinary build, because the installed approval
|
|
38
|
+
# bridge refuses COMPOSITE_EXECUTION_PLAN, so it shares the generic leaves'
|
|
39
|
+
# status string rather than inventing another one. (The ledger now registers
|
|
40
|
+
# the two additive Google Ads CREATE record kinds, so that is no longer one of
|
|
41
|
+
# the reasons it refuses.)
|
|
42
|
+
GOOGLE_ADS_CREATE_EXECUTION_COMMAND_STATUS: Final = INSTALLED_APPROVAL_EXECUTION_COMMAND_STATUS
|
|
43
|
+
|
|
44
|
+
# OpenAI Ads paused chat-card hierarchy CREATE executes through the same
|
|
45
|
+
# provider-neutral `execute plan` leaf: P04-OA registered its planner and
|
|
46
|
+
# journaled child-egress adapter for ("openai_ads", CREATE), the ledger
|
|
47
|
+
# registers its two additive record kinds, and the transport carries the one
|
|
48
|
+
# bounded multipart image upload it needs. The pair is therefore no longer
|
|
49
|
+
# unimplemented, and it is still not usable in an ordinary build, because the
|
|
50
|
+
# installed approval bridge refuses COMPOSITE_EXECUTION_PLAN. It shares the
|
|
51
|
+
# generic leaves' status string rather than inventing another one, and the two
|
|
52
|
+
# build checks stay in the planner and the adapter factory so a build without
|
|
53
|
+
# either dependency refuses before any credential.
|
|
54
|
+
OPENAI_ADS_CREATE_EXECUTION_COMMAND_STATUS: Final = INSTALLED_APPROVAL_EXECUTION_COMMAND_STATUS
|
|
55
|
+
|
|
56
|
+
# Google Ads Search hierarchy ACTIVATE and the guarded maintenance operations
|
|
57
|
+
# execute through the same provider-neutral `execute plan` leaf: P05 registered
|
|
58
|
+
# their planners and guarded adapters for ("google_ads", ACTIVATE) and
|
|
59
|
+
# ("google_ads", UPDATE), so those pairs are no longer unimplemented. The
|
|
60
|
+
# delete-class ("google_ads", ARCHIVE) pair is deliberately not registered until
|
|
61
|
+
# a cited reference read can supply AGENTS rule 11's dependency proof. The
|
|
62
|
+
# registered pairs are still not usable in an ordinary build, and the only
|
|
63
|
+
# reason is that the installed approval bridge refuses COMPOSITE_EXECUTION_PLAN;
|
|
64
|
+
# a ledger that did not register the four additive ACTIVATE and MAINTAIN record
|
|
65
|
+
# kinds would be a further, conditional refusal, but this build's ledger
|
|
66
|
+
# registers all four. They share the generic leaves' status string rather than
|
|
67
|
+
# inventing another one. Activation additionally remains a separate,
|
|
68
|
+
# spend-explicit, digest-bound authorization: nothing here makes it automatic.
|
|
69
|
+
GOOGLE_ADS_ACTIVATE_EXECUTION_COMMAND_STATUS: Final = INSTALLED_APPROVAL_EXECUTION_COMMAND_STATUS
|
|
70
|
+
GOOGLE_ADS_MAINTAIN_EXECUTION_COMMAND_STATUS: Final = INSTALLED_APPROVAL_EXECUTION_COMMAND_STATUS
|