ghoshell-moss 0.1.0a0__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.
- ghoshell_moss-0.1.0a0/LICENSE +200 -0
- ghoshell_moss-0.1.0a0/NOTICE +18 -0
- ghoshell_moss-0.1.0a0/PKG-INFO +159 -0
- ghoshell_moss-0.1.0a0/README.md +116 -0
- ghoshell_moss-0.1.0a0/pyproject.toml +84 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/README.md +7 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/__init__.py +15 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/channels/README.md +5 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/channels/__init__.py +1 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/channels/mac_channel.py +99 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/cli/README.md +5 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/cli/__init__.py +1 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/compatible/README.md +7 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/compatible/__init__.py +1 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/compatible/mcp_channel/__init__.py +3 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/compatible/mcp_channel/mcp_channel.py +468 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/compatible/mcp_channel/types.py +17 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/compatible/mcp_channel/utils.py +25 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/README.md +6 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/__init__.py +13 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/concepts/README.md +20 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/concepts/__init__.py +118 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/concepts/channel.py +813 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/concepts/command.py +981 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/concepts/errors.py +73 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/concepts/interpreter.py +365 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/concepts/shell.py +332 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/concepts/speech.py +548 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/concepts/states.py +216 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/concepts/topics.py +186 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/ctml/README.md +9 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/ctml/__init__.py +5 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/ctml/elements.py +480 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/ctml/interpreter.py +558 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/ctml/prompt.py +9 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/ctml/prompt_v1.md +174 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/ctml/token_parser.py +427 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/duplex/README.md +9 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/duplex/__init__.py +54 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/duplex/connection.py +57 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/duplex/protocol.py +244 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/duplex/provider.py +650 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/duplex/proxy.py +1046 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/duplex/thread_channel.py +180 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/helpers/README.md +3 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/helpers/__init__.py +1 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/helpers/asyncio_utils.py +215 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/helpers/func.py +166 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/helpers/result.py +104 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/helpers/stream.py +141 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/helpers/token_filters.py +48 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/py_channel.py +599 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/shell/README.md +3 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/shell/__init__.py +2 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/shell/channel_runtime.py +632 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/shell/main_channel.py +36 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/shell/shell_impl.py +329 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/core/shell/shell_runtime.py +431 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/message/README.md +13 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/message/__init__.py +4 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/message/abcd.py +592 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/message/adapters/__init__.py +1 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/message/adapters/openai_adapter.py +101 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/message/addtions.py +17 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/message/contents.py +149 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/message/deltas.py +32 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/message/utils.py +15 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/speech/README.md +9 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/speech/__init__.py +23 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/speech/mock.py +124 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/speech/player/__init__.py +1 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/speech/player/base_player.py +250 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/speech/player/pulseaudio_player.py +74 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/speech/player/pyaudio_player.py +71 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/speech/stream_tts_speech.py +183 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/speech/volcengine_tts/__init__.py +9 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/speech/volcengine_tts/protocol.py +552 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/speech/volcengine_tts/tts.py +728 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/transports/README.md +19 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/transports/__init__.py +1 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/transports/redis_channel/__init__.py +7 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/transports/redis_channel/redis_channel.py +228 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/transports/ws_channel/__init__.py +7 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/transports/ws_channel/ws_channel.py +209 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/transports/zmq_channel/__init__.py +2 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/transports/zmq_channel/zmq_channel.py +403 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss/transports/zmq_channel/zmq_hub.py +340 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/README.md +4 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/__init__.py +0 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/agent/README.md +5 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/agent/__init__.py +23 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/agent/chat/__init__.py +1 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/agent/chat/base.py +42 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/agent/chat/console.py +202 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/agent/chat/queue.py +191 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/agent/depends.py +12 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/agent/output.py +114 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/agent/simple_agent.py +367 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/channels/__init__.py +0 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/channels/docs_reader.py +9 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/channels/mermaid_draw.py +79 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/channels/mpv_video.py +195 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/channels/opencv_vision.py +307 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/channels/project_manager.py +9 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/channels/screen_capture.py +231 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/channels/slide_studio.py +302 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/channels/terminal.py +9 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/channels/web_bookmark.py +75 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/example_ws.py +148 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/gui/__init__.py +0 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/gui/image_viewer.py +86 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/gui/slide_studio_creator.py +260 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/prototypes/README.md +4 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/prototypes/__init__.py +1 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/prototypes/ros2_robot/README.md +11 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/prototypes/ros2_robot/__init__.py +1 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/prototypes/ros2_robot/abcd.py +578 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/prototypes/ros2_robot/joint_parsers.py +26 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/prototypes/ros2_robot/main_channel.py +237 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/prototypes/ros2_robot/manager.py +84 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/prototypes/ros2_robot/mocks.py +51 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/prototypes/ros2_robot/models.py +407 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/prototypes/ros2_robot/ros2_controller.py +203 -0
- ghoshell_moss-0.1.0a0/src/ghoshell_moss_contrib/prototypes/ros2_robot/ros2_node.py +209 -0
- ghoshell_moss-0.1.0a0/tests/__init__.py +0 -0
- ghoshell_moss-0.1.0a0/tests/agent/__init__.py +0 -0
- ghoshell_moss-0.1.0a0/tests/agent/test_queue_chat.py +36 -0
- ghoshell_moss-0.1.0a0/tests/async_cases/__init__.py +0 -0
- ghoshell_moss-0.1.0a0/tests/async_cases/test_anyio_event.py +28 -0
- ghoshell_moss-0.1.0a0/tests/async_cases/test_anyio_stream.py +54 -0
- ghoshell_moss-0.1.0a0/tests/async_cases/test_asyncio.py +456 -0
- ghoshell_moss-0.1.0a0/tests/channels/__init__.py +0 -0
- ghoshell_moss-0.1.0a0/tests/channels/test_py_channel.py +221 -0
- ghoshell_moss-0.1.0a0/tests/channels/test_thread_channel.py +254 -0
- ghoshell_moss-0.1.0a0/tests/concepts/__init__.py +0 -0
- ghoshell_moss-0.1.0a0/tests/concepts/test_command.py +144 -0
- ghoshell_moss-0.1.0a0/tests/concepts/test_command_task.py +182 -0
- ghoshell_moss-0.1.0a0/tests/ctml/__init__.py +0 -0
- ghoshell_moss-0.1.0a0/tests/ctml/test_elements.py +242 -0
- ghoshell_moss-0.1.0a0/tests/ctml/test_interpreter.py +75 -0
- ghoshell_moss-0.1.0a0/tests/ctml/test_token_parser.py +236 -0
- ghoshell_moss-0.1.0a0/tests/helpers/__init__.py +0 -0
- ghoshell_moss-0.1.0a0/tests/helpers/test_asyncio_utils.py +247 -0
- ghoshell_moss-0.1.0a0/tests/helpers/test_func_tools.py +31 -0
- ghoshell_moss-0.1.0a0/tests/helpers/test_result.py +247 -0
- ghoshell_moss-0.1.0a0/tests/helpers/test_stream.py +64 -0
- ghoshell_moss-0.1.0a0/tests/helpers/test_token_filters.py +18 -0
- ghoshell_moss-0.1.0a0/tests/mcp_channel/__init__.py +0 -0
- ghoshell_moss-0.1.0a0/tests/mcp_channel/helper/__init__.py +0 -0
- ghoshell_moss-0.1.0a0/tests/mcp_channel/helper/mcp_server_demo.py +53 -0
- ghoshell_moss-0.1.0a0/tests/mcp_channel/test_mcp_channel.py +132 -0
- ghoshell_moss-0.1.0a0/tests/prototypes/__init__.py +0 -0
- ghoshell_moss-0.1.0a0/tests/prototypes/test_robot_v1.py +114 -0
- ghoshell_moss-0.1.0a0/tests/py_feats/__init__.py +0 -0
- ghoshell_moss-0.1.0a0/tests/py_feats/test_func.py +16 -0
- ghoshell_moss-0.1.0a0/tests/py_feats/test_literal_eval.py +14 -0
- ghoshell_moss-0.1.0a0/tests/py_feats/test_slice.py +8 -0
- ghoshell_moss-0.1.0a0/tests/redis_channel/__init__.py +0 -0
- ghoshell_moss-0.1.0a0/tests/redis_channel/test_redis_channel.py +70 -0
- ghoshell_moss-0.1.0a0/tests/shell/__init__.py +0 -0
- ghoshell_moss-0.1.0a0/tests/shell/test_channel_runtime.py +63 -0
- ghoshell_moss-0.1.0a0/tests/shell/test_shell_channel_messages.py +46 -0
- ghoshell_moss-0.1.0a0/tests/shell/test_shell_command_call.py +256 -0
- ghoshell_moss-0.1.0a0/tests/shell/test_shell_parse.py +25 -0
- ghoshell_moss-0.1.0a0/tests/shell/test_shell_state_store.py +102 -0
- ghoshell_moss-0.1.0a0/tests/speech/test_mock.py +41 -0
- ghoshell_moss-0.1.0a0/tests/test_libs/__init__.py +0 -0
- ghoshell_moss-0.1.0a0/tests/test_libs/test_pydantic.py +20 -0
- ghoshell_moss-0.1.0a0/tests/ws_channel/__init__.py +0 -0
- ghoshell_moss-0.1.0a0/tests/ws_channel/test_ws_channel.py +81 -0
- ghoshell_moss-0.1.0a0/tests/zmq_channel/__init__.py +0 -0
- ghoshell_moss-0.1.0a0/tests/zmq_channel/test_zmq_channel.py +260 -0
|
@@ -0,0 +1,200 @@
|
|
|
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
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
9
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
10
|
+
|
|
11
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
12
|
+
the copyright owner that is granting the License.
|
|
13
|
+
|
|
14
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
15
|
+
other entities that control, are controlled by, or are under common
|
|
16
|
+
control with that entity. For the purposes of this definition,
|
|
17
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
18
|
+
direction or management of such entity, whether by contract or
|
|
19
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
20
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
21
|
+
|
|
22
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
23
|
+
exercising permissions granted by this License.
|
|
24
|
+
|
|
25
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
26
|
+
including but not limited to software source code, documentation
|
|
27
|
+
source, and configuration files.
|
|
28
|
+
|
|
29
|
+
"Object" form shall mean any form resulting from mechanical
|
|
30
|
+
transformation or translation of a Source form, including but
|
|
31
|
+
not limited to compiled object code, generated documentation,
|
|
32
|
+
and conversions to other media types.
|
|
33
|
+
|
|
34
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
35
|
+
Object form, made available under the License, as indicated by a
|
|
36
|
+
copyright notice that is included in or attached to the work
|
|
37
|
+
(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 any work of authorship, including
|
|
48
|
+
the original version of the Work and any modifications or additions
|
|
49
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
50
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
51
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
52
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
53
|
+
means any form of electronic, verbal, or written communication sent
|
|
54
|
+
to the Licensor or its representatives, including but not limited to
|
|
55
|
+
communication on electronic mailing lists, source code control systems,
|
|
56
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
57
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
58
|
+
excluding communication that is conspicuously marked or otherwise
|
|
59
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
60
|
+
|
|
61
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
62
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
63
|
+
subsequently incorporated within the Work.
|
|
64
|
+
|
|
65
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
66
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
67
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
68
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
69
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
70
|
+
Work and such Derivative Works in Source or Object form.
|
|
71
|
+
|
|
72
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
73
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
74
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
75
|
+
(except as stated in this section) patent license to make, have made,
|
|
76
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
77
|
+
where such license applies only to those patent claims licensable
|
|
78
|
+
by such Contributor that are necessarily infringed by their
|
|
79
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
80
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
81
|
+
institute patent litigation against any entity (including a
|
|
82
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
83
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
84
|
+
or contributory patent infringement, then any patent licenses
|
|
85
|
+
granted to You under this License for that Work shall terminate
|
|
86
|
+
as of the date such litigation is filed.
|
|
87
|
+
|
|
88
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
89
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
90
|
+
modifications, and in Source or Object form, provided that You
|
|
91
|
+
meet the following conditions:
|
|
92
|
+
|
|
93
|
+
(a) You must give any other recipients of the Work or
|
|
94
|
+
Derivative Works a copy of this License; and
|
|
95
|
+
|
|
96
|
+
(b) You must cause any modified files to carry prominent notices
|
|
97
|
+
stating that You changed the files; and
|
|
98
|
+
|
|
99
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
100
|
+
that You distribute, all copyright, patent, trademark, and
|
|
101
|
+
attribution notices from the Source form of the Work,
|
|
102
|
+
excluding those notices that do not pertain to any part of
|
|
103
|
+
the Derivative Works; and
|
|
104
|
+
|
|
105
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
106
|
+
distribution, then any Derivative Works that You distribute must
|
|
107
|
+
include a readable copy of the attribution notices contained
|
|
108
|
+
within such NOTICE file, excluding those notices that do not
|
|
109
|
+
pertain to any part of the Derivative Works, in at least one
|
|
110
|
+
of the following places: within a NOTICE text file distributed
|
|
111
|
+
as part of the Derivative Works; within the Source form or
|
|
112
|
+
documentation, if provided along with the Derivative Works; or,
|
|
113
|
+
within a display generated by the Derivative Works, if and
|
|
114
|
+
wherever such third-party notices normally appear. The contents
|
|
115
|
+
of the NOTICE file are for informational purposes only and
|
|
116
|
+
do not modify the License. You may add Your own attribution
|
|
117
|
+
notices within Derivative Works that You distribute, alongside
|
|
118
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
119
|
+
that such additional attribution notices cannot be construed
|
|
120
|
+
as modifying the License.
|
|
121
|
+
|
|
122
|
+
You may add Your own copyright statement to Your modifications and
|
|
123
|
+
may provide additional or different license terms and conditions
|
|
124
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
125
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
126
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
127
|
+
the conditions stated in this License.
|
|
128
|
+
|
|
129
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
130
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
131
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
132
|
+
this License, without any additional terms or conditions.
|
|
133
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
134
|
+
the terms of any separate license agreement you may have executed
|
|
135
|
+
with Licensor regarding such Contributions.
|
|
136
|
+
|
|
137
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
138
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
139
|
+
except as required for reasonable and customary use in describing the
|
|
140
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
141
|
+
|
|
142
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
143
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
144
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
145
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
146
|
+
implied, including, without limitation, any warranties or conditions
|
|
147
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
148
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
149
|
+
appropriateness of using or redistributing the Work and assume any
|
|
150
|
+
risks associated with Your exercise of permissions under this License.
|
|
151
|
+
|
|
152
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
153
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
154
|
+
unless required by applicable law (such as deliberate and grossly
|
|
155
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
156
|
+
liable to You for damages, including any direct, indirect, special,
|
|
157
|
+
incidental, or consequential damages of any character arising as a
|
|
158
|
+
result of this License or out of the use or inability to use the
|
|
159
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
160
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
161
|
+
other commercial damages or losses), even if such Contributor
|
|
162
|
+
has been advised of the possibility of such damages.
|
|
163
|
+
|
|
164
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
165
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
166
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
167
|
+
or other liability obligations and/or rights consistent with this
|
|
168
|
+
License. However, in accepting such obligations, You may act only
|
|
169
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
170
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
171
|
+
defend, and hold each Contributor harmless for any liability
|
|
172
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
173
|
+
of your accepting any such warranty or additional liability.
|
|
174
|
+
|
|
175
|
+
END OF TERMS AND CONDITIONS
|
|
176
|
+
|
|
177
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
178
|
+
|
|
179
|
+
To apply the Apache License to your work, attach the following
|
|
180
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
181
|
+
replaced with your own identifying information. (Don't include
|
|
182
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
183
|
+
comment syntax for the file format. We also recommend that a
|
|
184
|
+
file or class name and description of purpose be included on the
|
|
185
|
+
same "printed page" as the copyright notice for easier
|
|
186
|
+
identification within third-party archives.
|
|
187
|
+
|
|
188
|
+
Copyright 2026 灵枢云智(北京)科技有限公司
|
|
189
|
+
|
|
190
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
191
|
+
you may not use this file except in compliance with the License.
|
|
192
|
+
You may obtain a copy of the License at
|
|
193
|
+
|
|
194
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
195
|
+
|
|
196
|
+
Unless required by applicable law or agreed to in writing, software
|
|
197
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
198
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
199
|
+
See the License for the specific language governing permissions and
|
|
200
|
+
limitations under the License.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Copyright 2026 灵枢云智(北京)科技有限公司
|
|
2
|
+
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
See the License for the specific language governing permissions and
|
|
13
|
+
limitations under the License.
|
|
14
|
+
|
|
15
|
+
This product includes software developed by 灵枢云智(北京)科技有限公司 (https://github.com/GhostInShells/MOSShell).
|
|
16
|
+
|
|
17
|
+
This software includes third-party libraries.
|
|
18
|
+
Their licenses and copyright notices are documented in the `pyproject.toml` file of the source code repository.
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: ghoshell-moss
|
|
3
|
+
Version: 0.1.0a0
|
|
4
|
+
Summary: LLM-oriented operating system shell, providing interpreter for llm to control everything
|
|
5
|
+
Author: thirdgerb, 17wang
|
|
6
|
+
License: Apache License 2.0
|
|
7
|
+
Requires-Python: >=3.10
|
|
8
|
+
Requires-Dist: ghoshell-common>=0.5.0
|
|
9
|
+
Requires-Dist: ghoshell-container>=0.3.1
|
|
10
|
+
Requires-Dist: openai>=2.8.1
|
|
11
|
+
Requires-Dist: pillow>=12.1.0
|
|
12
|
+
Requires-Dist: python-frontmatter>=1.1.0
|
|
13
|
+
Provides-Extra: zmq
|
|
14
|
+
Requires-Dist: zmq>=0.0.0; extra == "zmq"
|
|
15
|
+
Requires-Dist: aiozmq>=1.0.0; extra == "zmq"
|
|
16
|
+
Requires-Dist: psutil>=7.2.1; extra == "zmq"
|
|
17
|
+
Provides-Extra: mcp
|
|
18
|
+
Requires-Dist: mcp[cli]>=1.17.0; extra == "mcp"
|
|
19
|
+
Provides-Extra: wss
|
|
20
|
+
Requires-Dist: websockets>=15.0.1; extra == "wss"
|
|
21
|
+
Provides-Extra: redis
|
|
22
|
+
Requires-Dist: fakeredis>=2.32.1; extra == "redis"
|
|
23
|
+
Requires-Dist: redis>=7.0.1; extra == "redis"
|
|
24
|
+
Provides-Extra: audio
|
|
25
|
+
Requires-Dist: pulsectl>=24.12.0; extra == "audio"
|
|
26
|
+
Requires-Dist: pyaudio>=0.2.14; extra == "audio"
|
|
27
|
+
Requires-Dist: scipy>=1.15.3; extra == "audio"
|
|
28
|
+
Provides-Extra: contrib
|
|
29
|
+
Requires-Dist: litellm>=1.78.5; extra == "contrib"
|
|
30
|
+
Requires-Dist: live2d-py<0.6.0,>=0.5.4; extra == "contrib"
|
|
31
|
+
Requires-Dist: mermaid-py>=0.8.1; extra == "contrib"
|
|
32
|
+
Requires-Dist: mss>=10.1.0; extra == "contrib"
|
|
33
|
+
Requires-Dist: prompt-toolkit>=3.0.52; extra == "contrib"
|
|
34
|
+
Requires-Dist: pygame>=2.6.1; extra == "contrib"
|
|
35
|
+
Requires-Dist: pyqt6>=6.10.2; extra == "contrib"
|
|
36
|
+
Requires-Dist: python-mpv-jsonipc>=1.2.1; extra == "contrib"
|
|
37
|
+
Requires-Dist: rich>=14.2.0; extra == "contrib"
|
|
38
|
+
Requires-Dist: javascript>=1!1.2.6; extra == "contrib"
|
|
39
|
+
Requires-Dist: opencv-python>=4.13.0.92; extra == "contrib"
|
|
40
|
+
Requires-Dist: loadenv>=0.1.1; extra == "contrib"
|
|
41
|
+
Requires-Dist: pymupdf>=1.27.1; extra == "contrib"
|
|
42
|
+
Description-Content-Type: text/markdown
|
|
43
|
+
|
|
44
|
+
# 项目概述
|
|
45
|
+
|
|
46
|
+
项目名为 `MOS-Shell` (Model-oriented Operating System Shell), 包含几个核心目标:
|
|
47
|
+
|
|
48
|
+
1. `MOS`: 为 AI 大模型提供一个 "面向模型的操作系统", 可以将 跨设备/跨进程 的功能模块, 以 "树" 的形式提供给模型操作.
|
|
49
|
+
1. `Shell Runtime`: 为 AI Agent 提供一个持续运转的运行时 (Runtime), 联通所有功能模块 (称之为 Channel, 对标 python 的
|
|
50
|
+
module).
|
|
51
|
+
1. `Code As Prompt`: 让 AI 大模型用 python 函数 的形式理解所有它可调用的功能, 而不是 json schema. 实现 "
|
|
52
|
+
面向模型的编程语言".
|
|
53
|
+
1. `Streaming Interpret`: 支持 AI 大模型流式输出对话和命令 (Command) 调用, 并且 Shell 会流式地编译执行这些调用,
|
|
54
|
+
并行多轨控制自己的躯体和软件.
|
|
55
|
+
|
|
56
|
+
目标是 AI 大模型作为大脑, 不仅可以思考, 还可以 实时/并行/有序 地操作包括 计算机/具身躯体 来进行交互.
|
|
57
|
+
|
|
58
|
+
MOS-Shell 是 Ghost In Shells (中文名: 灵枢) 项目创建的新交互范式架构, 是第二代 MOSS 架构 (完善了 ChannelApp 和
|
|
59
|
+
Realtime-Actions 思想). 第一代 MOSS 架构 (全代码驱动 + FunctionToken) 详见 [GhostOS](https://github.com/ghostInShells/ghostos)
|
|
60
|
+
|
|
61
|
+
**更多设计思路请访问飞书文档**: [核心设计思想综述](https://ycnrlabqki3v.feishu.cn/wiki/QCKUwAX7tiUs4GkJTkLcMeWqneh)
|
|
62
|
+
|
|
63
|
+
## Alpha 版本声明
|
|
64
|
+
|
|
65
|
+
当前版本为内测版 (Alpha), 这意味着:
|
|
66
|
+
|
|
67
|
+
1. 项目仍然在第一阶段开发中, 会激进地迭代.
|
|
68
|
+
1. 主要是验证核心链路和设计思想, 许多计划中的关键功能还未实现.
|
|
69
|
+
1. 暂时没有人力去完善文档
|
|
70
|
+
1. 不适合在生产环境使用.
|
|
71
|
+
|
|
72
|
+
如果想要试用项目, 请直接联系 灵枢开发组 配合.
|
|
73
|
+
|
|
74
|
+
想要阅读架构的设计思想, 推荐直接看 [concepts 目录](src/ghoshell_moss/core/concepts).
|
|
75
|
+
|
|
76
|
+
## Examples
|
|
77
|
+
|
|
78
|
+
在 [examples](examples) 目录下有当前 alpha 版各种用例. 具体的情况请查阅相关目录的 readme 文档.
|
|
79
|
+
|
|
80
|
+
体验 examples 的方法:
|
|
81
|
+
|
|
82
|
+
> 建议使用 mac, 基线都是在 mac 上测试的. windows 可能兼容存在问题.
|
|
83
|
+
|
|
84
|
+
## 1. clone 仓库
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
git clone https://github.com/GhostInShells/MOSShell MOSShell
|
|
88
|
+
cd MOSShell
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## 2. 创建环境
|
|
92
|
+
|
|
93
|
+
- 使用 `uv` 创建环境, 运行 `uv venv` . 由于依赖 live2d, 所以默认的 python 版本是 3.12
|
|
94
|
+
- 进入 uv 的环境: `source .venv/bin/activate`
|
|
95
|
+
- 安装所有依赖:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# examples 的依赖大多在 ghoshell-moss[contrib] 中, 没有拆分. 所以需要安装全部依赖.
|
|
99
|
+
uv sync --active --all-extras
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## 3. 配置环境变量
|
|
103
|
+
|
|
104
|
+
启动 demo 时需要配置模型和音频 (可选), 目前 alpha 版本的基线全部使用的是火山引擎.
|
|
105
|
+
需要把环境变量配置上.
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
# 复制 env 文件为目标文件.
|
|
109
|
+
cp examples/.env.example examples/.env
|
|
110
|
+
|
|
111
|
+
# 修改相关配置项为真值.
|
|
112
|
+
vim examples/.env
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
配置时需要在火山引擎创建 大模型流式tts 服务. 不好搞定可以先设置 USE_VOICE_SPEECH 为 `no`
|
|
116
|
+
|
|
117
|
+
## 4. 运行 moss agent
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
# 基于当前环境的 python 运行 moss_agent 脚本
|
|
121
|
+
.venv/bin/python examples/moss_agent.py
|
|
122
|
+
|
|
123
|
+
# 打开后建议问它, 你可以做什么.
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
已知的问题:
|
|
127
|
+
|
|
128
|
+
1. 语音输入模块 alpha 版本没有开发完.
|
|
129
|
+
1. 目前使用的 simple agent 是测试专用, 打断的生命周期还有问题.
|
|
130
|
+
1. 由于 shell 的几个控制原语未开发完, 一些行为阻塞逻辑会错乱.
|
|
131
|
+
1. interpreter 的生命周期计划 beta 完成, 现在交互的 ReACT 模式并不是最佳实践 (模型会连续回复)
|
|
132
|
+
|
|
133
|
+
更多测试用例, 请看 examples 目录下的各个文件夹 readme.
|
|
134
|
+
|
|
135
|
+
## Beta Roadmap
|
|
136
|
+
|
|
137
|
+
Alpha 版本是内测版. 预计在 Beta 版本完成:
|
|
138
|
+
|
|
139
|
+
- [ ] 中英双语说明文档
|
|
140
|
+
- [ ] 流式控制基线
|
|
141
|
+
- [ ] CTML 控制原语: clear / stop_all / wait / concurrent / observe. 目前原语未完成, 多轨并行和阻塞存在问题.
|
|
142
|
+
- [ ] Speech 模块 Channel 化.
|
|
143
|
+
- [ ] 完善 CommandResult, 用于支持正规的 Agent 交互范式.
|
|
144
|
+
- [ ] 完善 states/topics 等核心技术模块.
|
|
145
|
+
- [ ] 完善 Interpreter 与 AI Agent 的交互范式基线.
|
|
146
|
+
- [ ] 完善 Channel 体系
|
|
147
|
+
- [ ] 定义 Channel App 范式, 创建本地的 Channel Applications Store
|
|
148
|
+
- [ ] 完善 Channel 运行时生命周期治理
|
|
149
|
+
- [ ] 完成对 Claude MCP 和 Skill 的兼容
|
|
150
|
+
- [ ] 完善 MOSS 项目的自解释 AI
|
|
151
|
+
- [ ] 实现第一个 Ghost 原型, 代号 Alice
|
|
152
|
+
- [ ] 实现架构级的 Channels, 用于支撑基于 MOSS 运转的 Ghost 体系.
|
|
153
|
+
- [ ] 实现一部分开箱即用的 Channels, 用来提供 AIOS 的运行基线.
|
|
154
|
+
|
|
155
|
+
## Contributing
|
|
156
|
+
|
|
157
|
+
- Thank you for being interested in contributing to `MOSShell`!
|
|
158
|
+
- We welcome all kinds of contributions. Whether you're fixing bugs, adding features, or improving documentation, we appreciate your help.
|
|
159
|
+
- For those who'd like to contribute code, see our [Contribution Guide](https://github.com/GhostInShells/MOSShell/blob/main/CONTRIBUTING.md).
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# 项目概述
|
|
2
|
+
|
|
3
|
+
项目名为 `MOS-Shell` (Model-oriented Operating System Shell), 包含几个核心目标:
|
|
4
|
+
|
|
5
|
+
1. `MOS`: 为 AI 大模型提供一个 "面向模型的操作系统", 可以将 跨设备/跨进程 的功能模块, 以 "树" 的形式提供给模型操作.
|
|
6
|
+
1. `Shell Runtime`: 为 AI Agent 提供一个持续运转的运行时 (Runtime), 联通所有功能模块 (称之为 Channel, 对标 python 的
|
|
7
|
+
module).
|
|
8
|
+
1. `Code As Prompt`: 让 AI 大模型用 python 函数 的形式理解所有它可调用的功能, 而不是 json schema. 实现 "
|
|
9
|
+
面向模型的编程语言".
|
|
10
|
+
1. `Streaming Interpret`: 支持 AI 大模型流式输出对话和命令 (Command) 调用, 并且 Shell 会流式地编译执行这些调用,
|
|
11
|
+
并行多轨控制自己的躯体和软件.
|
|
12
|
+
|
|
13
|
+
目标是 AI 大模型作为大脑, 不仅可以思考, 还可以 实时/并行/有序 地操作包括 计算机/具身躯体 来进行交互.
|
|
14
|
+
|
|
15
|
+
MOS-Shell 是 Ghost In Shells (中文名: 灵枢) 项目创建的新交互范式架构, 是第二代 MOSS 架构 (完善了 ChannelApp 和
|
|
16
|
+
Realtime-Actions 思想). 第一代 MOSS 架构 (全代码驱动 + FunctionToken) 详见 [GhostOS](https://github.com/ghostInShells/ghostos)
|
|
17
|
+
|
|
18
|
+
**更多设计思路请访问飞书文档**: [核心设计思想综述](https://ycnrlabqki3v.feishu.cn/wiki/QCKUwAX7tiUs4GkJTkLcMeWqneh)
|
|
19
|
+
|
|
20
|
+
## Alpha 版本声明
|
|
21
|
+
|
|
22
|
+
当前版本为内测版 (Alpha), 这意味着:
|
|
23
|
+
|
|
24
|
+
1. 项目仍然在第一阶段开发中, 会激进地迭代.
|
|
25
|
+
1. 主要是验证核心链路和设计思想, 许多计划中的关键功能还未实现.
|
|
26
|
+
1. 暂时没有人力去完善文档
|
|
27
|
+
1. 不适合在生产环境使用.
|
|
28
|
+
|
|
29
|
+
如果想要试用项目, 请直接联系 灵枢开发组 配合.
|
|
30
|
+
|
|
31
|
+
想要阅读架构的设计思想, 推荐直接看 [concepts 目录](src/ghoshell_moss/core/concepts).
|
|
32
|
+
|
|
33
|
+
## Examples
|
|
34
|
+
|
|
35
|
+
在 [examples](examples) 目录下有当前 alpha 版各种用例. 具体的情况请查阅相关目录的 readme 文档.
|
|
36
|
+
|
|
37
|
+
体验 examples 的方法:
|
|
38
|
+
|
|
39
|
+
> 建议使用 mac, 基线都是在 mac 上测试的. windows 可能兼容存在问题.
|
|
40
|
+
|
|
41
|
+
## 1. clone 仓库
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
git clone https://github.com/GhostInShells/MOSShell MOSShell
|
|
45
|
+
cd MOSShell
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## 2. 创建环境
|
|
49
|
+
|
|
50
|
+
- 使用 `uv` 创建环境, 运行 `uv venv` . 由于依赖 live2d, 所以默认的 python 版本是 3.12
|
|
51
|
+
- 进入 uv 的环境: `source .venv/bin/activate`
|
|
52
|
+
- 安装所有依赖:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# examples 的依赖大多在 ghoshell-moss[contrib] 中, 没有拆分. 所以需要安装全部依赖.
|
|
56
|
+
uv sync --active --all-extras
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## 3. 配置环境变量
|
|
60
|
+
|
|
61
|
+
启动 demo 时需要配置模型和音频 (可选), 目前 alpha 版本的基线全部使用的是火山引擎.
|
|
62
|
+
需要把环境变量配置上.
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# 复制 env 文件为目标文件.
|
|
66
|
+
cp examples/.env.example examples/.env
|
|
67
|
+
|
|
68
|
+
# 修改相关配置项为真值.
|
|
69
|
+
vim examples/.env
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
配置时需要在火山引擎创建 大模型流式tts 服务. 不好搞定可以先设置 USE_VOICE_SPEECH 为 `no`
|
|
73
|
+
|
|
74
|
+
## 4. 运行 moss agent
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
# 基于当前环境的 python 运行 moss_agent 脚本
|
|
78
|
+
.venv/bin/python examples/moss_agent.py
|
|
79
|
+
|
|
80
|
+
# 打开后建议问它, 你可以做什么.
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
已知的问题:
|
|
84
|
+
|
|
85
|
+
1. 语音输入模块 alpha 版本没有开发完.
|
|
86
|
+
1. 目前使用的 simple agent 是测试专用, 打断的生命周期还有问题.
|
|
87
|
+
1. 由于 shell 的几个控制原语未开发完, 一些行为阻塞逻辑会错乱.
|
|
88
|
+
1. interpreter 的生命周期计划 beta 完成, 现在交互的 ReACT 模式并不是最佳实践 (模型会连续回复)
|
|
89
|
+
|
|
90
|
+
更多测试用例, 请看 examples 目录下的各个文件夹 readme.
|
|
91
|
+
|
|
92
|
+
## Beta Roadmap
|
|
93
|
+
|
|
94
|
+
Alpha 版本是内测版. 预计在 Beta 版本完成:
|
|
95
|
+
|
|
96
|
+
- [ ] 中英双语说明文档
|
|
97
|
+
- [ ] 流式控制基线
|
|
98
|
+
- [ ] CTML 控制原语: clear / stop_all / wait / concurrent / observe. 目前原语未完成, 多轨并行和阻塞存在问题.
|
|
99
|
+
- [ ] Speech 模块 Channel 化.
|
|
100
|
+
- [ ] 完善 CommandResult, 用于支持正规的 Agent 交互范式.
|
|
101
|
+
- [ ] 完善 states/topics 等核心技术模块.
|
|
102
|
+
- [ ] 完善 Interpreter 与 AI Agent 的交互范式基线.
|
|
103
|
+
- [ ] 完善 Channel 体系
|
|
104
|
+
- [ ] 定义 Channel App 范式, 创建本地的 Channel Applications Store
|
|
105
|
+
- [ ] 完善 Channel 运行时生命周期治理
|
|
106
|
+
- [ ] 完成对 Claude MCP 和 Skill 的兼容
|
|
107
|
+
- [ ] 完善 MOSS 项目的自解释 AI
|
|
108
|
+
- [ ] 实现第一个 Ghost 原型, 代号 Alice
|
|
109
|
+
- [ ] 实现架构级的 Channels, 用于支撑基于 MOSS 运转的 Ghost 体系.
|
|
110
|
+
- [ ] 实现一部分开箱即用的 Channels, 用来提供 AIOS 的运行基线.
|
|
111
|
+
|
|
112
|
+
## Contributing
|
|
113
|
+
|
|
114
|
+
- Thank you for being interested in contributing to `MOSShell`!
|
|
115
|
+
- We welcome all kinds of contributions. Whether you're fixing bugs, adding features, or improving documentation, we appreciate your help.
|
|
116
|
+
- For those who'd like to contribute code, see our [Contribution Guide](https://github.com/GhostInShells/MOSShell/blob/main/CONTRIBUTING.md).
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "ghoshell-moss"
|
|
3
|
+
version = "0.1.0-alpha"
|
|
4
|
+
description = "LLM-oriented operating system shell, providing interpreter for llm to control everything"
|
|
5
|
+
authors = [
|
|
6
|
+
{ name = "thirdgerb" },
|
|
7
|
+
{ name = "17wang" },
|
|
8
|
+
]
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
dependencies = [
|
|
12
|
+
"ghoshell-common>=0.5.0",
|
|
13
|
+
"ghoshell-container>=0.3.1",
|
|
14
|
+
"openai>=2.8.1",
|
|
15
|
+
"pillow>=12.1.0",
|
|
16
|
+
"python-frontmatter>=1.1.0",
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
[project.license]
|
|
20
|
+
text = "Apache License 2.0"
|
|
21
|
+
|
|
22
|
+
[project.optional-dependencies]
|
|
23
|
+
zmq = [
|
|
24
|
+
"zmq>=0.0.0",
|
|
25
|
+
"aiozmq>=1.0.0",
|
|
26
|
+
"psutil>=7.2.1",
|
|
27
|
+
]
|
|
28
|
+
mcp = [
|
|
29
|
+
"mcp[cli]>=1.17.0",
|
|
30
|
+
]
|
|
31
|
+
wss = [
|
|
32
|
+
"websockets>=15.0.1",
|
|
33
|
+
]
|
|
34
|
+
redis = [
|
|
35
|
+
"fakeredis>=2.32.1",
|
|
36
|
+
"redis>=7.0.1",
|
|
37
|
+
]
|
|
38
|
+
audio = [
|
|
39
|
+
"pulsectl>=24.12.0",
|
|
40
|
+
"pyaudio>=0.2.14",
|
|
41
|
+
"scipy>=1.15.3",
|
|
42
|
+
]
|
|
43
|
+
contrib = [
|
|
44
|
+
"litellm>=1.78.5",
|
|
45
|
+
"live2d-py>=0.5.4,<0.6.0",
|
|
46
|
+
"mermaid-py>=0.8.1",
|
|
47
|
+
"mss>=10.1.0",
|
|
48
|
+
"prompt-toolkit>=3.0.52",
|
|
49
|
+
"pygame>=2.6.1",
|
|
50
|
+
"pyqt6>=6.10.2",
|
|
51
|
+
"python-mpv-jsonipc>=1.2.1",
|
|
52
|
+
"rich>=14.2.0",
|
|
53
|
+
"javascript>=1!1.2.6",
|
|
54
|
+
"opencv-python>=4.13.0.92",
|
|
55
|
+
"loadenv>=0.1.1",
|
|
56
|
+
"pymupdf>=1.27.1",
|
|
57
|
+
]
|
|
58
|
+
|
|
59
|
+
[tool.setuptools]
|
|
60
|
+
packages = [
|
|
61
|
+
"src",
|
|
62
|
+
]
|
|
63
|
+
|
|
64
|
+
[tool.pdm.build]
|
|
65
|
+
includes = []
|
|
66
|
+
|
|
67
|
+
[build-system]
|
|
68
|
+
requires = [
|
|
69
|
+
"pdm-backend",
|
|
70
|
+
]
|
|
71
|
+
build-backend = "pdm.backend"
|
|
72
|
+
|
|
73
|
+
[dependency-groups]
|
|
74
|
+
dev = [
|
|
75
|
+
"ruff>=0.15.0",
|
|
76
|
+
"pytest>=8.3.5",
|
|
77
|
+
"pytest-asyncio>=1.1.0",
|
|
78
|
+
"anyio>=4.10.0",
|
|
79
|
+
"mcp>=1.21.0",
|
|
80
|
+
"fastapi>=0.121.1",
|
|
81
|
+
"uvicorn>=0.37.0",
|
|
82
|
+
"mdformat>=1.0.0",
|
|
83
|
+
"mdformat-gfm>=1.0.0",
|
|
84
|
+
]
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# 目录介绍
|
|
2
|
+
|
|
3
|
+
- core: ghoshell moss 的核心功能模块
|
|
4
|
+
- message: 兼容性的模型消息协议. 暂时放到 ghoshell-moss 库, 未来可能迁出
|
|
5
|
+
- transports: 通过 provider -> proxy 范式, 跨进程的构建 channel 之间的双工通讯.
|
|
6
|
+
- compatible: 兼容性模块, 用来兼容行业生态. 比如 claude mcp 和 claude skills.
|
|
7
|
+
- channels: ghoshell-moss 库认为需要开箱自带的 channel 实现.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
from ghoshell_container import (
|
|
2
|
+
Container,
|
|
3
|
+
IoCContainer,
|
|
4
|
+
get_container,
|
|
5
|
+
set_container,
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
from ghoshell_moss.core import *
|
|
9
|
+
from ghoshell_moss.message import *
|
|
10
|
+
|
|
11
|
+
"""
|
|
12
|
+
Ghoshell MOSS 库的 facade, 用来存放最常用的类库引用.
|
|
13
|
+
|
|
14
|
+
考虑只对外暴露最基础的常用函数.
|
|
15
|
+
"""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|