substratum-cli 0.2.5__tar.gz → 0.2.6__tar.gz
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.
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/PKG-INFO +1 -1
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/__init__.py +1 -1
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/_boot.py +3 -2
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/_update.py +24 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/session.py +4 -2
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli.egg-info/PKG-INFO +1 -1
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/README.md +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/pyproject.toml +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/setup.cfg +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/README.md +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/__main__.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/_vendor/__init__.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/_vendor/_pro_test_derive.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/_vendor/client_gate.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/_wordmark.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/account.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/build_state.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/cli.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/codes.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/commands/__init__.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/commands/apply.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/commands/auth.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/commands/commit.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/commands/explain.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/commands/failing.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/commands/fix.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/commands/history.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/commands/init_cmd.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/commands/pr.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/commands/replay.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/commands/scaffold.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/commands/show.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/commands/undo.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/commands/verify.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/commands/write.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/config.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/diffs.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/engine.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/gitio.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/langscan.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/product_ops.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/refusals.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/remote.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/render.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/result.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/run_store.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/runid.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli/style.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli.egg-info/SOURCES.txt +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli.egg-info/dependency_links.txt +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli.egg-info/entry_points.txt +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli.egg-info/requires.txt +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/substratum_cli.egg-info/top_level.txt +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_adaptive_prior.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_alias_warrant_trace.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_bidirectional_gate_contracts.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_coherence_evolution.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_coherences.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_connection_web_api.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_cross_entity_scoping.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_data.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_de28_negation_refuse.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_definite_description_handler.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_demo_regression_catalog.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_demo_response_shape.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_e1_e2_field_alignment.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_extraction_class_write_time.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_falsification_predictions.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_gap_d_wh_normalization.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_inference.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_inflection_cvc_rule.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_inflection_irregular.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_intervention.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_invariant.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_legal_citation_handler.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_lens_noop_seam.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_markup_tag_handler.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_nl_parser.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_nl_parser_adversarial.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_noise.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_pass2_contextual.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_perspectives.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_polysemous_token_alias_guard.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_possessive_normalization.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_predicate_canon.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_projection_gate.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_projection_gate_tag_question.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_query_normalizer.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_records_answer_format.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_referent_aboutness_gate.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_referent_quality_gate.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_refuse_message_topic_neutrality.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_relation_detection.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_relaxation.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_residual_content_gate.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_reverse_lookup_subject_filter.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_sec_statement_aliases.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_span_lens.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_span_lens_query_integration.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_substrate.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_synonymy_detector.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_table_ingest.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_triple_ingest.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_two_phase_schema.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_user_asserted_aliases.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_v2_api.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_v2_api_claims.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_v2_claim_determinism.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_word_role.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_word_role_wiring.py +0 -0
- {substratum_cli-0.2.5 → substratum_cli-0.2.6}/tests/test_xbrl_doc_aliases.py +0 -0
|
@@ -5,4 +5,4 @@ Import budget: this package is stdlib-only; the ONLY module reaching into backen
|
|
|
5
5
|
"""
|
|
6
6
|
# SINGLE SOURCE OF TRUTH for the release version. pyproject reads this (dynamic version), the boot shows
|
|
7
7
|
# it, and the update-check compares against it. To cut a release, bump ONLY this line, then publish.
|
|
8
|
-
__version__ = "0.2.
|
|
8
|
+
__version__ = "0.2.6"
|
|
@@ -56,7 +56,8 @@ def seal(lib_name: str, version: str) -> tuple[str, str]:
|
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
def render(name, census, langs, substrate, substrate_note, substrate_ok, standing, version,
|
|
59
|
-
color=True, ascii_mode=False, logged_in=True, update_to="", seal_key=""
|
|
59
|
+
color=True, ascii_mode=False, logged_in=True, update_to="", seal_key="",
|
|
60
|
+
update_cmd="pip install --upgrade substratum-cli") -> list[str]:
|
|
60
61
|
"""Return the boot lines. `substrate` is the HONEST name of the intelligence serving this session
|
|
61
62
|
(the hosted engine version, or 'not connected') -- NEVER a local path. `substrate_note`/`_ok` render
|
|
62
63
|
the connection state. `seal_key` is the stable identity the self-certificate hashes."""
|
|
@@ -157,7 +158,7 @@ def render(name, census, langs, substrate, substrate_note, substrate_ok, standin
|
|
|
157
158
|
if update_to: # a pip package cannot self-update; hand over the one command
|
|
158
159
|
arrow = "^" if ascii_mode else "↑"
|
|
159
160
|
out += [" " + c(GO, f"{arrow} update") + c(LAB, f" Substratum {update_to} is available")
|
|
160
|
-
+ c(CH, f" {dot} ") + c(GO,
|
|
161
|
+
+ c(CH, f" {dot} ") + c(GO, update_cmd)]
|
|
161
162
|
if not logged_in:
|
|
162
163
|
out += [" " + c(GO, "login") + c(LAB, " to ") + c(DAT, "fix") + c(LAB, " and ") + c(DAT, "write")
|
|
163
164
|
+ c(LAB, " code (connects the engine)")
|
|
@@ -40,6 +40,30 @@ def available(current: str) -> str:
|
|
|
40
40
|
return latest if latest and _version_tuple(latest) > _version_tuple(current) else ""
|
|
41
41
|
|
|
42
42
|
|
|
43
|
+
def upgrade_command() -> str:
|
|
44
|
+
"""The exact command that updates THIS install. pipx installs each app into an isolated venv under
|
|
45
|
+
a `pipx` path, where `pip install --upgrade` is a no-op -- so a nag that always says "pip" is wrong
|
|
46
|
+
for the primary (pipx) install path our docs recommend. Detect the install method from the runtime
|
|
47
|
+
location and hand the right command; if the location is somehow unreadable, name both so the user is
|
|
48
|
+
never stuck. Pure, no network, never raises."""
|
|
49
|
+
try:
|
|
50
|
+
import sys
|
|
51
|
+
parts = [getattr(sys, "prefix", "") or "", getattr(sys, "executable", "") or ""]
|
|
52
|
+
try:
|
|
53
|
+
parts.append(os.path.dirname(os.path.abspath(__file__)))
|
|
54
|
+
except Exception:
|
|
55
|
+
pass
|
|
56
|
+
hay = "/".join(p for p in parts if p).replace("\\", "/").lower()
|
|
57
|
+
if not hay:
|
|
58
|
+
return "pipx upgrade substratum-cli (or) pip install --upgrade substratum-cli"
|
|
59
|
+
# pipx venvs live at .../pipx/venvs/<app>/...; the `/pipx/` path segment is the reliable signal.
|
|
60
|
+
if "/pipx/" in ("/" + hay + "/") or "pipx/venvs" in hay:
|
|
61
|
+
return "pipx upgrade substratum-cli"
|
|
62
|
+
return "pip install --upgrade substratum-cli"
|
|
63
|
+
except Exception:
|
|
64
|
+
return "pipx upgrade substratum-cli (or) pip install --upgrade substratum-cli"
|
|
65
|
+
|
|
66
|
+
|
|
43
67
|
def engine_version() -> str:
|
|
44
68
|
"""The HOSTED engine's substrate version from the last check (cached), or "". This is what actually
|
|
45
69
|
serves fix/write for a thin client, so the boot shows THIS -- never a local path."""
|
|
@@ -114,6 +114,7 @@ class Session:
|
|
|
114
114
|
logged_in = account.is_logged_in()
|
|
115
115
|
_update.refresh_async() # refresh the update cache in the background (next session)
|
|
116
116
|
update_to = _update.available(_cver) # instant read from cache; "" if none or unknown
|
|
117
|
+
update_cmd = _update.upgrade_command() # the RIGHT command for this install (pipx vs pip)
|
|
117
118
|
|
|
118
119
|
# HONEST substrate: which intelligence actually serves fix/write this session, and in which mode.
|
|
119
120
|
# Two real deployment modes: HOSTED (thin client -> engine on Fly) and AIRGAPPED-LOCAL (engine +
|
|
@@ -141,7 +142,8 @@ class Session:
|
|
|
141
142
|
if S.seal_cols() >= 84:
|
|
142
143
|
for ln in _boot.render(name, census, "py · go · ts", substrate, sub_note, sub_ok,
|
|
143
144
|
st, "0.1.0", color=self.color, ascii_mode=ascii_mode,
|
|
144
|
-
logged_in=logged_in, update_to=update_to, seal_key=seal_key
|
|
145
|
+
logged_in=logged_in, update_to=update_to, seal_key=seal_key,
|
|
146
|
+
update_cmd=update_cmd):
|
|
145
147
|
self._say(ln)
|
|
146
148
|
return
|
|
147
149
|
# compact identity (narrow pane): the mark + a lime-railed status
|
|
@@ -161,7 +163,7 @@ class Session:
|
|
|
161
163
|
self._say(f" {rail} " + bits)
|
|
162
164
|
if update_to:
|
|
163
165
|
self._say(" " + pn("update", S.GOLD)
|
|
164
|
-
+ pn(f" {update_to}:
|
|
166
|
+
+ pn(f" {update_to}: {update_cmd}", S.LABEL))
|
|
165
167
|
if not logged_in:
|
|
166
168
|
self._say(" " + pn("login", S.GOLD) + pn(" to fix and write code", S.LABEL))
|
|
167
169
|
self._say(" " + pn("help", S.GOLD) + pn(" for commands", S.LABEL))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|