@hasna/sandboxes 0.1.24 → 0.1.25
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 +5 -15
- package/README.md +11 -0
- package/dist/mcp/http.d.ts +14 -0
- package/dist/mcp/index.js +826 -724
- package/dist/mcp/server.d.ts +3 -0
- package/dist/server/index.js +31276 -9235
- package/package.json +1 -1
package/LICENSE
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
|
|
1
2
|
Apache License
|
|
2
3
|
Version 2.0, January 2004
|
|
3
4
|
http://www.apache.org/licenses/
|
|
@@ -48,7 +49,7 @@
|
|
|
48
49
|
"Contribution" shall mean any work of authorship, including
|
|
49
50
|
the original version of the Work and any modifications or additions
|
|
50
51
|
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
52
53
|
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
54
|
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
55
|
means any form of electronic, verbal, or written communication sent
|
|
@@ -60,7 +61,7 @@
|
|
|
60
61
|
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
62
|
|
|
62
63
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
on behalf of whom a Contribution has been received by the Licensor and
|
|
64
65
|
subsequently incorporated within the Work.
|
|
65
66
|
|
|
66
67
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
@@ -106,7 +107,7 @@
|
|
|
106
107
|
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
108
|
distribution, then any Derivative Works that You distribute must
|
|
108
109
|
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding
|
|
110
|
+
within such NOTICE file, excluding any notices that do not
|
|
110
111
|
pertain to any part of the Derivative Works, in at least one
|
|
111
112
|
of the following places: within a NOTICE text file distributed
|
|
112
113
|
as part of the Derivative Works; within the Source form or
|
|
@@ -175,18 +176,7 @@
|
|
|
175
176
|
|
|
176
177
|
END OF TERMS AND CONDITIONS
|
|
177
178
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
To apply the Apache License to your work, attach the following
|
|
181
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
-
replaced with your own identifying information. (Don't include
|
|
183
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
-
comment syntax for the file format. We also recommend that a
|
|
185
|
-
file or class name and description of purpose be included on the
|
|
186
|
-
same "printed page" as the copyright notice for easier
|
|
187
|
-
identification within third-party archives.
|
|
188
|
-
|
|
189
|
-
Copyright [yyyy] [name of copyright owner]
|
|
179
|
+
Copyright 2026 Hasna, Inc.
|
|
190
180
|
|
|
191
181
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
182
|
you may not use this file except in compliance with the License.
|
package/README.md
CHANGED
|
@@ -25,6 +25,17 @@ sandboxes-mcp
|
|
|
25
25
|
|
|
26
26
|
41 tools available.
|
|
27
27
|
|
|
28
|
+
## HTTP mode
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
sandboxes-mcp --http # default port 8831
|
|
32
|
+
MCP_HTTP=1 sandboxes-mcp
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
- Health: `GET http://127.0.0.1:8831/health`
|
|
36
|
+
- MCP: `http://127.0.0.1:8831/mcp`
|
|
37
|
+
- Stdio remains default. `sandboxes-serve` also mounts `/health` and `/mcp`.
|
|
38
|
+
|
|
28
39
|
## REST API
|
|
29
40
|
|
|
30
41
|
```bash
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type Server } from "node:http";
|
|
2
|
+
export declare const DEFAULT_MCP_HTTP_PORT = 8831;
|
|
3
|
+
export declare function isHttpMode(argv: string[]): boolean;
|
|
4
|
+
export declare function resolveMcpHttpPort(argv: string[]): number;
|
|
5
|
+
export declare function healthPayload(name?: string): {
|
|
6
|
+
status: string;
|
|
7
|
+
name: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function handleMcpHttpRoutes(req: Request): Promise<Response | null>;
|
|
10
|
+
export declare function startMcpHttpServer(options?: {
|
|
11
|
+
port?: number;
|
|
12
|
+
hostname?: string;
|
|
13
|
+
onListening?: (port: number) => void;
|
|
14
|
+
}): Server;
|