@mmmbuto/gemini-cli-termux 0.20.2-termux
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 +202 -0
- package/README.md +194 -0
- package/bundle/gemini.js +468168 -0
- package/bundle/sandbox-macos-permissive-closed.sb +32 -0
- package/bundle/sandbox-macos-permissive-open.sb +27 -0
- package/bundle/sandbox-macos-permissive-proxied.sb +37 -0
- package/bundle/sandbox-macos-restrictive-closed.sb +93 -0
- package/bundle/sandbox-macos-restrictive-open.sb +96 -0
- package/bundle/sandbox-macos-restrictive-proxied.sb +98 -0
- package/package.json +161 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
(version 1)
|
|
2
|
+
|
|
3
|
+
;; allow everything by default
|
|
4
|
+
(allow default)
|
|
5
|
+
|
|
6
|
+
;; deny all writes EXCEPT under specific paths
|
|
7
|
+
(deny file-write*)
|
|
8
|
+
(allow file-write*
|
|
9
|
+
(subpath (param "TARGET_DIR"))
|
|
10
|
+
(subpath (param "TMP_DIR"))
|
|
11
|
+
(subpath (param "CACHE_DIR"))
|
|
12
|
+
(subpath (string-append (param "HOME_DIR") "/.gemini"))
|
|
13
|
+
(subpath (string-append (param "HOME_DIR") "/.npm"))
|
|
14
|
+
(subpath (string-append (param "HOME_DIR") "/.cache"))
|
|
15
|
+
(subpath (string-append (param "HOME_DIR") "/.gitconfig"))
|
|
16
|
+
;; Allow writes to included directories from --include-directories
|
|
17
|
+
(subpath (param "INCLUDE_DIR_0"))
|
|
18
|
+
(subpath (param "INCLUDE_DIR_1"))
|
|
19
|
+
(subpath (param "INCLUDE_DIR_2"))
|
|
20
|
+
(subpath (param "INCLUDE_DIR_3"))
|
|
21
|
+
(subpath (param "INCLUDE_DIR_4"))
|
|
22
|
+
(literal "/dev/stdout")
|
|
23
|
+
(literal "/dev/stderr")
|
|
24
|
+
(literal "/dev/null")
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
;; deny all inbound network traffic EXCEPT on debugger port
|
|
28
|
+
(deny network-inbound)
|
|
29
|
+
(allow network-inbound (local ip "localhost:9229"))
|
|
30
|
+
|
|
31
|
+
;; deny all outbound network traffic
|
|
32
|
+
(deny network-outbound)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
(version 1)
|
|
2
|
+
|
|
3
|
+
;; allow everything by default
|
|
4
|
+
(allow default)
|
|
5
|
+
|
|
6
|
+
;; deny all writes EXCEPT under specific paths
|
|
7
|
+
(deny file-write*)
|
|
8
|
+
(allow file-write*
|
|
9
|
+
(subpath (param "TARGET_DIR"))
|
|
10
|
+
(subpath (param "TMP_DIR"))
|
|
11
|
+
(subpath (param "CACHE_DIR"))
|
|
12
|
+
(subpath (string-append (param "HOME_DIR") "/.gemini"))
|
|
13
|
+
(subpath (string-append (param "HOME_DIR") "/.npm"))
|
|
14
|
+
(subpath (string-append (param "HOME_DIR") "/.cache"))
|
|
15
|
+
(subpath (string-append (param "HOME_DIR") "/.gitconfig"))
|
|
16
|
+
;; Allow writes to included directories from --include-directories
|
|
17
|
+
(subpath (param "INCLUDE_DIR_0"))
|
|
18
|
+
(subpath (param "INCLUDE_DIR_1"))
|
|
19
|
+
(subpath (param "INCLUDE_DIR_2"))
|
|
20
|
+
(subpath (param "INCLUDE_DIR_3"))
|
|
21
|
+
(subpath (param "INCLUDE_DIR_4"))
|
|
22
|
+
(literal "/dev/stdout")
|
|
23
|
+
(literal "/dev/stderr")
|
|
24
|
+
(literal "/dev/null")
|
|
25
|
+
(literal "/dev/ptmx")
|
|
26
|
+
(regex #"^/dev/ttys[0-9]*$")
|
|
27
|
+
)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
(version 1)
|
|
2
|
+
|
|
3
|
+
;; allow everything by default
|
|
4
|
+
(allow default)
|
|
5
|
+
|
|
6
|
+
;; deny all writes EXCEPT under specific paths
|
|
7
|
+
(deny file-write*)
|
|
8
|
+
(allow file-write*
|
|
9
|
+
(subpath (param "TARGET_DIR"))
|
|
10
|
+
(subpath (param "TMP_DIR"))
|
|
11
|
+
(subpath (param "CACHE_DIR"))
|
|
12
|
+
(subpath (string-append (param "HOME_DIR") "/.gemini"))
|
|
13
|
+
(subpath (string-append (param "HOME_DIR") "/.npm"))
|
|
14
|
+
(subpath (string-append (param "HOME_DIR") "/.cache"))
|
|
15
|
+
(subpath (string-append (param "HOME_DIR") "/.gitconfig"))
|
|
16
|
+
;; Allow writes to included directories from --include-directories
|
|
17
|
+
(subpath (param "INCLUDE_DIR_0"))
|
|
18
|
+
(subpath (param "INCLUDE_DIR_1"))
|
|
19
|
+
(subpath (param "INCLUDE_DIR_2"))
|
|
20
|
+
(subpath (param "INCLUDE_DIR_3"))
|
|
21
|
+
(subpath (param "INCLUDE_DIR_4"))
|
|
22
|
+
(literal "/dev/stdout")
|
|
23
|
+
(literal "/dev/stderr")
|
|
24
|
+
(literal "/dev/null")
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
;; deny all inbound network traffic EXCEPT on debugger port
|
|
28
|
+
(deny network-inbound)
|
|
29
|
+
(allow network-inbound (local ip "localhost:9229"))
|
|
30
|
+
|
|
31
|
+
;; deny all outbound network traffic EXCEPT through proxy on localhost:8877
|
|
32
|
+
;; set `GEMINI_SANDBOX_PROXY_COMMAND=<command>` to run proxy alongside sandbox
|
|
33
|
+
;; proxy must listen on :::8877 (see docs/examples/proxy-script.md)
|
|
34
|
+
(deny network-outbound)
|
|
35
|
+
(allow network-outbound (remote tcp "localhost:8877"))
|
|
36
|
+
|
|
37
|
+
(allow network-bind (local ip "*:*"))
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
(version 1)
|
|
2
|
+
|
|
3
|
+
;; deny everything by default
|
|
4
|
+
(deny default)
|
|
5
|
+
|
|
6
|
+
;; allow reading files from anywhere on host
|
|
7
|
+
(allow file-read*)
|
|
8
|
+
|
|
9
|
+
;; allow exec/fork (children inherit policy)
|
|
10
|
+
(allow process-exec)
|
|
11
|
+
(allow process-fork)
|
|
12
|
+
|
|
13
|
+
;; allow signals to self, e.g. SIGPIPE on write to closed pipe
|
|
14
|
+
(allow signal (target self))
|
|
15
|
+
|
|
16
|
+
;; allow read access to specific information about system
|
|
17
|
+
;; from https://source.chromium.org/chromium/chromium/src/+/main:sandbox/policy/mac/common.sb;l=273-319;drc=7b3962fe2e5fc9e2ee58000dc8fbf3429d84d3bd
|
|
18
|
+
(allow sysctl-read
|
|
19
|
+
(sysctl-name "hw.activecpu")
|
|
20
|
+
(sysctl-name "hw.busfrequency_compat")
|
|
21
|
+
(sysctl-name "hw.byteorder")
|
|
22
|
+
(sysctl-name "hw.cacheconfig")
|
|
23
|
+
(sysctl-name "hw.cachelinesize_compat")
|
|
24
|
+
(sysctl-name "hw.cpufamily")
|
|
25
|
+
(sysctl-name "hw.cpufrequency_compat")
|
|
26
|
+
(sysctl-name "hw.cputype")
|
|
27
|
+
(sysctl-name "hw.l1dcachesize_compat")
|
|
28
|
+
(sysctl-name "hw.l1icachesize_compat")
|
|
29
|
+
(sysctl-name "hw.l2cachesize_compat")
|
|
30
|
+
(sysctl-name "hw.l3cachesize_compat")
|
|
31
|
+
(sysctl-name "hw.logicalcpu_max")
|
|
32
|
+
(sysctl-name "hw.machine")
|
|
33
|
+
(sysctl-name "hw.ncpu")
|
|
34
|
+
(sysctl-name "hw.nperflevels")
|
|
35
|
+
(sysctl-name "hw.optional.arm.FEAT_BF16")
|
|
36
|
+
(sysctl-name "hw.optional.arm.FEAT_DotProd")
|
|
37
|
+
(sysctl-name "hw.optional.arm.FEAT_FCMA")
|
|
38
|
+
(sysctl-name "hw.optional.arm.FEAT_FHM")
|
|
39
|
+
(sysctl-name "hw.optional.arm.FEAT_FP16")
|
|
40
|
+
(sysctl-name "hw.optional.arm.FEAT_I8MM")
|
|
41
|
+
(sysctl-name "hw.optional.arm.FEAT_JSCVT")
|
|
42
|
+
(sysctl-name "hw.optional.arm.FEAT_LSE")
|
|
43
|
+
(sysctl-name "hw.optional.arm.FEAT_RDM")
|
|
44
|
+
(sysctl-name "hw.optional.arm.FEAT_SHA512")
|
|
45
|
+
(sysctl-name "hw.optional.armv8_2_sha512")
|
|
46
|
+
(sysctl-name "hw.packages")
|
|
47
|
+
(sysctl-name "hw.pagesize_compat")
|
|
48
|
+
(sysctl-name "hw.physicalcpu_max")
|
|
49
|
+
(sysctl-name "hw.tbfrequency_compat")
|
|
50
|
+
(sysctl-name "hw.vectorunit")
|
|
51
|
+
(sysctl-name "kern.hostname")
|
|
52
|
+
(sysctl-name "kern.maxfilesperproc")
|
|
53
|
+
(sysctl-name "kern.osproductversion")
|
|
54
|
+
(sysctl-name "kern.osrelease")
|
|
55
|
+
(sysctl-name "kern.ostype")
|
|
56
|
+
(sysctl-name "kern.osvariant_status")
|
|
57
|
+
(sysctl-name "kern.osversion")
|
|
58
|
+
(sysctl-name "kern.secure_kernel")
|
|
59
|
+
(sysctl-name "kern.usrstack64")
|
|
60
|
+
(sysctl-name "kern.version")
|
|
61
|
+
(sysctl-name "sysctl.proc_cputype")
|
|
62
|
+
(sysctl-name-prefix "hw.perflevel")
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
;; allow writes to specific paths
|
|
66
|
+
(allow file-write*
|
|
67
|
+
(subpath (param "TARGET_DIR"))
|
|
68
|
+
(subpath (param "TMP_DIR"))
|
|
69
|
+
(subpath (param "CACHE_DIR"))
|
|
70
|
+
(subpath (string-append (param "HOME_DIR") "/.gemini"))
|
|
71
|
+
(subpath (string-append (param "HOME_DIR") "/.npm"))
|
|
72
|
+
(subpath (string-append (param "HOME_DIR") "/.cache"))
|
|
73
|
+
(subpath (string-append (param "HOME_DIR") "/.gitconfig"))
|
|
74
|
+
;; Allow writes to included directories from --include-directories
|
|
75
|
+
(subpath (param "INCLUDE_DIR_0"))
|
|
76
|
+
(subpath (param "INCLUDE_DIR_1"))
|
|
77
|
+
(subpath (param "INCLUDE_DIR_2"))
|
|
78
|
+
(subpath (param "INCLUDE_DIR_3"))
|
|
79
|
+
(subpath (param "INCLUDE_DIR_4"))
|
|
80
|
+
(literal "/dev/stdout")
|
|
81
|
+
(literal "/dev/stderr")
|
|
82
|
+
(literal "/dev/null")
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
;; allow communication with sysmond for process listing (e.g. for pgrep)
|
|
86
|
+
(allow mach-lookup (global-name "com.apple.sysmond"))
|
|
87
|
+
|
|
88
|
+
;; enable terminal access required by ink
|
|
89
|
+
;; fixes setRawMode EPERM failure (at node:tty:81:24)
|
|
90
|
+
(allow file-ioctl (regex #"^/dev/tty.*"))
|
|
91
|
+
|
|
92
|
+
;; allow inbound network traffic on debugger port
|
|
93
|
+
(allow network-inbound (local ip "localhost:9229"))
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
(version 1)
|
|
2
|
+
|
|
3
|
+
;; deny everything by default
|
|
4
|
+
(deny default)
|
|
5
|
+
|
|
6
|
+
;; allow reading files from anywhere on host
|
|
7
|
+
(allow file-read*)
|
|
8
|
+
|
|
9
|
+
;; allow exec/fork (children inherit policy)
|
|
10
|
+
(allow process-exec)
|
|
11
|
+
(allow process-fork)
|
|
12
|
+
|
|
13
|
+
;; allow signals to self, e.g. SIGPIPE on write to closed pipe
|
|
14
|
+
(allow signal (target self))
|
|
15
|
+
|
|
16
|
+
;; allow read access to specific information about system
|
|
17
|
+
;; from https://source.chromium.org/chromium/chromium/src/+/main:sandbox/policy/mac/common.sb;l=273-319;drc=7b3962fe2e5fc9e2ee58000dc8fbf3429d84d3bd
|
|
18
|
+
(allow sysctl-read
|
|
19
|
+
(sysctl-name "hw.activecpu")
|
|
20
|
+
(sysctl-name "hw.busfrequency_compat")
|
|
21
|
+
(sysctl-name "hw.byteorder")
|
|
22
|
+
(sysctl-name "hw.cacheconfig")
|
|
23
|
+
(sysctl-name "hw.cachelinesize_compat")
|
|
24
|
+
(sysctl-name "hw.cpufamily")
|
|
25
|
+
(sysctl-name "hw.cpufrequency_compat")
|
|
26
|
+
(sysctl-name "hw.cputype")
|
|
27
|
+
(sysctl-name "hw.l1dcachesize_compat")
|
|
28
|
+
(sysctl-name "hw.l1icachesize_compat")
|
|
29
|
+
(sysctl-name "hw.l2cachesize_compat")
|
|
30
|
+
(sysctl-name "hw.l3cachesize_compat")
|
|
31
|
+
(sysctl-name "hw.logicalcpu_max")
|
|
32
|
+
(sysctl-name "hw.machine")
|
|
33
|
+
(sysctl-name "hw.ncpu")
|
|
34
|
+
(sysctl-name "hw.nperflevels")
|
|
35
|
+
(sysctl-name "hw.optional.arm.FEAT_BF16")
|
|
36
|
+
(sysctl-name "hw.optional.arm.FEAT_DotProd")
|
|
37
|
+
(sysctl-name "hw.optional.arm.FEAT_FCMA")
|
|
38
|
+
(sysctl-name "hw.optional.arm.FEAT_FHM")
|
|
39
|
+
(sysctl-name "hw.optional.arm.FEAT_FP16")
|
|
40
|
+
(sysctl-name "hw.optional.arm.FEAT_I8MM")
|
|
41
|
+
(sysctl-name "hw.optional.arm.FEAT_JSCVT")
|
|
42
|
+
(sysctl-name "hw.optional.arm.FEAT_LSE")
|
|
43
|
+
(sysctl-name "hw.optional.arm.FEAT_RDM")
|
|
44
|
+
(sysctl-name "hw.optional.arm.FEAT_SHA512")
|
|
45
|
+
(sysctl-name "hw.optional.armv8_2_sha512")
|
|
46
|
+
(sysctl-name "hw.packages")
|
|
47
|
+
(sysctl-name "hw.pagesize_compat")
|
|
48
|
+
(sysctl-name "hw.physicalcpu_max")
|
|
49
|
+
(sysctl-name "hw.tbfrequency_compat")
|
|
50
|
+
(sysctl-name "hw.vectorunit")
|
|
51
|
+
(sysctl-name "kern.hostname")
|
|
52
|
+
(sysctl-name "kern.maxfilesperproc")
|
|
53
|
+
(sysctl-name "kern.osproductversion")
|
|
54
|
+
(sysctl-name "kern.osrelease")
|
|
55
|
+
(sysctl-name "kern.ostype")
|
|
56
|
+
(sysctl-name "kern.osvariant_status")
|
|
57
|
+
(sysctl-name "kern.osversion")
|
|
58
|
+
(sysctl-name "kern.secure_kernel")
|
|
59
|
+
(sysctl-name "kern.usrstack64")
|
|
60
|
+
(sysctl-name "kern.version")
|
|
61
|
+
(sysctl-name "sysctl.proc_cputype")
|
|
62
|
+
(sysctl-name-prefix "hw.perflevel")
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
;; allow writes to specific paths
|
|
66
|
+
(allow file-write*
|
|
67
|
+
(subpath (param "TARGET_DIR"))
|
|
68
|
+
(subpath (param "TMP_DIR"))
|
|
69
|
+
(subpath (param "CACHE_DIR"))
|
|
70
|
+
(subpath (string-append (param "HOME_DIR") "/.gemini"))
|
|
71
|
+
(subpath (string-append (param "HOME_DIR") "/.npm"))
|
|
72
|
+
(subpath (string-append (param "HOME_DIR") "/.cache"))
|
|
73
|
+
(subpath (string-append (param "HOME_DIR") "/.gitconfig"))
|
|
74
|
+
;; Allow writes to included directories from --include-directories
|
|
75
|
+
(subpath (param "INCLUDE_DIR_0"))
|
|
76
|
+
(subpath (param "INCLUDE_DIR_1"))
|
|
77
|
+
(subpath (param "INCLUDE_DIR_2"))
|
|
78
|
+
(subpath (param "INCLUDE_DIR_3"))
|
|
79
|
+
(subpath (param "INCLUDE_DIR_4"))
|
|
80
|
+
(literal "/dev/stdout")
|
|
81
|
+
(literal "/dev/stderr")
|
|
82
|
+
(literal "/dev/null")
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
;; allow communication with sysmond for process listing (e.g. for pgrep)
|
|
86
|
+
(allow mach-lookup (global-name "com.apple.sysmond"))
|
|
87
|
+
|
|
88
|
+
;; enable terminal access required by ink
|
|
89
|
+
;; fixes setRawMode EPERM failure (at node:tty:81:24)
|
|
90
|
+
(allow file-ioctl (regex #"^/dev/tty.*"))
|
|
91
|
+
|
|
92
|
+
;; allow inbound network traffic on debugger port
|
|
93
|
+
(allow network-inbound (local ip "localhost:9229"))
|
|
94
|
+
|
|
95
|
+
;; allow all outbound network traffic
|
|
96
|
+
(allow network-outbound)
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
(version 1)
|
|
2
|
+
|
|
3
|
+
;; deny everything by default
|
|
4
|
+
(deny default)
|
|
5
|
+
|
|
6
|
+
;; allow reading files from anywhere on host
|
|
7
|
+
(allow file-read*)
|
|
8
|
+
|
|
9
|
+
;; allow exec/fork (children inherit policy)
|
|
10
|
+
(allow process-exec)
|
|
11
|
+
(allow process-fork)
|
|
12
|
+
|
|
13
|
+
;; allow signals to self, e.g. SIGPIPE on write to closed pipe
|
|
14
|
+
(allow signal (target self))
|
|
15
|
+
|
|
16
|
+
;; allow read access to specific information about system
|
|
17
|
+
;; from https://source.chromium.org/chromium/chromium/src/+/main:sandbox/policy/mac/common.sb;l=273-319;drc=7b3962fe2e5fc9e2ee58000dc8fbf3429d84d3bd
|
|
18
|
+
(allow sysctl-read
|
|
19
|
+
(sysctl-name "hw.activecpu")
|
|
20
|
+
(sysctl-name "hw.busfrequency_compat")
|
|
21
|
+
(sysctl-name "hw.byteorder")
|
|
22
|
+
(sysctl-name "hw.cacheconfig")
|
|
23
|
+
(sysctl-name "hw.cachelinesize_compat")
|
|
24
|
+
(sysctl-name "hw.cpufamily")
|
|
25
|
+
(sysctl-name "hw.cpufrequency_compat")
|
|
26
|
+
(sysctl-name "hw.cputype")
|
|
27
|
+
(sysctl-name "hw.l1dcachesize_compat")
|
|
28
|
+
(sysctl-name "hw.l1icachesize_compat")
|
|
29
|
+
(sysctl-name "hw.l2cachesize_compat")
|
|
30
|
+
(sysctl-name "hw.l3cachesize_compat")
|
|
31
|
+
(sysctl-name "hw.logicalcpu_max")
|
|
32
|
+
(sysctl-name "hw.machine")
|
|
33
|
+
(sysctl-name "hw.ncpu")
|
|
34
|
+
(sysctl-name "hw.nperflevels")
|
|
35
|
+
(sysctl-name "hw.optional.arm.FEAT_BF16")
|
|
36
|
+
(sysctl-name "hw.optional.arm.FEAT_DotProd")
|
|
37
|
+
(sysctl-name "hw.optional.arm.FEAT_FCMA")
|
|
38
|
+
(sysctl-name "hw.optional.arm.FEAT_FHM")
|
|
39
|
+
(sysctl-name "hw.optional.arm.FEAT_FP16")
|
|
40
|
+
(sysctl-name "hw.optional.arm.FEAT_I8MM")
|
|
41
|
+
(sysctl-name "hw.optional.arm.FEAT_JSCVT")
|
|
42
|
+
(sysctl-name "hw.optional.arm.FEAT_LSE")
|
|
43
|
+
(sysctl-name "hw.optional.arm.FEAT_RDM")
|
|
44
|
+
(sysctl-name "hw.optional.arm.FEAT_SHA512")
|
|
45
|
+
(sysctl-name "hw.optional.armv8_2_sha512")
|
|
46
|
+
(sysctl-name "hw.packages")
|
|
47
|
+
(sysctl-name "hw.pagesize_compat")
|
|
48
|
+
(sysctl-name "hw.physicalcpu_max")
|
|
49
|
+
(sysctl-name "hw.tbfrequency_compat")
|
|
50
|
+
(sysctl-name "hw.vectorunit")
|
|
51
|
+
(sysctl-name "kern.hostname")
|
|
52
|
+
(sysctl-name "kern.maxfilesperproc")
|
|
53
|
+
(sysctl-name "kern.osproductversion")
|
|
54
|
+
(sysctl-name "kern.osrelease")
|
|
55
|
+
(sysctl-name "kern.ostype")
|
|
56
|
+
(sysctl-name "kern.osvariant_status")
|
|
57
|
+
(sysctl-name "kern.osversion")
|
|
58
|
+
(sysctl-name "kern.secure_kernel")
|
|
59
|
+
(sysctl-name "kern.usrstack64")
|
|
60
|
+
(sysctl-name "kern.version")
|
|
61
|
+
(sysctl-name "sysctl.proc_cputype")
|
|
62
|
+
(sysctl-name-prefix "hw.perflevel")
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
;; allow writes to specific paths
|
|
66
|
+
(allow file-write*
|
|
67
|
+
(subpath (param "TARGET_DIR"))
|
|
68
|
+
(subpath (param "TMP_DIR"))
|
|
69
|
+
(subpath (param "CACHE_DIR"))
|
|
70
|
+
(subpath (string-append (param "HOME_DIR") "/.gemini"))
|
|
71
|
+
(subpath (string-append (param "HOME_DIR") "/.npm"))
|
|
72
|
+
(subpath (string-append (param "HOME_DIR") "/.cache"))
|
|
73
|
+
(subpath (string-append (param "HOME_DIR") "/.gitconfig"))
|
|
74
|
+
;; Allow writes to included directories from --include-directories
|
|
75
|
+
(subpath (param "INCLUDE_DIR_0"))
|
|
76
|
+
(subpath (param "INCLUDE_DIR_1"))
|
|
77
|
+
(subpath (param "INCLUDE_DIR_2"))
|
|
78
|
+
(subpath (param "INCLUDE_DIR_3"))
|
|
79
|
+
(subpath (param "INCLUDE_DIR_4"))
|
|
80
|
+
(literal "/dev/stdout")
|
|
81
|
+
(literal "/dev/stderr")
|
|
82
|
+
(literal "/dev/null")
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
;; allow communication with sysmond for process listing (e.g. for pgrep)
|
|
86
|
+
(allow mach-lookup (global-name "com.apple.sysmond"))
|
|
87
|
+
|
|
88
|
+
;; enable terminal access required by ink
|
|
89
|
+
;; fixes setRawMode EPERM failure (at node:tty:81:24)
|
|
90
|
+
(allow file-ioctl (regex #"^/dev/tty.*"))
|
|
91
|
+
|
|
92
|
+
;; allow inbound network traffic on debugger port
|
|
93
|
+
(allow network-inbound (local ip "localhost:9229"))
|
|
94
|
+
|
|
95
|
+
;; allow outbound network traffic through proxy on localhost:8877
|
|
96
|
+
;; set `GEMINI_SANDBOX_PROXY_COMMAND=<command>` to run proxy alongside sandbox
|
|
97
|
+
;; proxy must listen on :::8877 (see docs/examples/proxy-script.md)
|
|
98
|
+
(allow network-outbound (remote tcp "localhost:8877"))
|
package/package.json
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mmmbuto/gemini-cli-termux",
|
|
3
|
+
"version": "0.20.2-termux",
|
|
4
|
+
"description": "Gemini CLI Termux Edition (compatibilità Android)",
|
|
5
|
+
"engines": {
|
|
6
|
+
"node": ">=20.0.0"
|
|
7
|
+
},
|
|
8
|
+
"type": "module",
|
|
9
|
+
"workspaces": [
|
|
10
|
+
"packages/*"
|
|
11
|
+
],
|
|
12
|
+
"private": false,
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/DioNanos/gemini-cli.git"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"gemini",
|
|
19
|
+
"cli",
|
|
20
|
+
"ai",
|
|
21
|
+
"assistant",
|
|
22
|
+
"termux",
|
|
23
|
+
"android"
|
|
24
|
+
],
|
|
25
|
+
"author": "Google LLC (original), DioNanos (Termux port)",
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/DioNanos/gemini-cli/issues"
|
|
28
|
+
},
|
|
29
|
+
"homepage": "https://github.com/DioNanos/gemini-cli#readme",
|
|
30
|
+
"config": {
|
|
31
|
+
"sandboxImageUri": "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.20.0-nightly.20251201.2fe609cb6"
|
|
32
|
+
},
|
|
33
|
+
"scripts": {
|
|
34
|
+
"start": "cross-env NODE_ENV=development node scripts/start.js",
|
|
35
|
+
"start:a2a-server": "CODER_AGENT_PORT=41242 npm run start --workspace @google/gemini-cli-a2a-server",
|
|
36
|
+
"debug": "cross-env DEBUG=1 node --inspect-brk scripts/start.js",
|
|
37
|
+
"deflake": "node scripts/deflake.js",
|
|
38
|
+
"deflake:test:integration:sandbox:none": "npm run deflake -- --command=\"npm run test:integration:sandbox:none -- --retry=0\"",
|
|
39
|
+
"deflake:test:integration:sandbox:docker": "npm run deflake -- --command=\"npm run test:integration:sandbox:docker -- --retry=0\"",
|
|
40
|
+
"auth:npm": "npx google-artifactregistry-auth",
|
|
41
|
+
"auth:docker": "gcloud auth configure-docker us-west1-docker.pkg.dev",
|
|
42
|
+
"auth": "npm run auth:npm && npm run auth:docker",
|
|
43
|
+
"generate": "node scripts/generate-git-commit-info.js",
|
|
44
|
+
"predocs:settings": "npm run build --workspace @google/gemini-cli-core",
|
|
45
|
+
"schema:settings": "tsx ./scripts/generate-settings-schema.ts",
|
|
46
|
+
"docs:settings": "tsx ./scripts/generate-settings-doc.ts",
|
|
47
|
+
"docs:keybindings": "tsx ./scripts/generate-keybindings-doc.ts",
|
|
48
|
+
"build": "node scripts/build.js",
|
|
49
|
+
"build-and-start": "npm run build && npm run start",
|
|
50
|
+
"build:vscode": "node scripts/build_vscode_companion.js",
|
|
51
|
+
"build:all": "npm run build && npm run build:sandbox && npm run build:vscode",
|
|
52
|
+
"build:packages": "npm run build --workspaces",
|
|
53
|
+
"build:sandbox": "node scripts/build_sandbox.js",
|
|
54
|
+
"bundle": "npm run generate && node esbuild.config.js && node scripts/copy_bundle_assets.js",
|
|
55
|
+
"test": "npm run test --workspaces --if-present",
|
|
56
|
+
"test:ci": "npm run test:ci --workspaces --if-present && npm run test:scripts",
|
|
57
|
+
"test:scripts": "vitest run --config ./scripts/tests/vitest.config.ts",
|
|
58
|
+
"test:e2e": "cross-env VERBOSE=true KEEP_OUTPUT=true npm run test:integration:sandbox:none",
|
|
59
|
+
"test:integration:all": "npm run test:integration:sandbox:none && npm run test:integration:sandbox:docker && npm run test:integration:sandbox:podman",
|
|
60
|
+
"test:integration:sandbox:none": "cross-env GEMINI_SANDBOX=false vitest run --root ./integration-tests",
|
|
61
|
+
"test:integration:sandbox:docker": "cross-env GEMINI_SANDBOX=docker npm run build:sandbox && cross-env GEMINI_SANDBOX=docker vitest run --root ./integration-tests",
|
|
62
|
+
"test:integration:sandbox:podman": "cross-env GEMINI_SANDBOX=podman vitest run --root ./integration-tests",
|
|
63
|
+
"lint": "eslint . --ext .ts,.tsx && eslint integration-tests && eslint scripts",
|
|
64
|
+
"lint:fix": "eslint . --fix --ext .ts,.tsx && eslint integration-tests --fix && eslint scripts --fix && npm run format",
|
|
65
|
+
"lint:ci": "npm run lint:all",
|
|
66
|
+
"lint:all": "node scripts/lint.js",
|
|
67
|
+
"format": "prettier --experimental-cli --write .",
|
|
68
|
+
"typecheck": "npm run typecheck --workspaces --if-present",
|
|
69
|
+
"preflight": "npm run clean && npm ci && npm run format && npm run lint:ci && npm run build && npm run typecheck && npm run test:ci",
|
|
70
|
+
"prepare": "husky && npm run bundle",
|
|
71
|
+
"prepare:package": "node scripts/prepare-package.js",
|
|
72
|
+
"release:version": "node scripts/version.js",
|
|
73
|
+
"telemetry": "node scripts/telemetry.js",
|
|
74
|
+
"check:lockfile": "node scripts/check-lockfile.js",
|
|
75
|
+
"clean": "node scripts/clean.js",
|
|
76
|
+
"pre-commit": "node scripts/pre-commit.js"
|
|
77
|
+
},
|
|
78
|
+
"overrides": {
|
|
79
|
+
"ink": "npm:@jrichman/ink@6.4.6",
|
|
80
|
+
"wrap-ansi": "9.0.2",
|
|
81
|
+
"cliui": {
|
|
82
|
+
"wrap-ansi": "7.0.0"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"bin": {
|
|
86
|
+
"gemini": "bundle/gemini.js"
|
|
87
|
+
},
|
|
88
|
+
"files": [
|
|
89
|
+
"bundle/",
|
|
90
|
+
"README.md",
|
|
91
|
+
"LICENSE"
|
|
92
|
+
],
|
|
93
|
+
"devDependencies": {
|
|
94
|
+
"@octokit/rest": "^22.0.0",
|
|
95
|
+
"@types/marked": "^5.0.2",
|
|
96
|
+
"@types/mime-types": "^3.0.1",
|
|
97
|
+
"@types/minimatch": "^5.1.2",
|
|
98
|
+
"@types/mock-fs": "^4.13.4",
|
|
99
|
+
"@types/prompts": "^2.4.9",
|
|
100
|
+
"@types/react": "^19.2.0",
|
|
101
|
+
"@types/react-dom": "^19.2.0",
|
|
102
|
+
"@types/shell-quote": "^1.7.5",
|
|
103
|
+
"@vitest/coverage-v8": "^3.1.1",
|
|
104
|
+
"@vitest/eslint-plugin": "^1.3.4",
|
|
105
|
+
"cross-env": "^7.0.3",
|
|
106
|
+
"esbuild": "^0.25.0",
|
|
107
|
+
"esbuild-plugin-wasm": "^1.1.0",
|
|
108
|
+
"eslint": "^9.24.0",
|
|
109
|
+
"eslint-config-prettier": "^10.1.2",
|
|
110
|
+
"eslint-plugin-import": "^2.31.0",
|
|
111
|
+
"eslint-plugin-license-header": "^0.8.0",
|
|
112
|
+
"eslint-plugin-react": "^7.37.5",
|
|
113
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
114
|
+
"glob": "^12.0.0",
|
|
115
|
+
"globals": "^16.0.0",
|
|
116
|
+
"google-artifactregistry-auth": "^3.4.0",
|
|
117
|
+
"husky": "^9.1.7",
|
|
118
|
+
"ink-testing-library": "^4.0.0",
|
|
119
|
+
"json": "^11.0.0",
|
|
120
|
+
"lint-staged": "^16.1.6",
|
|
121
|
+
"memfs": "^4.42.0",
|
|
122
|
+
"mnemonist": "^0.40.3",
|
|
123
|
+
"mock-fs": "^5.5.0",
|
|
124
|
+
"msw": "^2.10.4",
|
|
125
|
+
"npm-run-all": "^4.1.5",
|
|
126
|
+
"prettier": "^3.5.3",
|
|
127
|
+
"react-devtools-core": "^6.1.2",
|
|
128
|
+
"semver": "^7.7.2",
|
|
129
|
+
"strip-ansi": "^7.1.2",
|
|
130
|
+
"tsx": "^4.20.3",
|
|
131
|
+
"typescript-eslint": "^8.30.1",
|
|
132
|
+
"vitest": "^3.2.4",
|
|
133
|
+
"yargs": "^17.7.2"
|
|
134
|
+
},
|
|
135
|
+
"dependencies": {
|
|
136
|
+
"ink": "npm:@jrichman/ink@6.4.6",
|
|
137
|
+
"latest-version": "^9.0.0",
|
|
138
|
+
"simple-git": "^3.28.0"
|
|
139
|
+
},
|
|
140
|
+
"optionalDependencies": {
|
|
141
|
+
"@lydell/node-pty": "1.1.0",
|
|
142
|
+
"@lydell/node-pty-darwin-arm64": "1.1.0",
|
|
143
|
+
"@lydell/node-pty-darwin-x64": "1.1.0",
|
|
144
|
+
"@lydell/node-pty-linux-x64": "1.1.0",
|
|
145
|
+
"@lydell/node-pty-win32-arm64": "1.1.0",
|
|
146
|
+
"@lydell/node-pty-win32-x64": "1.1.0",
|
|
147
|
+
"node-pty": "^1.0.0"
|
|
148
|
+
},
|
|
149
|
+
"lint-staged": {
|
|
150
|
+
"*.{js,jsx,ts,tsx}": [
|
|
151
|
+
"prettier --write",
|
|
152
|
+
"eslint --fix --max-warnings 0 --no-warn-ignored"
|
|
153
|
+
],
|
|
154
|
+
"eslint.config.js": [
|
|
155
|
+
"prettier --write"
|
|
156
|
+
],
|
|
157
|
+
"*.{json,md}": [
|
|
158
|
+
"prettier --write"
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
}
|