coreason-workspace-env 2.1.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 (106) hide show
  1. coreason_workspace_env-2.1.0/LICENSE.txt +57 -0
  2. coreason_workspace_env-2.1.0/NOTICE.txt +8 -0
  3. coreason_workspace_env-2.1.0/PKG-INFO +24 -0
  4. coreason_workspace_env-2.1.0/README.md +1 -0
  5. coreason_workspace_env-2.1.0/coreason_workspace_env.egg-info/PKG-INFO +24 -0
  6. coreason_workspace_env-2.1.0/coreason_workspace_env.egg-info/SOURCES.txt +104 -0
  7. coreason_workspace_env-2.1.0/coreason_workspace_env.egg-info/dependency_links.txt +1 -0
  8. coreason_workspace_env-2.1.0/coreason_workspace_env.egg-info/entry_points.txt +2 -0
  9. coreason_workspace_env-2.1.0/coreason_workspace_env.egg-info/requires.txt +9 -0
  10. coreason_workspace_env-2.1.0/coreason_workspace_env.egg-info/top_level.txt +1 -0
  11. coreason_workspace_env-2.1.0/pyproject.toml +36 -0
  12. coreason_workspace_env-2.1.0/setup.cfg +4 -0
  13. coreason_workspace_env-2.1.0/src/agents/agent_pm/orchestrator.py +9 -0
  14. coreason_workspace_env-2.1.0/src/agents/agent_pm/tools/__init__.py +1 -0
  15. coreason_workspace_env-2.1.0/src/agents/agent_validator/orchestrator.py +11 -0
  16. coreason_workspace_env-2.1.0/src/agents/backend_pm/orchestrator.py +9 -0
  17. coreason_workspace_env-2.1.0/src/agents/backend_pm/tools/__init__.py +1 -0
  18. coreason_workspace_env-2.1.0/src/agents/context_compressor/orchestrator.py +48 -0
  19. coreason_workspace_env-2.1.0/src/agents/database_architect/orchestrator.py +9 -0
  20. coreason_workspace_env-2.1.0/src/agents/database_architect/tools/__init__.py +1 -0
  21. coreason_workspace_env-2.1.0/src/agents/factory_ceo/orchestrator.py +56 -0
  22. coreason_workspace_env-2.1.0/src/agents/factory_ceo/tools/__init__.py +1 -0
  23. coreason_workspace_env-2.1.0/src/agents/fastapi_coder/orchestrator.py +9 -0
  24. coreason_workspace_env-2.1.0/src/agents/fastapi_coder/tools/__init__.py +1 -0
  25. coreason_workspace_env-2.1.0/src/agents/frontend_pm/orchestrator.py +9 -0
  26. coreason_workspace_env-2.1.0/src/agents/frontend_pm/tools/__init__.py +1 -0
  27. coreason_workspace_env-2.1.0/src/agents/knowledge_archivist/__init__.py +1 -0
  28. coreason_workspace_env-2.1.0/src/agents/knowledge_consultant/__init__.py +1 -0
  29. coreason_workspace_env-2.1.0/src/agents/legacy_deconstructor/__init__.py +1 -0
  30. coreason_workspace_env-2.1.0/src/agents/librarian_pm/__init__.py +1 -0
  31. coreason_workspace_env-2.1.0/src/agents/output_sanitizer/orchestrator.py +48 -0
  32. coreason_workspace_env-2.1.0/src/agents/prompt_engineer/orchestrator.py +9 -0
  33. coreason_workspace_env-2.1.0/src/agents/prompt_engineer/tools/__init__.py +1 -0
  34. coreason_workspace_env-2.1.0/src/agents/react_coder/orchestrator.py +9 -0
  35. coreason_workspace_env-2.1.0/src/agents/react_coder/tools/__init__.py +1 -0
  36. coreason_workspace_env-2.1.0/src/agents/ui_designer/orchestrator.py +9 -0
  37. coreason_workspace_env-2.1.0/src/agents/ui_designer/tools/__init__.py +1 -0
  38. coreason_workspace_env-2.1.0/src/agents/yaml_compiler/orchestrator.py +52 -0
  39. coreason_workspace_env-2.1.0/src/agents/yaml_compiler/tools/fs_tools.py +22 -0
  40. coreason_workspace_env-2.1.0/src/api/endpoints/agents.py +59 -0
  41. coreason_workspace_env-2.1.0/src/api/endpoints/docs.py +49 -0
  42. coreason_workspace_env-2.1.0/src/api/endpoints/mcp.py +36 -0
  43. coreason_workspace_env-2.1.0/src/api/endpoints/projects.py +70 -0
  44. coreason_workspace_env-2.1.0/src/api/router.py +18 -0
  45. coreason_workspace_env-2.1.0/src/api/streaming/__init__.py +1 -0
  46. coreason_workspace_env-2.1.0/src/api/streaming/agent_progress.py +42 -0
  47. coreason_workspace_env-2.1.0/src/api/streaming/crdt.py +22 -0
  48. coreason_workspace_env-2.1.0/src/api/streaming/state_sync.py +30 -0
  49. coreason_workspace_env-2.1.0/src/api/streaming/tty.py +16 -0
  50. coreason_workspace_env-2.1.0/src/cli/main.py +264 -0
  51. coreason_workspace_env-2.1.0/src/core/config.py +45 -0
  52. coreason_workspace_env-2.1.0/src/core/db.py +28 -0
  53. coreason_workspace_env-2.1.0/src/core/fsm_decoder.py +47 -0
  54. coreason_workspace_env-2.1.0/src/core/mcp_client.py +59 -0
  55. coreason_workspace_env-2.1.0/src/core/mcp_server.py +52 -0
  56. coreason_workspace_env-2.1.0/src/core/queue.py +41 -0
  57. coreason_workspace_env-2.1.0/src/core/schemas/__init__.py +1 -0
  58. coreason_workspace_env-2.1.0/src/core/schemas/epistemic_firewall.py +13 -0
  59. coreason_workspace_env-2.1.0/src/core/schemas/knowledge_receipt.py +28 -0
  60. coreason_workspace_env-2.1.0/src/core/schemas/legacy_ir.py +49 -0
  61. coreason_workspace_env-2.1.0/src/core/security/audit.py +77 -0
  62. coreason_workspace_env-2.1.0/src/core/security/auth.py +56 -0
  63. coreason_workspace_env-2.1.0/src/core/security/encryption.py +58 -0
  64. coreason_workspace_env-2.1.0/src/core/security/proxy_delegation.py +67 -0
  65. coreason_workspace_env-2.1.0/src/core/security/vault.py +79 -0
  66. coreason_workspace_env-2.1.0/src/core/services/__init__.py +24 -0
  67. coreason_workspace_env-2.1.0/src/core/services/agent_service.py +153 -0
  68. coreason_workspace_env-2.1.0/src/core/services/docs_service.py +80 -0
  69. coreason_workspace_env-2.1.0/src/core/services/health_service.py +81 -0
  70. coreason_workspace_env-2.1.0/src/core/services/mcp_service.py +88 -0
  71. coreason_workspace_env-2.1.0/src/core/services/project_service.py +140 -0
  72. coreason_workspace_env-2.1.0/src/core/skill_loader.py +146 -0
  73. coreason_workspace_env-2.1.0/src/core/skill_registry_schema.py +70 -0
  74. coreason_workspace_env-2.1.0/src/core/skills/__init__.py +6 -0
  75. coreason_workspace_env-2.1.0/src/core/skills/context_compressor.py +18 -0
  76. coreason_workspace_env-2.1.0/src/core/skills/escalate_to_human.py +23 -0
  77. coreason_workspace_env-2.1.0/src/core/skills/output_sanitizer.py +14 -0
  78. coreason_workspace_env-2.1.0/src/core/tracing/__init__.py +6 -0
  79. coreason_workspace_env-2.1.0/src/core/tracing/callbacks.py +143 -0
  80. coreason_workspace_env-2.1.0/src/core/tracing/config.py +24 -0
  81. coreason_workspace_env-2.1.0/src/core/tracing/langfuse_bridge.py +168 -0
  82. coreason_workspace_env-2.1.0/src/core/vfs/crdt_sync.py +51 -0
  83. coreason_workspace_env-2.1.0/src/core/vfs/git_backend.py +81 -0
  84. coreason_workspace_env-2.1.0/src/core/vfs/terminal_tty.py +49 -0
  85. coreason_workspace_env-2.1.0/src/core/ws_backplane.py +66 -0
  86. coreason_workspace_env-2.1.0/src/main.py +107 -0
  87. coreason_workspace_env-2.1.0/src/mcp/__init__.py +1 -0
  88. coreason_workspace_env-2.1.0/src/mcp/memory_server/__init__.py +1 -0
  89. coreason_workspace_env-2.1.0/src/mcp/memory_server/server.py +155 -0
  90. coreason_workspace_env-2.1.0/src/mcp/server.py +233 -0
  91. coreason_workspace_env-2.1.0/src/sdk/__init__.py +13 -0
  92. coreason_workspace_env-2.1.0/src/sdk/client.py +170 -0
  93. coreason_workspace_env-2.1.0/src/workers/keda_worker.py +45 -0
  94. coreason_workspace_env-2.1.0/tests/test_core.py +44 -0
  95. coreason_workspace_env-2.1.0/tests/test_envelope_fsm.py +23 -0
  96. coreason_workspace_env-2.1.0/tests/test_epistemic_graph.py +6 -0
  97. coreason_workspace_env-2.1.0/tests/test_framework.py +73 -0
  98. coreason_workspace_env-2.1.0/tests/test_knowledge_management.py +45 -0
  99. coreason_workspace_env-2.1.0/tests/test_legacy_modernization.py +82 -0
  100. coreason_workspace_env-2.1.0/tests/test_mcp.py +32 -0
  101. coreason_workspace_env-2.1.0/tests/test_parity.py +251 -0
  102. coreason_workspace_env-2.1.0/tests/test_security.py +75 -0
  103. coreason_workspace_env-2.1.0/tests/test_services.py +207 -0
  104. coreason_workspace_env-2.1.0/tests/test_skill_loader.py +194 -0
  105. coreason_workspace_env-2.1.0/tests/test_tracing.py +144 -0
  106. coreason_workspace_env-2.1.0/tests/test_vfs.py +39 -0
@@ -0,0 +1,57 @@
1
+ # The Prosperity Public License 3.0.0
2
+
3
+ Contributor: CoReason, Inc.
4
+
5
+ Source Code: https://github.com/CoReason-AI/coreason-workspace-env
6
+
7
+ ## Purpose
8
+
9
+ This license allows you to use and share this software for noncommercial purposes for free and to try this software for commercial purposes for thirty days.
10
+
11
+ ## Agreement
12
+
13
+ In order to receive this license, you have to agree to its rules. Those rules are both obligations under that agreement and conditions to your license. Don't do anything with this software that triggers a rule you can't or won't follow.
14
+
15
+ ## Notices
16
+
17
+ Make sure everyone who gets a copy of any part of this software from you, with or without changes, also gets the text of this license and the contributor and source code lines above.
18
+
19
+ ## Commercial Trial
20
+
21
+ Limit your use of this software for commercial purposes to a thirty-day trial period. If you use this software for work, your company gets one trial period for all personnel, not one trial per person.
22
+
23
+ ## Contributions Back
24
+
25
+ Developing feedback, changes, or additions that you contribute back to the contributor on the terms of a standardized public software license such as [the Blue Oak Model License 1.0.0](https://blueoakcouncil.org/license/1.0.0), [the Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0.html), [the MIT license](https://spdx.org/licenses/MIT.html), or [the two-clause BSD license](https://spdx.org/licenses/BSD-2-Clause.html) doesn't count as use for a commercial purpose.
26
+
27
+ ## Personal Uses
28
+
29
+ Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, doesn't count as use for a commercial purpose.
30
+
31
+ ## Noncommercial Organizations
32
+
33
+ Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution doesn't count as use for a commercial purpose regardless of the source of funding or obligations resulting from the funding.
34
+
35
+ ## Defense
36
+
37
+ Don't make any legal claim against anyone accusing this software, with or without changes, alone or with other technology, of infringing any patent.
38
+
39
+ ## Copyright
40
+
41
+ The contributor licenses you to do everything with this software that would otherwise infringe their copyright in it.
42
+
43
+ ## Patent
44
+
45
+ The contributor licenses you to do everything with this software that would otherwise infringe any patents they can license or become able to license.
46
+
47
+ ## Reliability
48
+
49
+ The contributor can't revoke this license.
50
+
51
+ ## Excuse
52
+
53
+ You're excused for unknowingly breaking [Notices](#notices) if you take all practical steps to comply within thirty days of learning you broke the rule.
54
+
55
+ ## No Liability
56
+
57
+ ***As far as the law allows, this software comes as is, without any warranty or condition, and the contributor won't be liable to anyone for any damages related to this software or this license, under any kind of legal claim.***
@@ -0,0 +1,8 @@
1
+ Copyright (c) 2026 CoReason, Inc.. All Rights Reserved
2
+
3
+ This software is licensed under the Prosperity Public License 3.0.0.
4
+ The issuer of the Prosperity Public License for this software is CoReason, Inc..
5
+
6
+ For a commercial version of this software, please contact us at gowtham.rao@coreason.ai.
7
+
8
+ GENESIS COMMIT: Initializing repository coreason_gitops per CoReason Clean Room Protocol PIP-001. This repository is established as an independently created De Novo development environment, commencing on 2026-06-11. I, Akshaya M certify that this date is subsequent to my individual Temporal Firewall Date.
@@ -0,0 +1,24 @@
1
+ Metadata-Version: 2.4
2
+ Name: coreason-workspace-env
3
+ Version: 2.1.0
4
+ Summary: Scalable, Async, Multi-Tenant LangGraph Platform
5
+ Author-email: "Gowtham A Rao, MD, PhD" <gowtham.rao@coreason.ai>
6
+ License: Prosperity 3.0
7
+ Classifier: Programming Language :: Python :: 3.14
8
+ Classifier: Operating System :: OS Independent
9
+ Requires-Python: >=3.14
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE.txt
12
+ License-File: NOTICE.txt
13
+ Requires-Dist: fastapi>=0.100
14
+ Requires-Dist: uvicorn>=0.20
15
+ Requires-Dist: asyncpg>=0.29.0
16
+ Requires-Dist: redis>=5.0
17
+ Requires-Dist: pydantic-settings>=2.0
18
+ Requires-Dist: langgraph>=0.0.10
19
+ Requires-Dist: alembic>=1.13.0
20
+ Requires-Dist: psycopg2-binary>=2.9.0
21
+ Requires-Dist: coreason-manifest>=0.98.0
22
+ Dynamic: license-file
23
+
24
+ # coreason-workspace-env
@@ -0,0 +1 @@
1
+ # coreason-workspace-env
@@ -0,0 +1,24 @@
1
+ Metadata-Version: 2.4
2
+ Name: coreason-workspace-env
3
+ Version: 2.1.0
4
+ Summary: Scalable, Async, Multi-Tenant LangGraph Platform
5
+ Author-email: "Gowtham A Rao, MD, PhD" <gowtham.rao@coreason.ai>
6
+ License: Prosperity 3.0
7
+ Classifier: Programming Language :: Python :: 3.14
8
+ Classifier: Operating System :: OS Independent
9
+ Requires-Python: >=3.14
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE.txt
12
+ License-File: NOTICE.txt
13
+ Requires-Dist: fastapi>=0.100
14
+ Requires-Dist: uvicorn>=0.20
15
+ Requires-Dist: asyncpg>=0.29.0
16
+ Requires-Dist: redis>=5.0
17
+ Requires-Dist: pydantic-settings>=2.0
18
+ Requires-Dist: langgraph>=0.0.10
19
+ Requires-Dist: alembic>=1.13.0
20
+ Requires-Dist: psycopg2-binary>=2.9.0
21
+ Requires-Dist: coreason-manifest>=0.98.0
22
+ Dynamic: license-file
23
+
24
+ # coreason-workspace-env
@@ -0,0 +1,104 @@
1
+ LICENSE.txt
2
+ NOTICE.txt
3
+ README.md
4
+ pyproject.toml
5
+ coreason_workspace_env.egg-info/PKG-INFO
6
+ coreason_workspace_env.egg-info/SOURCES.txt
7
+ coreason_workspace_env.egg-info/dependency_links.txt
8
+ coreason_workspace_env.egg-info/entry_points.txt
9
+ coreason_workspace_env.egg-info/requires.txt
10
+ coreason_workspace_env.egg-info/top_level.txt
11
+ src/main.py
12
+ src/agents/agent_pm/orchestrator.py
13
+ src/agents/agent_pm/tools/__init__.py
14
+ src/agents/agent_validator/orchestrator.py
15
+ src/agents/backend_pm/orchestrator.py
16
+ src/agents/backend_pm/tools/__init__.py
17
+ src/agents/context_compressor/orchestrator.py
18
+ src/agents/database_architect/orchestrator.py
19
+ src/agents/database_architect/tools/__init__.py
20
+ src/agents/factory_ceo/orchestrator.py
21
+ src/agents/factory_ceo/tools/__init__.py
22
+ src/agents/fastapi_coder/orchestrator.py
23
+ src/agents/fastapi_coder/tools/__init__.py
24
+ src/agents/frontend_pm/orchestrator.py
25
+ src/agents/frontend_pm/tools/__init__.py
26
+ src/agents/knowledge_archivist/__init__.py
27
+ src/agents/knowledge_consultant/__init__.py
28
+ src/agents/legacy_deconstructor/__init__.py
29
+ src/agents/librarian_pm/__init__.py
30
+ src/agents/output_sanitizer/orchestrator.py
31
+ src/agents/prompt_engineer/orchestrator.py
32
+ src/agents/prompt_engineer/tools/__init__.py
33
+ src/agents/react_coder/orchestrator.py
34
+ src/agents/react_coder/tools/__init__.py
35
+ src/agents/ui_designer/orchestrator.py
36
+ src/agents/ui_designer/tools/__init__.py
37
+ src/agents/yaml_compiler/orchestrator.py
38
+ src/agents/yaml_compiler/tools/fs_tools.py
39
+ src/api/router.py
40
+ src/api/endpoints/agents.py
41
+ src/api/endpoints/docs.py
42
+ src/api/endpoints/mcp.py
43
+ src/api/endpoints/projects.py
44
+ src/api/streaming/__init__.py
45
+ src/api/streaming/agent_progress.py
46
+ src/api/streaming/crdt.py
47
+ src/api/streaming/state_sync.py
48
+ src/api/streaming/tty.py
49
+ src/cli/main.py
50
+ src/core/config.py
51
+ src/core/db.py
52
+ src/core/fsm_decoder.py
53
+ src/core/mcp_client.py
54
+ src/core/mcp_server.py
55
+ src/core/queue.py
56
+ src/core/skill_loader.py
57
+ src/core/skill_registry_schema.py
58
+ src/core/ws_backplane.py
59
+ src/core/schemas/__init__.py
60
+ src/core/schemas/epistemic_firewall.py
61
+ src/core/schemas/knowledge_receipt.py
62
+ src/core/schemas/legacy_ir.py
63
+ src/core/security/audit.py
64
+ src/core/security/auth.py
65
+ src/core/security/encryption.py
66
+ src/core/security/proxy_delegation.py
67
+ src/core/security/vault.py
68
+ src/core/services/__init__.py
69
+ src/core/services/agent_service.py
70
+ src/core/services/docs_service.py
71
+ src/core/services/health_service.py
72
+ src/core/services/mcp_service.py
73
+ src/core/services/project_service.py
74
+ src/core/skills/__init__.py
75
+ src/core/skills/context_compressor.py
76
+ src/core/skills/escalate_to_human.py
77
+ src/core/skills/output_sanitizer.py
78
+ src/core/tracing/__init__.py
79
+ src/core/tracing/callbacks.py
80
+ src/core/tracing/config.py
81
+ src/core/tracing/langfuse_bridge.py
82
+ src/core/vfs/crdt_sync.py
83
+ src/core/vfs/git_backend.py
84
+ src/core/vfs/terminal_tty.py
85
+ src/mcp/__init__.py
86
+ src/mcp/server.py
87
+ src/mcp/memory_server/__init__.py
88
+ src/mcp/memory_server/server.py
89
+ src/sdk/__init__.py
90
+ src/sdk/client.py
91
+ src/workers/keda_worker.py
92
+ tests/test_core.py
93
+ tests/test_envelope_fsm.py
94
+ tests/test_epistemic_graph.py
95
+ tests/test_framework.py
96
+ tests/test_knowledge_management.py
97
+ tests/test_legacy_modernization.py
98
+ tests/test_mcp.py
99
+ tests/test_parity.py
100
+ tests/test_security.py
101
+ tests/test_services.py
102
+ tests/test_skill_loader.py
103
+ tests/test_tracing.py
104
+ tests/test_vfs.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ coreason = src.cli.main:cli_entry
@@ -0,0 +1,9 @@
1
+ fastapi>=0.100
2
+ uvicorn>=0.20
3
+ asyncpg>=0.29.0
4
+ redis>=5.0
5
+ pydantic-settings>=2.0
6
+ langgraph>=0.0.10
7
+ alembic>=1.13.0
8
+ psycopg2-binary>=2.9.0
9
+ coreason-manifest>=0.98.0
@@ -0,0 +1,36 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "coreason-workspace-env"
7
+ version = "2.1.0"
8
+ description = "Scalable, Async, Multi-Tenant LangGraph Platform"
9
+ authors = [
10
+ { name="Gowtham A Rao, MD, PhD", email="gowtham.rao@coreason.ai" }
11
+ ]
12
+ readme = "README.md"
13
+ license = { text = "Prosperity 3.0" }
14
+ requires-python = ">=3.14"
15
+ classifiers = [
16
+ "Programming Language :: Python :: 3.14",
17
+ "Operating System :: OS Independent",
18
+ ]
19
+ dependencies = [
20
+ "fastapi>=0.100",
21
+ "uvicorn>=0.20",
22
+ "asyncpg>=0.29.0",
23
+ "redis>=5.0",
24
+ "pydantic-settings>=2.0",
25
+ "langgraph>=0.0.10",
26
+ "alembic>=1.13.0",
27
+ "psycopg2-binary>=2.9.0",
28
+ "coreason-manifest>=0.98.0"
29
+ ]
30
+
31
+ [project.scripts]
32
+ coreason = "src.cli.main:cli_entry"
33
+
34
+ [tool.setuptools.packages.find]
35
+ where = ["."]
36
+ include = ["src*"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,9 @@
1
+ from deepagents import DeepAgent
2
+
3
+ class AgentPmAgent(DeepAgent):
4
+ """
5
+ Placeholder orchestrator stub for agent_pm.
6
+ LangGraph execution logic will be implemented here.
7
+ """
8
+ def __init__(self, **kwargs):
9
+ super().__init__(**kwargs)
@@ -0,0 +1 @@
1
+ # Placeholder for @tool skills
@@ -0,0 +1,11 @@
1
+ from deepagents import DeepAgent
2
+
3
+
4
+ class AgentValidatorAgent(DeepAgent):
5
+ """
6
+ Unified deterministic Checker for the CoReason Agent Factory.
7
+ Validates all factory artifacts against formal validation standards.
8
+ Operates as a post-build gate in the Maker-Checker-Approver pipeline.
9
+ """
10
+ def __init__(self, **kwargs):
11
+ super().__init__(**kwargs)
@@ -0,0 +1,9 @@
1
+ from deepagents import DeepAgent
2
+
3
+ class BackendPmAgent(DeepAgent):
4
+ """
5
+ Placeholder orchestrator stub for backend_pm.
6
+ LangGraph execution logic will be implemented here.
7
+ """
8
+ def __init__(self, **kwargs):
9
+ super().__init__(**kwargs)
@@ -0,0 +1 @@
1
+ # Placeholder for @tool skills
@@ -0,0 +1,48 @@
1
+ import os
2
+ import yaml
3
+ import logging
4
+ from typing import Dict, Any, List
5
+ from langchain_openai import ChatOpenAI
6
+
7
+ logger = logging.getLogger(__name__)
8
+
9
+ class ContextCompressorAgent:
10
+ """
11
+ Native DeepAgent Harness for the Context Compressor Sub-Agent.
12
+ """
13
+ def __init__(self, model_override: str = None):
14
+ yaml_path = os.path.join(os.path.dirname(__file__), "agent.yaml")
15
+ with open(yaml_path, "r", encoding="utf-8") as f:
16
+ self.agent_spec = yaml.safe_load(f)
17
+
18
+ self.llm = ChatOpenAI(
19
+ model=model_override or "nvidia/nemotron-3-nano-30b-a3b:free",
20
+ api_key="sovereign-key-placeholder",
21
+ temperature=0.1 # Very low temperature for strict factual extraction
22
+ )
23
+
24
+ self.tools = []
25
+ logger.info(f"Initialized {self.agent_spec.get('name')}")
26
+
27
+ def execute(self, raw_payload: str, compression_goal: str, session_id: str) -> str:
28
+ """
29
+ Executes the DeepAgent compression.
30
+ """
31
+ try:
32
+ from deepagents import create_deep_agent
33
+
34
+ graph = create_deep_agent(
35
+ model=self.llm,
36
+ tools=self.tools,
37
+ system_prompt=self.agent_spec.get("system_prompt")
38
+ )
39
+
40
+ config = {"configurable": {"thread_id": session_id}}
41
+ result = graph.invoke(
42
+ {"messages": [("user", f"Goal: {compression_goal}\n\nPayload:\n{raw_payload}")]},
43
+ config=config
44
+ )
45
+ return result['messages'][-1].content
46
+ except ImportError:
47
+ logger.warning("deepagents package missing, acting as mock execution.")
48
+ return f"[COMPRESSED DATA for '{compression_goal}']: ... (High signal data extracted) ..."
@@ -0,0 +1,9 @@
1
+ from deepagents import DeepAgent
2
+
3
+ class DatabaseArchitectAgent(DeepAgent):
4
+ """
5
+ Placeholder orchestrator stub for database_architect.
6
+ LangGraph execution logic will be implemented here.
7
+ """
8
+ def __init__(self, **kwargs):
9
+ super().__init__(**kwargs)
@@ -0,0 +1 @@
1
+ # Placeholder for @tool skills
@@ -0,0 +1,56 @@
1
+ from typing import Any
2
+ import uuid
3
+ from deepagents import DeepAgent
4
+
5
+ from coreason_manifest.spec.ontology import (
6
+ EpistemicQuarantineSnapshot,
7
+ EpistemicProxyState
8
+ )
9
+ from src.core.schemas.epistemic_firewall import LibrarianRoutingState
10
+
11
+
12
+ class FactoryCeoAgent(DeepAgent):
13
+ """
14
+ Orchestrator for factory_ceo.
15
+ """
16
+ def __init__(self, **kwargs):
17
+ super().__init__(**kwargs)
18
+
19
+ from src.core.db import get_db_pool
20
+
21
+ async def epistemic_interceptor_node(state: dict[str, Any]) -> dict[str, Any]:
22
+ """
23
+ LangGraph Node that physically intercepts large raw human transcripts
24
+ BEFORE they enter the factory_ceo's context window.
25
+ """
26
+ raw_payload = state.get("raw_transcript")
27
+
28
+ if raw_payload:
29
+ snapshot = EpistemicQuarantineSnapshot(
30
+ snapshot_id=str(uuid.uuid7()),
31
+ raw_payload=raw_payload
32
+ )
33
+
34
+ # Persist to WORM Postgres table for enterprise statelessness using global pool
35
+ try:
36
+ pool = await get_db_pool()
37
+ async with pool.acquire() as conn:
38
+ await conn.execute(
39
+ "INSERT INTO epistemic_quarantine_snapshots (snapshot_id, raw_payload) VALUES ($1, $2) ON CONFLICT DO NOTHING",
40
+ snapshot.snapshot_id, snapshot.raw_payload
41
+ )
42
+ except Exception as e:
43
+ # WORM persistence is mandatory for security compliance. Fail closed.
44
+ raise RuntimeError(f"Epistemic Interceptor failed to quarantine transcript: {e}")
45
+
46
+ proxy = EpistemicProxyState(
47
+ proxy_cid=snapshot.snapshot_id,
48
+ structural_type="HumanTranscript"
49
+ )
50
+
51
+ return {
52
+ "raw_transcript": None,
53
+ "epistemic_proxy": proxy
54
+ }
55
+
56
+ return {}
@@ -0,0 +1 @@
1
+ # Placeholder for @tool skills
@@ -0,0 +1,9 @@
1
+ from deepagents import DeepAgent
2
+
3
+ class FastapiCoderAgent(DeepAgent):
4
+ """
5
+ Placeholder orchestrator stub for fastapi_coder.
6
+ LangGraph execution logic will be implemented here.
7
+ """
8
+ def __init__(self, **kwargs):
9
+ super().__init__(**kwargs)
@@ -0,0 +1 @@
1
+ # Placeholder for @tool skills
@@ -0,0 +1,9 @@
1
+ from deepagents import DeepAgent
2
+
3
+ class FrontendPmAgent(DeepAgent):
4
+ """
5
+ Placeholder orchestrator stub for frontend_pm.
6
+ LangGraph execution logic will be implemented here.
7
+ """
8
+ def __init__(self, **kwargs):
9
+ super().__init__(**kwargs)
@@ -0,0 +1 @@
1
+ # Placeholder for @tool skills
@@ -0,0 +1,48 @@
1
+ import os
2
+ import yaml
3
+ import logging
4
+ from typing import Dict, Any, List
5
+ from langchain_openai import ChatOpenAI
6
+
7
+ logger = logging.getLogger(__name__)
8
+
9
+ class OutputSanitizerAgent:
10
+ """
11
+ Native DeepAgent Harness for the Output Sanitizer Sub-Agent.
12
+ """
13
+ def __init__(self, model_override: str = None):
14
+ yaml_path = os.path.join(os.path.dirname(__file__), "agent.yaml")
15
+ with open(yaml_path, "r", encoding="utf-8") as f:
16
+ self.agent_spec = yaml.safe_load(f)
17
+
18
+ self.llm = ChatOpenAI(
19
+ model=model_override or "nvidia/nemotron-3-nano-30b-a3b:free",
20
+ api_key="sovereign-key-placeholder",
21
+ temperature=0.0 # Zero temperature for strict deterministic formatting
22
+ )
23
+
24
+ self.tools = []
25
+ logger.info(f"Initialized {self.agent_spec.get('name')}")
26
+
27
+ def execute(self, raw_output: str, session_id: str) -> str:
28
+ """
29
+ Executes the DeepAgent sanitization.
30
+ """
31
+ try:
32
+ from deepagents import create_deep_agent
33
+
34
+ graph = create_deep_agent(
35
+ model=self.llm,
36
+ tools=self.tools,
37
+ system_prompt=self.agent_spec.get("system_prompt")
38
+ )
39
+
40
+ config = {"configurable": {"thread_id": session_id}}
41
+ result = graph.invoke(
42
+ {"messages": [("user", f"Sanitize and format this output:\n\n{raw_output}")]},
43
+ config=config
44
+ )
45
+ return result['messages'][-1].content
46
+ except ImportError:
47
+ logger.warning("deepagents package missing, acting as mock execution.")
48
+ return "| Key | Value |\n|---|---|\n| Status | Cleaned |"
@@ -0,0 +1,9 @@
1
+ from deepagents import DeepAgent
2
+
3
+ class PromptEngineerAgent(DeepAgent):
4
+ """
5
+ Placeholder orchestrator stub for prompt_engineer.
6
+ LangGraph execution logic will be implemented here.
7
+ """
8
+ def __init__(self, **kwargs):
9
+ super().__init__(**kwargs)
@@ -0,0 +1 @@
1
+ # Placeholder for @tool skills
@@ -0,0 +1,9 @@
1
+ from deepagents import DeepAgent
2
+
3
+ class ReactCoderAgent(DeepAgent):
4
+ """
5
+ Placeholder orchestrator stub for react_coder.
6
+ LangGraph execution logic will be implemented here.
7
+ """
8
+ def __init__(self, **kwargs):
9
+ super().__init__(**kwargs)
@@ -0,0 +1 @@
1
+ # Placeholder for @tool skills
@@ -0,0 +1,9 @@
1
+ from deepagents import DeepAgent
2
+
3
+ class UiDesignerAgent(DeepAgent):
4
+ """
5
+ Placeholder orchestrator stub for ui_designer.
6
+ LangGraph execution logic will be implemented here.
7
+ """
8
+ def __init__(self, **kwargs):
9
+ super().__init__(**kwargs)
@@ -0,0 +1 @@
1
+ # Placeholder for @tool skills
@@ -0,0 +1,52 @@
1
+ import os
2
+ import yaml
3
+ import logging
4
+ from typing import Dict, Any, List
5
+ from langchain_openai import ChatOpenAI
6
+ from .tools.fs_tools import local_fs_writer, local_fs_reader
7
+
8
+ logger = logging.getLogger(__name__)
9
+
10
+ class YAMLCompilerAgent:
11
+ """
12
+ Native DeepAgent Harness for the deterministic YAML Compiler.
13
+ Accepts the fully saturated context and scaffolds the project files.
14
+ """
15
+ def __init__(self, model_override: str = None):
16
+ # Updated to point to the encapsulated agent.yaml
17
+ yaml_path = os.path.join(os.path.dirname(__file__), "agent.yaml")
18
+ with open(yaml_path, "r", encoding="utf-8") as f:
19
+ self.agent_spec = yaml.safe_load(f)
20
+
21
+ self.llm = ChatOpenAI(
22
+ model=model_override or "nvidia/nemotron-3-nano-30b-a3b:free",
23
+ api_key="sovereign-key-placeholder",
24
+ temperature=0.0
25
+ )
26
+
27
+ # Bound to encapsulated tools
28
+ self.tools = [local_fs_writer, local_fs_reader]
29
+ logger.info(f"Initialized {self.agent_spec.get('name')}")
30
+
31
+ def execute(self, saturated_context: str, session_id: str) -> str:
32
+ """
33
+ Executes the DeepAgent compilation dynamically via LangGraph.
34
+ """
35
+ try:
36
+ from deepagents import create_deep_agent
37
+
38
+ graph = create_deep_agent(
39
+ model=self.llm,
40
+ tools=self.tools,
41
+ system_prompt=self.agent_spec.get("system_prompt")
42
+ )
43
+
44
+ config = {"configurable": {"thread_id": session_id}}
45
+ result = graph.invoke(
46
+ {"messages": [("user", f"Compile these requirements: {saturated_context}")]},
47
+ config=config
48
+ )
49
+ return result['messages'][-1].content
50
+ except ImportError:
51
+ logger.warning("deepagents package missing, acting as mock execution.")
52
+ return "MOCK_SUCCESS: Compiled project.yaml and orchestrator_agent.yaml"