1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
//! **The login pane**: the sign-in catalog — what this workspace can sign in
//! to, signed in or not (`catalog`, REMOTE §9.27) — and the act that signs it
//! in (yog's `docs/REMOTE.md` §8.3; PROTOCOL 13). It lists the catalog and
//! never the routing table (`providers`): brazen bl-6feb severed the two, and
//! the table omits exactly the unsigned presets a sign-in exists for.
//!
//! # The act is the SERVER'S and this pane only asks for it
//!
//! `bz --login` runs on the server, inside the named workspace's directory, so the
//! credential lands where the agents that read it run and **nothing
//! credential-shaped crosses this wire** (REMOTE §8.3). This crate spawns no
//! sign-in, holds no run and has no `exec` at all. What it does is post one
//! gesture and paint the lines that come back — which is the whole of why the
//! surface is portable.
//!
//! **Closing the pane terminates nothing.** The run is server RAM, one per
//! workspace × provider, replaced by the operator's own next sign-in and swept
//! at an hour. This side gets that for free and must not re-implement it.
//!
//! # Which sphere the sign-in is for, said in the surface
//!
//! The workspace's name and the channel it came down, and — for a workspace held
//! elsewhere — that it is held elsewhere, off the roster's own client-side
//! channel stamp (`crate::ui::Channel`). **Never a host address**: two entries
//! naming one listener are still two trust relationships, and an address in
//! this sentence would be this end telling the operator where a credential is
//! going to land.
//!
//! # The loopback remedy is stated, never built
//!
//! A row whose flow needs a browser at the SERVER's own loopback can only be
//! completed from a browser on that box, or through a port-forward the operator
//! sets up — *an operator act on boxes the operator administers*, and REMOTE
//! §8.3 rules it is stated as a remedy and never made a channel feature.
//!
//! **It is said for every row on a workspace held elsewhere, not for the browser-only
//! ones**, and that is a limit rather than a choice: the `device` column is on
//! yog's own provider row and not on the view that crosses the wire
//! (`crate::reply::providers`), so this seat cannot tell the two apart. A
//! stated remedy that is sometimes unnecessary beats a silence that is
//! sometimes wrong.
//!
//! # One control fires two ops, because following the run is part of starting it
//!
//! `sign in to this row` carries `act:login act:login-tail`. The act starts the
//! run and the pane's `following` is what stands the held lane up, so a seat
//! that tagged only the act would be claiming `login-tail` is reachable
//! nowhere. It is the start control's shape exactly (§4.16).
//!
//! # The run-by-hand fallback is the server's sentence, with one of ours
//!
//! `fallback` is composed by the end that knows the workspace and arrives only on a
//! non-zero exit. The original surface spelled a local workspace's fallback as an
//! `exec` on this box and an entry's as something else; both are the same case
//! now — **an act the operator runs on the box that HOLDS the workspace** — so what
//! this pane adds is one sentence saying so, naming the channel and no address.
use crateProviderRow;
use crate;
/// The followed run's own half of the pane — its lines, its exit and the
/// command to run by hand.
/// **The word typed after the slash** that opens it (`crate::ui::slash`).
pub const WORD: &str = "login";
/// The pane's own heading.
pub const HEADING: &str = "sign in";
/// What it says for a workspace nobody has been answered about yet.
pub const NOT_ANSWERED: &str = "waiting to hear what this workspace can sign in to";
/// What it says for a workspace that answered and can sign in to nothing. A
/// fact about the workspace, and the one empty state here that is not a wait:
/// the catalog is every row carrying a sign-in flow, so an empty one means no
/// such row is declared — never that a credential is missing.
pub const NO_PROVIDERS: &str =
"no provider here can sign in — /config brazen declares an oauth row";
/// The word on the control that starts a sign-in on a row.
pub const SIGN_IN: &str = "sign in to this provider";
/// What the sign-in does.
pub const SIGN_IN_HELP: &str =
"starts this provider's sign-in on the server; its progress stands below";
/// The word on the control that asks a row what it offers.
pub const OFFERS: &str = "what it offers…";
/// What `what it offers…` does.
pub const OFFERS_HELP: &str = "asks this provider which models it offers, listed below";
/// What it says under a row that was asked and has not answered.
pub const NOT_OFFERED: &str = "waiting to hear what this provider offers";
/// What it says for a row that answered and offers nothing.
pub const OFFERS_NOTHING: &str = "this provider offers no model";
/// The sentence that says where the sign-in is actually happening.
pub const ELSEWHERE: &str = "this workspace lives on another box, and the sign-in \
runs there — the credential is kept there, not \
on this one";
/// The §8.3 remedy for a row whose flow wants a browser at the server's own
/// loopback, said wherever the server is not this box.
pub const LOOPBACK: &str = "if the sign-in opens a web page, that page expects \
a browser on the server's box: finish it there, or \
forward the port by hand";
/// Paint the pane and take the clicks on it. Answers whether there was one to
/// paint, so the shell knows whether the conversation still stands.
/// One provider row: what it is, what the server knows about its credential,
/// and the two controls on it.
/// What this row offers, under the row that asked — and only under it, which is
/// what the pane's `asking` is for: the reply carries no provider name, so the
/// question is the only thing that can say which row it answers.