connector-agent-oss 0.2.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.
Files changed (122) hide show
  1. connector_agent_oss-0.2.0/PKG-INFO +137 -0
  2. connector_agent_oss-0.2.0/README.md +104 -0
  3. connector_agent_oss-0.2.0/aapi/Cargo.toml +87 -0
  4. connector_agent_oss-0.2.0/aapi/crates/aapi-core/Cargo.toml +22 -0
  5. connector_agent_oss-0.2.0/aapi/crates/aapi-core/src/error.rs +108 -0
  6. connector_agent_oss-0.2.0/aapi/crates/aapi-core/src/lib.rs +16 -0
  7. connector_agent_oss-0.2.0/aapi/crates/aapi-core/src/sandhi.rs +361 -0
  8. connector_agent_oss-0.2.0/aapi/crates/aapi-core/src/types.rs +744 -0
  9. connector_agent_oss-0.2.0/aapi/crates/aapi-core/src/vakya.rs +956 -0
  10. connector_agent_oss-0.2.0/aapi/crates/aapi-core/src/validation.rs +569 -0
  11. connector_agent_oss-0.2.0/connector/Cargo.toml +62 -0
  12. connector_agent_oss-0.2.0/connector/crates/connector-api/Cargo.toml +22 -0
  13. connector_agent_oss-0.2.0/connector/crates/connector-api/src/agent.rs +2768 -0
  14. connector_agent_oss-0.2.0/connector/crates/connector-api/src/auto_detect.rs +216 -0
  15. connector_agent_oss-0.2.0/connector/crates/connector-api/src/config.rs +1181 -0
  16. connector_agent_oss-0.2.0/connector/crates/connector-api/src/config_tests.rs +576 -0
  17. connector_agent_oss-0.2.0/connector/crates/connector-api/src/config_tests_ext.rs +860 -0
  18. connector_agent_oss-0.2.0/connector/crates/connector-api/src/connect.rs +160 -0
  19. connector_agent_oss-0.2.0/connector/crates/connector-api/src/connector.rs +2257 -0
  20. connector_agent_oss-0.2.0/connector/crates/connector-api/src/data.rs +274 -0
  21. connector_agent_oss-0.2.0/connector/crates/connector-api/src/db.rs +679 -0
  22. connector_agent_oss-0.2.0/connector/crates/connector-api/src/display.rs +358 -0
  23. connector_agent_oss-0.2.0/connector/crates/connector-api/src/error.rs +84 -0
  24. connector_agent_oss-0.2.0/connector/crates/connector-api/src/lib.rs +92 -0
  25. connector_agent_oss-0.2.0/connector/crates/connector-api/src/observe.rs +700 -0
  26. connector_agent_oss-0.2.0/connector/crates/connector-api/src/pipeline.rs +1380 -0
  27. connector_agent_oss-0.2.0/connector/crates/connector-api/src/security.rs +159 -0
  28. connector_agent_oss-0.2.0/connector/crates/connector-api/src/shorthand.rs +1274 -0
  29. connector_agent_oss-0.2.0/connector/crates/connector-api/src/trace.rs +721 -0
  30. connector_agent_oss-0.2.0/connector/crates/connector-api/src/types.rs +100 -0
  31. connector_agent_oss-0.2.0/connector/crates/connector-engine/Cargo.toml +29 -0
  32. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/aapi.rs +852 -0
  33. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/action.rs +463 -0
  34. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/action_tests.rs +955 -0
  35. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/adaptive_router.rs +375 -0
  36. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/adaptive_threshold.rs +257 -0
  37. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/agent_index.rs +356 -0
  38. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/auto_derive.rs +223 -0
  39. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/auto_vakya.rs +274 -0
  40. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/behavior.rs +461 -0
  41. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/bft_consensus.rs +430 -0
  42. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/binding.rs +406 -0
  43. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/checkpoint.rs +305 -0
  44. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/circuit_breaker.rs +268 -0
  45. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/claims.rs +381 -0
  46. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/compliance.rs +598 -0
  47. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/content_guard.rs +475 -0
  48. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/context_manager.rs +519 -0
  49. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/cross_cell_port.rs +185 -0
  50. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/discovery.rs +262 -0
  51. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/dispatcher.rs +2184 -0
  52. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/engine_store.rs +1494 -0
  53. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/error.rs +86 -0
  54. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/escrow.rs +348 -0
  55. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/fips_crypto.rs +352 -0
  56. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/firewall.rs +659 -0
  57. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/firewall_events.rs +272 -0
  58. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/formal_verify.rs +349 -0
  59. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/gateway_bridge.rs +315 -0
  60. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/global_quota.rs +196 -0
  61. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/grounding.rs +280 -0
  62. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/guard_pipeline.rs +417 -0
  63. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/instruction.rs +908 -0
  64. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/judgment.rs +310 -0
  65. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/kernel_ops.rs +604 -0
  66. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/knowledge.rs +1164 -0
  67. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/l6_integration.rs +650 -0
  68. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/lib.rs +105 -0
  69. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/llm.rs +260 -0
  70. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/llm_router.rs +565 -0
  71. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/logic.rs +336 -0
  72. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/memory.rs +392 -0
  73. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/memory_format.rs +184 -0
  74. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/negotiation.rs +378 -0
  75. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/noise_channel.rs +533 -0
  76. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/orchestrator.rs +473 -0
  77. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/output.rs +915 -0
  78. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/perception.rs +433 -0
  79. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/policy_engine.rs +364 -0
  80. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/post_quantum.rs +344 -0
  81. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/pricing.rs +332 -0
  82. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/rag.rs +457 -0
  83. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/redb_store.rs +829 -0
  84. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/reputation.rs +386 -0
  85. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/saga_bridge.rs +377 -0
  86. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/secret_store.rs +218 -0
  87. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/semantic_injection.rs +315 -0
  88. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/service_contract.rs +300 -0
  89. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/session_stickiness.rs +152 -0
  90. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/sqlite_store.rs +1515 -0
  91. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/stability_test.rs +523 -0
  92. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/storage_zone.rs +676 -0
  93. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/tool_def.rs +1059 -0
  94. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/trace.rs +1068 -0
  95. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/trust.rs +339 -0
  96. connector_agent_oss-0.2.0/connector/crates/connector-engine/src/watchdog.rs +613 -0
  97. connector_agent_oss-0.2.0/connector_oss/__init__.py +40 -0
  98. connector_agent_oss-0.2.0/pyproject.toml +53 -0
  99. connector_agent_oss-0.2.0/vac/Cargo.lock +4372 -0
  100. connector_agent_oss-0.2.0/vac/Cargo.toml +61 -0
  101. connector_agent_oss-0.2.0/vac/crates/vac-core/Cargo.toml +25 -0
  102. connector_agent_oss-0.2.0/vac/crates/vac-core/src/adaptive_scheduler.rs +433 -0
  103. connector_agent_oss-0.2.0/vac/crates/vac-core/src/audit_export.rs +961 -0
  104. connector_agent_oss-0.2.0/vac/crates/vac-core/src/cgroup_controllers.rs +537 -0
  105. connector_agent_oss-0.2.0/vac/crates/vac-core/src/cid.rs +324 -0
  106. connector_agent_oss-0.2.0/vac/crates/vac-core/src/codec.rs +76 -0
  107. connector_agent_oss-0.2.0/vac/crates/vac-core/src/error.rs +35 -0
  108. connector_agent_oss-0.2.0/vac/crates/vac-core/src/extensions.rs +585 -0
  109. connector_agent_oss-0.2.0/vac/crates/vac-core/src/guard.rs +305 -0
  110. connector_agent_oss-0.2.0/vac/crates/vac-core/src/integration.rs +820 -0
  111. connector_agent_oss-0.2.0/vac/crates/vac-core/src/interference.rs +978 -0
  112. connector_agent_oss-0.2.0/vac/crates/vac-core/src/kernel.rs +8893 -0
  113. connector_agent_oss-0.2.0/vac/crates/vac-core/src/knot.rs +945 -0
  114. connector_agent_oss-0.2.0/vac/crates/vac-core/src/lib.rs +35 -0
  115. connector_agent_oss-0.2.0/vac/crates/vac-core/src/namespace_types.rs +453 -0
  116. connector_agent_oss-0.2.0/vac/crates/vac-core/src/port_security.rs +390 -0
  117. connector_agent_oss-0.2.0/vac/crates/vac-core/src/range_window.rs +1275 -0
  118. connector_agent_oss-0.2.0/vac/crates/vac-core/src/self_healing.rs +606 -0
  119. connector_agent_oss-0.2.0/vac/crates/vac-core/src/store.rs +1303 -0
  120. connector_agent_oss-0.2.0/vac/crates/vac-core/src/types.rs +3925 -0
  121. connector_agent_oss-0.2.0/vac/crates/vac-ffi/Cargo.toml +30 -0
  122. connector_agent_oss-0.2.0/vac/crates/vac-ffi/src/lib.rs +1910 -0
@@ -0,0 +1,137 @@
1
+ Metadata-Version: 2.4
2
+ Name: connector-agent-oss
3
+ Version: 0.2.0
4
+ Classifier: Development Status :: 4 - Beta
5
+ Classifier: Intended Audience :: Developers
6
+ Classifier: License :: OSI Approved :: Apache Software License
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Programming Language :: Python :: 3.10
9
+ Classifier: Programming Language :: Python :: 3.11
10
+ Classifier: Programming Language :: Python :: 3.12
11
+ Classifier: Programming Language :: Python :: 3.13
12
+ Classifier: Programming Language :: Rust
13
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
14
+ Classifier: Topic :: Security
15
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
16
+ Classifier: Typing :: Typed
17
+ Requires-Dist: pytest>=7.0 ; extra == 'dev'
18
+ Requires-Dist: maturin>=1.4 ; extra == 'dev'
19
+ Requires-Dist: twine ; extra == 'dev'
20
+ Provides-Extra: dev
21
+ Summary: Tamper-proof memory, chain-of-custody, and OS-grade runtime for AI agents
22
+ Keywords: ai,agents,memory,compliance,hipaa,soc2,gdpr,audit,llm,trust,tamper-proof,chain-of-custody,deepseek,openai,anthropic,policy,firewall,multi-agent,pipeline,knowledge-graph,rag
23
+ Author: Connector OSS Contributors
24
+ License: Apache-2.0
25
+ Requires-Python: >=3.10
26
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
27
+ Project-URL: Bug Tracker, https://github.com/GlobalSushrut/connector-oss/issues
28
+ Project-URL: Changelog, https://github.com/GlobalSushrut/connector-oss/blob/main/CHANGELOG.md
29
+ Project-URL: Documentation, https://github.com/GlobalSushrut/connector-oss/blob/main/QUICKSTART.md
30
+ Project-URL: Homepage, https://github.com/GlobalSushrut/connector-oss
31
+ Project-URL: Repository, https://github.com/GlobalSushrut/connector-oss
32
+
33
+ # connector-oss — Python SDK
34
+
35
+ > Tamper-proof memory, chain-of-custody, and OS-grade runtime for AI agents.
36
+ > Native Rust kernel via PyO3 — ~140 methods, zero Python overhead.
37
+
38
+ ## Install
39
+
40
+ ```bash
41
+ pip install connector-oss
42
+ ```
43
+
44
+ Prebuilt wheels available for:
45
+ - Linux x86_64 / aarch64
46
+ - macOS x86_64 / Apple Silicon (aarch64)
47
+ - Windows x86_64
48
+
49
+ ## Quick Start
50
+
51
+ ```python
52
+ import os
53
+ from connector_oss import Connector
54
+
55
+ # 3 lines: agent with trusted memory
56
+ c = Connector("deepseek", "deepseek-chat", os.environ["DEEPSEEK_API_KEY"])
57
+ result = c.agent("bot", "You are helpful").run("Hello!", "user:alice")
58
+
59
+ print(result.text) # LLM response
60
+ print(result.trust) # 0-100 kernel-verified trust score
61
+ print(result.trust_grade) # "A+" | "A" | "B" | "C" | "D" | "F"
62
+ ```
63
+
64
+ ### From YAML Config
65
+
66
+ ```python
67
+ c = Connector.from_config("connector.yaml")
68
+ ```
69
+
70
+ ## Memory & Knowledge
71
+
72
+ ```python
73
+ # Write tamper-proof memory (CID-addressed)
74
+ c.memory_write("pid:bot", "text", "Patient has fever", "user:nurse", "ns:er")
75
+
76
+ # Search memory
77
+ packets = c.search_namespace("ns:er", limit=10)
78
+
79
+ # Knowledge graph + RAG
80
+ c.knowledge_ingest("ns:er")
81
+ ctx = c.rag_retrieve("pid:bot", "ns:er", entities=["fever"], max_facts=10)
82
+
83
+ # Cognitive cycle
84
+ report = c.cognitive_cycle("pid:bot", "ns:er", "Diagnose patient")
85
+ ```
86
+
87
+ ## Multi-Agent Pipeline
88
+
89
+ ```python
90
+ pipe = c.pipeline("support")
91
+ pipe.agent("triage", "Classify tickets")
92
+ pipe.agent("resolver", "Find answers")
93
+ pipe.route("triage -> resolver")
94
+ pipe.hipaa()
95
+
96
+ result = pipe.run("My account is locked", user="user:bob")
97
+ print(result.to_json()) # machine-parseable with provenance tags
98
+ ```
99
+
100
+ ## Custom Folders (OS mkdir model)
101
+
102
+ ```python
103
+ c.create_agent_folder("nurse", "notes", "Patient notes")
104
+ c.folder_put("agent:nurse/notes", "p123", '{"bp": "140/90"}')
105
+ val = c.folder_get("agent:nurse/notes", "p123")
106
+ ```
107
+
108
+ ## Observability
109
+
110
+ ```python
111
+ result.to_json() # every field tagged with source (kernel/llm/derived/user)
112
+ result.to_otel() # OTLP-compatible trace export
113
+ result.to_llm() # LLM-friendly summary
114
+ result.provenance() # {"kernel_verified": 5, "trust_percentage": 100.0}
115
+ result.is_verified() # True = zero-fake guarantee
116
+ ```
117
+
118
+ ## What Makes This Different
119
+
120
+ | | LangChain | CrewAI | **connector-oss** |
121
+ |-|-----------|--------|-------------------|
122
+ | Tamper-proof memory | ❌ | ❌ | ✅ CID-addressed, kernel-verified |
123
+ | Audit trail | ❌ | ❌ | ✅ Ed25519-signed, append-only |
124
+ | HIPAA/SOC2/GDPR | ❌ | ❌ | ✅ Built-in compliance |
125
+ | Trust scoring | ❌ | ❌ | ✅ Per-response, 0-100 |
126
+ | Policy enforcement | ❌ | ❌ | ✅ Non-bypassable 5-layer guard |
127
+
128
+ ## Links
129
+
130
+ - [QUICKSTART.md](https://github.com/GlobalSushrut/connector-oss/blob/main/QUICKSTART.md)
131
+ - [ARCHITECTURE.md](https://github.com/GlobalSushrut/connector-oss/blob/main/ARCHITECTURE.md)
132
+ - [GitHub](https://github.com/GlobalSushrut/connector-oss)
133
+
134
+ ## License
135
+
136
+ Apache-2.0
137
+
@@ -0,0 +1,104 @@
1
+ # connector-oss — Python SDK
2
+
3
+ > Tamper-proof memory, chain-of-custody, and OS-grade runtime for AI agents.
4
+ > Native Rust kernel via PyO3 — ~140 methods, zero Python overhead.
5
+
6
+ ## Install
7
+
8
+ ```bash
9
+ pip install connector-oss
10
+ ```
11
+
12
+ Prebuilt wheels available for:
13
+ - Linux x86_64 / aarch64
14
+ - macOS x86_64 / Apple Silicon (aarch64)
15
+ - Windows x86_64
16
+
17
+ ## Quick Start
18
+
19
+ ```python
20
+ import os
21
+ from connector_oss import Connector
22
+
23
+ # 3 lines: agent with trusted memory
24
+ c = Connector("deepseek", "deepseek-chat", os.environ["DEEPSEEK_API_KEY"])
25
+ result = c.agent("bot", "You are helpful").run("Hello!", "user:alice")
26
+
27
+ print(result.text) # LLM response
28
+ print(result.trust) # 0-100 kernel-verified trust score
29
+ print(result.trust_grade) # "A+" | "A" | "B" | "C" | "D" | "F"
30
+ ```
31
+
32
+ ### From YAML Config
33
+
34
+ ```python
35
+ c = Connector.from_config("connector.yaml")
36
+ ```
37
+
38
+ ## Memory & Knowledge
39
+
40
+ ```python
41
+ # Write tamper-proof memory (CID-addressed)
42
+ c.memory_write("pid:bot", "text", "Patient has fever", "user:nurse", "ns:er")
43
+
44
+ # Search memory
45
+ packets = c.search_namespace("ns:er", limit=10)
46
+
47
+ # Knowledge graph + RAG
48
+ c.knowledge_ingest("ns:er")
49
+ ctx = c.rag_retrieve("pid:bot", "ns:er", entities=["fever"], max_facts=10)
50
+
51
+ # Cognitive cycle
52
+ report = c.cognitive_cycle("pid:bot", "ns:er", "Diagnose patient")
53
+ ```
54
+
55
+ ## Multi-Agent Pipeline
56
+
57
+ ```python
58
+ pipe = c.pipeline("support")
59
+ pipe.agent("triage", "Classify tickets")
60
+ pipe.agent("resolver", "Find answers")
61
+ pipe.route("triage -> resolver")
62
+ pipe.hipaa()
63
+
64
+ result = pipe.run("My account is locked", user="user:bob")
65
+ print(result.to_json()) # machine-parseable with provenance tags
66
+ ```
67
+
68
+ ## Custom Folders (OS mkdir model)
69
+
70
+ ```python
71
+ c.create_agent_folder("nurse", "notes", "Patient notes")
72
+ c.folder_put("agent:nurse/notes", "p123", '{"bp": "140/90"}')
73
+ val = c.folder_get("agent:nurse/notes", "p123")
74
+ ```
75
+
76
+ ## Observability
77
+
78
+ ```python
79
+ result.to_json() # every field tagged with source (kernel/llm/derived/user)
80
+ result.to_otel() # OTLP-compatible trace export
81
+ result.to_llm() # LLM-friendly summary
82
+ result.provenance() # {"kernel_verified": 5, "trust_percentage": 100.0}
83
+ result.is_verified() # True = zero-fake guarantee
84
+ ```
85
+
86
+ ## What Makes This Different
87
+
88
+ | | LangChain | CrewAI | **connector-oss** |
89
+ |-|-----------|--------|-------------------|
90
+ | Tamper-proof memory | ❌ | ❌ | ✅ CID-addressed, kernel-verified |
91
+ | Audit trail | ❌ | ❌ | ✅ Ed25519-signed, append-only |
92
+ | HIPAA/SOC2/GDPR | ❌ | ❌ | ✅ Built-in compliance |
93
+ | Trust scoring | ❌ | ❌ | ✅ Per-response, 0-100 |
94
+ | Policy enforcement | ❌ | ❌ | ✅ Non-bypassable 5-layer guard |
95
+
96
+ ## Links
97
+
98
+ - [QUICKSTART.md](https://github.com/GlobalSushrut/connector-oss/blob/main/QUICKSTART.md)
99
+ - [ARCHITECTURE.md](https://github.com/GlobalSushrut/connector-oss/blob/main/ARCHITECTURE.md)
100
+ - [GitHub](https://github.com/GlobalSushrut/connector-oss)
101
+
102
+ ## License
103
+
104
+ Apache-2.0
@@ -0,0 +1,87 @@
1
+ [workspace]
2
+ resolver = "2"
3
+ members = [
4
+ "crates/aapi-core",
5
+ "crates/aapi-crypto",
6
+ "crates/aapi-indexdb",
7
+ "crates/aapi-gateway",
8
+ "crates/aapi-adapters",
9
+ "crates/aapi-metarules",
10
+ "crates/aapi-sdk",
11
+ "crates/aapi-cli",
12
+ "crates/aapi-pipeline",
13
+ "crates/aapi-federation",
14
+ ]
15
+
16
+ [workspace.package]
17
+ version = "0.1.0"
18
+ edition = "2021"
19
+ authors = ["AAPI Contributors"]
20
+ license = "Apache-2.0"
21
+ repository = "https://github.com/GlobalSushrut/connector-oss"
22
+ rust-version = "1.75"
23
+
24
+ [workspace.dependencies]
25
+ # Serialization
26
+ serde = { version = "1.0", features = ["derive"] }
27
+ serde_json = "1.0"
28
+ serde_with = "3.0"
29
+
30
+ # Cryptography
31
+ ed25519-dalek = { version = "2.1", features = ["serde", "rand_core"] }
32
+ sha2 = "0.10"
33
+ rand = "0.8"
34
+ base64 = "0.22"
35
+ hex = "0.4"
36
+
37
+ # Async runtime
38
+ tokio = { version = "1.35", features = ["full"] }
39
+ async-trait = "0.1"
40
+ futures = "0.3"
41
+
42
+ # HTTP/API
43
+ axum = { version = "0.7", features = ["macros"] }
44
+ tower = { version = "0.4", features = ["timeout"] }
45
+ tower-http = { version = "0.5", features = ["cors", "trace", "compression-gzip"] }
46
+ hyper = { version = "1.0", features = ["full"] }
47
+ reqwest = { version = "0.11", features = ["json", "rustls-tls"] }
48
+
49
+ # Database
50
+ sqlx = { version = "0.7", features = ["runtime-tokio", "sqlite", "postgres", "uuid", "chrono", "json"] }
51
+
52
+ # Validation & Schema
53
+ jsonschema = "0.18"
54
+ uuid = { version = "1.6", features = ["v4", "v7", "serde"] }
55
+ chrono = { version = "0.4", features = ["serde"] }
56
+
57
+ # Tracing & Observability
58
+ tracing = "0.1"
59
+ tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
60
+ opentelemetry = "0.21"
61
+ opentelemetry-otlp = "0.14"
62
+
63
+ # Error handling
64
+ thiserror = "1.0"
65
+ anyhow = "1.0"
66
+
67
+ # Configuration
68
+ config = "0.14"
69
+ dotenvy = "0.15"
70
+
71
+ # CLI
72
+ clap = { version = "4.4", features = ["derive", "env"] }
73
+
74
+ # Testing
75
+ tokio-test = "0.4"
76
+ wiremock = "0.5"
77
+ tempfile = "3.9"
78
+ assert-json-diff = "2.0"
79
+
80
+ [profile.release]
81
+ lto = true
82
+ codegen-units = 1
83
+ panic = "abort"
84
+ strip = true
85
+
86
+ [profile.dev]
87
+ debug = true
@@ -0,0 +1,22 @@
1
+ [package]
2
+ name = "aapi-core"
3
+ description = "AAPI Core - VĀKYA schema, Sandhi canonicalization, and validation"
4
+ version.workspace = true
5
+ edition.workspace = true
6
+ authors.workspace = true
7
+ license.workspace = true
8
+
9
+ [dependencies]
10
+ serde = { workspace = true }
11
+ serde_json = { workspace = true }
12
+ serde_with = { workspace = true }
13
+ uuid = { workspace = true }
14
+ chrono = { workspace = true }
15
+ thiserror = { workspace = true }
16
+ jsonschema = { workspace = true }
17
+ sha2 = { workspace = true }
18
+ hex = { workspace = true }
19
+
20
+ [dev-dependencies]
21
+ tokio-test = { workspace = true }
22
+ assert-json-diff = { workspace = true }
@@ -0,0 +1,108 @@
1
+ //! Error types for AAPI Core
2
+
3
+ use thiserror::Error;
4
+
5
+ /// Core errors that can occur during AAPI operations
6
+ #[derive(Error, Debug)]
7
+ pub enum AapiError {
8
+ #[error("Validation error: {0}")]
9
+ Validation(String),
10
+
11
+ #[error("Canonicalization error: {0}")]
12
+ Canonicalization(String),
13
+
14
+ #[error("Schema error: {0}")]
15
+ Schema(String),
16
+
17
+ #[error("Missing required field: {0}")]
18
+ MissingField(String),
19
+
20
+ #[error("Invalid field value for '{field}': {reason}")]
21
+ InvalidField { field: String, reason: String },
22
+
23
+ #[error("Capability error: {0}")]
24
+ Capability(String),
25
+
26
+ #[error("Authorization denied: {0}")]
27
+ AuthorizationDenied(String),
28
+
29
+ #[error("Budget exceeded: {resource} used {used}, limit {limit}")]
30
+ BudgetExceeded {
31
+ resource: String,
32
+ used: u64,
33
+ limit: u64,
34
+ },
35
+
36
+ #[error("TTL expired: expired at {expired_at}")]
37
+ TtlExpired { expired_at: String },
38
+
39
+ #[error("Scope violation: action '{action}' not in allowed scope")]
40
+ ScopeViolation { action: String },
41
+
42
+ #[error("Serialization error: {0}")]
43
+ Serialization(#[from] serde_json::Error),
44
+
45
+ #[error("Internal error: {0}")]
46
+ Internal(String),
47
+ }
48
+
49
+ /// Result type alias for AAPI operations
50
+ pub type AapiResult<T> = Result<T, AapiError>;
51
+
52
+ /// Reason codes for PRAMĀṆA receipts
53
+ #[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
54
+ #[serde(rename_all = "SCREAMING_SNAKE_CASE")]
55
+ pub enum ReasonCode {
56
+ /// Action completed successfully
57
+ Success,
58
+ /// Action completed with partial success
59
+ PartialSuccess,
60
+ /// Action failed due to validation error
61
+ ValidationFailed,
62
+ /// Action denied due to authorization
63
+ AuthorizationDenied,
64
+ /// Action denied due to capability scope
65
+ ScopeViolation,
66
+ /// Action denied due to budget exhaustion
67
+ BudgetExceeded,
68
+ /// Action denied due to TTL expiration
69
+ TtlExpired,
70
+ /// Action denied by MetaRule policy
71
+ PolicyDenied,
72
+ /// Action requires human approval
73
+ ApprovalRequired,
74
+ /// Action failed due to adapter error
75
+ AdapterError,
76
+ /// Action failed due to target system error
77
+ TargetError,
78
+ /// Action timed out
79
+ Timeout,
80
+ /// Action was cancelled
81
+ Cancelled,
82
+ /// Internal system error
83
+ InternalError,
84
+ }
85
+
86
+ impl ReasonCode {
87
+ /// Returns true if this is a success code
88
+ pub fn is_success(&self) -> bool {
89
+ matches!(self, ReasonCode::Success | ReasonCode::PartialSuccess)
90
+ }
91
+
92
+ /// Returns true if this is a denial code
93
+ pub fn is_denial(&self) -> bool {
94
+ matches!(
95
+ self,
96
+ ReasonCode::AuthorizationDenied
97
+ | ReasonCode::ScopeViolation
98
+ | ReasonCode::BudgetExceeded
99
+ | ReasonCode::TtlExpired
100
+ | ReasonCode::PolicyDenied
101
+ )
102
+ }
103
+
104
+ /// Returns true if this requires human intervention
105
+ pub fn requires_human(&self) -> bool {
106
+ matches!(self, ReasonCode::ApprovalRequired)
107
+ }
108
+ }
@@ -0,0 +1,16 @@
1
+ //! AAPI Core - VĀKYA Schema, Sandhi Canonicalization, and Validation
2
+ //!
3
+ //! This crate provides the foundational types and algorithms for the
4
+ //! Agentic Action Protocol Interface (AAPI).
5
+
6
+ pub mod vakya;
7
+ pub mod sandhi;
8
+ pub mod validation;
9
+ pub mod error;
10
+ pub mod types;
11
+
12
+ pub use vakya::*;
13
+ pub use sandhi::*;
14
+ pub use validation::*;
15
+ pub use error::*;
16
+ pub use types::*;