Metadata-Version: 2.1
Name: databricks-remote-tool-bootstrap
Version: 0.1.0
Summary: Secure bootstrap launcher for the Databricks Remote Tool Host
License: ## DB license
        
        **Definitions**.
        
        Agreement: The agreement between Databricks, Inc., and you governing the use of the Databricks Services, as that term is defined in the Master Cloud Services Agreement (MCSA) located at www.databricks.com/legal/mcsa.
        
        Licensed Materials: The source code, object code, data, and/or other works to which this license applies.
        
        **Scope of Use**. You may not use the Licensed Materials except in connection with your use of the Databricks Services pursuant to the Agreement. Your use of the Licensed Materials must comply at all times with any restrictions applicable to the Databricks Services, generally, and must be used in accordance with any applicable documentation. You may view, use, copy, modify, publish, and/or distribute the Licensed Materials solely for the purposes of using the Licensed Materials within or connecting to the Databricks Services. If you do not agree to these terms, you may not view, use, copy, modify, publish, and/or distribute the Licensed Materials.
        
        **Redistribution**. You may redistribute and sublicense the Licensed Materials so long as all use is in compliance with these terms. In addition:
        
        -   You must give any other recipients a copy of this License;
        -   You must cause any modified files to carry prominent notices stating that you changed the files;
        -   You must retain, in any derivative works that you distribute, all copyright, patent, trademark, and attribution notices, excluding those notices that do not pertain to any part of the derivative works; and
        -   If a "NOTICE" text file is provided as part of its distribution, then any derivative works that you distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the derivative works.
        
        You may add your own copyright statement to your modifications and may provide additional license terms and conditions for use, reproduction, or distribution of your modifications, or for any such derivative works as a whole, provided your use, reproduction, and distribution of the Licensed Materials otherwise complies with the conditions stated in this License.
        
        **Termination**. This license terminates automatically upon your breach of these terms or upon the termination of your Agreement. Additionally, Databricks may terminate this license at any time on notice. Upon termination, you must permanently delete the Licensed Materials and all copies thereof.
        
        **DISCLAIMER; LIMITATION OF LIABILITY.**
        
        THE LICENSED MATERIALS ARE PROVIDED “AS-IS” AND WITH ALL FAULTS. DATABRICKS, ON BEHALF OF ITSELF AND ITS LICENSORS, SPECIFICALLY DISCLAIMS ALL WARRANTIES RELATING TO THE LICENSED MATERIALS, EXPRESS AND IMPLIED, INCLUDING, WITHOUT LIMITATION, IMPLIED WARRANTIES, CONDITIONS AND OTHER TERMS OF MERCHANTABILITY, SATISFACTORY QUALITY OR FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. DATABRICKS AND ITS LICENSORS TOTAL AGGREGATE LIABILITY RELATING TO OR ARISING OUT OF YOUR USE OF OR DATABRICKS’ PROVISIONING OF THE LICENSED MATERIALS SHALL BE LIMITED TO ONE THOUSAND ($1,000) DOLLARS. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE LICENSED MATERIALS OR THE USE OR OTHER DEALINGS IN THE LICENSED MATERIALS.
        
Project-URL: Repository, https://github.com/Chien-wang/chatdataagent
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: <3.15,>=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.md
License-File: NOTICE.md
Requires-Dist: databricks-sdk==0.83.0

# Databricks Remote Tool Bootstrap

A small launcher that authenticates to a Databricks workspace, verifies the registered Builder App, downloads the App's private Remote Tool Host wheel, validates its size, SHA-256 digest and package metadata, and runs it from a dedicated virtual environment.

The public bootstrap package does not contain the Remote Tool Host implementation, App configuration, credentials, signing keys or persistent Host identity.

## Usage

PowerShell:

```powershell
& { $previousPipConfigFile = $env:PIP_CONFIG_FILE; try { $env:PIP_CONFIG_FILE = 'nul'; py -I -m pip --isolated install --index-url https://pypi.org/simple --upgrade --force-reinstall --no-cache-dir --only-binary=:all: "databricks-remote-tool-bootstrap==0.1.0"; if (-not $?) { if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }; exit 1 } } finally { $env:PIP_CONFIG_FILE = $previousPipConfigFile } }
py -I -m databricks_remote_tool_bootstrap --app-url https://your-app.databricksapps.com --app-name your-app --workspace-host https://your-workspace --oauth-client-id your-public-oauth-client-id
```

Bash:

```bash
PIP_CONFIG_FILE=/dev/null python3 -I -m pip --isolated install --index-url https://pypi.org/simple --upgrade --force-reinstall --no-cache-dir --only-binary=:all: "databricks-remote-tool-bootstrap==0.1.0" && \
  python3 -I -m databricks_remote_tool_bootstrap --app-url https://your-app.databricksapps.com --app-name your-app --workspace-host https://your-workspace --oauth-client-id your-public-oauth-client-id
```

Using the same isolated interpreter for installation and launch excludes the
current directory and `PYTHONPATH`, so local `pip.py` or
`databricks_remote_tool_bootstrap` files cannot shadow the reviewed modules.
The install temporarily points `PIP_CONFIG_FILE` at the platform null device;
together with pip's `--isolated` mode, this excludes global, site, user, and
environment-provided alternate package locations. The exact launcher version
is force-reinstalled as a wheel from the official PyPI index with the local
download cache disabled, replacing different same-version bytes already on the
machine. Invoking the module also avoids resolving a stale `remote-start`
executable from another Python environment.

The launcher opens Databricks external-browser OAuth with the App-provided
public client ID. It creates and validates the private environment with
isolated Python processes from controlled directories, removes inherited
Python startup settings, and disables pip configuration before installing the
authenticated wheel. It prepares a SHA-256-scoped Host environment,
force-installs and verifies that wheel's installed source, then starts one Host
`login-run` process. That process retains the machine lock while it registers
the computer on first use and throughout the foreground run; later runs
preserve the Host identity and reuse only an environment bound to the App's
current wheel digest.

Python 3.8 through 3.14 is supported. Python 3.9 must be 3.9.2 or newer.

## License and support

Use is limited to connecting to Databricks Services under the included `LICENSE.md`. See `NOTICE.md` for support and attribution information.
