armoriq-sdk-dev 0.3.1__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.
Files changed (46) hide show
  1. armoriq_sdk_dev-0.3.1/.env.example +33 -0
  2. armoriq_sdk_dev-0.3.1/CHANGELOG.md +101 -0
  3. armoriq_sdk_dev-0.3.1/LICENSE +21 -0
  4. armoriq_sdk_dev-0.3.1/MANIFEST.in +14 -0
  5. armoriq_sdk_dev-0.3.1/PKG-INFO +171 -0
  6. armoriq_sdk_dev-0.3.1/README.md +116 -0
  7. armoriq_sdk_dev-0.3.1/armoriq_sdk/__init__.py +129 -0
  8. armoriq_sdk_dev-0.3.1/armoriq_sdk/_build_env.py +45 -0
  9. armoriq_sdk_dev-0.3.1/armoriq_sdk/cli.py +562 -0
  10. armoriq_sdk_dev-0.3.1/armoriq_sdk/cli_auth.py +252 -0
  11. armoriq_sdk_dev-0.3.1/armoriq_sdk/client.py +1356 -0
  12. armoriq_sdk_dev-0.3.1/armoriq_sdk/config.py +181 -0
  13. armoriq_sdk_dev-0.3.1/armoriq_sdk/credentials.py +69 -0
  14. armoriq_sdk_dev-0.3.1/armoriq_sdk/exceptions.py +158 -0
  15. armoriq_sdk_dev-0.3.1/armoriq_sdk/integrations/__init__.py +24 -0
  16. armoriq_sdk_dev-0.3.1/armoriq_sdk/integrations/anthropic.py +21 -0
  17. armoriq_sdk_dev-0.3.1/armoriq_sdk/integrations/crewai.py +211 -0
  18. armoriq_sdk_dev-0.3.1/armoriq_sdk/integrations/google_adk.py +255 -0
  19. armoriq_sdk_dev-0.3.1/armoriq_sdk/integrations/langchain.py +21 -0
  20. armoriq_sdk_dev-0.3.1/armoriq_sdk/integrations/openai.py +21 -0
  21. armoriq_sdk_dev-0.3.1/armoriq_sdk/models.py +295 -0
  22. armoriq_sdk_dev-0.3.1/armoriq_sdk/plan_builder.py +96 -0
  23. armoriq_sdk_dev-0.3.1/armoriq_sdk/session.py +643 -0
  24. armoriq_sdk_dev-0.3.1/armoriq_sdk_dev.egg-info/PKG-INFO +171 -0
  25. armoriq_sdk_dev-0.3.1/armoriq_sdk_dev.egg-info/SOURCES.txt +44 -0
  26. armoriq_sdk_dev-0.3.1/armoriq_sdk_dev.egg-info/dependency_links.txt +1 -0
  27. armoriq_sdk_dev-0.3.1/armoriq_sdk_dev.egg-info/entry_points.txt +3 -0
  28. armoriq_sdk_dev-0.3.1/armoriq_sdk_dev.egg-info/requires.txt +32 -0
  29. armoriq_sdk_dev-0.3.1/armoriq_sdk_dev.egg-info/top_level.txt +4 -0
  30. armoriq_sdk_dev-0.3.1/docs/development-guide/ArmorIQ Concepts.md +1853 -0
  31. armoriq_sdk_dev-0.3.1/docs/development-guide/ArmorIQ SDK - API Reference.md +1600 -0
  32. armoriq_sdk_dev-0.3.1/docs/development-guide/Getting Started with ArmorIQ SDK.md +232 -0
  33. armoriq_sdk_dev-0.3.1/examples/README.md +173 -0
  34. armoriq_sdk_dev-0.3.1/examples/basic_agent.py +122 -0
  35. armoriq_sdk_dev-0.3.1/examples/complete_workflow.py +197 -0
  36. armoriq_sdk_dev-0.3.1/examples/crewai_integration.py +183 -0
  37. armoriq_sdk_dev-0.3.1/examples/delegation_example.py +135 -0
  38. armoriq_sdk_dev-0.3.1/examples/error_handling.py +224 -0
  39. armoriq_sdk_dev-0.3.1/examples/loan_delegation_workflow.py +362 -0
  40. armoriq_sdk_dev-0.3.1/examples/multi_mcp_agent.py +107 -0
  41. armoriq_sdk_dev-0.3.1/examples/multi_tool.py +83 -0
  42. armoriq_sdk_dev-0.3.1/examples/quickstart.py +90 -0
  43. armoriq_sdk_dev-0.3.1/pyproject.toml +60 -0
  44. armoriq_sdk_dev-0.3.1/scripts/generate_api_key.py +41 -0
  45. armoriq_sdk_dev-0.3.1/setup.cfg +4 -0
  46. armoriq_sdk_dev-0.3.1/setup.py +53 -0
@@ -0,0 +1,33 @@
1
+ # ArmorIQ SDK Configuration Template
2
+ # Copy this file to .env and fill in your actual values
3
+
4
+ # Environment Mode
5
+ # Set to "development" for local testing, "production" for live services
6
+ ARMORIQ_ENV=production
7
+
8
+ # Production Endpoints (default when ARMORIQ_ENV=production)
9
+ # IAP_ENDPOINT=https://customer-iap.armoriq.ai
10
+ # PROXY_ENDPOINT=https://cloud-run-customer-proxy.armoriq.ai
11
+ # CONMAP_ENDPOINT=https://customer-api.armoriq.ai
12
+
13
+ # Development/Local Endpoints (uncomment for local testing)
14
+ # IAP_ENDPOINT=http://localhost:8082
15
+ # PROXY_ENDPOINT=http://localhost:3001
16
+ # CONMAP_ENDPOINT=http://localhost:3000
17
+
18
+ # Agent Configuration (REQUIRED)
19
+ AGENT_ID=my-agent
20
+ USER_ID=test-user-123
21
+
22
+ # Optional Configuration
23
+ # CONTEXT_ID=default
24
+ # PROJECT_ID=test-project-456
25
+
26
+ # API Keys (if required by your services)
27
+ # ARMORIQ_API_KEY=your-api-key-here
28
+
29
+ # Logging
30
+ LOG_LEVEL=INFO
31
+
32
+ # Development Settings
33
+ DEBUG_MODE=false
@@ -0,0 +1,101 @@
1
+ # Changelog
2
+
3
+ All notable changes to ArmorIQ SDK will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.2.0] - 2026-01-26
9
+
10
+ ### Added
11
+ - **API Key Authentication**: Mandatory API key validation on SDK initialization
12
+ - **Production Endpoints**: Updated default endpoints for customer platform:
13
+ - IAP: `https://customer-iap.armoriq.ai`
14
+ - Proxy: `https://customer-proxy.armoriq.ai`
15
+ - ConMap: `https://customer-api.armoriq.ai`
16
+ - Dashboard: `https://platform.armoriq.ai/dashboard/api-keys`
17
+ - **Dual-Mode Support**: Local development and production modes
18
+ - Production mode (default): Uses customer-*.armoriq.ai endpoints
19
+ - Local mode: Uses localhost endpoints for development
20
+ - Toggle via `use_production=False` parameter
21
+ - Environment variable: `ARMORIQ_ENV=development`
22
+ - **API Key Management**: Integration with API Key Dashboard
23
+ - API keys required in format: `ak_live_*` or `ak_test_*`
24
+ - Set via environment variable: `ARMORIQ_API_KEY`
25
+ - Or pass directly: `ArmorIQClient(api_key="ak_live_...")`
26
+ - **Documentation**:
27
+ - `API_KEY_GUIDE.md`: Complete guide for API key usage
28
+ - `PRODUCTION_VS_LOCAL.md`: Dual-mode configuration guide
29
+ - Updated `examples/complete_workflow.py` with API key examples
30
+
31
+ ### Changed
32
+ - **BREAKING**: API key now required for SDK initialization
33
+ - Raises `ConfigurationException` if API key is missing
34
+ - API key format validation enforced
35
+ - Updated all default endpoints to customer-specific URLs
36
+ - Improved error messages for authentication failures
37
+ - Enhanced configuration validation
38
+
39
+ ### Security
40
+ - API key validation with bcrypt hash verification
41
+ - Secure key prefix lookup via database indexing
42
+ - Fire-and-forget usage tracking for performance
43
+ - Production token signing with GCP KMS
44
+ - Local development uses Ed25519 signing
45
+
46
+ ## [0.1.0] - 2026-01-16
47
+
48
+ ### Added
49
+ - Initial beta release of ArmorIQ SDK
50
+ - Core `ArmorIQClient` class with CSRG-IAP integration
51
+ - Production endpoints configured by default:
52
+ - IAP: `https://customer-iap.armoriq.ai`
53
+ - Proxy: `https://cloud-run-customer-proxy.armoriq.ai`
54
+ - ConMap: `https://customer-api.armoriq.ai`
55
+ - Automatic environment detection (`ARMORIQ_ENV`)
56
+ - Flexible endpoint configuration (env vars, parameters, per-MCP)
57
+ - Core APIs:
58
+ - `capture_plan()` - Plan canonicalization with CSRG
59
+ - `get_intent_token()` - Token acquisition from IAP with Ed25519 signatures
60
+ - `invoke()` - MCP action invocation through proxy
61
+ - `delegate()` - Agent-to-agent delegation with public key cryptography
62
+ - Custom exceptions:
63
+ - `InvalidTokenException`
64
+ - `IntentMismatchException`
65
+ - `TokenExpiredException`
66
+ - `MCPInvocationException`
67
+ - `DelegationException`
68
+ - `ConfigurationException`
69
+ - Pydantic models for type safety:
70
+ - `IntentToken`
71
+ - `PlanCapture`
72
+ - `MCPInvocation`
73
+ - `MCPInvocationResult`
74
+ - `DelegationRequest`
75
+ - `DelegationResult`
76
+ - `SDKConfig`
77
+ - Token caching with expiry checking
78
+ - Comprehensive error handling
79
+ - Environment variable configuration support
80
+ - Context manager support for resource cleanup
81
+ - Example scripts:
82
+ - Basic agent usage
83
+ - Multi-MCP coordination
84
+ - Agent delegation
85
+ - Error handling patterns
86
+ - Full test suite with pytest
87
+ - Development documentation
88
+ - README with quick start guide
89
+
90
+ ### Dependencies
91
+ - `httpx>=0.27.0` - HTTP client
92
+ - `pydantic>=2.0.0` - Data validation
93
+ - `csrg-iap>=0.1.0` - CSRG canonicalization
94
+
95
+ ### Notes
96
+ - This is an alpha release for testing and feedback
97
+ - API may change in future versions
98
+ - Requires CSRG-IAP service running
99
+ - Requires ArmorIQ Proxy service for MCP invocations
100
+
101
+ [0.1.0]: https://github.com/armoriq/armoriq-sdk-python/releases/tag/v0.1.0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ArmorIQ
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,14 @@
1
+ include README.md
2
+ include LICENSE
3
+ include CHANGELOG.md
4
+ include requirements.txt
5
+ include .env.example
6
+ recursive-include armoriq_sdk *.py
7
+ recursive-include docs *.md *.rst
8
+ recursive-include examples *.py *.md
9
+ prune tests
10
+ prune .github
11
+ prune __pycache__
12
+ global-exclude *.pyc
13
+ global-exclude *.pyo
14
+ global-exclude __pycache__
@@ -0,0 +1,171 @@
1
+ Metadata-Version: 2.4
2
+ Name: armoriq-sdk-dev
3
+ Version: 0.3.1
4
+ Summary: ArmorIQ SDK - Build secure AI agents with cryptographic intent verification.
5
+ Home-page: https://armoriq.ai
6
+ Author: ArmorIQ Team
7
+ Author-email: ArmorIQ Team <license@armoriq.io>
8
+ License: MIT
9
+ Project-URL: Homepage, https://armoriq.ai
10
+ Project-URL: Documentation, https://docs.armoriq.ai
11
+ Project-URL: Source Code, https://github.com/armoriq/armoriq-sdk-python
12
+ Keywords: armoriq,sdk,ai,agents,security,verification
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Security
22
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
+ Requires-Python: >=3.9
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: httpx>=0.24.0
27
+ Requires-Dist: pydantic>=2.0.0
28
+ Requires-Dist: cryptography>=41.0.0
29
+ Requires-Dist: PyYAML>=6.0
30
+ Provides-Extra: crewai
31
+ Requires-Dist: crewai>=0.28.0; extra == "crewai"
32
+ Provides-Extra: langchain
33
+ Requires-Dist: langchain>=0.1.0; extra == "langchain"
34
+ Provides-Extra: google-adk
35
+ Requires-Dist: google-adk>=1.0.0; extra == "google-adk"
36
+ Provides-Extra: openai
37
+ Requires-Dist: openai>=1.0.0; extra == "openai"
38
+ Provides-Extra: anthropic
39
+ Requires-Dist: anthropic>=0.20.0; extra == "anthropic"
40
+ Provides-Extra: dev
41
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
42
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
43
+ Requires-Dist: black; extra == "dev"
44
+ Requires-Dist: mypy; extra == "dev"
45
+ Provides-Extra: all
46
+ Requires-Dist: crewai>=0.28.0; extra == "all"
47
+ Requires-Dist: langchain>=0.1.0; extra == "all"
48
+ Requires-Dist: google-adk>=1.0.0; extra == "all"
49
+ Requires-Dist: openai>=1.0.0; extra == "all"
50
+ Requires-Dist: anthropic>=0.20.0; extra == "all"
51
+ Dynamic: author
52
+ Dynamic: home-page
53
+ Dynamic: license-file
54
+ Dynamic: requires-python
55
+
56
+ # ArmorIQ SDK
57
+
58
+ **Build secure AI agents with cryptographic intent verification.**
59
+
60
+ The ArmorIQ SDK enables developers to build AI agents with built-in security and auditability. Just one API key - no cloud complexity.
61
+
62
+ ---
63
+
64
+ ## Why ArmorIQ?
65
+
66
+ - **Simple** - Just one API key, no cloud credentials
67
+ - **Secure** - Cryptographic verification for every action
68
+ - **Auditable** - Complete execution trail
69
+ - **Fast** - Get started in 5 minutes
70
+
71
+ ---
72
+
73
+ ## Installation
74
+
75
+ ```bash
76
+ pip install armoriq-sdk
77
+ ```
78
+
79
+ CLI commands are also available after install:
80
+
81
+ ```bash
82
+ armoriq --help
83
+ ```
84
+
85
+ ---
86
+
87
+ ## Quick Start
88
+
89
+ ### 1. Get Your API Key
90
+
91
+ Visit [platform.armoriq.ai](https://platform.armoriq.ai) to generate your API key.
92
+
93
+ ### 2. Initialize the Client
94
+
95
+ ```python
96
+ from armoriq_sdk import ArmorIQClient
97
+
98
+ client = ArmorIQClient(
99
+ api_key="ak_your_key_here",
100
+ user_id="your-user-id",
101
+ agent_id="your-agent-id"
102
+ )
103
+ ```
104
+
105
+ Or load SDK settings from `armoriq.yaml` generated by the CLI:
106
+
107
+ ```python
108
+ from armoriq_sdk import ArmorIQClient
109
+
110
+ client = ArmorIQClient.from_config("armoriq.yaml")
111
+ ```
112
+
113
+ ### 3. Capture Your Plan
114
+
115
+ ```python
116
+ plan = {
117
+ "goal": "Get weather forecast",
118
+ "steps": [
119
+ {
120
+ "action": "get_weather",
121
+ "tool": "weather_api",
122
+ "inputs": {"city": "Boston"}
123
+ }
124
+ ]
125
+ }
126
+
127
+ plan_capture = client.capture_plan(
128
+ llm="gpt-4",
129
+ prompt="What's the weather in Boston?",
130
+ plan=plan
131
+ )
132
+ ```
133
+
134
+ ### 4. Get Intent Token
135
+
136
+ ```python
137
+ token = client.get_intent_token(plan_capture)
138
+ ```
139
+
140
+ ### 5. Invoke Actions
141
+
142
+ ```python
143
+ result = client.invoke(
144
+ mcp_name="weather-mcp",
145
+ action="get_weather",
146
+ intent_token=token,
147
+ inputs={"city": "Boston"}
148
+ )
149
+
150
+ print(result)
151
+ ```
152
+
153
+ ---
154
+
155
+ ## Documentation
156
+
157
+ For complete documentation, visit [docs.armoriq.ai](https://docs.armoriq.ai)
158
+
159
+ ---
160
+
161
+ ## Links
162
+
163
+ - [armoriq.ai](https://armoriq.ai)
164
+ - [docs.armoriq.ai](https://docs.armoriq.ai)
165
+ - [platform.armoriq.ai](https://platform.armoriq.ai)
166
+
167
+ ---
168
+
169
+ ## License
170
+
171
+ MIT License - see [LICENSE](LICENSE) file for details.
@@ -0,0 +1,116 @@
1
+ # ArmorIQ SDK
2
+
3
+ **Build secure AI agents with cryptographic intent verification.**
4
+
5
+ The ArmorIQ SDK enables developers to build AI agents with built-in security and auditability. Just one API key - no cloud complexity.
6
+
7
+ ---
8
+
9
+ ## Why ArmorIQ?
10
+
11
+ - **Simple** - Just one API key, no cloud credentials
12
+ - **Secure** - Cryptographic verification for every action
13
+ - **Auditable** - Complete execution trail
14
+ - **Fast** - Get started in 5 minutes
15
+
16
+ ---
17
+
18
+ ## Installation
19
+
20
+ ```bash
21
+ pip install armoriq-sdk
22
+ ```
23
+
24
+ CLI commands are also available after install:
25
+
26
+ ```bash
27
+ armoriq --help
28
+ ```
29
+
30
+ ---
31
+
32
+ ## Quick Start
33
+
34
+ ### 1. Get Your API Key
35
+
36
+ Visit [platform.armoriq.ai](https://platform.armoriq.ai) to generate your API key.
37
+
38
+ ### 2. Initialize the Client
39
+
40
+ ```python
41
+ from armoriq_sdk import ArmorIQClient
42
+
43
+ client = ArmorIQClient(
44
+ api_key="ak_your_key_here",
45
+ user_id="your-user-id",
46
+ agent_id="your-agent-id"
47
+ )
48
+ ```
49
+
50
+ Or load SDK settings from `armoriq.yaml` generated by the CLI:
51
+
52
+ ```python
53
+ from armoriq_sdk import ArmorIQClient
54
+
55
+ client = ArmorIQClient.from_config("armoriq.yaml")
56
+ ```
57
+
58
+ ### 3. Capture Your Plan
59
+
60
+ ```python
61
+ plan = {
62
+ "goal": "Get weather forecast",
63
+ "steps": [
64
+ {
65
+ "action": "get_weather",
66
+ "tool": "weather_api",
67
+ "inputs": {"city": "Boston"}
68
+ }
69
+ ]
70
+ }
71
+
72
+ plan_capture = client.capture_plan(
73
+ llm="gpt-4",
74
+ prompt="What's the weather in Boston?",
75
+ plan=plan
76
+ )
77
+ ```
78
+
79
+ ### 4. Get Intent Token
80
+
81
+ ```python
82
+ token = client.get_intent_token(plan_capture)
83
+ ```
84
+
85
+ ### 5. Invoke Actions
86
+
87
+ ```python
88
+ result = client.invoke(
89
+ mcp_name="weather-mcp",
90
+ action="get_weather",
91
+ intent_token=token,
92
+ inputs={"city": "Boston"}
93
+ )
94
+
95
+ print(result)
96
+ ```
97
+
98
+ ---
99
+
100
+ ## Documentation
101
+
102
+ For complete documentation, visit [docs.armoriq.ai](https://docs.armoriq.ai)
103
+
104
+ ---
105
+
106
+ ## Links
107
+
108
+ - [armoriq.ai](https://armoriq.ai)
109
+ - [docs.armoriq.ai](https://docs.armoriq.ai)
110
+ - [platform.armoriq.ai](https://platform.armoriq.ai)
111
+
112
+ ---
113
+
114
+ ## License
115
+
116
+ MIT License - see [LICENSE](LICENSE) file for details.
@@ -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]