@floh-solutions/pharos-cli 0.23.0 → 0.24.0
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.
- package/README.md +318 -1
- package/dist/capabilities.d.ts.map +1 -1
- package/dist/capabilities.js +23 -0
- package/dist/capabilities.js.map +1 -1
- package/dist/cli.d.ts +4 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +235 -31
- package/dist/cli.js.map +1 -1
- package/dist/commands/doctor.d.ts +11 -2
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +351 -8
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/issue.d.ts +40 -0
- package/dist/commands/issue.d.ts.map +1 -0
- package/dist/commands/issue.js +2188 -0
- package/dist/commands/issue.js.map +1 -0
- package/dist/commands/setup.d.ts +6 -0
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +114 -0
- package/dist/commands/setup.js.map +1 -1
- package/dist/half-link.d.ts +147 -0
- package/dist/half-link.d.ts.map +1 -0
- package/dist/half-link.js +247 -0
- package/dist/half-link.js.map +1 -0
- package/dist/issue-scan.d.ts +383 -0
- package/dist/issue-scan.d.ts.map +1 -0
- package/dist/issue-scan.js +455 -0
- package/dist/issue-scan.js.map +1 -0
- package/dist/output.d.ts +18 -1
- package/dist/output.d.ts.map +1 -1
- package/dist/output.js +171 -0
- package/dist/output.js.map +1 -1
- package/dist/session.d.ts +50 -0
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +70 -0
- package/dist/session.js.map +1 -1
- package/package.json +4 -3
- package/skill/SKILL.md +268 -9
package/README.md
CHANGED
|
@@ -71,6 +71,10 @@ A bad token exits **2**, not 1 — retrying it is pure noise. A conflict carries
|
|
|
71
71
|
both revisions, and says out loud that posting a comment bumps `System.Rev`, so
|
|
72
72
|
a rev mismatch is *not* proof that somebody edited the same field.
|
|
73
73
|
|
|
74
|
+
A failure that came from GitHub says so — `"platform": "github"` — because
|
|
75
|
+
`pharos issue` touches two platforms in one call and which one refused is the
|
|
76
|
+
first thing to know. Its absence means Azure DevOps or this tool, as before.
|
|
77
|
+
|
|
74
78
|
## Guards
|
|
75
79
|
|
|
76
80
|
Every verb here is one an agent can call in a loop against a board real people
|
|
@@ -98,6 +102,10 @@ something a caller can skip.
|
|
|
98
102
|
runaway loop becomes a clean refusal rather than 500 work items. `--max-writes 0`
|
|
99
103
|
is read-only: reads work, every write is refused before it is sent.
|
|
100
104
|
|
|
105
|
+
It counts **both platforms**. `pharos issue` writes to Azure DevOps and to
|
|
106
|
+
GitHub in one invocation, and a cap that covered one of them because the other
|
|
107
|
+
left by a different transport would be a cap in name only.
|
|
108
|
+
|
|
101
109
|
It is **not security** — anything that can run this holds the token and can make
|
|
102
110
|
the same REST calls directly. It shapes intent and catches accidents. A
|
|
103
111
|
capability that must be impossible has to be withheld at the token.
|
|
@@ -108,6 +116,9 @@ capability that must be impossible has to be withheld at the token.
|
|
|
108
116
|
task <id> the whole context, in one call
|
|
109
117
|
wiki list | tree | read | write | delete
|
|
110
118
|
comment list | add | edit | delete | react | unreact | reactors
|
|
119
|
+
issue adopt | link | say | trail | drift | backfill | close
|
|
120
|
+
a GitHub issue and a work item, joined —
|
|
121
|
+
and kept honest
|
|
111
122
|
plan <file> an implementation plan becomes a work item tree
|
|
112
123
|
```
|
|
113
124
|
|
|
@@ -123,6 +134,251 @@ pharos comment add 210 --file review.md
|
|
|
123
134
|
pharos wiki write /Plans/Sprint-4 --stdin < plan.md
|
|
124
135
|
```
|
|
125
136
|
|
|
137
|
+
### `issue` — the GitHub edge, and only the edge
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
pharos issue adopt contoso/widgets#45 --parent 39
|
|
141
|
+
pharos issue link contoso/widgets#45 4821
|
|
142
|
+
pharos issue say contoso/widgets#45 --file reply.md
|
|
143
|
+
pharos issue trail 4821 # …or trail contoso/widgets#45
|
|
144
|
+
pharos issue drift # where the two platforms disagree
|
|
145
|
+
pharos issue backfill contoso/widgets --limit 25 --yes
|
|
146
|
+
pharos issue close 4821 --text "Shipped in 1.4.0."
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Azure DevOps already has a GitHub integration and **the link it makes carries
|
|
150
|
+
nothing**: title, body, comments, labels and state stay on their own island, and
|
|
151
|
+
the transition only ever fires from a commit or a PR merge, never from closing
|
|
152
|
+
an issue. That is the gap, and it is the whole pitch — not "there is no
|
|
153
|
+
integration".
|
|
154
|
+
|
|
155
|
+
**Seven verbs, because `gh` already exists.** Listing, viewing and commenting on
|
|
156
|
+
an issue is `gh`'s job and it is better at it — closing one *end* is `gh issue
|
|
157
|
+
close`, and closing the *pair* is `pharos issue close`; a second GitHub CLI
|
|
158
|
+
would be the drifting duplicate this repo has been bitten by three times.
|
|
159
|
+
Pharos owns what `gh` cannot see: the join.
|
|
160
|
+
|
|
161
|
+
`adopt` creates the work item **and** writes both ends of the link:
|
|
162
|
+
|
|
163
|
+
| | where | |
|
|
164
|
+
|---|---|---|
|
|
165
|
+
| 1 | a `Hyperlink` relation on the work item | measured, not chosen — `_apis/githubconnections` answers **401** on Pharos's PAT scopes while a control call answers 200, so the connection id a native `vstfs:///GitHub/Issue/…` link needs cannot be read at all |
|
|
166
|
+
| 2 | one comment on the issue: `AB#4821` **and** `<!-- pharos:v1 repo=… issue=… ado=… -->` | `AB#` is free official linking wherever the Azure Boards app happens to be installed and harmless text where it is not. The trailer is what every machine reads, including the loop guard |
|
|
167
|
+
|
|
168
|
+
**The marker goes in a comment, never the issue body.** Editing a reporter's
|
|
169
|
+
body collides with them, is rude on a public repo, and needs write access we may
|
|
170
|
+
not have on a community issue. A comment is append-only and needs none of that.
|
|
171
|
+
|
|
172
|
+
The relation and the parent ride in the **same patch** as the fields, so a work
|
|
173
|
+
item is never briefly pointing at nothing. Azure DevOps is written first because
|
|
174
|
+
the work item id does not exist until it lands — so the one failure this can
|
|
175
|
+
leave is always the same shape, and it is reported rather than swallowed:
|
|
176
|
+
|
|
177
|
+
```json
|
|
178
|
+
{ "error": { "createdWorkItem": 4821, "halfLinked": true, "wrote": ["hyperlink"],
|
|
179
|
+
"recover": "pharos issue link contoso/widgets#45 4821" } }
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
`link` writes only the half that is missing, which makes it both the way to join
|
|
183
|
+
an existing pair and the repair for exactly that state.
|
|
184
|
+
|
|
185
|
+
**Adopting an issue twice never makes a second work item, and there are three
|
|
186
|
+
different answers behind that one sentence.** Which one you get says what state
|
|
187
|
+
the pair was in:
|
|
188
|
+
|
|
189
|
+
| the issue carries a marker | exit **0**, `created: false` — the work item it names, and nothing written. The state you asked for already holds |
|
|
190
|
+
| a work item links the issue and the issue says nothing | exit **3**, `halfLinked: true`, carrying `recover` — the same `pharos issue link …` command the failure above handed over. Finishing that link is the repair; a second work item is not |
|
|
191
|
+
| two work items claim one issue | exit **3**, both named, and no `recover` — picking one would be inventing an answer to the question this feature exists to answer |
|
|
192
|
+
|
|
193
|
+
The middle row is the one that used to be a duplicate. The marker is the index
|
|
194
|
+
and in that state it was never posted, so before creating anything `adopt` also
|
|
195
|
+
asks **this machine** — an adoption is written to `~/.config/pharos/half-links.json`
|
|
196
|
+
between the create and the comment, and removed when the comment lands — and
|
|
197
|
+
then **the board**, narrowing on `[System.HyperLinkCount]` and matching the
|
|
198
|
+
relation URLs client-side, which is the only way round Azure DevOps having no
|
|
199
|
+
query over them. The first sees a work item created seconds ago that the query
|
|
200
|
+
index has not caught up with yet; the second sees a half-link left on another
|
|
201
|
+
machine. Every run reports `boardCheck`, because "the board says nobody has
|
|
202
|
+
adopted this" and "the board could not be asked" are different facts and only
|
|
203
|
+
one of them means the check happened.
|
|
204
|
+
|
|
205
|
+
`trail` is read-only and answers from **either** end — the output shape does not
|
|
206
|
+
depend on which you passed. Read `evidence`: `["hyperlink","marker"]` is a
|
|
207
|
+
complete link, and either one alone is a link that only half exists.
|
|
208
|
+
|
|
209
|
+
#### `say` — one message, two audiences
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
pharos issue say contoso/widgets#45 --file reply.md
|
|
213
|
+
pharos issue say contoso/widgets#45 --stdin --summary "Fixed in 1.4.2; asked for a crash log"
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
| | GitHub | Azure DevOps |
|
|
217
|
+
|---|---|---|
|
|
218
|
+
| who reads it | the reporter, who does **not** have an Azure DevOps account and never will | the team |
|
|
219
|
+
| what they get | the full explanation, in their register | a summary, and the URL of the comment carrying the rest |
|
|
220
|
+
|
|
221
|
+
**The asymmetry is the verb.** The same words in both places is `gh issue
|
|
222
|
+
comment` followed by `pharos comment add`, and neither of those knows the other
|
|
223
|
+
happened. Without `--summary` the board gets the first paragraph cut to 200
|
|
224
|
+
characters — a guess, and allowed to be one *only* because the comment's URL
|
|
225
|
+
travels with it. The board is never the record of what was said; GitHub is.
|
|
226
|
+
|
|
227
|
+
**The loop guard keys on content, never on `sender.login`.** GitHub events carry
|
|
228
|
+
an actor and Azure DevOps events do not, which makes the actor look like the easy
|
|
229
|
+
answer and is the trap: every client writes with its own `gh` credential, so
|
|
230
|
+
`sender.login == me` is *also* true of the human typing into the web UI, and
|
|
231
|
+
suppressing on it silently swallows their real comments. So the guard is the
|
|
232
|
+
`pharos:v1` trailer, in two halves:
|
|
233
|
+
|
|
234
|
+
- **Every comment `say` posts carries it**, because the read sweep is only safe
|
|
235
|
+
if `isPharosAuthored` is total. One unmarked Pharos comment anywhere is one the
|
|
236
|
+
sweep reads as a human's, and the loop that starts from it does not stop.
|
|
237
|
+
- **A message that already carries one is refused.** That is Pharos's own output
|
|
238
|
+
being handed back — a mirrored body, a copy-paste, a script re-posting what it
|
|
239
|
+
read — and it is the loop starting one step before any sweep could see it. The
|
|
240
|
+
macOS app's queue refuses exactly the same thing.
|
|
241
|
+
|
|
242
|
+
GitHub is written **first** here, the opposite of `adopt`, because the board's
|
|
243
|
+
comment carries the GitHub comment's URL and that does not exist until the POST
|
|
244
|
+
returns. The work item is read before anything is published, since the GitHub
|
|
245
|
+
half lands on a repository that may not be ours. If the board half then fails:
|
|
246
|
+
|
|
247
|
+
```json
|
|
248
|
+
{ "error": { "halfSaid": true, "wrote": ["github-comment"],
|
|
249
|
+
"github": { "commentUrl": "https://github.com/…#issuecomment-950" },
|
|
250
|
+
"recover": "pharos comment add 4821 --stdin", "adoComment": "…" } }
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
**Do not re-run it.** A comment is an append, so a second `say` posts a second
|
|
254
|
+
public comment; the error carries the exact text and the command that writes the
|
|
255
|
+
half that is missing.
|
|
256
|
+
|
|
257
|
+
`say` starts from the issue end only. A work item may hyperlink several issues,
|
|
258
|
+
so that end names no single reporter — `pharos issue trail <id>` is how you find
|
|
259
|
+
out which issue you meant.
|
|
260
|
+
|
|
261
|
+
Pull requests are out of scope for v1 and are refused by name rather than
|
|
262
|
+
half-supported: on GitHub's API every PR is also an issue, so `adopt` on a PR
|
|
263
|
+
number would otherwise mirror something the rest of this does not model.
|
|
264
|
+
|
|
265
|
+
#### `drift` — the report no other tool can produce
|
|
266
|
+
|
|
267
|
+
```bash
|
|
268
|
+
pharos issue drift
|
|
269
|
+
pharos issue drift --repo contoso/widgets --limit 50
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
`gh` can list issues; Azure DevOps can list work items; **neither holds both
|
|
273
|
+
sides**, so neither can say *these two disagree*. A link nobody checks decays
|
|
274
|
+
quietly — an issue gets closed on GitHub and the board still shows the work in
|
|
275
|
+
progress, or a work item is marked done and the reporter, who has no Azure
|
|
276
|
+
DevOps account and never will, is still waiting.
|
|
277
|
+
|
|
278
|
+
Four kinds, because they want four different actions:
|
|
279
|
+
|
|
280
|
+
| kind | what it means |
|
|
281
|
+
|---|---|
|
|
282
|
+
| `state` | both ends exist and disagree about whether the work is finished |
|
|
283
|
+
| `missing-issue` | the work item names an issue GitHub does not have |
|
|
284
|
+
| `one-sided` | the board has the link and the issue does not — what a failed `adopt` leaves. Carries the `pharos issue link …` that repairs it |
|
|
285
|
+
| `unreadable` | the GitHub end could not be read, so nothing about this pair is known |
|
|
286
|
+
|
|
287
|
+
**It scans links, not issues.** An unadopted issue is not drift — on a repo with
|
|
288
|
+
four hundred of them, counting "not linked" as a problem buries three real
|
|
289
|
+
findings under three hundred and eighty-eight rows of noise. What is *missing*
|
|
290
|
+
from the bridge is `backfill`'s question; what is *wrong* inside it is this one.
|
|
291
|
+
|
|
292
|
+
**"Finished" is read from the project, never guessed.** A process template
|
|
293
|
+
renames every state, and `Resolved` is terminal on a Bug and open on a User
|
|
294
|
+
Story — so each work item is judged against its own type's categories and the
|
|
295
|
+
report says which source it used. When the catalogue cannot be read the stock
|
|
296
|
+
names are used *and said out loud*, because a row is uninterpretable without
|
|
297
|
+
knowing what was counted as finished.
|
|
298
|
+
|
|
299
|
+
An unreadable repository is **information, not a fault, and never fails the
|
|
300
|
+
command**: a work item can hyperlink a repo somebody else adopted on a machine
|
|
301
|
+
configured differently.
|
|
302
|
+
|
|
303
|
+
#### `backfill` — the adoption path, for the repo everybody actually has
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
pharos issue backfill contoso/widgets # previews, then REFUSES
|
|
307
|
+
pharos issue backfill contoso/widgets --dry-run # the same preview, exit 0
|
|
308
|
+
pharos issue backfill contoso/widgets --limit 25 --max-writes 50 --yes
|
|
309
|
+
pharos issue backfill contoso/widgets --label bug --parent 39 --yes
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
Without a bulk route the bridge only works on a greenfield repository, which is
|
|
313
|
+
not where anybody is. A team with four hundred open issues cannot adopt them one
|
|
314
|
+
command at a time.
|
|
315
|
+
|
|
316
|
+
**Deciding what is already adopted costs two requests, not four hundred.** The
|
|
317
|
+
board is the enumerable side: a work item carries its `Hyperlink` relations on
|
|
318
|
+
its own row, so one WIQL and one `workitemsbatch` return every link at once.
|
|
319
|
+
GitHub cannot answer the equivalent question at all — the marker lives in a
|
|
320
|
+
comment, so asking costs a request per issue. That subtraction is correct
|
|
321
|
+
because `adopt` writes the Azure DevOps end **first**, so the half-state it can
|
|
322
|
+
leave is a hyperlink with no comment and never the reverse. The mirror image is
|
|
323
|
+
still possible if somebody deletes a relation by hand, so the marker is re-read
|
|
324
|
+
per issue **at adoption time** — on the handful being written — and an issue
|
|
325
|
+
that turns out to be claimed already is skipped rather than adopted twice.
|
|
326
|
+
|
|
327
|
+
**It is resumable and needs no state file to be.** The link *is* the progress
|
|
328
|
+
record: a second run reads the board again, finds the ones the first run adopted
|
|
329
|
+
already linked, and carries on. Candidates are ordered by issue number ascending
|
|
330
|
+
so that is true in the obvious way as well as the technical one.
|
|
331
|
+
|
|
332
|
+
**The write budget is the throttle, on purpose.** Each adoption is two writes, so
|
|
333
|
+
four hundred issues is eight hundred against a default cap of twenty. That cost
|
|
334
|
+
is worked out *before* anything is written and a run that cannot finish is
|
|
335
|
+
refused, naming both ways forward — rather than stopping at write nineteen,
|
|
336
|
+
which is the outcome a caller can reason about least.
|
|
337
|
+
|
|
338
|
+
A bare invocation previews and **refuses** (exit 3); `--dry-run` is the same
|
|
339
|
+
preview at exit 0. The preview names the repository, the `gh` account it would
|
|
340
|
+
be reached as, **and the Azure DevOps organisation and project the work items
|
|
341
|
+
would land on**. Nothing in the design pairs a repo with a board, and a
|
|
342
|
+
mis-aimed `adopt` is one work item where a mis-aimed `backfill --yes` is four
|
|
343
|
+
hundred — each with a public comment naming a board its reporter has nothing to
|
|
344
|
+
do with.
|
|
345
|
+
|
|
346
|
+
`--state` defaults to `open`: a closed issue is history, and adopting it creates
|
|
347
|
+
a work item that is finished before anybody looks at it.
|
|
348
|
+
|
|
349
|
+
#### `close` — the ending of the trail
|
|
350
|
+
|
|
351
|
+
```bash
|
|
352
|
+
pharos issue close 4821 # …or close contoso/widgets#45
|
|
353
|
+
pharos issue close 4821 --to Removed --reason not-planned
|
|
354
|
+
pharos issue close 4821 --file release-note.md
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
Closes **both** ends, comments on each **pointing at the other**, then **re-reads
|
|
358
|
+
both** and reports what actually moved. Two 200s are not proof: a workflow rule
|
|
359
|
+
can refuse a transition on a field the API happily accepted, so `verified` is
|
|
360
|
+
what was there afterwards rather than what was sent.
|
|
361
|
+
|
|
362
|
+
**It does not compose `Closes #45` / `Fixes AB#123` into a PR body.** Those fire
|
|
363
|
+
on a PR *merge* and pull requests are out of scope for v1 — so there would be
|
|
364
|
+
nothing to compose into and nothing to verify.
|
|
365
|
+
|
|
366
|
+
**There is no hardcodable `Closed`.** The state written comes from the project's
|
|
367
|
+
own categories: exactly one terminal state for that work item type is used,
|
|
368
|
+
several is a **refusal** naming them and `--to`, because `Done` and `Removed` are
|
|
369
|
+
both finished and mean opposite things. If the catalogue cannot be read at all it
|
|
370
|
+
refuses rather than guessing — `drift` degrades to the stock names because a
|
|
371
|
+
misclassified row is a question somebody can dismiss, and the same guess here
|
|
372
|
+
would be a write.
|
|
373
|
+
|
|
374
|
+
`--to`, not `--state`: `--state` already means `open|closed|all` on `backfill`,
|
|
375
|
+
and one flag with two meanings across two verbs of one command is a bug that only
|
|
376
|
+
shows up when somebody runs it.
|
|
377
|
+
|
|
378
|
+
Closing an already-closed pair writes nothing and exits 0. A work item linking
|
|
379
|
+
several issues is refused unless `--all` says so — "close 4821" should not read
|
|
380
|
+
as "close four strangers' issues".
|
|
381
|
+
|
|
126
382
|
## Configuration
|
|
127
383
|
|
|
128
384
|
| | |
|
|
@@ -143,6 +399,67 @@ items, `vso.wiki_write` for the wiki.
|
|
|
143
399
|
**Every person uses their own token.** Board attribution is per-person, and a
|
|
144
400
|
shared token makes everyone's work read as one account.
|
|
145
401
|
|
|
402
|
+
### GitHub, which follows a different rule for a measured reason
|
|
403
|
+
|
|
404
|
+
The rule above is about `ADO_PAT` and it has not moved. GitHub is a separate
|
|
405
|
+
thing, and it needs two facts that an environment variable cannot carry.
|
|
406
|
+
|
|
407
|
+
**The credential comes from `gh`, so there is no fourth secret to manage.**
|
|
408
|
+
`gh auth token --user <account>` resolves it and the API calls are ordinary
|
|
409
|
+
HTTPS from there; revoking GitHub access never touches the Azure DevOps token.
|
|
410
|
+
Pass `--user` or nothing else: a bare `gh auth token` returns whatever `GH_TOKEN`
|
|
411
|
+
happens to be exported and ignores the keyring entirely, so an exported token in
|
|
412
|
+
somebody's shell would silently become the identity of a sweep.
|
|
413
|
+
|
|
414
|
+
**The account is bound per repository, in `~/.config/pharos/repos.json`.**
|
|
415
|
+
|
|
416
|
+
```bash
|
|
417
|
+
pharos setup --repo contoso/widgets --gh-account alisina-tibata
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
Both flags or neither — a repository is a `(repo, account)` **pair**, and there
|
|
421
|
+
is deliberately no fallback to whichever account `gh` has active. Azure DevOps
|
|
422
|
+
binds a project to one GitHub identity; `gh` holds many at once with one active
|
|
423
|
+
machine-wide, and on the machine this was measured on the active account was not
|
|
424
|
+
the one owning the repository behind the project being worked. The failure is
|
|
425
|
+
not a clean error either: two accounts can each see a repository of the same
|
|
426
|
+
name, so the wrong one answers **200** for a different repository. That is what
|
|
427
|
+
`pharos doctor --verify` compares owners for.
|
|
428
|
+
|
|
429
|
+
`$PHAROS_REPOS_FILE` and `$XDG_CONFIG_HOME` both move the file. `gh` is optional
|
|
430
|
+
— without it every `pharos issue` verb is refused by name with the reason, and
|
|
431
|
+
the Azure DevOps verbs are untouched.
|
|
432
|
+
|
|
433
|
+
**`half-links.json` sits beside it, and it is the only thing this CLI remembers
|
|
434
|
+
between runs.** An adoption is written there between the work item create and
|
|
435
|
+
the GitHub comment and removed when the comment lands, so what survives is
|
|
436
|
+
exactly the set of adoptions that half-happened — the state neither platform can
|
|
437
|
+
be asked about, and the one a retry follows. It is never consulted for what a
|
|
438
|
+
link *is*: the marker and the hyperlink are read fresh every time, and an entry
|
|
439
|
+
is checked against Azure DevOps before it is believed. Delete it and you lose
|
|
440
|
+
nothing but one guard; `$PHAROS_HALF_LINKS_FILE` moves it.
|
|
441
|
+
|
|
442
|
+
## Checking a machine
|
|
443
|
+
|
|
444
|
+
```bash
|
|
445
|
+
pharos doctor # three tiers, with a stable id per check
|
|
446
|
+
pharos doctor --verify # prove the credentials with real calls
|
|
447
|
+
pharos setup --install gh # or ask|all|libreoffice,poppler,…
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
`doctor` is read-only and works before anything is configured, which is what
|
|
451
|
+
makes it the right first move when something behaves oddly. It prints the PATH
|
|
452
|
+
it searched, because a GUI-launched app inherits a minimal one and would
|
|
453
|
+
otherwise be told a fully provisioned machine is bare.
|
|
454
|
+
|
|
455
|
+
It is offline apart from one probe, and that probe is named rather than glossed:
|
|
456
|
+
**`gh auth status` validates every token against github.com**, with no flag to
|
|
457
|
+
stop it, so it runs only when `gh` is installed. Measured on gh 2.87.3, it also
|
|
458
|
+
reports an unreachable host as `The token in keyring is invalid` — a
|
|
459
|
+
connectivity fault worded as a credential fault. `gh-auth` therefore never tells
|
|
460
|
+
you that you are signed out; it reports both causes, because from here they are
|
|
461
|
+
genuinely indistinguishable.
|
|
462
|
+
|
|
146
463
|
## Requirements
|
|
147
464
|
|
|
148
|
-
Node 22 or later.
|
|
465
|
+
Node 22 or later. `gh` for the GitHub bridge, and nothing else is required.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../src/capabilities.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,MAAM,WAAW,UAAU;IACzB,mEAAmE;IACnE,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,yEAAyE;IACzE,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,OAAO,CAAC;IACZ,qEAAqE;IACrE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB;
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../src/capabilities.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,MAAM,WAAW,UAAU;IACzB,mEAAmE;IACnE,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,yEAAyE;IACzE,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,OAAO,CAAC;IACZ,qEAAqE;IACrE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB;AA0CD,eAAO,MAAM,WAAW,EAAE,UAAU,EAsCnC,CAAC;AAEF,qEAAqE;AACrE,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,SAAS,MAAM,EAAE,EACtB,OAAO,GAAE;IACP,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,gEAAgE;IAChE,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnD,GACL,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAgB9B"}
|
package/dist/capabilities.js
CHANGED
|
@@ -26,6 +26,21 @@ const PACKAGES = {
|
|
|
26
26
|
apt: ["install", "-y", "poppler-utils"],
|
|
27
27
|
winget: ["install", "--id", "oschwartz10612.Poppler", "-e"],
|
|
28
28
|
},
|
|
29
|
+
// **`gh` is a credential source, not a transport** (plan §2, and @#779's
|
|
30
|
+
// clarification of it). Pharos resolves a token with `gh auth token --user
|
|
31
|
+
// <account>` and then makes ordinary HTTPS calls; installing gh is what makes
|
|
32
|
+
// that possible, and it is why there is no fourth Keychain entry to manage.
|
|
33
|
+
//
|
|
34
|
+
// No apt entry, deliberately. GitHub's own Linux instructions add their
|
|
35
|
+
// package repository (https://cli.github.com/packages) rather than pointing at
|
|
36
|
+
// a distro package, and what `apt install gh` gets you varies by release. A
|
|
37
|
+
// command that does not exist here is worse than no command, because somebody
|
|
38
|
+
// will paste it — so Linux gets the honest refusal and the doctor check names
|
|
39
|
+
// where to look.
|
|
40
|
+
gh: {
|
|
41
|
+
brew: ["install", "gh"],
|
|
42
|
+
winget: ["install", "--id", "GitHub.cli", "-e"],
|
|
43
|
+
},
|
|
29
44
|
};
|
|
30
45
|
export const INSTALLABLE = [
|
|
31
46
|
{
|
|
@@ -41,6 +56,14 @@ export const INSTALLABLE = [
|
|
|
41
56
|
unlocks: "`wiki import` for .docx, .pdf, .rtf, .html and .odt.",
|
|
42
57
|
size: "7.5 MB download",
|
|
43
58
|
},
|
|
59
|
+
{
|
|
60
|
+
id: "gh",
|
|
61
|
+
name: "GitHub CLI",
|
|
62
|
+
unlocks: "The GitHub bridge: `pharos issue` adopts, links and mirrors an issue against a work item. "
|
|
63
|
+
+ "gh holds the credential, so nothing new is stored and revoking GitHub access never "
|
|
64
|
+
+ "touches the Azure DevOps token.",
|
|
65
|
+
size: "~35 MB",
|
|
66
|
+
},
|
|
44
67
|
{
|
|
45
68
|
id: "libreoffice",
|
|
46
69
|
name: "LibreOffice",
|
package/dist/capabilities.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../src/capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,cAAc,EAA6B,MAAM,cAAc,CAAC;AAEzE,M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AI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;aACjC,CAAC;IAEV,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,IAAI,CAAC;YACH,MAAM,GAAG,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;YAChE,OAAO,SAAS,CAAC;QACnB,CAAC;QAAC,MAAM,CAAC;YACP,QAAQ;QACV,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AdoClient } from "@floh-solutions/ado-core";
|
|
2
|
+
import type { GitHubClient } from "@floh-solutions/gh-core";
|
|
2
3
|
import { type ExitCode } from "./output.js";
|
|
3
4
|
/**
|
|
4
5
|
* Every command this file dispatches — **one list, used by both the sentence and
|
|
@@ -11,7 +12,7 @@ import { type ExitCode } from "./output.js";
|
|
|
11
12
|
* expensive kind of wrong. Anything added to the switch belongs here, and the
|
|
12
13
|
* test below fails if it does not.
|
|
13
14
|
*/
|
|
14
|
-
export declare const COMMANDS: readonly ["setup", "whoami", "query", "task", "types", "history", "iterations", "areas", "links", "fields", "create", "update", "link", "unlink", "delete", "restore", "deleted", "attach", "detach", "download", "image", "people", "wiki", "comment", "hooks", "plan", "doctor"];
|
|
15
|
+
export declare const COMMANDS: readonly ["setup", "whoami", "query", "task", "types", "history", "iterations", "areas", "links", "fields", "create", "update", "link", "unlink", "delete", "restore", "deleted", "attach", "detach", "download", "image", "people", "wiki", "comment", "hooks", "plan", "doctor", "issue"];
|
|
15
16
|
export interface RunOptions {
|
|
16
17
|
argv: string[];
|
|
17
18
|
cwd: string;
|
|
@@ -22,6 +23,8 @@ export interface RunOptions {
|
|
|
22
23
|
readStdin?: (() => Promise<string>) | undefined;
|
|
23
24
|
/** Injected by tests, so the whole router can run against a mock transport. */
|
|
24
25
|
client?: AdoClient | undefined;
|
|
26
|
+
/** The same, for the GitHub half of `pharos issue`. */
|
|
27
|
+
github?: GitHubClient | undefined;
|
|
25
28
|
}
|
|
26
29
|
export declare function run(options: RunOptions): Promise<ExitCode>;
|
|
27
30
|
//# sourceMappingURL=cli.d.ts.map
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AA8B5D,OAAO,EAKL,KAAK,QAAQ,EAEd,MAAM,aAAa,CAAC;AAyBrB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,6RAMX,CAAC;AA0cX,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;IACvB,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,gDAAgD;IAChD,SAAS,CAAC,EAAE,CAAC,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,SAAS,CAAC;IAChD,+EAA+E;IAC/E,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAC/B,uDAAuD;IACvD,MAAM,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;CACnC;AAED,wBAAsB,GAAG,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,QAAQ,CAAC,CAOhE"}
|