Skip to main content

nexusos-common

NEXUS 四包(nexusos-gate / nexusos-mem / nexusos-xdr / nexusos-common)共享的锚点解析单源(1955 design §3)。

为什么存在

三包各自解析 NEXUS_HOME/vault 根会漂移出多套状态家目录(1955 audit §1 铁证)。 本包是唯一解析点:零三方依赖,核心 anchors.py ≤200 行。

锚点解析顺序(design §3.1)

  • nexus_home():env NEXUS_HOME(必须绝对路径,相对/空串=ConfigError)> 默认 ~/.nexus
  • vault_root(anchor):env NEXUS_VAULT_ROOT > 包位置哨兵推导(vault 布局)
  • task_root():env NEXUS_TASK_ROOT > $NEXUS_HOME/tasks
  • subpath(*parts):$NEXUS_HOME 下子路径(八区名见 ZONES)
  • expand_env(s):${NEXUS_HOME} / ${NEXUS_VAULT_ROOT} 占位展开

缺 vault 三态语义(design §3.2 统一规则)

  1. env 显式给定 → 直接用(相对路径拒绝)
  2. 哨兵推导可得(包部署于 vault 布局)→ 直接用
  3. 不可得 → vault_root() 返回 None;vault_root(required=True) 抛 ConfigError(含 remediation 提示)。废静默占位:可降级的功能必须由 调用方 log WARN,必须 vault 的功能必须显式报错。

八区常量(design §1.1,layout_version=1)

ZONES = ("xdr", "secrets", "mem", "tmp", "trash", "gate", "logs", "tasks") (secrets/tmp 目录权限 700,见 SECRET_DIR_MODE / TMP_DIR_MODE)

私路径 lint(拆单1 交付物)

python -m nexusos_common.lint <目录>...            # 基线报告(exit 0)
python -m nexusos_common.lint <目录>... --strict   # CI 模式(命中 exit 1)

扫描私路径模式(audit §1 清单化正则,数据单源 lint_patterns.py——后续新增私路径只改数据文件)。

Metadata

Release files for nexusos-common 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nexusos-common 1.0.0
File Size Uploaded Provenance Actions
nexusos_common-1.0.0.tar.gz 34.4 kB Without provenance Details for nexusos_common-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nexusos-common 1.0.0
File Interpreter ABI Platform Actions
nexusos_common-1.0.0-py3-none-any.whl Python 3 none any Details for nexusos_common-1.0.0-py3-none-any.whl

Total release size: 67.8 kB

Release files / nexusos_common-1.0.0.tar.gz

Download URL nexusos_common-1.0.0.tar.gz
Size 34.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a7a4c55b5b143daabdad4519ce742c036d5797880605344dbc61fec57debea3c
BLAKE2b-256 checksum
How to use checksums
6c3dce8b8b5926c5fd40df53d2c5efe1877924072fb3955af1f5b2b4b007427e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.6

Release files / nexusos_common-1.0.0-py3-none-any.whl

Download URL nexusos_common-1.0.0-py3-none-any.whl
Size 33.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c25f1602ca892b38d210ae27ebd6d90b1b21be1f57081b4be8d27bee730eac69
BLAKE2b-256 checksum
How to use checksums
fd400e4aff428f44784243afd9781b35dc6b0c95e2ca530b8181ade11092163b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.6

Security for nexusos-common 1.0.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page