armoriq-sdk-dev 0.3.1__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.
@@ -0,0 +1,129 @@
1
+ """
2
+ ArmorIQ SDK - Build Secure AI Agents
3
+
4
+ A Python SDK for building AI agents with cryptographic intent verification.
5
+ Provides simple APIs for plan capture, token management, and secure MCP
6
+ tool invocation with built-in security.
7
+
8
+ Author: ArmorIQ Team <license@armoriq.io>
9
+ """
10
+
11
+ from .client import ArmorIQClient
12
+ from .session import (
13
+ ArmorIQSession,
14
+ EnforceResult,
15
+ ReportOptions,
16
+ SessionMode,
17
+ SessionOptions,
18
+ )
19
+ from .plan_builder import (
20
+ ToolNameParser,
21
+ build_plan_from_tool_calls,
22
+ default_tool_name_parser,
23
+ hash_tool_calls,
24
+ )
25
+ from .exceptions import (
26
+ ArmorIQException,
27
+ ConfigurationException,
28
+ DelegationException,
29
+ IntentMismatchException,
30
+ InvalidTokenException,
31
+ MCPInvocationException,
32
+ PolicyBlockedException,
33
+ PolicyHoldException,
34
+ TokenExpiredException,
35
+ )
36
+ from .models import (
37
+ ApprovedDelegation,
38
+ DelegationRequest,
39
+ DelegationRequestParams,
40
+ DelegationRequestResult,
41
+ DelegationResult,
42
+ HoldInfo,
43
+ IntentToken,
44
+ InvokeOptions,
45
+ MCPInvocation,
46
+ MCPInvocationResult,
47
+ MCPSemanticMetadata,
48
+ McpCredential,
49
+ McpCredentialMap,
50
+ PlanCapture,
51
+ PolicyContext,
52
+ SDKConfig,
53
+ ToolCall,
54
+ ToolSemanticEntry,
55
+ )
56
+
57
+ __version__ = "0.2.12"
58
+ VERSION = __version__
59
+ __author__ = "ArmorIQ Team"
60
+ AUTHOR = __author__
61
+ __email__ = "license@armoriq.io"
62
+ EMAIL = __email__
63
+
64
+ __all__ = [
65
+ # Core
66
+ "ArmorIQClient",
67
+ "ArmorIQSession",
68
+ "SessionOptions",
69
+ "SessionMode",
70
+ "EnforceResult",
71
+ "ReportOptions",
72
+ # Plan helpers
73
+ "build_plan_from_tool_calls",
74
+ "default_tool_name_parser",
75
+ "hash_tool_calls",
76
+ "ToolNameParser",
77
+ # Exceptions
78
+ "ArmorIQException",
79
+ "InvalidTokenException",
80
+ "IntentMismatchException",
81
+ "MCPInvocationException",
82
+ "TokenExpiredException",
83
+ "DelegationException",
84
+ "ConfigurationException",
85
+ "PolicyBlockedException",
86
+ "PolicyHoldException",
87
+ # Models
88
+ "IntentToken",
89
+ "PlanCapture",
90
+ "MCPInvocation",
91
+ "MCPInvocationResult",
92
+ "DelegationRequest",
93
+ "DelegationResult",
94
+ "SDKConfig",
95
+ "MCPSemanticMetadata",
96
+ "ToolSemanticEntry",
97
+ "PolicyContext",
98
+ "InvokeOptions",
99
+ "HoldInfo",
100
+ "DelegationRequestParams",
101
+ "DelegationRequestResult",
102
+ "ApprovedDelegation",
103
+ "ToolCall",
104
+ "McpCredential",
105
+ "McpCredentialMap",
106
+ # Metadata
107
+ "VERSION",
108
+ "AUTHOR",
109
+ "EMAIL",
110
+ ]
111
+
112
+ # Optional framework integrations (each requires its own extra to be installed)
113
+ try:
114
+ from .integrations import (
115
+ ArmorIQAnthropic,
116
+ ArmorIQCrew,
117
+ ArmorIQGoogleADK,
118
+ ArmorIQLangChain,
119
+ ArmorIQOpenAI,
120
+ )
121
+ __all__ += [
122
+ "ArmorIQCrew",
123
+ "ArmorIQLangChain",
124
+ "ArmorIQGoogleADK",
125
+ "ArmorIQOpenAI",
126
+ "ArmorIQAnthropic",
127
+ ]
128
+ except Exception:
129
+ pass
@@ -0,0 +1,45 @@
1
+ """
2
+ Build-time environment marker.
3
+
4
+ This file is the ONLY difference between the `dev` and `main` branches —
5
+ merging dev → main conflicts on this single constant, which is intentional
6
+ so the release owner consciously flips the default before publishing prod.
7
+
8
+ main branch → ARMORIQ_ENV = "production" (prod URLs; published as stable)
9
+ dev branch → ARMORIQ_ENV = "staging" (staging URLs; published as -dev)
10
+
11
+ The baked constant is the ONLY source of truth for which environment's
12
+ URLs to use — no runtime env-var override. To point the SDK at staging,
13
+ install the dev build; to override a specific endpoint for testing,
14
+ pass `backend_endpoint=...` to the ArmorIQClient constructor or set
15
+ BACKEND_ENDPOINT / IAP_ENDPOINT / PROXY_ENDPOINT env vars.
16
+ """
17
+
18
+ ARMORIQ_ENV: str = "staging"
19
+
20
+ # Endpoint table — keep in sync with GCP Cloud Run domain mappings
21
+ # (verified via `gcloud beta run domain-mappings describe --domain=...`).
22
+ # prod:
23
+ # api.armoriq.ai → conmap-auto (us-central1)
24
+ # iap.armoriq.ai → csrg-execution-service (us-central1)
25
+ # proxy.armoriq.ai → armoriq-proxy-server (us-central1)
26
+ # staging:
27
+ # staging-api.armoriq.ai → conmap-auto-staging (us-central1)
28
+ # iap-staging.armoriq.ai → csrg-execution-service-staging (us-central1)
29
+ # cloud-run-proxy.armoriq.io → armoriq-proxy-dev (europe-west1)
30
+ ENDPOINTS = {
31
+ "production": {
32
+ "backend": "https://api.armoriq.ai",
33
+ "proxy": "https://proxy.armoriq.ai",
34
+ "iap": "https://iap.armoriq.ai",
35
+ },
36
+ "staging": {
37
+ "backend": "https://staging-api.armoriq.ai",
38
+ "proxy": "https://cloud-run-proxy.armoriq.io",
39
+ "iap": "https://iap-staging.armoriq.ai",
40
+ },
41
+ }
42
+
43
+
44
+ def resolve(kind: str) -> str:
45
+ return ENDPOINTS[ARMORIQ_ENV][kind]