Metadata-Version: 2.4
Name: dialoghelper
Version: 0.2.44
Summary: Helper functions for solveit dialogs
Author-email: Jeremy Howard <github@jhoward.fastmail.fm>
License: Apache-2.0
Project-URL: Repository, https://github.com/AnswerDotAI/dialoghelper
Project-URL: Documentation, https://AnswerDotAI.github.io/dialoghelper
Keywords: nbdev,jupyter,notebook,python
Classifier: Natural Language :: English
Classifier: Intended Audience :: Developers
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aidialog>=0.0.34
Requires-Dist: fastcore>=2.2.7
Requires-Dist: fasttransport>=0.0.2
Requires-Dist: ghapi>=2.0.0
Requires-Dist: ipykernel-helper>=0.0.28
Requires-Dist: ipymini>=0.1.21
Requires-Dist: jupyasyncclient>=0.2.16
Requires-Dist: python-fastllm
Requires-Dist: pyskills>=0.0.33
Requires-Dist: rgapi>=0.1.8
Requires-Dist: toolslm>=0.3.30
Requires-Dist: exhash>=0.3.14
Requires-Dist: safepyrun>=0.0.23
Requires-Dist: ast-grep-cli
Requires-Dist: ast-grep-py
Requires-Dist: restrictedpython
Requires-Dist: restrictedpython-async
Requires-Dist: websockets
Requires-Dist: pillow
Requires-Dist: pyjwt
Requires-Dist: tracefunc
Provides-Extra: dev
Requires-Dist: python-fasthtml; extra == "dev"
Requires-Dist: tracefunc; extra == "dev"
Requires-Dist: nbdev; extra == "dev"
Dynamic: license-file

# dialoghelper


<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

## Usage

### Installation

Install from [pypi](https://pypi.org/project/dialoghelper/)

``` sh
$ pip install dialoghelper
```

### Documentation

Documentation can be found hosted on this GitHub [repository](https://github.com/AnswerDotAI/dialoghelper)’s [pages](https://AnswerDotAI.github.io/dialoghelper/).

### Dialog identity and filenames

Current-session reads, edits, execution and browser callbacks use `dh_settings['kid']`, initialized from `RUSTYGATE_KERNEL_ID`. The gateway owns the notebook binding. Renames and restarts retain the kernel id. `curr_dialog(dname='')` returns the notebook’s current `name` and `mode` from the gateway. Explicit `dname` arguments remain file-based.

Dialog names include `.ipynb`. Inputs such as `lesson.ipynb` resolve relative to the current dialog’s folder. A leading slash, as in `/project/lesson.ipynb`, addresses the gateway root rather than the disk root. [`find_dname`](https://AnswerDotAI.github.io/dialoghelper/core.html#find_dname) and [`curr_dialog`](https://AnswerDotAI.github.io/dialoghelper/core.html#curr_dialog) return gateway-root-relative filenames without a leading slash. [`list_dialogs`](https://AnswerDotAI.github.io/dialoghelper/core.html#list_dialogs) retains notebook extensions and marks folders with a trailing slash.

[`realpath()`](https://AnswerDotAI.github.io/dialoghelper/core.html#realpath) returns the gateway’s on-disk root. `realpath('')` and [`list_dialogs()`](https://AnswerDotAI.github.io/dialoghelper/core.html#list_dialogs) default to the current notebook’s folder. Relative subpaths use that folder even after a notebook rename, not the kernel’s mutable cwd. A leading slash uses the gateway root. [`realpath`](https://AnswerDotAI.github.io/dialoghelper/core.html#realpath) accepts prospective paths without creating them. `..` can move up within the root. The gateway resolves symlinks within its root and rejects dangling symlinks and paths escaping the root. Notebook-relative paths require a bound kernel.

### Folder-local skills

Solveit activates pyskills from the dialog’s opening folder before loading its tool layer. Put a public `.py` module or package in a `_pyskills/` directory there or in an ancestor. Give it a module docstring. `list_pyskills()` discovers it and ordinary imports load it without an install or entry-point declaration. The nearest local folder wins. Changing cwd or moving a live dialog does not change the selected scope; restart its kernel to use the new location. Function permissions remain separate from discovery.
