@moxxy/cli 0.0.11 → 0.1.0

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 (141) hide show
  1. package/README.md +278 -112
  2. package/bin/moxxy +10 -0
  3. package/package.json +36 -53
  4. package/src/api-client.js +286 -0
  5. package/src/cli.js +341 -0
  6. package/src/commands/agent.js +413 -0
  7. package/src/commands/auth.js +326 -0
  8. package/src/commands/channel.js +285 -0
  9. package/src/commands/doctor.js +261 -0
  10. package/src/commands/events.js +80 -0
  11. package/src/commands/gateway.js +428 -0
  12. package/src/commands/heartbeat.js +145 -0
  13. package/src/commands/init.js +767 -0
  14. package/src/commands/mcp.js +278 -0
  15. package/src/commands/plugin.js +583 -0
  16. package/src/commands/provider.js +1934 -0
  17. package/src/commands/skill.js +125 -0
  18. package/src/commands/template.js +237 -0
  19. package/src/commands/uninstall.js +196 -0
  20. package/src/commands/update.js +406 -0
  21. package/src/commands/vault.js +219 -0
  22. package/src/help.js +368 -0
  23. package/src/lib/plugin-registry.js +98 -0
  24. package/src/platform.js +40 -0
  25. package/src/sse-client.js +79 -0
  26. package/src/tui/action-wizards.js +130 -0
  27. package/src/tui/app.jsx +859 -0
  28. package/src/tui/components/action-picker.jsx +86 -0
  29. package/src/tui/components/chat-panel.jsx +120 -0
  30. package/src/tui/components/footer.jsx +13 -0
  31. package/src/tui/components/header.jsx +45 -0
  32. package/src/tui/components/input-area.jsx +384 -0
  33. package/src/tui/components/messages/ask-message.jsx +13 -0
  34. package/src/tui/components/messages/assistant-message.jsx +165 -0
  35. package/src/tui/components/messages/channel-message.jsx +18 -0
  36. package/src/tui/components/messages/event-message.jsx +22 -0
  37. package/src/tui/components/messages/hive-status.jsx +34 -0
  38. package/src/tui/components/messages/skill-message.jsx +31 -0
  39. package/src/tui/components/messages/system-message.jsx +12 -0
  40. package/src/tui/components/messages/thinking.jsx +25 -0
  41. package/src/tui/components/messages/tool-group.jsx +62 -0
  42. package/src/tui/components/messages/tool-message.jsx +66 -0
  43. package/src/tui/components/messages/user-message.jsx +12 -0
  44. package/src/tui/components/model-picker.jsx +138 -0
  45. package/src/tui/components/multiline-input.jsx +72 -0
  46. package/src/tui/events-handler.js +730 -0
  47. package/src/tui/helpers.js +59 -0
  48. package/src/tui/hooks/use-command-handler.js +451 -0
  49. package/src/tui/index.jsx +55 -0
  50. package/src/tui/input-utils.js +26 -0
  51. package/src/tui/markdown-renderer.js +66 -0
  52. package/src/tui/mcp-wizard.js +136 -0
  53. package/src/tui/model-picker.js +174 -0
  54. package/src/tui/slash-commands.js +26 -0
  55. package/src/tui/store.js +12 -0
  56. package/src/tui/theme.js +17 -0
  57. package/src/ui.js +109 -0
  58. package/bin/moxxy.js +0 -2
  59. package/dist/chunk-23LZYKQ6.mjs +0 -1131
  60. package/dist/chunk-2FZEA3NG.mjs +0 -457
  61. package/dist/chunk-3KDPLS22.mjs +0 -1131
  62. package/dist/chunk-3QRJTRBT.mjs +0 -1102
  63. package/dist/chunk-6DZX6EAA.mjs +0 -37
  64. package/dist/chunk-A4WRDUNY.mjs +0 -1242
  65. package/dist/chunk-C46NSEKG.mjs +0 -211
  66. package/dist/chunk-CAUXONEF.mjs +0 -1131
  67. package/dist/chunk-CPL5V56X.mjs +0 -1131
  68. package/dist/chunk-CTBVTTBG.mjs +0 -440
  69. package/dist/chunk-FHHLXTEZ.mjs +0 -1121
  70. package/dist/chunk-FXY3GPVA.mjs +0 -1126
  71. package/dist/chunk-GSNMMI3H.mjs +0 -530
  72. package/dist/chunk-HHOAOGUS.mjs +0 -1242
  73. package/dist/chunk-N5JTPB6U.mjs +0 -820
  74. package/dist/chunk-NGVL4Q5C.mjs +0 -1102
  75. package/dist/chunk-Q2OCMNYI.mjs +0 -1131
  76. package/dist/chunk-QDVRLN6D.mjs +0 -1121
  77. package/dist/chunk-QO2JONHP.mjs +0 -1131
  78. package/dist/chunk-RVAPILHA.mjs +0 -1242
  79. package/dist/chunk-S7YBOV7E.mjs +0 -1131
  80. package/dist/chunk-SHIG6Y5L.mjs +0 -1074
  81. package/dist/chunk-SOFST2PV.mjs +0 -1242
  82. package/dist/chunk-TMZWETMH.mjs +0 -1242
  83. package/dist/chunk-TYD7NMMI.mjs +0 -581
  84. package/dist/chunk-TYQ3YS42.mjs +0 -1068
  85. package/dist/chunk-UALWCJ7F.mjs +0 -1131
  86. package/dist/chunk-UQZKODNW.mjs +0 -1124
  87. package/dist/chunk-USC6R2ON.mjs +0 -1242
  88. package/dist/chunk-W32EQCVC.mjs +0 -823
  89. package/dist/chunk-WMB5ENMC.mjs +0 -1242
  90. package/dist/chunk-WNHA5JAP.mjs +0 -1242
  91. package/dist/cli-2AIWTL6F.mjs +0 -8
  92. package/dist/cli-2QKJ5UUL.mjs +0 -8
  93. package/dist/cli-4RIS6DQX.mjs +0 -8
  94. package/dist/cli-5RH4VBBL.mjs +0 -7
  95. package/dist/cli-7MK4YGOP.mjs +0 -7
  96. package/dist/cli-B4KH6MZI.mjs +0 -8
  97. package/dist/cli-CGO2LZ6Z.mjs +0 -8
  98. package/dist/cli-CVP26EL2.mjs +0 -8
  99. package/dist/cli-DDRVVNAV.mjs +0 -8
  100. package/dist/cli-E7U56QVQ.mjs +0 -8
  101. package/dist/cli-EQNRMLL3.mjs +0 -8
  102. package/dist/cli-F5RUHHH4.mjs +0 -8
  103. package/dist/cli-LX6FFSEF.mjs +0 -8
  104. package/dist/cli-LY74GWKR.mjs +0 -6
  105. package/dist/cli-MAT3ZJHI.mjs +0 -8
  106. package/dist/cli-NJXXTQYF.mjs +0 -8
  107. package/dist/cli-O4ZGFAZG.mjs +0 -8
  108. package/dist/cli-ORVLI3UQ.mjs +0 -8
  109. package/dist/cli-PV43ZVKA.mjs +0 -8
  110. package/dist/cli-REVD6ISM.mjs +0 -8
  111. package/dist/cli-TBX76KQX.mjs +0 -8
  112. package/dist/cli-TLX5ENVM.mjs +0 -8
  113. package/dist/cli-TNJHCBQA.mjs +0 -6
  114. package/dist/cli-TUX22CZP.mjs +0 -8
  115. package/dist/cli-XJVH7EEP.mjs +0 -8
  116. package/dist/cli-XXOW4VXJ.mjs +0 -8
  117. package/dist/cli-XZ5RESNB.mjs +0 -6
  118. package/dist/cli-YCBYZ76Q.mjs +0 -8
  119. package/dist/cli-ZLMQCU7X.mjs +0 -8
  120. package/dist/dist-2VGKJRBH.mjs +0 -6820
  121. package/dist/dist-37BNX4QG.mjs +0 -7081
  122. package/dist/dist-7LTHRYKA.mjs +0 -11569
  123. package/dist/dist-7XJPQW5C.mjs +0 -6950
  124. package/dist/dist-AYMVOW7T.mjs +0 -7123
  125. package/dist/dist-FAXRJMEN.mjs +0 -6812
  126. package/dist/dist-HQGANM3P.mjs +0 -6976
  127. package/dist/dist-KATLOZQV.mjs +0 -7054
  128. package/dist/dist-KLSB6YHV.mjs +0 -6964
  129. package/dist/dist-LKIOZQ42.mjs +0 -17
  130. package/dist/dist-UYA4RJUH.mjs +0 -2792
  131. package/dist/dist-ZYHCBILM.mjs +0 -6993
  132. package/dist/index.d.mts +0 -23
  133. package/dist/index.d.ts +0 -23
  134. package/dist/index.js +0 -25512
  135. package/dist/index.mjs +0 -18
  136. package/dist/src-APP5P3UD.mjs +0 -1386
  137. package/dist/src-D5HMDDVE.mjs +0 -1324
  138. package/dist/src-EK3WD4AU.mjs +0 -1327
  139. package/dist/src-LSZFLMFN.mjs +0 -1400
  140. package/dist/src-WIOCZRAC.mjs +0 -1397
  141. package/dist/src-YK6CHCMW.mjs +0 -1400
@@ -1,211 +0,0 @@
1
- // ../integration-base/dist/index.mjs
2
- var IntegrationError = class extends Error {
3
- constructor(message, integration, code, cause) {
4
- super(message);
5
- this.integration = integration;
6
- this.code = code;
7
- this.cause = cause;
8
- this.name = "IntegrationError";
9
- }
10
- };
11
- var IntegrationConnectionError = class extends IntegrationError {
12
- constructor(message, integration, cause) {
13
- super(message, integration, "CONNECTION_ERROR", cause);
14
- this.name = "IntegrationConnectionError";
15
- }
16
- };
17
- var IntegrationConfigError = class extends IntegrationError {
18
- constructor(message, integration, cause) {
19
- super(message, integration, "CONFIG_ERROR", cause);
20
- this.name = "IntegrationConfigError";
21
- }
22
- };
23
- var IntegrationNotFoundError = class extends IntegrationError {
24
- constructor(integration) {
25
- super(`Integration "${integration}" not found`, integration, "NOT_FOUND");
26
- this.name = "IntegrationNotFoundError";
27
- }
28
- };
29
- var BaseIntegration = class {
30
- constructor(name, type) {
31
- this.name = name;
32
- this.type = type;
33
- }
34
- _status = "disconnected";
35
- handlers = /* @__PURE__ */ new Map();
36
- get status() {
37
- return this._status;
38
- }
39
- async connect(config) {
40
- if (this._status === "connected" || this._status === "watching") {
41
- return;
42
- }
43
- this._status = "connecting";
44
- try {
45
- await this.onConnect(config);
46
- this._status = "connected";
47
- } catch (error) {
48
- this._status = "error";
49
- throw new IntegrationConnectionError(
50
- `Failed to connect integration "${this.name}": ${error instanceof Error ? error.message : String(error)}`,
51
- this.name,
52
- error instanceof Error ? error : void 0
53
- );
54
- }
55
- }
56
- async disconnect() {
57
- if (this._status === "disconnected") {
58
- return;
59
- }
60
- try {
61
- await this.onDisconnect();
62
- } finally {
63
- this._status = "disconnected";
64
- }
65
- }
66
- async watch(targets) {
67
- if (this._status !== "connected" && this._status !== "watching") {
68
- throw new IntegrationConnectionError(
69
- `Cannot watch: integration "${this.name}" is not connected`,
70
- this.name
71
- );
72
- }
73
- await this.onWatch(targets);
74
- this._status = "watching";
75
- }
76
- async unwatch(targets) {
77
- if (this._status !== "watching") {
78
- return;
79
- }
80
- await this.onUnwatch(targets);
81
- this._status = "connected";
82
- }
83
- async dispose() {
84
- if (this._status !== "disconnected") {
85
- await this.disconnect();
86
- }
87
- this.handlers.clear();
88
- }
89
- on(event, handler) {
90
- let set = this.handlers.get(event);
91
- if (!set) {
92
- set = /* @__PURE__ */ new Set();
93
- this.handlers.set(event, set);
94
- }
95
- set.add(handler);
96
- }
97
- off(event, handler) {
98
- const set = this.handlers.get(event);
99
- if (set) {
100
- set.delete(handler);
101
- if (set.size === 0) {
102
- this.handlers.delete(event);
103
- }
104
- }
105
- }
106
- emit(type, data) {
107
- const event = {
108
- type,
109
- integration: this.name,
110
- data,
111
- timestamp: Date.now()
112
- };
113
- const specificHandlers = this.handlers.get(type);
114
- if (specificHandlers) {
115
- for (const handler of specificHandlers) {
116
- handler(event);
117
- }
118
- }
119
- const wildcardHandlers = this.handlers.get("*");
120
- if (wildcardHandlers) {
121
- for (const handler of wildcardHandlers) {
122
- handler(event);
123
- }
124
- }
125
- }
126
- };
127
- var IntegrationManager = class {
128
- integrations = /* @__PURE__ */ new Map();
129
- handlers = /* @__PURE__ */ new Map();
130
- integrationListeners = /* @__PURE__ */ new Map();
131
- register(integration) {
132
- this.integrations.set(integration.name, integration);
133
- const listener = (event) => {
134
- this.emitToHandlers(event);
135
- };
136
- this.integrationListeners.set(integration.name, listener);
137
- integration.on("*", listener);
138
- }
139
- unregister(name) {
140
- const integration = this.integrations.get(name);
141
- if (!integration) {
142
- return;
143
- }
144
- const listener = this.integrationListeners.get(name);
145
- if (listener) {
146
- integration.off("*", listener);
147
- this.integrationListeners.delete(name);
148
- }
149
- this.integrations.delete(name);
150
- }
151
- get(name) {
152
- return this.integrations.get(name);
153
- }
154
- getAll() {
155
- return Array.from(this.integrations.values());
156
- }
157
- async startAll() {
158
- const promises = [];
159
- for (const integration of this.integrations.values()) {
160
- promises.push(integration.connect({}));
161
- }
162
- await Promise.all(promises);
163
- }
164
- async stopAll() {
165
- const promises = [];
166
- for (const integration of this.integrations.values()) {
167
- promises.push(integration.disconnect());
168
- }
169
- await Promise.all(promises);
170
- }
171
- on(event, handler) {
172
- let set = this.handlers.get(event);
173
- if (!set) {
174
- set = /* @__PURE__ */ new Set();
175
- this.handlers.set(event, set);
176
- }
177
- set.add(handler);
178
- }
179
- off(event, handler) {
180
- const set = this.handlers.get(event);
181
- if (set) {
182
- set.delete(handler);
183
- if (set.size === 0) {
184
- this.handlers.delete(event);
185
- }
186
- }
187
- }
188
- emitToHandlers(event) {
189
- const specificHandlers = this.handlers.get(event.type);
190
- if (specificHandlers) {
191
- for (const handler of specificHandlers) {
192
- handler(event);
193
- }
194
- }
195
- const wildcardHandlers = this.handlers.get("*");
196
- if (wildcardHandlers) {
197
- for (const handler of wildcardHandlers) {
198
- handler(event);
199
- }
200
- }
201
- }
202
- };
203
-
204
- export {
205
- IntegrationError,
206
- IntegrationConnectionError,
207
- IntegrationConfigError,
208
- IntegrationNotFoundError,
209
- BaseIntegration,
210
- IntegrationManager
211
- };