This release is a pre-release and may not be stable for production use.
Hypnosis
Initial PyPI preview: 0.1.0a1. Data and training use published
parse-mw==0.1.0; optional profiles select exact published package versions.
No weights or datasets are distributed. Wispsy Releases
tracks verified publication separately from current main development.
Bounded harness execution, orchestration and a Carets terminal application. Python 3.14+. Source development is tracked in Cohesion Block B.
uv sync
uv run hypnosis demo --text 'Hello from Hypnosis.'
uv run hypnosis terminal --text 'Live output in Carets.'
demo uses a deterministic offline source and prints one JSON result. terminal
opens a Carets application on a supported POSIX terminal: Enter starts the run,
c cancels and q quits. There is one Program/TerminalSession owner. The
application displays a bounded text tail, escapes terminal control characters,
handles resize and closes producers before terminal restoration. Interactive
output uses stderr so command results remain separate on stdout.
Ordinary Python can use Harness.stream(factory, run_id=..., control=...) with
an async text source. The default limits are 4,096 events (including started and
terminal), 65,536 UTF-8 output bytes and 30 seconds including consumer delay.
Outcomes distinguish completion, cooperative cancellation, source failure and
budget exhaustion. External consumer/task cancellation propagates; cleanup does
not fabricate a successful terminal event. Producer exceptions are reported by
structural codes rather than private exception text. A limit may consume one
extra source item to discover exhaustion; effects of that item are not rolled
back.
hypnosis.execution.from_sync(factory) moves synchronous iteration and closure
to one owned worker with one next() in flight. Cancellation waits for that
operation before closing on the worker. It cannot forcibly stop Python code or
guarantee a hard inference deadline. model_text(adapter, prompt) adapts a
configured Thoughtform ThoughtformulaModel using the same mechanism. Install
uv sync --extra models to run the actual tiny-model integration tests; callers
still supply compatible model/tokenizer instances and serialize shared model
access. No model/data download, training or inference starts on import.
Selected tools use Hidden Moves catalogs; context uses Workspace and Parse MD; durable jobs use func_seq; records use Backpack; training stays in Thoughtformula. Measured harness trials use actual verifier outcomes and a heldout regression gate with explicit promotion. Ollama remains deferred. Importing the package never activates providers, trains weights or downloads data.
Harness workbench
uv sync --extra application
uv run hypnosis application-demo
uv run hypnosis app
uv run hypnosis stream --text 'Incremental process output.'
The application profile composes Carets 0.2.0's shared shell and typed snapshot
tables. The offline workflow retrieves a selected scratch document, calls an
explicit tool, verifies and repairs a saved artifact, and compares configurations
on validation/heldout cases. These are real service integrations using a small
deterministic exercise; they do not claim general autonomous problem solving.
app presents jobs, tools, context references, verification attempts, trials,
checkpoint metadata and private local output. Use 1–7 to change section, Tab to
change focus, arrows to navigate, c to cancel and q to quit. Press p to review a
promotion; the dialog defaults to Cancel and requires selecting Confirm.
Select --database PATH to retain structural receipts. Select both
--checkpoint-database PATH --checkpoint-root PATH to browse an existing
checkpoint collection read-only. With --extra models as well, --artifact PATH
loads an explicitly selected local Hero/Hero Coding sidecar for a bounded native
syntax probe. No generated Python is executed and syntax is not a functional
correctness test. No model weights change. See application composition,
tools, context, verification,
trials, jobs and
process streams.
Verify with PYTHONPATH=src python -m unittest discover -s tests. CI builds and
checks wheel/source installations outside the checkout on Linux, macOS and
Windows, with and without the optional real-model profile. Native Windows
terminal interaction is not claimed by those headless checks.
See the repository plan and the complete family plan.
Approved homegrown training data
The optional data profile reads explicitly selected local TinyStories,
Wikipedia multistream bz2/index, Wiktextract and UD files. hypnosis.data exposes
bounded corpus preparation with source snapshots, grouped held-out splits,
deduplication, citation markers and reproducible corpus receipts. It never
extracts the full Wikipedia dump or fetches reference URLs.
Source IDs are admitted by explicit reviewed catalogs. The internally generated v1 pilot remains reproducible under source review #13. The later approved Python vault/tutorials, docs and wiki snapshots are tracked under source review #27; future sources and recipe changes retain their own review. Fingerprints are labeled stat-plus-head/tail samples, not full-dump checksum verification. Exact selected corpus/block hashes retain reproducibility. Keep corpus outputs in caller-owned ignored local artifact directories.
The optional records profile uses Backpack Store directly. RunLedger persists
versioned TrainingReceipt, EvaluationReceipt and ArtifactReceipt values at
an explicit local SQLite path. Records hold identities and measurements, without
source text or transcripts. A repeated matching write is idempotent for workflow
recovery; a conflicting receipt is refused. One workflow owns the job writer.
The optional workflow profile composes explicit trusted prepare, train,
evaluate and register callables with func_seq. WorkflowIdentity binds corpus,
source selection, recipe and job configuration into its version. Its existing
checkpoint preserves completed stages and requires explicit retry/restart after
an uncertain interrupted effect. Native numerical checkpoints remain separate.
evaluation.measure_split retains explicit held-out split denominators and
reports unknown-token exclusions, selected records, sequence/token counts and
missing splits without substituting training examples. The Thoughtformula
adapter reports token-weighted next-token loss/perplexity. Bounded syntax probes
parse generated continuations without executing them. These measures do not
establish factual accuracy, working code or autonomous agent capability.
hypnosis.curriculum.generated_documents implements the explicitly approved
wispsy-internal-curriculum/v1 pilot: exact addition/multiplication answers and
Python addition, even-number filtering and list-sum references. Seeds and recipe
hashes identify the generated material. Related arithmetic and Python variants
share a split group. Reference code is authored and independently checked;
model-generated code is never executed. New recipes and sources require review.
Homegrown training
Install the training extra to select the complete pinned component profile.
The default import and demo remain lightweight.
hypnosis prepare sources.json .corpora/pilot --documents-per-source 128
hypnosis train .corpora/pilot .runs/hero hero.json
hypnosis train-terminal .corpora/pilot .runs/hero-live hero-live.json
hypnosis train .corpora/pilot .runs/hero-coding coding.json \
--parent-artifact .runs/hero/artifact.json
Create the parent .corpora and .runs directories explicitly. A source file is
a JSON list of approved source_id, local path and, for Wikipedia, index
selections. The approved generated source is {"source_id":"internal-v1", "path":"recipe"}. New IDs remain rejected pending source review.
A job file is a closed JSON object such as:
{"run_id":"hero-pilot","model_id":"hero","max_steps":1000,
"max_seconds":240,"block_size":32,"seed":7,"shuffle":false}
Hero Coding selects "model_id":"hero-coding" and an explicit Hero sidecar.
It preserves parent weights/tokenizer as a starting point, resets Adam for its own
trajectory and selects only approved internal Python exercises. Hero uses the
selected training split; tokenizer fitting sees training material only, with a
predeclared printable ASCII alphabet. Unknown text exclusions are counted.
Curriculum and shuffle runs consume the same fixed document windows.
Each new destination binds corpus/source/config/recipe/parent identities.
func_seq owns prepare/train/evaluate/register progress, Thoughtformula owns
lossless .tft numerical state and .mgpt inference exports, Thoughtform owns
the passive sidecar, and Backpack holds structural receipts. result.json
contains before/after held-out measurements and explicit denominators. Weights,
source corpora and local job directories stay outside Git.
Carets shows the same worker's progress. c cancels cooperatively at an optimizer
boundary and saves latest.tft; q requests cancellation before exiting. Use
--retry explicitly after reviewing an interrupted workflow. Completed stages
are not replayed. Changed job identities and reused foreign destinations are
refused. A new specialization and exact numerical resume are separate operations.
Time limits are checked at step boundaries; the bounded pilot launcher also
applies a hard combined process deadline. These pilot artifacts are experimental.
Wikipedia citation names are scoped by reference group. Explicit conflicting bodies retain their own spans/URLs; an empty reuse of an ambiguous name stays unresolved. Reused long bodies inherit truncation metadata. Preserved citation associations remain provenance, not a verdict that the reference supports a claim.
Approved Python material sources now include python-vault-tutorials,
python-vault-reference, psf-wiki-python and python314-docs. Their approval
is recorded in issue #27. bind_source(Source(...)) returns a complete selected
snapshot fingerprint; put that fingerprint in the selected Source before corpus
preparation. Changed/added selected files are rejected. Markdown uses Parse MD
source spans and code blocks; documentation members stream from the text archive
without extraction. References and derivation remain attached, and related page
chunks share a held-out group. Alternate documentation formats are not duplicate
training samples. Downloaded examples are data and are never executed.
The balanced-v2 job profile selects the named larger recipes and interleaves
weighted source/document windows. Every selected source receives a quota; small
original sets may be deliberately oversampled, with unique/repeated counts
recorded. Tokenizer merges use a bounded balanced training sample, and its
alphabet includes all selected training characters. Hero Coding inherits that
frozen vocabulary. Actual consumed source windows/tokens and separate coding/
general held-out measurements are reported. pilot-v1 remains the default and
retains its original config, tokenizer and window identities for old jobs and
matched comparisons. Losses across different tokenizers are not directly comparable.
Balanced-v2 jobs retain immutable checkpoints/step-.../model.tft snapshots and
verified sidecars at the selected checkpoint interval. Latest recovery state is
separate. A job keeps at most 128 history snapshots and 512 MiB of native history;
reaching either ceiling saves a final limited result without deleting history.
Typed Backpack collections retain model/profile/tokenizer/data/parent/continuation
identities and support bounded pages:
hypnosis index-checkpoints .runs/my-run .runs/checkpoints.sqlite .runs
hypnosis checkpoints .runs/checkpoints.sqlite .runs --model-id hero --profile balanced-v2
hypnosis train .corpora/selected .runs/hero-next next.json \
--continue-artifact .runs/my-run/artifact.json
Continuation preserves full weights, Adam and numerical order from a balanced-v2
checkpoint. It requires identical corpus, recipe, tokenizer, windows, learning
rate and ordering policy. Its step/time settings are additional budgets in a new
run directory; cumulative and per-job counters are both recorded. Specialization
uses --parent-artifact instead and resets Adam. These operations cannot be
combined. Every history/final context is passive data; no source code is loaded
from it. Index refresh is idempotent and does not train or mutate checkpoint bytes.
MediaWiki excerpt profile
The optional data and training profiles use parse-mw==0.1.0 for typed
MediaWiki syntax. Hypnosis retains citation policy: exact original character
spans, named/grouped reuse, ambiguous definitions and bounded evidence URLs.
A small reference-span adapter handles self-closing and grouped references
before parsing; no template expansion, URL retrieval or external parser runs.
Comments and unexpanded templates are omitted from plain excerpts, link labels
and literal regions remain text. Up to 128 citation records and 4,096 scanned
references are admitted per article; input is capped at 4 Mi characters and the
syntax tree at 100,000 nodes/64 levels. Nested/unclosed references or conflicting
name/group attributes refuse rather than inventing citation provenance.
Metadata
Release files for hypnosis 0.1.0a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hypnosis-0.1.0a1.tar.gz | 127.8 kB | With provenance | Details for hypnosis-0.1.0a1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hypnosis-0.1.0a1-py3-none-any.whl | Python 3 | none | any | Details for hypnosis-0.1.0a1-py3-none-any.whl |
Total release size: 200.9 kB
Release files / hypnosis-0.1.0a1.tar.gz
| Download URL | hypnosis-0.1.0a1.tar.gz |
|---|---|
| Size | 127.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b7058404f60187e4179862c5b760c91ad15eedd9d57c5778155f70323489b109
|
|
BLAKE2b-256 checksum How to use checksums |
ad285dcce25979969a7143e9e612361b21d010cf5eff3fdb2683e2f2169cdcab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logRelease files / hypnosis-0.1.0a1-py3-none-any.whl
| Download URL | hypnosis-0.1.0a1-py3-none-any.whl |
|---|---|
| Size | 73.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
58c7e99c65cc2d73ff475fbe19abd11d2363d4e9c4ba886d9904fe08947f5eb9
|
|
BLAKE2b-256 checksum How to use checksums |
d47ae171f8a9759f5988deb804ea38847277797b9c9e74f22d698dbcd662b780
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logSecurity for hypnosis 0.1.0a1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for hypnosis-0.1.0a1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.