opensquad 0.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 (51) hide show
  1. opensquad-0.1.0/LICENSE +177 -0
  2. opensquad-0.1.0/PKG-INFO +82 -0
  3. opensquad-0.1.0/opensquad/__init__.py +32 -0
  4. opensquad-0.1.0/opensquad/bridge.py +673 -0
  5. opensquad-0.1.0/opensquad/chat_api.py +611 -0
  6. opensquad-0.1.0/opensquad/claude_api.py +555 -0
  7. opensquad-0.1.0/opensquad/context_base.py +278 -0
  8. opensquad-0.1.0/opensquad/core/__init__.py +0 -0
  9. opensquad-0.1.0/opensquad/core/experience.py +82 -0
  10. opensquad-0.1.0/opensquad/events.py +71 -0
  11. opensquad-0.1.0/opensquad/gateway_adapter.py +212 -0
  12. opensquad-0.1.0/opensquad/input_hub.py +328 -0
  13. opensquad-0.1.0/opensquad/log_setup.py +186 -0
  14. opensquad-0.1.0/opensquad/memory_manager.py +419 -0
  15. opensquad-0.1.0/opensquad/message_queue.py +177 -0
  16. opensquad-0.1.0/opensquad/message_router.py +240 -0
  17. opensquad-0.1.0/opensquad/parser.py +54 -0
  18. opensquad-0.1.0/opensquad/plugin_api.py +725 -0
  19. opensquad-0.1.0/opensquad/registry.py +149 -0
  20. opensquad-0.1.0/opensquad/runner.py +1665 -0
  21. opensquad-0.1.0/opensquad/sdk.py +196 -0
  22. opensquad-0.1.0/opensquad/session_manager.py +464 -0
  23. opensquad-0.1.0/opensquad/sessions/__init__.py +0 -0
  24. opensquad-0.1.0/opensquad/skill_loader.py +565 -0
  25. opensquad-0.1.0/opensquad/sleep_controller.py +165 -0
  26. opensquad-0.1.0/opensquad/state_manager.py +186 -0
  27. opensquad-0.1.0/opensquad/task.py +16 -0
  28. opensquad-0.1.0/opensquad/task_logger.py +224 -0
  29. opensquad-0.1.0/opensquad/tool.py +13 -0
  30. opensquad-0.1.0/opensquad/tools/__init__.py +24 -0
  31. opensquad-0.1.0/opensquad/tools/agent_setup.py +194 -0
  32. opensquad-0.1.0/opensquad/tools/api_process.py +203 -0
  33. opensquad-0.1.0/opensquad/tools/collaboration.py +373 -0
  34. opensquad-0.1.0/opensquad/tools/filesystem.py +437 -0
  35. opensquad-0.1.0/opensquad/tools/im.py +233 -0
  36. opensquad-0.1.0/opensquad/tools/long_memory.py +145 -0
  37. opensquad-0.1.0/opensquad/tools/mcp_adapter.py +677 -0
  38. opensquad-0.1.0/opensquad/tools/memory.py +36 -0
  39. opensquad-0.1.0/opensquad/tools/system.py +307 -0
  40. opensquad-0.1.0/opensquad/tools/tool.py +13 -0
  41. opensquad-0.1.0/opensquad/utils/__init__.py +16 -0
  42. opensquad-0.1.0/opensquad/utils/archive_util.py +100 -0
  43. opensquad-0.1.0/opensquad/utils/media_util.py +44 -0
  44. opensquad-0.1.0/opensquad/xml_parser.py +248 -0
  45. opensquad-0.1.0/opensquad.egg-info/PKG-INFO +82 -0
  46. opensquad-0.1.0/opensquad.egg-info/SOURCES.txt +49 -0
  47. opensquad-0.1.0/opensquad.egg-info/dependency_links.txt +1 -0
  48. opensquad-0.1.0/opensquad.egg-info/top_level.txt +1 -0
  49. opensquad-0.1.0/pyproject.toml +30 -0
  50. opensquad-0.1.0/readme.md +64 -0
  51. opensquad-0.1.0/setup.cfg +4 -0
@@ -0,0 +1,177 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship made available under
36
+ the License, as indicated by a copyright notice that is included in
37
+ or attached to the work (an example is provided in the Appendix below).
38
+
39
+ "Derivative Works" shall mean any work, whether in Source or Object
40
+ form, that is based on (or derived from) the Work and for which the
41
+ editorial revisions, annotations, elaborations, or other modifications
42
+ represent, as a whole, an original work of authorship. For the purposes
43
+ of this License, Derivative Works shall not include works that remain
44
+ separable from, or merely link (or bind by name) to the interfaces of,
45
+ the Work and Derivative Works thereof.
46
+
47
+ "Contribution" shall mean, as submitted to the Licensor for inclusion
48
+ in the Work by the copyright owner or entity authorized by the copyright
49
+ owner, any modification, additions, or any other submission.
50
+
51
+ "Contributor" shall mean Licensor and any Legal Entity on behalf of
52
+ whom a Contribution has been received by the Licensor and included
53
+ within the Work.
54
+
55
+ 2. Grant of Copyright License. Subject to the terms and conditions of
56
+ this License, each Contributor hereby grants to You a perpetual,
57
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
58
+ copyright license to reproduce, prepare Derivative Works of,
59
+ publicly display, publicly perform, sublicense, and distribute the
60
+ Work and such Derivative Works in Source or Object form.
61
+
62
+ 3. Grant of Patent License. Subject to the terms and conditions of
63
+ this License, each Contributor hereby grants to You a perpetual,
64
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
65
+ (except as stated in this section) patent license to make, have made,
66
+ use, offer to sell, sell, import, and otherwise transfer the Work,
67
+ where such license applies only to those patent claims licensable
68
+ by such Contributor that are necessarily infringed by their
69
+ Contribution(s) alone or by the combination of their Contribution(s)
70
+ with the Work to which such Contribution(s) was submitted. If You
71
+ institute patent litigation against any entity (including a cross-claim
72
+ or counterclaim in a lawsuit) alleging that the Work or any such
73
+ Contribution constitutes direct or contributory patent infringement,
74
+ then any patent licenses granted to You under this License for that
75
+ Work shall terminate as of the date such litigation is filed.
76
+
77
+ 4. Redistribution. You may reproduce and distribute copies of the
78
+ Work or Derivative Works thereof in any medium, with or without
79
+ modifications, and in Source or Object form, provided that You
80
+ meet the following conditions:
81
+
82
+ (a) You must give any other recipients of the Work or Derivative
83
+ Works a copy of this License; and
84
+
85
+ (b) You must cause any modified files to carry prominent notices
86
+ stating that You changed the files; and
87
+
88
+ (c) You must retain, in the Source form of any Derivative Works
89
+ that You distribute, all copyright, patent, trademark, and
90
+ attribution notices from the Source form of the Work,
91
+ excluding those notices that do not pertain to any part of
92
+ the Derivative Works; and
93
+
94
+ (d) If the Work includes a "NOTICE" text file as part of its
95
+ distribution, You must include a readable copy of the
96
+ attribution notices contained within such NOTICE file, in
97
+ at least one of the following places: within a NOTICE text
98
+ file distributed as part of the Derivative Works; within
99
+ the Source form or documentation, if provided along with the
100
+ Derivative Works; or, within a display generated by the
101
+ Derivative Works, if and wherever such third-party notices
102
+ normally appear. The contents of the NOTICE file are for
103
+ informational purposes only and do not modify the License.
104
+ You may add Your own attribution notices within Derivative
105
+ Works that You distribute, alongside or in addition to the
106
+ NOTICE text from the Work, provided that such additional
107
+ attribution notices cannot be construed as modifying the License.
108
+
109
+ You may add Your own license statement for Your modifications and
110
+ may provide additional grant of rights to use, copy, modify, merge,
111
+ publish, distribute, sublicense, and/or sell copies of the Work,
112
+ and to permit persons to whom the Work is furnished to do so,
113
+ subject to the following conditions: the above copyright notice and
114
+ this permission notice shall be included in all copies or substantial
115
+ portions of the Work.
116
+
117
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
118
+ any Contribution intentionally submitted for inclusion in the Work
119
+ by You to the Licensor shall be under the terms and conditions of
120
+ this License, without any additional terms or conditions.
121
+ Notwithstanding the above, nothing herein shall supersede or modify
122
+ the terms of any separate license agreement you may have executed
123
+ with Licensor regarding such Contributions.
124
+
125
+ 6. Trademarks. This License does not grant permission to use the trade
126
+ names, trademarks, service marks, or product names of the Licensor,
127
+ except as required for reasonable and customary use in describing the
128
+ origin of the Work and reproducing the content of the NOTICE file.
129
+
130
+ 7. Disclaimer of Warranty. Unless required by applicable law or
131
+ agreed to in writing, Licensor provides the Work (and each
132
+ Contributor provides its Contributions) on an "AS IS" BASIS,
133
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
134
+ implied, including, without limitation, any warranties or conditions
135
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
136
+ PARTICULAR PURPOSE. You are solely responsible for determining the
137
+ appropriateness of using or reproducing the Work and assume any
138
+ risks associated with Your exercise of permissions under this License.
139
+
140
+ 8. Limitation of Liability. In no event and under no legal theory,
141
+ whether in tort (including negligence), contract, or otherwise,
142
+ unless required by applicable law (such as deliberate and grossly
143
+ negligent acts) or agreed to in writing, shall any Contributor be
144
+ liable to You for damages, including any direct, indirect, special,
145
+ incidental, or exemplary damages of any character arising as a
146
+ result of this License or out of the use or inability to use the
147
+ Work (including but not limited to damages for loss of goodwill,
148
+ work stoppage, computer failure or malfunction, or all other
149
+ commercial damages or losses), even if such Contributor has been
150
+ advised of the possibility of such damages.
151
+
152
+ 9. Accepting Warranty or Additional Liability. While redistributing
153
+ the Work or Derivative Works thereof, You may choose to offer,
154
+ and charge a fee for, acceptance of support, warranty, indemnity,
155
+ or other liability obligations and/or rights consistent with this
156
+ License. However, in accepting such obligations, You may offer such
157
+ obligations only on Your own behalf and on Your sole responsibility,
158
+ not on behalf of any other Contributor, and only if You agree to
159
+ indemnify, defend, and hold each Contributor harmless for any
160
+ liability incurred by, or claims asserted against, such Contributor
161
+ by reason of your accepting any such warranty or additional liability.
162
+
163
+ END OF TERMS AND CONDITIONS
164
+
165
+ Copyright 2026 OpenSquad Contributors
166
+
167
+ Licensed under the Apache License, Version 2.0 (the "License");
168
+ you may not use this file except in compliance with the License.
169
+ You may obtain a copy of the License at
170
+
171
+ http://www.apache.org/licenses/LICENSE-2.0
172
+
173
+ Unless required by applicable law or agreed to in writing, software
174
+ distributed under the License is distributed on an "AS IS" BASIS,
175
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
176
+ See the License for the specific language governing permissions and
177
+ limitations under the License.
@@ -0,0 +1,82 @@
1
+ Metadata-Version: 2.4
2
+ Name: opensquad
3
+ Version: 0.1.0
4
+ Summary: OpenSquad - Local-first Multi-Agent Collaboration Framework (coming soon)
5
+ Author: OpenSquad Contributors
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/opensquad/opensquad
8
+ Project-URL: Repository, https://github.com/opensquad/opensquad
9
+ Keywords: ai,agents,multi-agent,llm,framework
10
+ Classifier: Development Status :: 1 - Planning
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
14
+ Requires-Python: >=3.9
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Dynamic: license-file
18
+
19
+ <div align="center">
20
+ <img src="docs/banner.svg" alt="OpenSquad" width="720" />
21
+ </div>
22
+
23
+ <br>
24
+
25
+ OpenSquad is a local-first multi-agent collaboration framework. Multiple autonomous agents (PM, Coder, QA, etc.) communicate via group chat and coordinate through Blueprint-driven workflows, with a shared file workspace for cross-agent visibility.
26
+
27
+ ---
28
+
29
+ ## Key Features
30
+
31
+ - **Blueprint-Driven Collaboration**: Structured workflow protocols define role responsibilities, phase transitions, and communication rules. See `blueprints/software_dev/BLUEPRINT.md`.
32
+ - **Task Board + Auto-Sync**: Each agent maintains a personal Task Board (injected into their prompt). Changes are automatically synced to `workspace/collab/{agent_id}_tasks.md` for PM visibility.
33
+ - **Plugin Architecture**: Decorator-based plugin system supporting tool plugins, lifecycle hooks, platform adapters (Telegram, Feishu), and web dashboards.
34
+ - **Dynamic Skills**: Agents can hot-load skill packs at runtime from `skills/` directories.
35
+ - **Multi-Channel Access**: Web UI (React + WebSocket), Telegram bot, Feishu bot, External HTTP API.
36
+ - **MCP Support**: Dynamic MCP server management — agents can add/remove MCP servers at runtime.
37
+
38
+ ---
39
+
40
+ ## Quick Start
41
+
42
+ ### Prerequisites
43
+ - Python 3.9+
44
+ - Node.js 18+ (for frontend)
45
+ - A compatible LLM API endpoint (GLM-4, DeepSeek, GPT-4, Claude, etc.)
46
+
47
+ ### Installation
48
+ ```bash
49
+ pip install -r requirements.txt
50
+ cd gateway/nexuschat-pro && npm install
51
+ ```
52
+
53
+ ### Configuration
54
+
55
+ Edit the system config file to set your LLM API keys, model selection, and service options. Each agent has its own config for independent model and tool assignments.
56
+
57
+ ### Start All Services
58
+ ```bash
59
+ scripts\start_all.bat
60
+ ```
61
+
62
+ ### Access
63
+ Open the Web UI in your browser after services are running. The URL is shown in your `system_config.json`.
64
+
65
+ ---
66
+
67
+ ## Documentation
68
+
69
+ | Document | Description |
70
+ |----------|-------------|
71
+ | [Architecture](docs/ARCHITECTURE.md) | System architecture, module responsibilities, data flow |
72
+ | [Collaboration](docs/COLLABORATION.md) | Multi-agent collaboration mechanism (Blueprint, TaskBoard, Auto-Sync) |
73
+ | [Plugin Development](docs/PLUGIN_DEVELOPMENT.md) | How to write plugins (tools, hooks, adapters) |
74
+ | [Agent Setup](docs/agent_setup.md) | Agent configuration and tag system |
75
+ | [Group Chat](docs/group_chat_agent.md) | Group chat integration guide |
76
+ | [MCP Guide](docs/MCP_DYNAMIC_SETUP.md) | Dynamic MCP server management |
77
+ | [Deployment](docs/multi_server_deployment.md) | Multi-server deployment guide |
78
+ | [Whisper](docs/WHISPER_GUIDE.md) | Speech-to-text service setup |
79
+
80
+ ---
81
+
82
+ *Powered by OpenSquad Core*
@@ -0,0 +1,32 @@
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ OpenSquad - Local-first Multi-Agent Collaboration Framework
4
+
5
+ https://github.com/opensquad/opensquad
6
+ """
7
+
8
+ __version__ = "0.1.0"
9
+ __author__ = "OpenSquad Contributors"
10
+
11
+ # Shared runtime context dict — updated by Runner each turn.
12
+ _runtime_ctx: dict = {}
13
+
14
+ try:
15
+ from .runner import AgentRunner
16
+ from .registry import ToolRegistry
17
+ from .events import bus
18
+ from .tools import system, filesystem, api_process, memory
19
+
20
+ __all__ = [
21
+ "__version__",
22
+ "AgentRunner",
23
+ "ToolRegistry",
24
+ "bus",
25
+ "system",
26
+ "filesystem",
27
+ "api_process",
28
+ "memory",
29
+ "_runtime_ctx",
30
+ ]
31
+ except ImportError:
32
+ __all__ = ["__version__", "__author__", "_runtime_ctx"]