lighthouse-cli 0.16.0__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.
- lighthouse_cli-0.16.0/LICENSE +202 -0
- lighthouse_cli-0.16.0/NOTICE +2 -0
- lighthouse_cli-0.16.0/PKG-INFO +23 -0
- lighthouse_cli-0.16.0/README.md +258 -0
- lighthouse_cli-0.16.0/lighthouse/__init__.py +6 -0
- lighthouse_cli-0.16.0/lighthouse/__main__.py +9 -0
- lighthouse_cli-0.16.0/lighthouse/commands/__init__.py +0 -0
- lighthouse_cli-0.16.0/lighthouse/commands/agents.py +310 -0
- lighthouse_cli-0.16.0/lighthouse/commands/builds.py +85 -0
- lighthouse_cli-0.16.0/lighthouse/commands/collectors.py +147 -0
- lighthouse_cli-0.16.0/lighthouse/commands/connect.py +717 -0
- lighthouse_cli-0.16.0/lighthouse/commands/connections.py +201 -0
- lighthouse_cli-0.16.0/lighthouse/commands/evals.py +198 -0
- lighthouse_cli-0.16.0/lighthouse/commands/kb.py +224 -0
- lighthouse_cli-0.16.0/lighthouse/commands/language.py +56 -0
- lighthouse_cli-0.16.0/lighthouse/commands/limits.py +61 -0
- lighthouse_cli-0.16.0/lighthouse/commands/login.py +207 -0
- lighthouse_cli-0.16.0/lighthouse/commands/models.py +61 -0
- lighthouse_cli-0.16.0/lighthouse/commands/runs.py +157 -0
- lighthouse_cli-0.16.0/lighthouse/commands/spend.py +84 -0
- lighthouse_cli-0.16.0/lighthouse/commands/stack.py +103 -0
- lighthouse_cli-0.16.0/lighthouse/commands/terms.py +50 -0
- lighthouse_cli-0.16.0/lighthouse/commands/whoami.py +80 -0
- lighthouse_cli-0.16.0/lighthouse/config.py +141 -0
- lighthouse_cli-0.16.0/lighthouse/credentials.py +233 -0
- lighthouse_cli-0.16.0/lighthouse/device.py +124 -0
- lighthouse_cli-0.16.0/lighthouse/exits.py +78 -0
- lighthouse_cli-0.16.0/lighthouse/flags.py +61 -0
- lighthouse_cli-0.16.0/lighthouse/http.py +355 -0
- lighthouse_cli-0.16.0/lighthouse/i18n.py +250 -0
- lighthouse_cli-0.16.0/lighthouse/locales/ar.json +343 -0
- lighthouse_cli-0.16.0/lighthouse/locales/de.json +343 -0
- lighthouse_cli-0.16.0/lighthouse/locales/en.json +343 -0
- lighthouse_cli-0.16.0/lighthouse/locales/es.json +343 -0
- lighthouse_cli-0.16.0/lighthouse/locales/fr.json +343 -0
- lighthouse_cli-0.16.0/lighthouse/locales/ga.json +343 -0
- lighthouse_cli-0.16.0/lighthouse/locales/it.json +343 -0
- lighthouse_cli-0.16.0/lighthouse/locales/ja.json +343 -0
- lighthouse_cli-0.16.0/lighthouse/locales/nl.json +343 -0
- lighthouse_cli-0.16.0/lighthouse/locales/pt.json +343 -0
- lighthouse_cli-0.16.0/lighthouse/locales/zh-Hans.json +343 -0
- lighthouse_cli-0.16.0/lighthouse/locales/zh-Hant.json +343 -0
- lighthouse_cli-0.16.0/lighthouse/main.py +229 -0
- lighthouse_cli-0.16.0/lighthouse/out.py +169 -0
- lighthouse_cli-0.16.0/lighthouse/py.typed +0 -0
- lighthouse_cli-0.16.0/lighthouse/sealing.py +448 -0
- lighthouse_cli-0.16.0/lighthouse_cli.egg-info/PKG-INFO +23 -0
- lighthouse_cli-0.16.0/lighthouse_cli.egg-info/SOURCES.txt +67 -0
- lighthouse_cli-0.16.0/lighthouse_cli.egg-info/dependency_links.txt +1 -0
- lighthouse_cli-0.16.0/lighthouse_cli.egg-info/entry_points.txt +2 -0
- lighthouse_cli-0.16.0/lighthouse_cli.egg-info/requires.txt +14 -0
- lighthouse_cli-0.16.0/lighthouse_cli.egg-info/top_level.txt +1 -0
- lighthouse_cli-0.16.0/pyproject.toml +105 -0
- lighthouse_cli-0.16.0/setup.cfg +4 -0
- lighthouse_cli-0.16.0/tests/test_ci_credential.py +428 -0
- lighthouse_cli-0.16.0/tests/test_collectors.py +113 -0
- lighthouse_cli-0.16.0/tests/test_commands.py +1133 -0
- lighthouse_cli-0.16.0/tests/test_connect_erp_hr.py +105 -0
- lighthouse_cli-0.16.0/tests/test_connect_finav.py +134 -0
- lighthouse_cli-0.16.0/tests/test_connect_library.py +154 -0
- lighthouse_cli-0.16.0/tests/test_dev_surface.py +454 -0
- lighthouse_cli-0.16.0/tests/test_fixtures.py +83 -0
- lighthouse_cli-0.16.0/tests/test_golden.py +187 -0
- lighthouse_cli-0.16.0/tests/test_i18n.py +238 -0
- lighthouse_cli-0.16.0/tests/test_installers.py +76 -0
- lighthouse_cli-0.16.0/tests/test_plumbing.py +465 -0
- lighthouse_cli-0.16.0/tests/test_sealing.py +262 -0
- lighthouse_cli-0.16.0/tests/test_stack.py +66 -0
- lighthouse_cli-0.16.0/tests/test_version.py +19 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: lighthouse-cli
|
|
3
|
+
Version: 0.16.0
|
|
4
|
+
Summary: The LightHouse command line: sign in, connect your estate, deploy agents, watch runs
|
|
5
|
+
License-Expression: Apache-2.0
|
|
6
|
+
Classifier: Programming Language :: Python :: 3
|
|
7
|
+
Classifier: Typing :: Typed
|
|
8
|
+
Requires-Python: >=3.11
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
License-File: NOTICE
|
|
11
|
+
Requires-Dist: httpx==0.28.1
|
|
12
|
+
Requires-Dist: keyring==25.7.0
|
|
13
|
+
Requires-Dist: cryptography==50.0.2
|
|
14
|
+
Provides-Extra: dev
|
|
15
|
+
Requires-Dist: pytest==9.1.1; extra == "dev"
|
|
16
|
+
Requires-Dist: pytest-cov==7.1.0; extra == "dev"
|
|
17
|
+
Requires-Dist: ruff==0.16.10; extra == "dev"
|
|
18
|
+
Requires-Dist: mypy==2.4.0; extra == "dev"
|
|
19
|
+
Requires-Dist: bandit[toml]==1.9.4; extra == "dev"
|
|
20
|
+
Requires-Dist: jsonschema==4.25.1; extra == "dev"
|
|
21
|
+
Provides-Extra: build
|
|
22
|
+
Requires-Dist: pyinstaller==6.22.3; extra == "build"
|
|
23
|
+
Dynamic: license-file
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
# The `lighthouse` command line for LightHouse™
|
|
2
|
+
|
|
3
|
+
LightHouse from a terminal: sign in through the browser, see what is connected,
|
|
4
|
+
read spend and limits, scaffold an agent, follow the runs. In the manner of the
|
|
5
|
+
Stripe CLI — one command to install, one to sign in, and everything else
|
|
6
|
+
scriptable.
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
brew install atlantic-agentic-labs/tap/lighthouse # or npm, pip, curl (below)
|
|
10
|
+
lighthouse login --host t7m2kqx9vbn.atlanticagenticlabs.com
|
|
11
|
+
lighthouse whoami
|
|
12
|
+
lighthouse spend --by model --json | jq '.rows[0]'
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Why Python
|
|
16
|
+
|
|
17
|
+
The requirement is one binary installable four ways. Go would give that most
|
|
18
|
+
directly, and the Stripe CLI is written in Go. We chose Python, on this
|
|
19
|
+
evidence:
|
|
20
|
+
|
|
21
|
+
| | Weight |
|
|
22
|
+
|---|---|
|
|
23
|
+
| **The control plane is Python.** The service, its OpenAPI generator and its MCP server are all `aal_control`. The CLI's integration tests therefore run **in process against the very application that is deployed** (`service/tests/test_cli_integration.py`) — the real routes, the real OAuth, the real row-level security, no stack to boot and no stub to drift. No other choice gets us that. | decisive |
|
|
24
|
+
| **No new toolchain in any pipeline.** Every job already runs `python:3.13-slim`; a Go CLI would add a compiler, a cross-build matrix and a second dependency-audit path to all 21 repositories. | heavy |
|
|
25
|
+
| **`keyring` gives the OS keychain on all three platforms** — macOS Keychain, Secret Service, Windows Credential Locker — with no native code to sign or notarise. | heavy |
|
|
26
|
+
| Against: `npm` and `curl` want a runtime-free binary. | the cost |
|
|
27
|
+
|
|
28
|
+
That last line is the real cost, and it is paid rather than hidden: `pip` and
|
|
29
|
+
`brew` install from source, while the **npm package and the curl script serve a
|
|
30
|
+
single-file build** made with PyInstaller (`installers/`), which embeds the
|
|
31
|
+
interpreter. A person installing by `curl | sh` needs no Python; a person
|
|
32
|
+
installing by `pip` has one already.
|
|
33
|
+
|
|
34
|
+
If the npm and curl routes ever become the main way people install this, the
|
|
35
|
+
decision is worth revisiting — the commands, their output and their tests are
|
|
36
|
+
the valuable part and none of it is language-specific.
|
|
37
|
+
|
|
38
|
+
## Install
|
|
39
|
+
|
|
40
|
+
| Route | Command | What it installs |
|
|
41
|
+
|---|---|---|
|
|
42
|
+
| Homebrew | `brew install atlantic-agentic-labs/tap/lighthouse` | from source, into its own virtualenv (`installers/lighthouse.rb`) |
|
|
43
|
+
| pip | `pip install lighthouse-cli` | from source, as a normal console script |
|
|
44
|
+
| curl | `curl -fsSL https://get.atlanticagenticlabs.com/lighthouse \| sh` | the single-file build (`installers/install.sh`) |
|
|
45
|
+
|
|
46
|
+
**Nothing is published yet.** From a clone:
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
cd cli && pip install -e ".[dev]"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
What has to exist before any of the three routes work is in
|
|
53
|
+
`installers/README.md`: a Homebrew tap, a PyPI project and one DNS name. No
|
|
54
|
+
registry credential is stored for any of them.
|
|
55
|
+
|
|
56
|
+
## Signing in
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
$ lighthouse login --host t7m2kqx9vbn.atlanticagenticlabs.com
|
|
60
|
+
|
|
61
|
+
Your pairing code is: WXKM-7T4P
|
|
62
|
+
Approve it at https://t7m2kqx9vbn.atlanticagenticlabs.com/device
|
|
63
|
+
Press Enter to open the browser, or Ctrl-C to stop…
|
|
64
|
+
Signed in to Example Air as ops@example.test (client_admin).
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
A device code, exactly as `stripe login` does it. The person approves in their
|
|
68
|
+
own portal, behind their own identity provider and their own second factor;
|
|
69
|
+
nothing is typed into the terminal and no token is copied by hand.
|
|
70
|
+
|
|
71
|
+
**The credential goes in the operating system keychain, never a file.** Not in
|
|
72
|
+
the repository, not in a dotfile, not in an environment file. One entry per
|
|
73
|
+
host, so you can be signed in to several tenants at once:
|
|
74
|
+
|
|
75
|
+
```sh
|
|
76
|
+
lighthouse whoami --profiles
|
|
77
|
+
lighthouse logout --all # revokes at the service, then forgets
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**What the credential can do** is in
|
|
81
|
+
`docs/adr/0012-delegated-credentials.md`: it reads as you, it never
|
|
82
|
+
administers, approves or pays, and the access grant behind it is re-read on
|
|
83
|
+
every request — so a withdrawn grant stops it at once.
|
|
84
|
+
|
|
85
|
+
## In CI
|
|
86
|
+
|
|
87
|
+
There is no keychain on a runner and no browser to open, so a pipeline uses a
|
|
88
|
+
**machine key** and the tenant's **Cloudflare Access service token**, both in
|
|
89
|
+
masked variables:
|
|
90
|
+
|
|
91
|
+
| Variable | What it is |
|
|
92
|
+
|---|---|
|
|
93
|
+
| `LIGHTHOUSE_HOST` | the tenant, `<tenant id>.atlanticagenticlabs.com` |
|
|
94
|
+
| `LIGHTHOUSE_TOKEN` | a machine key (`aalcp-...`), created on the portal's **Keys** page |
|
|
95
|
+
| `LIGHTHOUSE_ACCESS_CLIENT_ID` | the tenant's Access service token id |
|
|
96
|
+
| `LIGHTHOUSE_ACCESS_CLIENT_SECRET` | its secret |
|
|
97
|
+
|
|
98
|
+
```yaml
|
|
99
|
+
spend-report:
|
|
100
|
+
image: python:3.13-slim
|
|
101
|
+
variables:
|
|
102
|
+
LIGHTHOUSE_HOST: t7m2kqx9vbn.atlanticagenticlabs.com
|
|
103
|
+
# LIGHTHOUSE_TOKEN, LIGHTHOUSE_ACCESS_CLIENT_ID and
|
|
104
|
+
# LIGHTHOUSE_ACCESS_CLIENT_SECRET are masked CI/CD variables.
|
|
105
|
+
script:
|
|
106
|
+
- pip install -q lighthouse-cli
|
|
107
|
+
- lighthouse whoami --json
|
|
108
|
+
- lighthouse evals list --fail-below 0.8 --json
|
|
109
|
+
- lighthouse spend --json > spend.json
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**Why two credentials.** Every tenant host sits behind Cloudflare Access except
|
|
113
|
+
the sign-in endpoints, so every other request carries the Access service token
|
|
114
|
+
(`CF-Access-Client-Id` and `CF-Access-Client-Secret`) *and* the key
|
|
115
|
+
(`Authorization: Bearer ...`). If Access answers instead of LightHouse (a
|
|
116
|
+
redirect to `*.cloudflareaccess.com`, or a login page) the CLI says the Access
|
|
117
|
+
service token is missing or wrong and names the two variables.
|
|
118
|
+
|
|
119
|
+
**Machine key or delegated token.** `LIGHTHOUSE_TOKEN` also accepts a delegated
|
|
120
|
+
token (`lhat-...`), but that expires after **eight hours** and is not refreshed
|
|
121
|
+
under the variable: there would be nowhere to put the new one. A machine key
|
|
122
|
+
does not expire by time and has no refresh; revoke it on the Keys page. A
|
|
123
|
+
machine key has no person behind it, so `lighthouse tokens` says so rather than
|
|
124
|
+
failing, and `whoami` shows the key's kind.
|
|
125
|
+
|
|
126
|
+
When `LIGHTHOUSE_TOKEN` is set, the CLI reads and writes **no** credential
|
|
127
|
+
store at all.
|
|
128
|
+
|
|
129
|
+
**On a workstation** behind Access, `login` can keep the service token in the
|
|
130
|
+
keychain with the delegated token:
|
|
131
|
+
|
|
132
|
+
```sh
|
|
133
|
+
printf '%s\n' "$ACCESS_SECRET" | lighthouse login --access-client-id "$ACCESS_ID" \
|
|
134
|
+
--access-client-secret-stdin
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
The secret comes from standard input or `LIGHTHOUSE_ACCESS_CLIENT_SECRET`, never
|
|
138
|
+
from a command-line argument, where `ps` and shell history would keep it.
|
|
139
|
+
|
|
140
|
+
`--timeout N` is the number of seconds for one request (connect, read and write
|
|
141
|
+
each). `--no-input` makes any question an exit 7 instead of a hang, which is
|
|
142
|
+
what you want in a job. Colour is off automatically when standard output is not
|
|
143
|
+
a terminal, and when `CI`, `NO_COLOR` or `TERM=dumb` is set.
|
|
144
|
+
|
|
145
|
+
## The commands
|
|
146
|
+
|
|
147
|
+
| Command | |
|
|
148
|
+
|---|---|
|
|
149
|
+
| `login`, `logout`, `tokens` | sign in, sign out, see and revoke your delegated tokens |
|
|
150
|
+
| `whoami` | which tenant, which person, which role, which scopes, where the credential came from |
|
|
151
|
+
| `connect [provider]` | what is connected; open a provider's own approval; with `--credential-stdin`, connect an existing token as yourself (read from standard input, `--access read_write` by choice; needs `cloudflared access login https://<host>`); with `--reuse-local`, offer the `gh`, `glab` or `DD_*` sign-in already on this machine, sent the same way only after you type `yes` at a terminal (never under `--yes` or `--no-input`) |
|
|
152
|
+
| `connections`, `connections schedule <id> --mode ...`, `connections sync <id>` | each connection's sync schedule, last and next sync; set a schedule (`off`, `every_15m`, `hourly`, `working_hours --tz ...`, `daily --at HH:MM --tz ...`) or sync now, as yourself (a client administrator; needs `cloudflared access login https://<host>`; checked by the service exactly as on the card) |
|
|
153
|
+
| `collectors`, `collectors request --vendor ... --product ... --reads ... --cloud ...` | your tenant's collector requests and their stage in Atlantic's backlog; ask for another (handler or client administrator; `--kind`, `--access read_write`, `--urgency`, `--docs-url` optional; at a terminal it asks for what is missing). The request becomes a public issue that never names your organisation |
|
|
154
|
+
| `models` | the model library and its evidence scores |
|
|
155
|
+
| `kb`, `kb show`, `kb ingest <index> --source <connection or connector> [--wait]` | knowledge bases and their freshness; sync a connection into one now (`connections sync` by another name, as yourself), and with `--wait` until the deployment reports the sync finished |
|
|
156
|
+
| `agents`, `agents show`, `agents init`, `agents logs` | the agents, and scaffold one |
|
|
157
|
+
| `agents deploy <pack:card> --version V [--wait]`, `agents rollback <pack:card> [--to V]` | make a released version current (the `deploy` scope): live at once when the version passed its evaluation gate and your policy allows it, otherwise a request a person approves in LightHouse; `--wait` follows it to the end |
|
|
158
|
+
| `evals list`, `evals list --fail-below N` | evaluation results, as a release gate on one named metric (`--metric`, default `f1`); fails closed when a row has no such number |
|
|
159
|
+
| `evals run <pack:card> --cap N [--set S] [--wait] [--fail-below N]` | run the agent's scheduled evaluation once under a spend cap (the `deploy` scope, or a person); with `--wait`, gate on the new results |
|
|
160
|
+
| `runs`, `runs show`, `runs tail` | what ran, and what is running now |
|
|
161
|
+
| `spend` | spend by day, model, pack, agent or connection; the forecast; the estimated savings |
|
|
162
|
+
| `limits` | the limits in force, and whether the engines applied them |
|
|
163
|
+
| `terms` | the commercial terms in force |
|
|
164
|
+
|
|
165
|
+
### A release gate in CI
|
|
166
|
+
|
|
167
|
+
`evals run --wait --fail-below` exits 1 when a new evaluation row did not
|
|
168
|
+
pass, or its metric is below the threshold or missing (it fails closed), so
|
|
169
|
+
a pipeline can evaluate, then deploy only what passed. Deploying and running
|
|
170
|
+
an evaluation need a person's delegated token with the `deploy` scope
|
|
171
|
+
(`lighthouse login --scope "telemetry:read agents:read deploy"`, eight hours,
|
|
172
|
+
in `LIGHTHOUSE_TOKEN`); a machine key reads but never deploys or spends.
|
|
173
|
+
|
|
174
|
+
```yaml
|
|
175
|
+
release:
|
|
176
|
+
image: python:3.13-slim
|
|
177
|
+
script:
|
|
178
|
+
- pip install -q lighthouse-cli
|
|
179
|
+
- lighthouse evals run research:summary --cap 5 --wait --fail-below 0.8 --json
|
|
180
|
+
- lighthouse agents deploy research:summary --version "$CI_COMMIT_TAG" --wait --json
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
`agents deploy --wait` exits 0 when the version is current, 1 when the
|
|
184
|
+
deployment refused it or a person rejected the request, and 5 when it is
|
|
185
|
+
still waiting at `--wait-timeout` (default 900 seconds; 1,800 for `evals run`).
|
|
186
|
+
A rate limit (`429`) is waited out and retried by the CLI itself.
|
|
187
|
+
|
|
188
|
+
## Output and exit codes
|
|
189
|
+
|
|
190
|
+
**Language.** `--lang <tag>` (or `LIGHTHOUSE_LANG`) picks the language of help,
|
|
191
|
+
prompts, errors and table headers for one run: `en` (British English, the
|
|
192
|
+
default and the source), `fr`, `de`, `es`, `it`, `pt`, `nl`, `ga`, `ja`, `zh-Hans`, `zh-Hant` or `ar`. Without
|
|
193
|
+
either, the CLI uses the language you set in the portal (kept by `lighthouse
|
|
194
|
+
whoami` and `lighthouse language`), then `LANG`. `--json` is never translated: its
|
|
195
|
+
keys, values and the `error` code are the same in every language. The translations
|
|
196
|
+
are machine-drafted, pending native review; the command-specific notes not yet in a
|
|
197
|
+
catalogue are shown in English.
|
|
198
|
+
|
|
199
|
+
`--json` on every command: one JSON document on standard output and **nothing
|
|
200
|
+
else** — prose, prompts and progress go to standard error, so
|
|
201
|
+
`lighthouse spend --json | jq` works while the command is still talking to you.
|
|
202
|
+
`runs tail --json` writes JSON Lines, one object per change.
|
|
203
|
+
|
|
204
|
+
| Code | Meaning | What a pipeline should do |
|
|
205
|
+
|---|---|---|
|
|
206
|
+
| 0 | it worked | carry on |
|
|
207
|
+
| 1 | the command failed | stop; the message says why |
|
|
208
|
+
| 2 | the command line was wrong | stop; fix the invocation |
|
|
209
|
+
| 3 | not signed in, or the credential expired | `lighthouse login` |
|
|
210
|
+
| 4 | signed in, but the role or scope does not reach this | ask an administrator |
|
|
211
|
+
| 5 | refused for now: a rate limit, or a retryable 5xx | retry later |
|
|
212
|
+
| 7 | it needed a person and none is there | stop |
|
|
213
|
+
|
|
214
|
+
`--json` is the API's own document: the keys the service sent, unchanged, with
|
|
215
|
+
`ok` added. Every `--json` output is frozen in `tests/golden/`, built from
|
|
216
|
+
fixtures that are themselves generated from the service's OpenAPI document
|
|
217
|
+
(`tests/api_fixtures.py`, checked by `tests/test_fixtures.py`), so a key cannot
|
|
218
|
+
be renamed or dropped, and the CLI cannot drift from the API, without a reviewer
|
|
219
|
+
seeing it in the diff.
|
|
220
|
+
|
|
221
|
+
## Develop
|
|
222
|
+
|
|
223
|
+
```sh
|
|
224
|
+
pip install -e ".[dev]"
|
|
225
|
+
pytest # no network, no keychain
|
|
226
|
+
python -m tests.api_fixtures # regenerate the fixtures from docs/api/openapi.json
|
|
227
|
+
LIGHTHOUSE_GOLDEN=update pytest # re-record the golden files, then read the diff
|
|
228
|
+
ruff check . && mypy && bandit -q -c pyproject.toml -r lighthouse
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
The integration test lives with the service (`service/tests/test_cli_integration.py`),
|
|
232
|
+
because that is where the fixtures that build a working tenant are. It runs the
|
|
233
|
+
real CLI against the real application in process: the device flow, connect,
|
|
234
|
+
tail, spend, and the refusals.
|
|
235
|
+
|
|
236
|
+
```sh
|
|
237
|
+
cd ../service && pip install -e ".[dev]" -e ../cli
|
|
238
|
+
AAL_TEST_PG_DSN=... pytest tests/test_cli_integration.py
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
Three things are stood in for and no more: the keychain (a dictionary), the
|
|
242
|
+
browser (a recorder), and `sleep`. The device code is approved by calling the
|
|
243
|
+
portal's own route as the person would have after clicking, so the grant, the
|
|
244
|
+
token and every check on it are real.
|
|
245
|
+
|
|
246
|
+
**The gap, named.** That test runs the CLI against the application *in
|
|
247
|
+
process*, through Starlette's own test transport. So the routes, the database,
|
|
248
|
+
the row-level security, the OAuth flow and the refusals are all real, and
|
|
249
|
+
everything between the CLI's `httpx` call and the service is not: TLS, a
|
|
250
|
+
redirect, chunked transfer, a `Retry-After` from Cloudflare. The retry and
|
|
251
|
+
back-off code is covered against a stubbed transport in `tests/test_plumbing.py`
|
|
252
|
+
and the back-off arithmetic is a pure function, so what is unproved is the
|
|
253
|
+
socket, not the logic. The honest next step is a scenario in `e2e/`, where the
|
|
254
|
+
stack is already stood up behind its Cloudflare stand-in; it is not in this
|
|
255
|
+
change, and `--target live` against a deployed hostname is the other half of
|
|
256
|
+
it.
|
|
257
|
+
|
|
258
|
+
© 2026 Atlantic Agentic Labs.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Copyright 2026 Atlantic Agentic Labs. All Rights Reserved.
|
|
2
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
"""`python -m lighthouse`, the same as the `lighthouse` script."""
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
from lighthouse.main import run
|
|
7
|
+
|
|
8
|
+
if __name__ == "__main__":
|
|
9
|
+
run()
|
|
File without changes
|