nsp.cli app registers phase_app (the gate's workflow-fact source). phase meta
--json emits {schema_version, max_phase, phases:[{num,id,name,advance,artifacts_out}]}
from load_workflow() -- the single source of truth. F8/datamart is present (the
exact JS-drift bug in ChironeWp3, PHASE_NAMES truncated to 7, is structurally gone).
Scope: the 12 other command groups land in their porting tasks (A9 ports
db/mschema/_guards; B1 vectorstore; B3 search/lshindex). Eager-importing them now
would break the app on unported deps -- deferred to keep the suite green at each commit.
42 lines
1.0 KiB
Python
42 lines
1.0 KiB
Python
"""nsp CLI -- Typer app `nsp`.
|
|
|
|
Minimal skeleton for now: registers `phase_app` (the gate needs `nsp phase meta --json`).
|
|
Other command groups (db, schema, lsh, vector, memory, session, decision, sql, cte,
|
|
evidence, search) are wired in their porting tasks, once their backend deps land
|
|
(A9 ports db/mschema/_guards; B1 ports vectorstore; B3 ports search/lshindex/sampling).
|
|
"""
|
|
from __future__ import annotations
|
|
|
|
import typer
|
|
|
|
from nsp import __version__
|
|
|
|
app = typer.Typer(
|
|
help="nsp (Natural Semantic Platform) -- kit operativo per generazione SQL assistita da Pi",
|
|
no_args_is_help=True,
|
|
)
|
|
|
|
|
|
def _version_callback(value: bool) -> None:
|
|
if value:
|
|
typer.echo(__version__)
|
|
raise typer.Exit()
|
|
|
|
|
|
@app.callback()
|
|
def main(
|
|
version: bool = typer.Option(
|
|
False,
|
|
"--version",
|
|
callback=_version_callback,
|
|
is_eager=True,
|
|
help="Mostra la versione ed esce.",
|
|
),
|
|
) -> None:
|
|
pass
|
|
|
|
|
|
from nsp.cli.phase_cmd import phase_app # noqa: E402
|
|
|
|
app.add_typer(phase_app, name="phase")
|