infralink 0.6.15__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.
- infralink-0.6.15/.gitignore +50 -0
- infralink-0.6.15/BACKLOG.md +51 -0
- infralink-0.6.15/PKG-INFO +310 -0
- infralink-0.6.15/PRD.md +153 -0
- infralink-0.6.15/README.md +265 -0
- infralink-0.6.15/docs/compatibility/v0.2.md +67 -0
- infralink-0.6.15/examples/edges.yml +121 -0
- infralink-0.6.15/examples/observation/edges.yml +18 -0
- infralink-0.6.15/examples/observation/instances.yml +15 -0
- infralink-0.6.15/examples/observation/operations.yml +29 -0
- infralink-0.6.15/examples/observation/profiles.yml +48 -0
- infralink-0.6.15/examples/observation/secrets.yml +10 -0
- infralink-0.6.15/examples/registry.yml +169 -0
- infralink-0.6.15/examples/release/publisher-request.v2.json +31 -0
- infralink-0.6.15/examples/release/publisher-request.v3.json +64 -0
- infralink-0.6.15/examples/release/release-attestation.v1.json +31 -0
- infralink-0.6.15/examples/release/release-attestation.v2.json +44 -0
- infralink-0.6.15/examples/release/release-candidate.v1.json +22 -0
- infralink-0.6.15/examples/roles.yml +183 -0
- infralink-0.6.15/pyproject.toml +139 -0
- infralink-0.6.15/src/infralink/__about__.py +1 -0
- infralink-0.6.15/src/infralink/__init__.py +29 -0
- infralink-0.6.15/src/infralink/__main__.py +4 -0
- infralink-0.6.15/src/infralink/adapters/__init__.py +1 -0
- infralink-0.6.15/src/infralink/adapters/bws.py +421 -0
- infralink-0.6.15/src/infralink/agent_surface.py +192 -0
- infralink-0.6.15/src/infralink/cli/__init__.py +18 -0
- infralink-0.6.15/src/infralink/cli/actions.py +130 -0
- infralink-0.6.15/src/infralink/cli/analyze.py +411 -0
- infralink-0.6.15/src/infralink/cli/app.py +88 -0
- infralink-0.6.15/src/infralink/cli/artifacts.py +840 -0
- infralink-0.6.15/src/infralink/cli/check.py +203 -0
- infralink-0.6.15/src/infralink/cli/contracts.py +745 -0
- infralink-0.6.15/src/infralink/cli/diagram.py +129 -0
- infralink-0.6.15/src/infralink/cli/docs.py +165 -0
- infralink-0.6.15/src/infralink/cli/doctor.py +1380 -0
- infralink-0.6.15/src/infralink/cli/errors.py +153 -0
- infralink-0.6.15/src/infralink/cli/host_readiness.py +94 -0
- infralink-0.6.15/src/infralink/cli/main.py +2478 -0
- infralink-0.6.15/src/infralink/cli/observation.py +460 -0
- infralink-0.6.15/src/infralink/cli/observation_contracts.py +152 -0
- infralink-0.6.15/src/infralink/cli/operation_contracts.py +144 -0
- infralink-0.6.15/src/infralink/cli/operations.py +1119 -0
- infralink-0.6.15/src/infralink/cli/output.py +226 -0
- infralink-0.6.15/src/infralink/cli/pagination.py +188 -0
- infralink-0.6.15/src/infralink/cli/queries.py +396 -0
- infralink-0.6.15/src/infralink/cli/registry_authoring.py +524 -0
- infralink-0.6.15/src/infralink/cli/release.py +637 -0
- infralink-0.6.15/src/infralink/cli/resolve.py +120 -0
- infralink-0.6.15/src/infralink/cli/secrets.py +410 -0
- infralink-0.6.15/src/infralink/cli/validate.py +238 -0
- infralink-0.6.15/src/infralink/controller_contracts.py +81 -0
- infralink-0.6.15/src/infralink/core/__init__.py +19 -0
- infralink-0.6.15/src/infralink/core/application.py +117 -0
- infralink-0.6.15/src/infralink/core/edges.py +222 -0
- infralink-0.6.15/src/infralink/core/errors.py +5 -0
- infralink-0.6.15/src/infralink/core/registry.py +600 -0
- infralink-0.6.15/src/infralink/core/resolver.py +497 -0
- infralink-0.6.15/src/infralink/core/schema.py +612 -0
- infralink-0.6.15/src/infralink/core/template.py +65 -0
- infralink-0.6.15/src/infralink/firewall.py +266 -0
- infralink-0.6.15/src/infralink/generators/__init__.py +15 -0
- infralink-0.6.15/src/infralink/generators/d2.py +109 -0
- infralink-0.6.15/src/infralink/generators/dot.py +97 -0
- infralink-0.6.15/src/infralink/generators/markdown.py +217 -0
- infralink-0.6.15/src/infralink/generators/mermaid.py +163 -0
- infralink-0.6.15/src/infralink/health/__init__.py +5 -0
- infralink-0.6.15/src/infralink/health/checks.py +322 -0
- infralink-0.6.15/src/infralink/host_readiness.py +361 -0
- infralink-0.6.15/src/infralink/host_registry_state.py +59 -0
- infralink-0.6.15/src/infralink/host_transport.py +237 -0
- infralink-0.6.15/src/infralink/local_doctor.py +747 -0
- infralink-0.6.15/src/infralink/local_doctor_agent.py +542 -0
- infralink-0.6.15/src/infralink/mcp_server.py +275 -0
- infralink-0.6.15/src/infralink/observation/__init__.py +201 -0
- infralink-0.6.15/src/infralink/observation/api.py +546 -0
- infralink-0.6.15/src/infralink/observation/canonical.py +170 -0
- infralink-0.6.15/src/infralink/observation/codes.py +153 -0
- infralink-0.6.15/src/infralink/observation/diagnostics.py +144 -0
- infralink-0.6.15/src/infralink/observation/explain.py +84 -0
- infralink-0.6.15/src/infralink/observation/loader.py +952 -0
- infralink-0.6.15/src/infralink/observation/models.py +552 -0
- infralink-0.6.15/src/infralink/observation/models_v2.py +531 -0
- infralink-0.6.15/src/infralink/observation/planner.py +1838 -0
- infralink-0.6.15/src/infralink/observation/v2.py +799 -0
- infralink-0.6.15/src/infralink/operator_operations/__init__.py +1 -0
- infralink-0.6.15/src/infralink/operator_operations/host_bootstrap.py +1191 -0
- infralink-0.6.15/src/infralink/operator_sources.py +118 -0
- infralink-0.6.15/src/infralink/operator_surface.py +181 -0
- infralink-0.6.15/src/infralink/release/__init__.py +27 -0
- infralink-0.6.15/src/infralink/release/contracts.py +360 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/analyze.json +469 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/app-list.json +285 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/app-show.json +535 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/capabilities.json +318 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/check.json +430 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/diagram.json +394 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/docs.json +394 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/doctor.json +789 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/edge-show.json +415 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/edges-list.json +285 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/explain.json +309 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/help.json +412 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/host-apply.json +638 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/host-bootstrap.json +557 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/host-logs.json +335 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/host-show.json +419 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/host-status.json +415 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/host-verifier.json +476 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/hosts.json +285 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/info.json +328 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/observation-validate.json +411 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/operation-status.json +424 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/project-observation.json +2276 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/project-readiness.json +405 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/project-secrets.json +530 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/project-view.json +588 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/registry-host-get.json +320 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/registry-host-patch.json +354 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/release-inspect-attestation.json +928 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/release-inspect.json +520 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/release-render-publisher-request.json +760 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/release-validate-candidate.json +386 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/resolve.json +462 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/root.json +314 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/secrets-audit.json +492 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/secrets-inspect.json +512 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/service-show.json +540 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/services.json +285 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/validate.json +421 -0
- infralink-0.6.15/src/infralink/schemas/cli/v1/version.json +288 -0
- infralink-0.6.15/src/infralink/schemas/observation/v1/application.json +79 -0
- infralink-0.6.15/src/infralink/schemas/observation/v1/dependency.json +118 -0
- infralink-0.6.15/src/infralink/schemas/observation/v1/instance.json +329 -0
- infralink-0.6.15/src/infralink/schemas/observation/v1/operations-view.json +546 -0
- infralink-0.6.15/src/infralink/schemas/observation/v1/profile.json +578 -0
- infralink-0.6.15/src/infralink/schemas/observation/v1/readiness-suite.json +116 -0
- infralink-0.6.15/src/infralink/schemas/observation/v1/secrets.json +190 -0
- infralink-0.6.15/src/infralink/schemas/observation/v2/document.json +1128 -0
- infralink-0.6.15/src/infralink/schemas/release/v1/release-attestation.v1.schema.json +202 -0
- infralink-0.6.15/src/infralink/schemas/release/v1/release-candidate.v1.schema.json +142 -0
- infralink-0.6.15/src/infralink/schemas/release/v2/publisher-request.v2.schema.json +201 -0
- infralink-0.6.15/src/infralink/schemas/release/v2/release-attestation.v2.schema.json +272 -0
- infralink-0.6.15/src/infralink/schemas/release/v3/publisher-request.v3.schema.json +283 -0
- infralink-0.6.15/src/infralink/schemas/release/v3/release-attestation.v3.schema.json +354 -0
- infralink-0.6.15/src/infralink/secrets/__init__.py +10 -0
- infralink-0.6.15/src/infralink/secrets/base.py +82 -0
- infralink-0.6.15/src/infralink/secrets/inventory.py +39 -0
- infralink-0.6.15/src/infralink/validation.py +34 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
.Python
|
|
7
|
+
build/
|
|
8
|
+
develop-eggs/
|
|
9
|
+
dist/
|
|
10
|
+
downloads/
|
|
11
|
+
eggs/
|
|
12
|
+
.eggs/
|
|
13
|
+
lib/
|
|
14
|
+
lib64/
|
|
15
|
+
parts/
|
|
16
|
+
sdist/
|
|
17
|
+
var/
|
|
18
|
+
wheels/
|
|
19
|
+
*.egg-info/
|
|
20
|
+
.installed.cfg
|
|
21
|
+
*.egg
|
|
22
|
+
|
|
23
|
+
# Virtual environments
|
|
24
|
+
.venv/
|
|
25
|
+
venv/
|
|
26
|
+
ENV/
|
|
27
|
+
|
|
28
|
+
# Testing
|
|
29
|
+
.coverage
|
|
30
|
+
.pytest_cache/
|
|
31
|
+
htmlcov/
|
|
32
|
+
.tox/
|
|
33
|
+
.nox/
|
|
34
|
+
|
|
35
|
+
# IDE
|
|
36
|
+
.idea/
|
|
37
|
+
.vscode/
|
|
38
|
+
*.swp
|
|
39
|
+
*.swo
|
|
40
|
+
*~
|
|
41
|
+
|
|
42
|
+
# OS
|
|
43
|
+
.DS_Store
|
|
44
|
+
Thumbs.db
|
|
45
|
+
|
|
46
|
+
# Local working files (prod analysis, generated output)
|
|
47
|
+
local/
|
|
48
|
+
output/
|
|
49
|
+
|
|
50
|
+
.worktrees/
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Infralink Product Backlog
|
|
2
|
+
|
|
3
|
+
Current package version: `0.5.6`.
|
|
4
|
+
|
|
5
|
+
## Completed Foundation
|
|
6
|
+
|
|
7
|
+
- [x] Typed registry, services, roles, and edges.
|
|
8
|
+
- [x] Resolver endpoints and safe connection templates.
|
|
9
|
+
- [x] TCP, HTTP, and Redis health checks.
|
|
10
|
+
- [x] Stable CLI envelopes, bounded outputs, cursors, and exit codes.
|
|
11
|
+
- [x] Bounded topology and application queries.
|
|
12
|
+
- [x] Deterministic diagram and documentation artifacts.
|
|
13
|
+
- [x] Opaque secret values and declared-reference inventory.
|
|
14
|
+
- [x] Optional read-only hosted BWS adapter and metadata audit.
|
|
15
|
+
- [x] Strict typing, Ruff, branch coverage, schema, and package gates.
|
|
16
|
+
- [x] Deterministic public-data boundary and package policy.
|
|
17
|
+
- [x] Manual main-bound Woodpecker release contract.
|
|
18
|
+
- [x] Release candidate, publisher request, and attestation contracts through v3.
|
|
19
|
+
- [x] Offline observation contracts, diagnostics, readiness suites, and profile-scoped operations views.
|
|
20
|
+
|
|
21
|
+
## Current Next Work
|
|
22
|
+
|
|
23
|
+
- [ ] Keep contributor and agent onboarding docs current as command surfaces change.
|
|
24
|
+
- [ ] Add optional private compatibility diagnostics in Woodpecker without weakening public CI.
|
|
25
|
+
- [ ] Run canary validation against sanitized topology fixtures.
|
|
26
|
+
- [ ] Migrate consumers from legacy URL helpers to connection templates.
|
|
27
|
+
- [ ] Migrate consumers to structured CLI envelopes and cursors.
|
|
28
|
+
- [ ] Add PostgreSQL and MySQL query checks.
|
|
29
|
+
- [ ] Add retry and timeout policy controls.
|
|
30
|
+
- [ ] Add registry diff and impact analysis.
|
|
31
|
+
- [ ] Add Prometheus metrics and configuration generation.
|
|
32
|
+
- [ ] Add Jinja2 integration for safe templates.
|
|
33
|
+
- [ ] Evaluate custom BWS endpoints only after the hosted-only boundary has a design and tests.
|
|
34
|
+
|
|
35
|
+
## Deferred
|
|
36
|
+
|
|
37
|
+
- Dynamic service discovery.
|
|
38
|
+
- Deployment orchestration.
|
|
39
|
+
- Secret writes or arbitrary secret lookup.
|
|
40
|
+
- Automatic or non-main publication and production deployment.
|
|
41
|
+
- Non-POSIX support for transactional artifact commands.
|
|
42
|
+
|
|
43
|
+
## Historical Notes
|
|
44
|
+
|
|
45
|
+
The `v0.2` foundation and migration inventory remain useful history. See
|
|
46
|
+
[docs/compatibility/v0.2.md](docs/compatibility/v0.2.md) and
|
|
47
|
+
[docs/releases/](docs/releases/) for version-specific notes. Do not trigger old
|
|
48
|
+
release versions from backlog text; release publication requires explicit human
|
|
49
|
+
approval through the protected Woodpecker workflow.
|
|
50
|
+
|
|
51
|
+
*Last updated: 2026-08-17*
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: infralink
|
|
3
|
+
Version: 0.6.15
|
|
4
|
+
Summary: Infrastructure topology modeling with UUID-based nodes and typed edges
|
|
5
|
+
Project-URL: Homepage, https://github.com/cyberstorm-dev/infralink
|
|
6
|
+
Project-URL: Issues, https://github.com/cyberstorm-dev/infralink/issues
|
|
7
|
+
Project-URL: Source, https://github.com/cyberstorm-dev/infralink
|
|
8
|
+
Author: Infrastructure Team
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
Keywords: documentation,gitops,graph,infrastructure,monitoring,topology
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: System Administrators
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Topic :: System :: Systems Administration
|
|
20
|
+
Classifier: Topic :: Utilities
|
|
21
|
+
Requires-Python: >=3.12
|
|
22
|
+
Requires-Dist: agent-surface[mcp]==0.1.5
|
|
23
|
+
Requires-Dist: click>=8.0
|
|
24
|
+
Requires-Dist: jinja2>=3.0
|
|
25
|
+
Requires-Dist: mcp<3,>=2
|
|
26
|
+
Requires-Dist: pydantic<3,>=2.11
|
|
27
|
+
Requires-Dist: pyyaml>=6.0
|
|
28
|
+
Requires-Dist: rich>=13.0
|
|
29
|
+
Provides-Extra: bws
|
|
30
|
+
Requires-Dist: bitwarden-sdk<3,>=2.1; extra == 'bws'
|
|
31
|
+
Provides-Extra: dev
|
|
32
|
+
Requires-Dist: build>=1.2; extra == 'dev'
|
|
33
|
+
Requires-Dist: jsonschema>=4.23; extra == 'dev'
|
|
34
|
+
Requires-Dist: mypy>=1.0; extra == 'dev'
|
|
35
|
+
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
|
|
36
|
+
Requires-Dist: pytest>=7.0; extra == 'dev'
|
|
37
|
+
Requires-Dist: ruff>=0.1.0; extra == 'dev'
|
|
38
|
+
Requires-Dist: tomli>=2.0; (python_version < '3.11') and extra == 'dev'
|
|
39
|
+
Requires-Dist: twine>=5.1; extra == 'dev'
|
|
40
|
+
Requires-Dist: types-pyyaml; extra == 'dev'
|
|
41
|
+
Provides-Extra: docs
|
|
42
|
+
Requires-Dist: mkdocs-material>=9.0; extra == 'docs'
|
|
43
|
+
Requires-Dist: mkdocs>=1.5; extra == 'docs'
|
|
44
|
+
Description-Content-Type: text/markdown
|
|
45
|
+
|
|
46
|
+
# Infralink
|
|
47
|
+
|
|
48
|
+
Infralink is a Python library and agent-oriented CLI for modeling infrastructure
|
|
49
|
+
topology with UUID-based hosts, typed edges, bounded queries, health checks,
|
|
50
|
+
safe connection templates, offline observation contracts, diagrams, generated
|
|
51
|
+
documentation, and release evidence inspection.
|
|
52
|
+
|
|
53
|
+
Current package version: `0.5.8`.
|
|
54
|
+
|
|
55
|
+
## Public Boundary
|
|
56
|
+
|
|
57
|
+
Infralink is the public CLI, schema, and Python API layer. It models declared
|
|
58
|
+
infrastructure data, validates files, emits bounded command envelopes, and
|
|
59
|
+
generates documentation or release evidence.
|
|
60
|
+
|
|
61
|
+
Private host-runtime helpers live in the `cyberstorm-dev/infralink-ops`
|
|
62
|
+
consumer repository.
|
|
63
|
+
That repo packages controller image primitives such as registry checkout,
|
|
64
|
+
template rendering, config projection, BWS-backed secret rendering, image
|
|
65
|
+
retention, firewall verification, and the `infralink-host` reconciler timer.
|
|
66
|
+
|
|
67
|
+
```mermaid
|
|
68
|
+
flowchart LR
|
|
69
|
+
public["infralink public CLI/API"] --> registry["declared registry data"]
|
|
70
|
+
registry --> ops["infralink-ops private controller runtime"]
|
|
71
|
+
ops --> host["managed host evidence"]
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Do not use the public Infralink package as a deployment controller by itself.
|
|
75
|
+
It can inspect, validate, and model; environment-specific controllers select
|
|
76
|
+
registry revisions and activate services.
|
|
77
|
+
|
|
78
|
+
## Install
|
|
79
|
+
|
|
80
|
+
Infralink supports Python 3.10 through 3.12. Artifact-generating commands require POSIX/Linux
|
|
81
|
+
filesystem semantics and are validated on Linux in CI.
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
python -m pip install infralink
|
|
85
|
+
python -m pip install "infralink[bws]" # optional hosted BWS audit
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
For local development, see [CONTRIBUTING.md](CONTRIBUTING.md). Coding agents
|
|
89
|
+
should also read [AGENTS.md](AGENTS.md).
|
|
90
|
+
|
|
91
|
+
## Public Example
|
|
92
|
+
|
|
93
|
+
```yaml
|
|
94
|
+
# registry.yml
|
|
95
|
+
hosts:
|
|
96
|
+
d1b9e5d5-36b0-459d-a556-96622811fbd5:
|
|
97
|
+
canonical_name: database.example.com
|
|
98
|
+
status: active
|
|
99
|
+
group: production
|
|
100
|
+
cloud: example-cloud
|
|
101
|
+
tailscale_ip: 192.0.2.10
|
|
102
|
+
services:
|
|
103
|
+
postgresql:
|
|
104
|
+
port: 5432
|
|
105
|
+
protocol: postgresql
|
|
106
|
+
exposure: internal
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
```yaml
|
|
110
|
+
# edges.yml
|
|
111
|
+
schema_version: "1.0"
|
|
112
|
+
edges:
|
|
113
|
+
- id: 058e29ff-57b9-47c8-b6fa-0914ac03e25c
|
|
114
|
+
type: database
|
|
115
|
+
from:
|
|
116
|
+
hosts: [fa2b9872-d94c-4b20-a73a-57a205560769]
|
|
117
|
+
service: api
|
|
118
|
+
to:
|
|
119
|
+
host: d1b9e5d5-36b0-459d-a556-96622811fbd5
|
|
120
|
+
service: postgresql
|
|
121
|
+
port: 5432
|
|
122
|
+
protocol: postgresql
|
|
123
|
+
auth:
|
|
124
|
+
type: password
|
|
125
|
+
secret_ref: example/database-password
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Validate and inspect explicit sources:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
infralink --registry registry.yml --edges edges.yml validate
|
|
132
|
+
infralink --registry registry.yml --edges edges.yml info
|
|
133
|
+
infralink --registry registry.yml --edges edges.yml host show \
|
|
134
|
+
d1b9e5d5-36b0-459d-a556-96622811fbd5
|
|
135
|
+
infralink --registry registry.yml --edges edges.yml resolve \
|
|
136
|
+
058e29ff-57b9-47c8-b6fa-0914ac03e25c --user app --database app
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Resolution returns endpoint metadata, declared secret references, and safe
|
|
140
|
+
templates such as:
|
|
141
|
+
|
|
142
|
+
```text
|
|
143
|
+
postgresql://app:${secret:example/database-password}@192.0.2.10:5432/app
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
The CLI never returns resolved secret values and accepts no arbitrary secret
|
|
147
|
+
identifier lookup.
|
|
148
|
+
|
|
149
|
+
## CLI Contract
|
|
150
|
+
|
|
151
|
+
Every invocation writes exactly one structured envelope to stdout. YAML is the
|
|
152
|
+
default for topology and offline observation commands; use `--output json` for
|
|
153
|
+
explicit compact JSON. Envelopes include `ok`, a shallow parsed command view, a
|
|
154
|
+
typed `result` or redacted `error`, and bounded next actions. Lists use explicit
|
|
155
|
+
limits and opaque cursors.
|
|
156
|
+
|
|
157
|
+
Topology commands use `infralink.cli/v1`. Offline observation commands use
|
|
158
|
+
`agent-cli.response.v1`.
|
|
159
|
+
|
|
160
|
+
## MCP
|
|
161
|
+
|
|
162
|
+
The same installed executable can serve typed operator tools to an MCP client:
|
|
163
|
+
|
|
164
|
+
```toml
|
|
165
|
+
[mcp_servers.infralink]
|
|
166
|
+
command = "/usr/local/bin/infralink"
|
|
167
|
+
args = ["mcp", "serve"]
|
|
168
|
+
|
|
169
|
+
[mcp_servers.infralink.env]
|
|
170
|
+
INFRALINK_REGISTRY = "/var/lib/infralink/registry"
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
The server exposes `infralink_command`. Pass an argv array such as
|
|
174
|
+
`["doctor", "host", "cyberstorm-watchtower"]`; its structured result is the
|
|
175
|
+
same `infralink.cli/v1` envelope returned by the CLI. It accepts no shell
|
|
176
|
+
syntax, while existing explicit `--write` and `--apply` gates remain in force.
|
|
177
|
+
|
|
178
|
+
Useful discovery commands:
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
infralink capabilities
|
|
182
|
+
infralink help
|
|
183
|
+
infralink help resolve
|
|
184
|
+
infralink --output json help resolve
|
|
185
|
+
infralink explain schema-version-unsupported
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### Operator Context
|
|
189
|
+
|
|
190
|
+
For direct operator use, configure one registry checkout root in
|
|
191
|
+
`$XDG_CONFIG_HOME/infralink/config.yml` (default:
|
|
192
|
+
`~/.config/infralink/config.yml`):
|
|
193
|
+
|
|
194
|
+
```yaml
|
|
195
|
+
registry: /srv/infra-registry
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
The checkout must contain `hosts/`. With that one local selector, Doctor
|
|
199
|
+
derives the standard edges and observation inputs from the checkout and keeps
|
|
200
|
+
their resolved paths in its response:
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
infralink doctor host relayos-staging
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Explicit `--registry`, `INFRALINK_REGISTRY`, and per-source flags override the
|
|
207
|
+
local config. Gatus URL and token remain process configuration, so an MCP may
|
|
208
|
+
set `INFRALINK_REGISTRY` and its Gatus environment without duplicating CLI
|
|
209
|
+
logic. The local config never selects a registry revision or desired state.
|
|
210
|
+
|
|
211
|
+
Offline observation examples:
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
AS_OF=2026-08-17T00:00:00Z
|
|
215
|
+
infralink validate --source examples/observation --as-of "$AS_OF"
|
|
216
|
+
infralink project observation --source examples/observation --as-of "$AS_OF"
|
|
217
|
+
infralink project secrets --source examples/observation --as-of "$AS_OF"
|
|
218
|
+
infralink project view service-overview --source examples/observation --as-of "$AS_OF"
|
|
219
|
+
infralink project readiness ci-release --source examples/observation --as-of "$AS_OF"
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
Observation documents declare `schema_version: infralink.observation/v1` and may
|
|
223
|
+
be validated against packaged schemas under
|
|
224
|
+
`src/infralink/schemas/observation/v1` and
|
|
225
|
+
`src/infralink/schemas/observation/v2`.
|
|
226
|
+
|
|
227
|
+
In v2, a service profile may declare `configuration_slots` for non-secret
|
|
228
|
+
render or materialization inputs. A slot is profile-wide by default and may
|
|
229
|
+
optionally name a component owner. Instances supply exactly one typed
|
|
230
|
+
`configuration_binding` for each required slot. Supported values are strings,
|
|
231
|
+
integers, booleans, string lists, records, and record lists with explicitly
|
|
232
|
+
declared fields; record fields are limited to scalars and string lists. The
|
|
233
|
+
cross-document loader validates the binding against the profile contract, and
|
|
234
|
+
`plan_v2_configuration_bindings()` returns the normalized, deterministically
|
|
235
|
+
ordered renderer input. Secrets continue to use `resource_slots` and secret
|
|
236
|
+
references rather than configuration bindings.
|
|
237
|
+
|
|
238
|
+
## Exit Codes
|
|
239
|
+
|
|
240
|
+
| Code | Meaning |
|
|
241
|
+
| --- | --- |
|
|
242
|
+
| `0` | Positive domain result |
|
|
243
|
+
| `1` | Completed negative domain result |
|
|
244
|
+
| `2` | Usage error |
|
|
245
|
+
| `3` | Input, schema, or entity error |
|
|
246
|
+
| `4` | Provider or authentication failure |
|
|
247
|
+
| `69` | Unsupported platform |
|
|
248
|
+
| `70` | Unexpected internal failure |
|
|
249
|
+
| `74` | Artifact I/O failure or retained recovery state |
|
|
250
|
+
|
|
251
|
+
Exit `74` uses `artifact_io_failed` for storage failures and
|
|
252
|
+
`artifact_recovery_required` when recovery state is retained. `internal_error`
|
|
253
|
+
is reserved for exit `70`.
|
|
254
|
+
|
|
255
|
+
## Python API
|
|
256
|
+
|
|
257
|
+
```python
|
|
258
|
+
from infralink import EdgeResolver, EdgeSet, Registry
|
|
259
|
+
|
|
260
|
+
registry = Registry.load("registry.yml")
|
|
261
|
+
edges = EdgeSet.load("edges.yml")
|
|
262
|
+
resolver = EdgeResolver(registry, edges)
|
|
263
|
+
|
|
264
|
+
endpoint = resolver.get_target_endpoint("058e29ff-57b9-47c8-b6fa-0914ac03e25c")
|
|
265
|
+
template = resolver.get_connection_template(
|
|
266
|
+
"058e29ff-57b9-47c8-b6fa-0914ac03e25c",
|
|
267
|
+
user="app",
|
|
268
|
+
database="app",
|
|
269
|
+
)
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
Legacy Python URL helpers remain available for compatibility but are
|
|
273
|
+
deprecated. New integrations should use secret references and connection
|
|
274
|
+
templates.
|
|
275
|
+
|
|
276
|
+
## Development And Operations
|
|
277
|
+
|
|
278
|
+
- Contribution flow and canonical checks: [CONTRIBUTING.md](CONTRIBUTING.md)
|
|
279
|
+
- Agent instructions: [AGENTS.md](AGENTS.md)
|
|
280
|
+
- Architecture/navigation: [docs/architecture.md](docs/architecture.md)
|
|
281
|
+
- Public/private runtime split: [docs/architecture.md#public-and-private-runtime-boundary](docs/architecture.md#public-and-private-runtime-boundary)
|
|
282
|
+
- Observable topology and metric contracts: [docs/observable-model.md](docs/observable-model.md)
|
|
283
|
+
- Security boundaries: [docs/security-boundaries.md](docs/security-boundaries.md)
|
|
284
|
+
- Release workflow: [docs/release-operator-workflow.md](docs/release-operator-workflow.md)
|
|
285
|
+
- v0.2 migration history: [docs/compatibility/v0.2.md](docs/compatibility/v0.2.md)
|
|
286
|
+
- Current and historical release notes: [docs/releases/](docs/releases/)
|
|
287
|
+
|
|
288
|
+
## Release Adoption And Rollback
|
|
289
|
+
|
|
290
|
+
Woodpecker is the only CI release executor. The manual release step runs only
|
|
291
|
+
for `main` on Python 3.12 after all three parallel Python-version quality gates.
|
|
292
|
+
It requires `RELEASE_VERSION` to match the package version and the pipeline
|
|
293
|
+
commit to equal the current `main` commit. It rebuilds and publishes exactly the
|
|
294
|
+
wheel, sdist, `SHA256SUMS`, and `SHA256SUMS.sigstore.json` to the matching
|
|
295
|
+
GitHub Release tag. Existing tags or releases stop the process for operator
|
|
296
|
+
inspection.
|
|
297
|
+
|
|
298
|
+
Consumers verify the Cosign bundle and `SHA256SUMS` before installing the
|
|
299
|
+
wheel, then record the source commit and wheel digest in consumer configuration.
|
|
300
|
+
Rollback restores the previously verified release revision and digest; it does
|
|
301
|
+
not rebuild old source or mutate the existing public release.
|
|
302
|
+
|
|
303
|
+
Managed-host adoption is a consumer workflow. For private host controller
|
|
304
|
+
runtime, adopt the verified wheel into the `infralink-ops` consumer repository,
|
|
305
|
+
publish the controller image there, and select that image through the
|
|
306
|
+
environment registry.
|
|
307
|
+
|
|
308
|
+
## License
|
|
309
|
+
|
|
310
|
+
MIT
|
infralink-0.6.15/PRD.md
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# Infralink Product Requirements
|
|
2
|
+
|
|
3
|
+
Current package version: `0.5.6`.
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
Infralink makes infrastructure dependencies explicit, reviewable, and safe to
|
|
8
|
+
consume by humans, agents, CI systems, and operators. It loads declarative host,
|
|
9
|
+
edge, observation, and release data; validates contracts; answers bounded
|
|
10
|
+
queries; resolves endpoints without resolving secrets; checks health; and
|
|
11
|
+
generates deterministic artifacts.
|
|
12
|
+
|
|
13
|
+
The public package is provider-neutral at its domain boundary. Optional adapters
|
|
14
|
+
may integrate with external providers only through constrained, documented,
|
|
15
|
+
read-only or explicitly authorized operations.
|
|
16
|
+
|
|
17
|
+
## Current Requirements
|
|
18
|
+
|
|
19
|
+
- Support Python 3.10 through 3.12.
|
|
20
|
+
- Validate on Linux/POSIX for artifact-generating commands that rely on
|
|
21
|
+
transactional filesystem semantics.
|
|
22
|
+
- Keep UUID-based host identity and typed, validated edges as the topology
|
|
23
|
+
foundation.
|
|
24
|
+
- Emit exactly one structured CLI envelope per invocation.
|
|
25
|
+
- Preserve stable `infralink.cli/v1` and `agent-cli.response.v1` result/error
|
|
26
|
+
contracts, bounded collections, opaque continuation cursors, and actionable
|
|
27
|
+
next steps.
|
|
28
|
+
- Preserve stable exit codes for domain results, contract failures, platform
|
|
29
|
+
support, artifact I/O, and unexpected failures.
|
|
30
|
+
- Return safe connection templates containing declared `secret_ref`
|
|
31
|
+
placeholders, never resolved credentials.
|
|
32
|
+
- Provide offline declared-secret inventory and optional read-only hosted BWS
|
|
33
|
+
metadata audit.
|
|
34
|
+
- Provide offline observation documents, diagnostics, service/profile operations
|
|
35
|
+
views, readiness suites, and packaged observation schemas.
|
|
36
|
+
- Provide local host bootstrap/apply planning, status, logs, and verifier
|
|
37
|
+
surfaces with bounded sanitized output and explicit operator authority for
|
|
38
|
+
mutations.
|
|
39
|
+
- Provide release candidate, publisher request, and attestation validation
|
|
40
|
+
surfaces without turning local commands into a publisher.
|
|
41
|
+
- Generate deterministic diagram, documentation, CLI schema, observation schema,
|
|
42
|
+
and release schema artifacts.
|
|
43
|
+
- Protect public examples and docs from private topology or secret leakage.
|
|
44
|
+
- Keep Woodpecker as the only release executor.
|
|
45
|
+
|
|
46
|
+
## CLI Surface
|
|
47
|
+
|
|
48
|
+
The command tree includes:
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
infralink
|
|
52
|
+
|-- help [command ...]
|
|
53
|
+
|-- version
|
|
54
|
+
|-- info
|
|
55
|
+
|-- hosts
|
|
56
|
+
|-- host create|list|show|bootstrap|verifier|apply|status|logs
|
|
57
|
+
|-- services
|
|
58
|
+
|-- service list|show
|
|
59
|
+
|-- edges-list
|
|
60
|
+
|-- edge list|show
|
|
61
|
+
|-- app list|show
|
|
62
|
+
|-- validate
|
|
63
|
+
|-- check
|
|
64
|
+
|-- resolve <edge-id>
|
|
65
|
+
|-- analyze --output <directory>
|
|
66
|
+
|-- diagram --output <directory>
|
|
67
|
+
|-- docs --output <directory>
|
|
68
|
+
|-- secrets inspect|audit
|
|
69
|
+
|-- capabilities
|
|
70
|
+
|-- project observation|secrets|view|readiness
|
|
71
|
+
|-- explain <code>
|
|
72
|
+
|-- release inspect|validate-candidate|render-publisher-request|inspect-attestation
|
|
73
|
+
`-- registry host get|patch
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Topology commands require declared sources through flags or environment
|
|
77
|
+
variables. Packaged examples are explicit demo and test inputs only.
|
|
78
|
+
|
|
79
|
+
## Exit Codes
|
|
80
|
+
|
|
81
|
+
| Code | Meaning |
|
|
82
|
+
| --- | --- |
|
|
83
|
+
| `0` | Positive domain result |
|
|
84
|
+
| `1` | Completed negative domain result |
|
|
85
|
+
| `2` | Usage error |
|
|
86
|
+
| `3` | Input, schema, or entity error |
|
|
87
|
+
| `4` | Provider or authentication failure |
|
|
88
|
+
| `69` | Unsupported platform |
|
|
89
|
+
| `70` | Unexpected internal failure |
|
|
90
|
+
| `74` | Artifact I/O failure or retained recovery state |
|
|
91
|
+
|
|
92
|
+
Exit `74` uses `artifact_io_failed` for storage failures and
|
|
93
|
+
`artifact_recovery_required` when recovery state is retained. `internal_error`
|
|
94
|
+
is reserved for exit `70`.
|
|
95
|
+
|
|
96
|
+
## Secret Boundary
|
|
97
|
+
|
|
98
|
+
Topology stores references such as `example/database-password`, not values.
|
|
99
|
+
`resolve` may return:
|
|
100
|
+
|
|
101
|
+
```text
|
|
102
|
+
postgresql://app:${secret:example/database-password}@192.0.2.10:5432/app
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
`secrets inspect` reports declared references and source locations only.
|
|
106
|
+
`secrets audit --provider bws` may inspect hosted Bitwarden metadata for those
|
|
107
|
+
declared references, but cannot accept arbitrary secret IDs and never retrieves
|
|
108
|
+
values. Production audit requires `BWS_ACCESS_TOKEN` and `BWS_ORGANIZATION_ID`.
|
|
109
|
+
Custom BWS endpoints remain out of scope until explicitly designed.
|
|
110
|
+
|
|
111
|
+
## Release Boundary
|
|
112
|
+
|
|
113
|
+
Woodpecker is the only CI release executor. Its manual release step runs for
|
|
114
|
+
`main` on Python 3.12 only after all three Python-version quality gates succeed.
|
|
115
|
+
It requires the requested version to equal the package version and requires the
|
|
116
|
+
pipeline commit to equal the current `main` commit. It publishes exactly:
|
|
117
|
+
|
|
118
|
+
```text
|
|
119
|
+
infralink-<version>-py3-none-any.whl
|
|
120
|
+
infralink-<version>.tar.gz
|
|
121
|
+
SHA256SUMS
|
|
122
|
+
SHA256SUMS.sigstore.json
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
GitHub is the public source and release destination. The step fails if the tag
|
|
126
|
+
or release already exists, builds the packages, checks them with Twine, writes
|
|
127
|
+
canonical checksums, and signs the checksum file with Cosign. Local release
|
|
128
|
+
scripts are validators and asset assemblers; they are not an alternate release
|
|
129
|
+
path.
|
|
130
|
+
|
|
131
|
+
## Non-Goals
|
|
132
|
+
|
|
133
|
+
- Dynamic service discovery.
|
|
134
|
+
- Secret storage, writes, resolved credential output, or arbitrary secret lookup.
|
|
135
|
+
- Public disclosure of private topology.
|
|
136
|
+
- Automatic release, non-main publication, or production rollout.
|
|
137
|
+
- Running live host or provider mutations without explicit operator authority.
|
|
138
|
+
|
|
139
|
+
## Success Criteria
|
|
140
|
+
|
|
141
|
+
- Every public CLI response validates against its checked-in schema.
|
|
142
|
+
- No secret value crosses a serialization boundary.
|
|
143
|
+
- Generated schemas are deterministic and clean after regeneration.
|
|
144
|
+
- Release assets correspond to the exact protected `main` source commit.
|
|
145
|
+
- Public docs and examples contain only deliberate example topology.
|
|
146
|
+
- Compatibility changes have an explicit migration path.
|
|
147
|
+
|
|
148
|
+
## Historical Context
|
|
149
|
+
|
|
150
|
+
The `v0.2` foundation remains documented for migration and release-history
|
|
151
|
+
purposes. Keep that history in [docs/compatibility/v0.2.md](docs/compatibility/v0.2.md)
|
|
152
|
+
and [docs/releases/](docs/releases/) rather than using it as the current
|
|
153
|
+
top-level product frame.
|