loopsy 1.0.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.
- package/LICENSE +190 -0
- package/README.md +425 -0
- package/dist/cli/commands/connect.d.ts +2 -0
- package/dist/cli/commands/connect.d.ts.map +1 -0
- package/dist/cli/commands/connect.js +120 -0
- package/dist/cli/commands/connect.js.map +1 -0
- package/dist/cli/commands/context.d.ts +2 -0
- package/dist/cli/commands/context.d.ts.map +1 -0
- package/dist/cli/commands/context.js +39 -0
- package/dist/cli/commands/context.js.map +1 -0
- package/dist/cli/commands/daemon.d.ts +4 -0
- package/dist/cli/commands/daemon.d.ts.map +1 -0
- package/dist/cli/commands/daemon.js +55 -0
- package/dist/cli/commands/daemon.js.map +1 -0
- package/dist/cli/commands/dashboard.d.ts +2 -0
- package/dist/cli/commands/dashboard.d.ts.map +1 -0
- package/dist/cli/commands/dashboard.js +24 -0
- package/dist/cli/commands/dashboard.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +2 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -0
- package/dist/cli/commands/doctor.js +130 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/exec.d.ts +2 -0
- package/dist/cli/commands/exec.d.ts.map +1 -0
- package/dist/cli/commands/exec.js +34 -0
- package/dist/cli/commands/exec.js.map +1 -0
- package/dist/cli/commands/init.d.ts +2 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +71 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/key.d.ts +2 -0
- package/dist/cli/commands/key.d.ts.map +1 -0
- package/dist/cli/commands/key.js +39 -0
- package/dist/cli/commands/key.js.map +1 -0
- package/dist/cli/commands/logs.d.ts +2 -0
- package/dist/cli/commands/logs.d.ts.map +1 -0
- package/dist/cli/commands/logs.js +26 -0
- package/dist/cli/commands/logs.js.map +1 -0
- package/dist/cli/commands/mcp.d.ts +4 -0
- package/dist/cli/commands/mcp.d.ts.map +1 -0
- package/dist/cli/commands/mcp.js +70 -0
- package/dist/cli/commands/mcp.js.map +1 -0
- package/dist/cli/commands/pair.d.ts +6 -0
- package/dist/cli/commands/pair.d.ts.map +1 -0
- package/dist/cli/commands/pair.js +208 -0
- package/dist/cli/commands/pair.js.map +1 -0
- package/dist/cli/commands/peers.d.ts +2 -0
- package/dist/cli/commands/peers.d.ts.map +1 -0
- package/dist/cli/commands/peers.js +29 -0
- package/dist/cli/commands/peers.js.map +1 -0
- package/dist/cli/commands/service/linux.d.ts +7 -0
- package/dist/cli/commands/service/linux.d.ts.map +1 -0
- package/dist/cli/commands/service/linux.js +86 -0
- package/dist/cli/commands/service/linux.js.map +1 -0
- package/dist/cli/commands/service/macos.d.ts +7 -0
- package/dist/cli/commands/service/macos.d.ts.map +1 -0
- package/dist/cli/commands/service/macos.js +83 -0
- package/dist/cli/commands/service/macos.js.map +1 -0
- package/dist/cli/commands/service/windows.d.ts +7 -0
- package/dist/cli/commands/service/windows.d.ts.map +1 -0
- package/dist/cli/commands/service/windows.js +52 -0
- package/dist/cli/commands/service/windows.js.map +1 -0
- package/dist/cli/commands/service.d.ts +4 -0
- package/dist/cli/commands/service.d.ts.map +1 -0
- package/dist/cli/commands/service.js +68 -0
- package/dist/cli/commands/service.js.map +1 -0
- package/dist/cli/commands/session.d.ts +8 -0
- package/dist/cli/commands/session.d.ts.map +1 -0
- package/dist/cli/commands/session.js +270 -0
- package/dist/cli/commands/session.js.map +1 -0
- package/dist/cli/commands/transfer.d.ts +3 -0
- package/dist/cli/commands/transfer.d.ts.map +1 -0
- package/dist/cli/commands/transfer.js +57 -0
- package/dist/cli/commands/transfer.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +89 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/package-root.d.ts +27 -0
- package/dist/cli/package-root.d.ts.map +1 -0
- package/dist/cli/package-root.js +54 -0
- package/dist/cli/package-root.js.map +1 -0
- package/dist/cli/utils.d.ts +11 -0
- package/dist/cli/utils.d.ts.map +1 -0
- package/dist/cli/utils.js +48 -0
- package/dist/cli/utils.js.map +1 -0
- package/dist/daemon/config.d.ts +4 -0
- package/dist/daemon/config.d.ts.map +1 -0
- package/dist/daemon/config.js +58 -0
- package/dist/daemon/config.js.map +1 -0
- package/dist/daemon/hooks/permission-hook.mjs +108 -0
- package/dist/daemon/index.d.ts +3 -0
- package/dist/daemon/index.d.ts.map +1 -0
- package/dist/daemon/index.js +3 -0
- package/dist/daemon/index.js.map +1 -0
- package/dist/daemon/main.d.ts +3 -0
- package/dist/daemon/main.d.ts.map +1 -0
- package/dist/daemon/main.js +28 -0
- package/dist/daemon/main.js.map +1 -0
- package/dist/daemon/middleware/auth.d.ts +3 -0
- package/dist/daemon/middleware/auth.d.ts.map +1 -0
- package/dist/daemon/middleware/auth.js +22 -0
- package/dist/daemon/middleware/auth.js.map +1 -0
- package/dist/daemon/routes/ai-tasks.d.ts +4 -0
- package/dist/daemon/routes/ai-tasks.d.ts.map +1 -0
- package/dist/daemon/routes/ai-tasks.js +146 -0
- package/dist/daemon/routes/ai-tasks.js.map +1 -0
- package/dist/daemon/routes/context.d.ts +4 -0
- package/dist/daemon/routes/context.d.ts.map +1 -0
- package/dist/daemon/routes/context.js +49 -0
- package/dist/daemon/routes/context.js.map +1 -0
- package/dist/daemon/routes/execute.d.ts +4 -0
- package/dist/daemon/routes/execute.d.ts.map +1 -0
- package/dist/daemon/routes/execute.js +74 -0
- package/dist/daemon/routes/execute.js.map +1 -0
- package/dist/daemon/routes/health.d.ts +15 -0
- package/dist/daemon/routes/health.d.ts.map +1 -0
- package/dist/daemon/routes/health.js +38 -0
- package/dist/daemon/routes/health.js.map +1 -0
- package/dist/daemon/routes/pair.d.ts +11 -0
- package/dist/daemon/routes/pair.d.ts.map +1 -0
- package/dist/daemon/routes/pair.js +149 -0
- package/dist/daemon/routes/pair.js.map +1 -0
- package/dist/daemon/routes/peers.d.ts +5 -0
- package/dist/daemon/routes/peers.d.ts.map +1 -0
- package/dist/daemon/routes/peers.js +69 -0
- package/dist/daemon/routes/peers.js.map +1 -0
- package/dist/daemon/routes/transfer.d.ts +4 -0
- package/dist/daemon/routes/transfer.d.ts.map +1 -0
- package/dist/daemon/routes/transfer.js +135 -0
- package/dist/daemon/routes/transfer.js.map +1 -0
- package/dist/daemon/server.d.ts +8 -0
- package/dist/daemon/server.d.ts.map +1 -0
- package/dist/daemon/server.js +170 -0
- package/dist/daemon/server.js.map +1 -0
- package/dist/daemon/services/ai-task-manager.d.ts +56 -0
- package/dist/daemon/services/ai-task-manager.d.ts.map +1 -0
- package/dist/daemon/services/ai-task-manager.js +491 -0
- package/dist/daemon/services/ai-task-manager.js.map +1 -0
- package/dist/daemon/services/audit-logger.d.ts +16 -0
- package/dist/daemon/services/audit-logger.d.ts.map +1 -0
- package/dist/daemon/services/audit-logger.js +23 -0
- package/dist/daemon/services/audit-logger.js.map +1 -0
- package/dist/daemon/services/context-store.d.ts +17 -0
- package/dist/daemon/services/context-store.d.ts.map +1 -0
- package/dist/daemon/services/context-store.js +97 -0
- package/dist/daemon/services/context-store.js.map +1 -0
- package/dist/daemon/services/job-manager.d.ts +19 -0
- package/dist/daemon/services/job-manager.d.ts.map +1 -0
- package/dist/daemon/services/job-manager.js +92 -0
- package/dist/daemon/services/job-manager.js.map +1 -0
- package/dist/daemon/services/tls-manager.d.ts +33 -0
- package/dist/daemon/services/tls-manager.d.ts.map +1 -0
- package/dist/daemon/services/tls-manager.js +114 -0
- package/dist/daemon/services/tls-manager.js.map +1 -0
- package/dist/daemon/utils/which.d.ts +2 -0
- package/dist/daemon/utils/which.d.ts.map +1 -0
- package/dist/daemon/utils/which.js +18 -0
- package/dist/daemon/utils/which.js.map +1 -0
- package/dist/dashboard/config.d.ts +8 -0
- package/dist/dashboard/config.d.ts.map +1 -0
- package/dist/dashboard/config.js +22 -0
- package/dist/dashboard/config.js.map +1 -0
- package/dist/dashboard/public/app.js +120 -0
- package/dist/dashboard/public/icon-192.png +0 -0
- package/dist/dashboard/public/icon-512.png +0 -0
- package/dist/dashboard/public/index.html +85 -0
- package/dist/dashboard/public/manifest.json +12 -0
- package/dist/dashboard/public/style.css +784 -0
- package/dist/dashboard/public/sw.js +31 -0
- package/dist/dashboard/public/views/ai-tasks.js +679 -0
- package/dist/dashboard/public/views/context.js +167 -0
- package/dist/dashboard/public/views/messages.js +263 -0
- package/dist/dashboard/public/views/overview.js +228 -0
- package/dist/dashboard/public/views/peers.js +136 -0
- package/dist/dashboard/public/views/terminal.js +153 -0
- package/dist/dashboard/routes/ai-tasks.d.ts +3 -0
- package/dist/dashboard/routes/ai-tasks.d.ts.map +1 -0
- package/dist/dashboard/routes/ai-tasks.js +193 -0
- package/dist/dashboard/routes/ai-tasks.js.map +1 -0
- package/dist/dashboard/routes/messages.d.ts +3 -0
- package/dist/dashboard/routes/messages.d.ts.map +1 -0
- package/dist/dashboard/routes/messages.js +137 -0
- package/dist/dashboard/routes/messages.js.map +1 -0
- package/dist/dashboard/routes/peer-utils.d.ts +17 -0
- package/dist/dashboard/routes/peer-utils.d.ts.map +1 -0
- package/dist/dashboard/routes/peer-utils.js +193 -0
- package/dist/dashboard/routes/peer-utils.js.map +1 -0
- package/dist/dashboard/routes/peers-all.d.ts +3 -0
- package/dist/dashboard/routes/peers-all.d.ts.map +1 -0
- package/dist/dashboard/routes/peers-all.js +8 -0
- package/dist/dashboard/routes/peers-all.js.map +1 -0
- package/dist/dashboard/routes/proxy.d.ts +3 -0
- package/dist/dashboard/routes/proxy.d.ts.map +1 -0
- package/dist/dashboard/routes/proxy.js +59 -0
- package/dist/dashboard/routes/proxy.js.map +1 -0
- package/dist/dashboard/routes/sessions.d.ts +3 -0
- package/dist/dashboard/routes/sessions.d.ts.map +1 -0
- package/dist/dashboard/routes/sessions.js +64 -0
- package/dist/dashboard/routes/sessions.js.map +1 -0
- package/dist/dashboard/routes/sse.d.ts +3 -0
- package/dist/dashboard/routes/sse.d.ts.map +1 -0
- package/dist/dashboard/routes/sse.js +49 -0
- package/dist/dashboard/routes/sse.js.map +1 -0
- package/dist/dashboard/routes/status.d.ts +3 -0
- package/dist/dashboard/routes/status.d.ts.map +1 -0
- package/dist/dashboard/routes/status.js +38 -0
- package/dist/dashboard/routes/status.js.map +1 -0
- package/dist/dashboard/server.d.ts +3 -0
- package/dist/dashboard/server.d.ts.map +1 -0
- package/dist/dashboard/server.js +77 -0
- package/dist/dashboard/server.js.map +1 -0
- package/dist/dashboard/session-manager.d.ts +17 -0
- package/dist/dashboard/session-manager.d.ts.map +1 -0
- package/dist/dashboard/session-manager.js +225 -0
- package/dist/dashboard/session-manager.js.map +1 -0
- package/dist/discovery/health-checker.d.ts +15 -0
- package/dist/discovery/health-checker.d.ts.map +1 -0
- package/dist/discovery/health-checker.js +47 -0
- package/dist/discovery/health-checker.js.map +1 -0
- package/dist/discovery/index.d.ts +4 -0
- package/dist/discovery/index.d.ts.map +1 -0
- package/dist/discovery/index.js +4 -0
- package/dist/discovery/index.js.map +1 -0
- package/dist/discovery/mdns.d.ts +21 -0
- package/dist/discovery/mdns.d.ts.map +1 -0
- package/dist/discovery/mdns.js +83 -0
- package/dist/discovery/mdns.js.map +1 -0
- package/dist/discovery/peer-registry.d.ts +18 -0
- package/dist/discovery/peer-registry.d.ts.map +1 -0
- package/dist/discovery/peer-registry.js +81 -0
- package/dist/discovery/peer-registry.js.map +1 -0
- package/dist/mcp-server/daemon-client.d.ts +69 -0
- package/dist/mcp-server/daemon-client.d.ts.map +1 -0
- package/dist/mcp-server/daemon-client.js +281 -0
- package/dist/mcp-server/daemon-client.js.map +1 -0
- package/dist/mcp-server/index.d.ts +3 -0
- package/dist/mcp-server/index.d.ts.map +1 -0
- package/dist/mcp-server/index.js +406 -0
- package/dist/mcp-server/index.js.map +1 -0
- package/dist/protocol/constants.d.ts +66 -0
- package/dist/protocol/constants.d.ts.map +1 -0
- package/dist/protocol/constants.js +66 -0
- package/dist/protocol/constants.js.map +1 -0
- package/dist/protocol/errors.d.ts +47 -0
- package/dist/protocol/errors.d.ts.map +1 -0
- package/dist/protocol/errors.js +62 -0
- package/dist/protocol/errors.js.map +1 -0
- package/dist/protocol/index.d.ts +5 -0
- package/dist/protocol/index.d.ts.map +1 -0
- package/dist/protocol/index.js +5 -0
- package/dist/protocol/index.js.map +1 -0
- package/dist/protocol/schemas.d.ts +209 -0
- package/dist/protocol/schemas.d.ts.map +1 -0
- package/dist/protocol/schemas.js +115 -0
- package/dist/protocol/schemas.js.map +1 -0
- package/dist/protocol/types.d.ts +302 -0
- package/dist/protocol/types.d.ts.map +1 -0
- package/dist/protocol/types.js +2 -0
- package/dist/protocol/types.js.map +1 -0
- package/package.json +50 -0
- package/scripts/postinstall.mjs +42 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
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, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by the Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding any notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
Copyright 2024 Amos Fiveworks
|
|
179
|
+
|
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
|
+
you may not use this file except in compliance with the License.
|
|
182
|
+
You may obtain a copy of the License at
|
|
183
|
+
|
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
+
|
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
189
|
+
See the License for the specific language governing permissions and
|
|
190
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
# Loopsy
|
|
2
|
+
|
|
3
|
+
Cross-machine communication for Claude Code. Run commands, transfer files, share context, and send messages between Claude Code instances on different machines over your LAN.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
Machine A (macOS) Machine B (Windows)
|
|
7
|
+
┌──────────────┐ ┌──────────────┐
|
|
8
|
+
│ Claude Code │ │ Claude Code │
|
|
9
|
+
│ + MCP Server │ │ + MCP Server │
|
|
10
|
+
│ │ │ │ │ │
|
|
11
|
+
│ Loopsy Daemon│◄── HTTP(S)/LAN ───►│ Loopsy Daemon│
|
|
12
|
+
│ :19532 │ │ :19532 │
|
|
13
|
+
└──────────────┘ └──────────────┘
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Install
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install -g loopsy
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Requires Node.js 20+. That's it — no cloning, no build step.
|
|
23
|
+
|
|
24
|
+
## Quick Start
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# 1. Initialize (generates config + API key, registers MCP with Claude Code)
|
|
28
|
+
loopsy init
|
|
29
|
+
|
|
30
|
+
# 2. Start the daemon
|
|
31
|
+
loopsy start
|
|
32
|
+
|
|
33
|
+
# 3. Pair with another machine
|
|
34
|
+
loopsy pair # on Machine A (displays invite code)
|
|
35
|
+
loopsy pair 192.168.1.50 # on Machine B (enters invite code)
|
|
36
|
+
|
|
37
|
+
# 4. Verify
|
|
38
|
+
loopsy doctor
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
After pairing, restart both daemons (`loopsy stop && loopsy start`). Open Claude Code and the `loopsy_*` MCP tools are available immediately.
|
|
42
|
+
|
|
43
|
+
### Auto-Start on Login
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
loopsy enable # registers as a system service (launchd / systemd / Task Scheduler)
|
|
47
|
+
loopsy disable # removes the system service
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## How It Works
|
|
51
|
+
|
|
52
|
+
Each machine runs a **Loopsy daemon** — a Fastify HTTP server on port 19532. Daemons communicate directly over HTTP (or HTTPS with TLS enabled). An **MCP server** exposes the daemon's capabilities as tools inside Claude Code.
|
|
53
|
+
|
|
54
|
+
Peers discover each other via mDNS or manual configuration. The `loopsy pair` command automates key exchange using ECDH with a 6-digit verification code — no manual copying of 64-character API keys.
|
|
55
|
+
|
|
56
|
+
## CLI Reference
|
|
57
|
+
|
|
58
|
+
### Setup & Status
|
|
59
|
+
|
|
60
|
+
| Command | Description |
|
|
61
|
+
|---|---|
|
|
62
|
+
| `loopsy init` | Generate config and API key; auto-registers MCP with Claude Code |
|
|
63
|
+
| `loopsy start` | Start the daemon |
|
|
64
|
+
| `loopsy stop` | Stop the daemon |
|
|
65
|
+
| `loopsy status` | Show daemon status (peers, jobs, context) |
|
|
66
|
+
| `loopsy doctor` | Health check — config, daemon, MCP, TLS, peers, service |
|
|
67
|
+
|
|
68
|
+
### Networking
|
|
69
|
+
|
|
70
|
+
| Command | Description |
|
|
71
|
+
|---|---|
|
|
72
|
+
| `loopsy pair [address]` | Secure pairing (no address = wait for peer; with address = connect) |
|
|
73
|
+
| `loopsy connect` | Interactive wizard for manual peer setup |
|
|
74
|
+
| `loopsy peers` | List known peers |
|
|
75
|
+
| `loopsy peers add <ip> [port]` | Add a manual peer |
|
|
76
|
+
| `loopsy peers remove <nodeId>` | Remove a peer |
|
|
77
|
+
|
|
78
|
+
### Remote Operations
|
|
79
|
+
|
|
80
|
+
| Command | Description |
|
|
81
|
+
|---|---|
|
|
82
|
+
| `loopsy exec <peer> <cmd..>` | Execute a command on a remote peer |
|
|
83
|
+
| `loopsy send <peer> <src> <dest>` | Push a file to a peer |
|
|
84
|
+
| `loopsy pull <peer> <src> <dest>` | Pull a file from a peer |
|
|
85
|
+
|
|
86
|
+
### Context Store
|
|
87
|
+
|
|
88
|
+
| Command | Description |
|
|
89
|
+
|---|---|
|
|
90
|
+
| `loopsy context set <key> <value>` | Set a shared value (optional `--ttl`) |
|
|
91
|
+
| `loopsy context get <key>` | Get a value |
|
|
92
|
+
| `loopsy context list` | List all entries |
|
|
93
|
+
| `loopsy context delete <key>` | Delete an entry |
|
|
94
|
+
|
|
95
|
+
### System Service
|
|
96
|
+
|
|
97
|
+
| Command | Description |
|
|
98
|
+
|---|---|
|
|
99
|
+
| `loopsy enable` | Auto-start daemon on login (launchd / systemd / Task Scheduler) |
|
|
100
|
+
| `loopsy disable` | Remove auto-start |
|
|
101
|
+
| `loopsy service-status` | Check registration status |
|
|
102
|
+
|
|
103
|
+
### MCP Management
|
|
104
|
+
|
|
105
|
+
| Command | Description |
|
|
106
|
+
|---|---|
|
|
107
|
+
| `loopsy mcp add` | Register MCP server with Claude Code |
|
|
108
|
+
| `loopsy mcp remove` | Unregister MCP server |
|
|
109
|
+
| `loopsy mcp status` | Check registration |
|
|
110
|
+
|
|
111
|
+
### Multi-Session
|
|
112
|
+
|
|
113
|
+
Run multiple daemon instances per machine, each as an independent peer:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
loopsy session start-fleet --count 3 # starts worker-1, worker-2, worker-3
|
|
117
|
+
loopsy session list # show all sessions
|
|
118
|
+
loopsy session stop-all # stop everything
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Each session gets a unique port (19533+), hostname (`<host>-worker-N`), and isolated data directory (`~/.loopsy/sessions/<name>/`).
|
|
122
|
+
|
|
123
|
+
| Command | Description |
|
|
124
|
+
|---|---|
|
|
125
|
+
| `loopsy session start <name>` | Start a named session |
|
|
126
|
+
| `loopsy session start-fleet -c N` | Start N worker sessions |
|
|
127
|
+
| `loopsy session stop <name>` | Stop a session |
|
|
128
|
+
| `loopsy session stop-all` | Stop all sessions |
|
|
129
|
+
| `loopsy session list` | List sessions with status |
|
|
130
|
+
| `loopsy session status <name>` | Detailed session status |
|
|
131
|
+
|
|
132
|
+
### Other
|
|
133
|
+
|
|
134
|
+
| Command | Description |
|
|
135
|
+
|---|---|
|
|
136
|
+
| `loopsy dashboard` | Start the web dashboard (default port 19540) |
|
|
137
|
+
| `loopsy key show` | Show current API key |
|
|
138
|
+
| `loopsy key generate` | Generate a new API key |
|
|
139
|
+
| `loopsy logs [-f]` | View audit logs |
|
|
140
|
+
|
|
141
|
+
## MCP Tools
|
|
142
|
+
|
|
143
|
+
When the MCP server is registered with Claude Code (done automatically by `loopsy init`), these tools are available:
|
|
144
|
+
|
|
145
|
+
| Tool | Description |
|
|
146
|
+
|---|---|
|
|
147
|
+
| `loopsy_list_peers` | List all peers with online/offline status |
|
|
148
|
+
| `loopsy_peer_status` | Detailed status for a specific peer |
|
|
149
|
+
| `loopsy_execute` | Run a command on a remote peer |
|
|
150
|
+
| `loopsy_transfer_file` | Push or pull files between machines |
|
|
151
|
+
| `loopsy_list_remote_files` | Browse a directory on a remote peer |
|
|
152
|
+
| `loopsy_context_set` | Store a key-value pair locally or on a peer |
|
|
153
|
+
| `loopsy_context_get` | Retrieve a value |
|
|
154
|
+
| `loopsy_context_list` | List entries with optional prefix filter |
|
|
155
|
+
| `loopsy_context_delete` | Delete an entry |
|
|
156
|
+
| `loopsy_broadcast_context` | Set a value on ALL online peers |
|
|
157
|
+
| `loopsy_send_message` | Send a protocol-compliant message (auto-handles envelope, inbox key, outbox copy, TTL) |
|
|
158
|
+
| `loopsy_check_inbox` | Check inbox for new messages |
|
|
159
|
+
| `loopsy_ack_message` | Acknowledge a received message |
|
|
160
|
+
| `loopsy_check_ack` | Check if a peer acknowledged your messages |
|
|
161
|
+
|
|
162
|
+
The MCP server also exposes resources (`loopsy://peers`, `loopsy://status`, `loopsy://context`) and prompts (`loopsy_help`, `loopsy_coordinate`).
|
|
163
|
+
|
|
164
|
+
### Manual MCP Registration
|
|
165
|
+
|
|
166
|
+
If `loopsy init` didn't auto-register (e.g., Claude Code wasn't installed yet):
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
loopsy mcp add
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Or manually:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
claude mcp add loopsy -- node $(npm root -g)/loopsy/dist/mcp-server/index.js
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
## Pairing Protocol
|
|
179
|
+
|
|
180
|
+
`loopsy pair` replaces manual API key exchange with a secure ECDH handshake:
|
|
181
|
+
|
|
182
|
+
1. **Machine A** runs `loopsy pair` — daemon generates a 6-digit invite code
|
|
183
|
+
2. **Machine B** runs `loopsy pair <A's IP>` — enters the invite code
|
|
184
|
+
3. Both machines perform ECDH key exchange (P-256) and derive a Short Authentication String (SAS)
|
|
185
|
+
4. Both users confirm the 6-digit SAS matches on their screens
|
|
186
|
+
5. API keys and TLS certificate fingerprints are exchanged automatically
|
|
187
|
+
6. Both configs are updated — restart daemons to connect
|
|
188
|
+
|
|
189
|
+
The pairing session expires after 5 minutes. No secrets are transmitted in plaintext.
|
|
190
|
+
|
|
191
|
+
## TLS
|
|
192
|
+
|
|
193
|
+
Loopsy supports optional HTTPS for all peer-to-peer communication:
|
|
194
|
+
|
|
195
|
+
1. Enable in `~/.loopsy/config.yaml`:
|
|
196
|
+
```yaml
|
|
197
|
+
tls:
|
|
198
|
+
enabled: true
|
|
199
|
+
```
|
|
200
|
+
2. Restart the daemon — a self-signed EC certificate is generated at `~/.loopsy/tls/`
|
|
201
|
+
3. When pairing, certificate fingerprints are exchanged and pinned automatically
|
|
202
|
+
|
|
203
|
+
The daemon falls back to HTTP for peers that don't support TLS. Local connections (MCP server, dashboard) always use HTTP on localhost.
|
|
204
|
+
|
|
205
|
+
## Web Dashboard
|
|
206
|
+
|
|
207
|
+
A browser-based UI for monitoring and control:
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
loopsy dashboard # opens on port 19540
|
|
211
|
+
loopsy dashboard -p 8080 # custom port
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
The dashboard provides:
|
|
215
|
+
- **Overview** — aggregate status across all sessions and peers
|
|
216
|
+
- **Peers** — deduplicated peer list with health status
|
|
217
|
+
- **Context** — browse and manage the key-value store
|
|
218
|
+
- **Messages** — unified inbox/outbox, compose and send messages
|
|
219
|
+
- **AI Tasks** — dispatch, monitor, stream output, approve/deny permissions, and cancel tasks
|
|
220
|
+
- **Terminal** — execute streaming commands on any local session
|
|
221
|
+
|
|
222
|
+
The dashboard proxies requests to all local daemon sessions, giving a unified view even with multiple workers running.
|
|
223
|
+
|
|
224
|
+
## AI Task Dispatch
|
|
225
|
+
|
|
226
|
+
Loopsy can dispatch Claude Code tasks to run on any machine:
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
# Via REST API
|
|
230
|
+
curl -X POST http://localhost:19532/api/v1/ai-tasks \
|
|
231
|
+
-H "Authorization: Bearer $API_KEY" \
|
|
232
|
+
-H "Content-Type: application/json" \
|
|
233
|
+
-d '{"prompt": "List all TODO comments in this repo", "cwd": "/path/to/project"}'
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
Tasks run Claude CLI via PTY for real-time streaming. Permission requests (tool approvals) are surfaced through the dashboard or API. Up to 3 concurrent AI tasks per daemon (configurable).
|
|
237
|
+
|
|
238
|
+
## REST API
|
|
239
|
+
|
|
240
|
+
Base URL: `http(s)://<host>:19532/api/v1`
|
|
241
|
+
|
|
242
|
+
All endpoints except `/health` require `Authorization: Bearer <api_key>`.
|
|
243
|
+
|
|
244
|
+
### Health & Status
|
|
245
|
+
|
|
246
|
+
| Method | Path | Description |
|
|
247
|
+
|---|---|---|
|
|
248
|
+
| GET | `/health` | Health check (no auth required) |
|
|
249
|
+
| GET | `/status` | Daemon status with peer/job/context counts |
|
|
250
|
+
| GET | `/identity` | Node identity (nodeId, hostname, platform, capabilities) |
|
|
251
|
+
|
|
252
|
+
### Peers
|
|
253
|
+
|
|
254
|
+
| Method | Path | Description |
|
|
255
|
+
|---|---|---|
|
|
256
|
+
| GET | `/peers` | List all known peers |
|
|
257
|
+
| POST | `/peers` | Add a manual peer |
|
|
258
|
+
| DELETE | `/peers/:nodeId` | Remove a peer |
|
|
259
|
+
| POST | `/peers/handshake` | Peer registration handshake |
|
|
260
|
+
|
|
261
|
+
### Remote Execution
|
|
262
|
+
|
|
263
|
+
| Method | Path | Description |
|
|
264
|
+
|---|---|---|
|
|
265
|
+
| POST | `/execute` | Run a command; returns stdout, stderr, exitCode |
|
|
266
|
+
| POST | `/execute/stream` | Run with SSE streaming |
|
|
267
|
+
| DELETE | `/execute/:jobId` | Cancel a running job |
|
|
268
|
+
| GET | `/execute/jobs` | List active jobs |
|
|
269
|
+
|
|
270
|
+
### File Transfer
|
|
271
|
+
|
|
272
|
+
| Method | Path | Description |
|
|
273
|
+
|---|---|---|
|
|
274
|
+
| POST | `/transfer/push` | Receive a file (multipart upload) |
|
|
275
|
+
| POST | `/transfer/pull` | Send a file (octet-stream response) |
|
|
276
|
+
| POST | `/transfer/list` | List a directory |
|
|
277
|
+
|
|
278
|
+
### Context Store
|
|
279
|
+
|
|
280
|
+
| Method | Path | Description |
|
|
281
|
+
|---|---|---|
|
|
282
|
+
| PUT | `/context/:key` | Set a value (`{value, ttl?}`) |
|
|
283
|
+
| GET | `/context/:key` | Get a value |
|
|
284
|
+
| DELETE | `/context/:key` | Delete a value |
|
|
285
|
+
| GET | `/context` | List all entries (optional `?prefix=` filter) |
|
|
286
|
+
|
|
287
|
+
### AI Tasks
|
|
288
|
+
|
|
289
|
+
| Method | Path | Description |
|
|
290
|
+
|---|---|---|
|
|
291
|
+
| POST | `/ai-tasks` | Dispatch a new AI task |
|
|
292
|
+
| GET | `/ai-tasks` | List all tasks |
|
|
293
|
+
| GET | `/ai-tasks/:id` | Get task status |
|
|
294
|
+
| GET | `/ai-tasks/:id/stream` | SSE event stream (`?since=` for reconnect) |
|
|
295
|
+
| POST | `/ai-tasks/:id/approve` | Approve or deny a permission request |
|
|
296
|
+
| DELETE | `/ai-tasks/:id` | Cancel or delete a task |
|
|
297
|
+
|
|
298
|
+
### Pairing
|
|
299
|
+
|
|
300
|
+
| Method | Path | Description |
|
|
301
|
+
|---|---|---|
|
|
302
|
+
| POST | `/pair/start` | Start a pairing session (returns invite code) |
|
|
303
|
+
| POST | `/pair/initiate` | Peer sends public key + invite code |
|
|
304
|
+
| POST | `/pair/confirm` | Confirm or cancel after SAS verification |
|
|
305
|
+
| GET | `/pair/status` | Check pairing session state |
|
|
306
|
+
|
|
307
|
+
## Configuration
|
|
308
|
+
|
|
309
|
+
Config file: `~/.loopsy/config.yaml`
|
|
310
|
+
|
|
311
|
+
```yaml
|
|
312
|
+
server:
|
|
313
|
+
port: 19532
|
|
314
|
+
host: 0.0.0.0
|
|
315
|
+
hostname: leo # optional custom hostname
|
|
316
|
+
|
|
317
|
+
auth:
|
|
318
|
+
apiKey: <auto-generated>
|
|
319
|
+
allowedKeys:
|
|
320
|
+
peer-name: <peer-api-key> # added automatically by loopsy pair
|
|
321
|
+
|
|
322
|
+
tls:
|
|
323
|
+
enabled: false # set to true for HTTPS
|
|
324
|
+
pinnedCerts: # populated by loopsy pair
|
|
325
|
+
peer-name: <sha256-hex>
|
|
326
|
+
|
|
327
|
+
execution:
|
|
328
|
+
denylist: [rm, rmdir, format, mkfs, dd, shutdown, reboot]
|
|
329
|
+
maxConcurrent: 10
|
|
330
|
+
defaultTimeout: 300000 # 5 minutes
|
|
331
|
+
|
|
332
|
+
transfer:
|
|
333
|
+
allowedPaths: [/Users/you]
|
|
334
|
+
deniedPaths: [/Users/you/.ssh, /Users/you/.gnupg]
|
|
335
|
+
maxFileSize: 1073741824 # 1 GB
|
|
336
|
+
|
|
337
|
+
rateLimits:
|
|
338
|
+
execute: 30 # requests per minute
|
|
339
|
+
transfer: 10
|
|
340
|
+
context: 60
|
|
341
|
+
|
|
342
|
+
discovery:
|
|
343
|
+
enabled: true
|
|
344
|
+
manualPeers:
|
|
345
|
+
- address: 192.168.1.75
|
|
346
|
+
port: 19532
|
|
347
|
+
|
|
348
|
+
logging:
|
|
349
|
+
level: info
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
## Data Storage
|
|
353
|
+
|
|
354
|
+
Default location: `~/.loopsy/`
|
|
355
|
+
|
|
356
|
+
| Path | Purpose |
|
|
357
|
+
|---|---|
|
|
358
|
+
| `config.yaml` | Daemon configuration |
|
|
359
|
+
| `context.json` | Key-value store |
|
|
360
|
+
| `peers.json` | Peer registry |
|
|
361
|
+
| `logs/audit.jsonl` | Request audit log |
|
|
362
|
+
| `daemon.pid` | Main daemon process ID |
|
|
363
|
+
| `tls/cert.pem` | Self-signed TLS certificate |
|
|
364
|
+
| `tls/key.pem` | TLS private key |
|
|
365
|
+
| `sessions/<name>/` | Per-session data (same structure) |
|
|
366
|
+
|
|
367
|
+
## Project Structure
|
|
368
|
+
|
|
369
|
+
```
|
|
370
|
+
packages/
|
|
371
|
+
protocol/ Shared types, schemas, constants
|
|
372
|
+
discovery/ mDNS peer discovery + health checking
|
|
373
|
+
daemon/ Fastify HTTP server (the core)
|
|
374
|
+
mcp-server/ MCP server for Claude Code integration
|
|
375
|
+
cli/ CLI tool (the loopsy binary)
|
|
376
|
+
dashboard/ Web UI for monitoring and control
|
|
377
|
+
scripts/
|
|
378
|
+
package.mjs Assembly script for npm packaging
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
## Security
|
|
382
|
+
|
|
383
|
+
- **Authentication**: Pre-shared API keys validated on every request (except `/health` and pairing endpoints)
|
|
384
|
+
- **Secure pairing**: ECDH key exchange with SAS verification — no plaintext secret transmission
|
|
385
|
+
- **TLS**: Optional HTTPS with self-signed certificates and cert pinning
|
|
386
|
+
- **Command denylist**: Configurable blocked commands (rm, shutdown, etc.)
|
|
387
|
+
- **Path restrictions**: File transfers limited to `allowedPaths` with `deniedPaths` exclusions
|
|
388
|
+
- **Rate limiting**: Per-category limits (execute: 30/min, transfer: 10/min, context: 60/min)
|
|
389
|
+
- **Audit logging**: Every request logged to `~/.loopsy/logs/audit.jsonl`
|
|
390
|
+
|
|
391
|
+
## Cross-Platform
|
|
392
|
+
|
|
393
|
+
Validated on macOS (arm64) and Windows 10 (x64, Git Bash).
|
|
394
|
+
|
|
395
|
+
- **Windows + Git Bash**: The daemon runs in Git Bash, so remote commands use Unix-style paths (`/c/Users/...`)
|
|
396
|
+
- **File transfers**: Both source and destination must be within `transfer.allowedPaths`
|
|
397
|
+
- **System service**: macOS uses launchd, Linux uses systemd user units, Windows uses Task Scheduler
|
|
398
|
+
|
|
399
|
+
## Development
|
|
400
|
+
|
|
401
|
+
For contributing or running from source:
|
|
402
|
+
|
|
403
|
+
```bash
|
|
404
|
+
git clone https://github.com/leox255/loopsy.git
|
|
405
|
+
cd loopsy
|
|
406
|
+
pnpm install
|
|
407
|
+
pnpm build
|
|
408
|
+
node packages/cli/dist/index.js init
|
|
409
|
+
node packages/cli/dist/index.js start
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
### Packaging
|
|
413
|
+
|
|
414
|
+
To build the npm package locally:
|
|
415
|
+
|
|
416
|
+
```bash
|
|
417
|
+
pnpm build
|
|
418
|
+
node scripts/package.mjs
|
|
419
|
+
cd package-dist && npm pack
|
|
420
|
+
npm install -g ./loopsy-*.tgz
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
## License
|
|
424
|
+
|
|
425
|
+
Apache License 2.0 — see [LICENSE](LICENSE) for details.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../src/commands/connect.ts"],"names":[],"mappings":"AA4BA,wBAAsB,cAAc,kBAwGnC"}
|