@floh-solutions/pharos-cli 0.28.0 → 0.30.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.
Files changed (51) hide show
  1. package/README.md +33 -0
  2. package/dist/adopt-type.d.ts.map +1 -1
  3. package/dist/adopt-type.js +7 -2
  4. package/dist/adopt-type.js.map +1 -1
  5. package/dist/capabilities.d.ts +7 -0
  6. package/dist/capabilities.d.ts.map +1 -1
  7. package/dist/capabilities.js +25 -0
  8. package/dist/capabilities.js.map +1 -1
  9. package/dist/cli.d.ts +18 -1
  10. package/dist/cli.d.ts.map +1 -1
  11. package/dist/cli.js +178 -86
  12. package/dist/cli.js.map +1 -1
  13. package/dist/commands/delegate.d.ts +143 -0
  14. package/dist/commands/delegate.d.ts.map +1 -0
  15. package/dist/commands/delegate.js +364 -0
  16. package/dist/commands/delegate.js.map +1 -0
  17. package/dist/commands/doctor.d.ts +8 -0
  18. package/dist/commands/doctor.d.ts.map +1 -1
  19. package/dist/commands/doctor.js +179 -4
  20. package/dist/commands/doctor.js.map +1 -1
  21. package/dist/commands/issue.d.ts.map +1 -1
  22. package/dist/commands/issue.js +89 -7
  23. package/dist/commands/issue.js.map +1 -1
  24. package/dist/commands/setup.d.ts.map +1 -1
  25. package/dist/commands/setup.js +7 -3
  26. package/dist/commands/setup.js.map +1 -1
  27. package/dist/delegate/hosts.d.ts +83 -0
  28. package/dist/delegate/hosts.d.ts.map +1 -0
  29. package/dist/delegate/hosts.js +154 -0
  30. package/dist/delegate/hosts.js.map +1 -0
  31. package/dist/delegate/quote.d.ts +78 -0
  32. package/dist/delegate/quote.d.ts.map +1 -0
  33. package/dist/delegate/quote.js +134 -0
  34. package/dist/delegate/quote.js.map +1 -0
  35. package/dist/delegate/sessions.d.ts +113 -0
  36. package/dist/delegate/sessions.d.ts.map +1 -0
  37. package/dist/delegate/sessions.js +220 -0
  38. package/dist/delegate/sessions.js.map +1 -0
  39. package/dist/delegate/vsix.d.ts +122 -0
  40. package/dist/delegate/vsix.d.ts.map +1 -0
  41. package/dist/delegate/vsix.js +329 -0
  42. package/dist/delegate/vsix.js.map +1 -0
  43. package/package.json +5 -4
  44. package/skill/SKILL.md +67 -6
  45. package/vscode/README.md +30 -0
  46. package/vscode/pharos-bridge.json +10 -0
  47. package/vscode/pharos-bridge.vsix +0 -0
  48. package/dist/commands/pr.d.ts +0 -56
  49. package/dist/commands/pr.d.ts.map +0 -1
  50. package/dist/commands/pr.js +0 -202
  51. package/dist/commands/pr.js.map +0 -1
@@ -1,202 +0,0 @@
1
- import { assertIssueCoordinate, linksFromComments, } from "@floh-solutions/gh-core";
2
- import { emit, emitText, failureOf, usageError } from "../output.js";
3
- export async function runPr(io, session, rest, options) {
4
- const [reference] = rest;
5
- if (reference === undefined || reference === "") {
6
- throw usageError("Which pull request? `pharos pr owner/name#123`. The same grammar as an issue, because "
7
- + "GitHub numbers them from one sequence and a reader should not have to know which.");
8
- }
9
- // Deliberately the ISSUE coordinate parser: GitHub draws pull requests and
10
- // issues from one number sequence, so `owner/name#123` is already unambiguous
11
- // and a second grammar would be a second thing to get wrong.
12
- const coordinate = assertIssueCoordinate(reference);
13
- const github = await session.github();
14
- const binding = github.binding(coordinate.repo);
15
- const pull = await github.pulls.get({ ...binding, number: coordinate.number });
16
- if (pull === undefined) {
17
- throw usageError(`${coordinate.repo}#${coordinate.number} is not a pull request in that repository. `
18
- + "If it is an ISSUE, `pharos issue trail` is the verb for it — GitHub numbers both from "
19
- + "one sequence, so a number that exists as one does not exist as the other.");
20
- }
21
- const problems = [];
22
- const workItemIds = options.noWorkItems
23
- ? [...pull.mentionsWorkItems]
24
- : await resolveWorkItems(session, binding.repo, binding.account, pull, problems);
25
- const workItems = await Promise.all(workItemIds.map(async (id) => {
26
- try {
27
- return summariseWorkItem(session, await session.client.workItems.get(id));
28
- }
29
- catch (error) {
30
- // A work item named by a marker that cannot be read is a real state —
31
- // deleted, or in a project this token cannot see. Reporting it as a
32
- // failed command would hide the half that WAS readable. Same shape as
33
- // `issue trail`, and the keys stay identical so a consumer never meets
34
- // a different object on the failure path.
35
- problems.push(`work item #${id} could not be read: ${messageOf(error)}`);
36
- return {
37
- id,
38
- type: null,
39
- title: null,
40
- state: null,
41
- assignedTo: null,
42
- url: session.workItemUrl({ id }),
43
- };
44
- }
45
- }));
46
- const result = {
47
- pullRequest: {
48
- repo: binding.repo,
49
- number: pull.number,
50
- title: pull.title,
51
- state: pull.state,
52
- isDraft: pull.isDraft,
53
- merged: pull.merged,
54
- mergedAt: pull.mergedAt,
55
- author: pull.author,
56
- branch: pull.headRefName,
57
- base: pull.baseRefName,
58
- url: pull.url,
59
- review: pull.reviewDecision,
60
- checks: pull.checks,
61
- failingChecks: pull.failingChecks,
62
- },
63
- closesIssues: pull.closesIssues,
64
- workItems,
65
- disagreements: disagreements(pull, workItems),
66
- problems,
67
- };
68
- return session.pretty ? emitText(io, render(result)) : emit(io, result);
69
- }
70
- /**
71
- * Both paths to a work item, merged and de-duplicated.
72
- *
73
- * The transitive path costs one comment read per closed issue, and a failure on
74
- * any one of them is a `problems[]` entry rather than the end of the command —
75
- * a pull request whose checks and review we CAN report is worth reporting even
76
- * when one issue's comments are unreachable.
77
- */
78
- async function resolveWorkItems(session, repo, account, pull, problems) {
79
- const ids = new Set(pull.mentionsWorkItems);
80
- const github = await session.github();
81
- await Promise.all(pull.closesIssues.map(async (number) => {
82
- try {
83
- const comments = await github.issues.comments({ repo, account, number });
84
- for (const link of linksFromComments({ repo, number }, comments)) {
85
- ids.add(link.workItemId);
86
- }
87
- }
88
- catch (error) {
89
- problems.push(`issue #${number} closes this pull request but its comments could not be read, so a `
90
- + `work item linked only through it is missing here: ${messageOf(error)}`);
91
- }
92
- }));
93
- return [...ids].sort((a, b) => a - b);
94
- }
95
- /**
96
- * What the two platforms disagree about.
97
- *
98
- * Every entry here is a state neither system can notice on its own: Azure DevOps
99
- * cannot see the pull request, and GitHub does not know the work item exists.
100
- *
101
- * These are **reported, never enforced**. This verb is a read, and a read that
102
- * refused to print would be a strange kind of report; the enforcement belongs on
103
- * the write verbs that can actually do the wrong thing. Naming them here is what
104
- * makes writing that guard possible.
105
- */
106
- function disagreements(pull, workItems) {
107
- const out = [];
108
- const finished = /^(done|closed|completed|resolved|removed)$/i;
109
- const notStarted = /^(to ?do|new|proposed|open|backlog)$/i;
110
- for (const item of workItems) {
111
- if (item.state === null)
112
- continue;
113
- if (pull.merged && notStarted.test(item.state)) {
114
- out.push(`#${item.id} is "${item.state}" but this pull request is already MERGED — the work `
115
- + "shipped and the board never moved.");
116
- }
117
- if (!pull.merged && pull.state === "OPEN" && finished.test(item.state)) {
118
- out.push(`#${item.id} is "${item.state}" but this pull request is still OPEN — the board says `
119
- + "finished while the code is not in.");
120
- }
121
- if (pull.state === "CLOSED" && !pull.merged && notStarted.test(item.state) === false
122
- && finished.test(item.state) === false) {
123
- out.push(`#${item.id} is "${item.state}" and this pull request was CLOSED WITHOUT MERGING — if `
124
- + "the work was abandoned the board still shows it in flight.");
125
- }
126
- }
127
- if (pull.merged && workItems.length === 0) {
128
- out.push("This pull request is merged and reaches no work item at all — nothing on the board "
129
- + "records that this shipped. `pharos pr` finds them through `AB#123` in the body or "
130
- + "through an adopted issue named by `Fixes #45`.");
131
- }
132
- return out;
133
- }
134
- function summariseWorkItem(session, item) {
135
- const fields = item.fields ?? {};
136
- const text = (name) => {
137
- const value = fields[name];
138
- return typeof value === "string" && value !== "" ? value : null;
139
- };
140
- const assigned = fields["System.AssignedTo"];
141
- return {
142
- id: item.id ?? 0,
143
- type: text("System.WorkItemType"),
144
- title: text("System.Title"),
145
- state: text("System.State"),
146
- assignedTo: typeof assigned === "string"
147
- ? assigned
148
- : typeof assigned === "object" && assigned !== null
149
- ? (assigned.displayName ?? null)
150
- : null,
151
- url: session.workItemUrl(item),
152
- };
153
- }
154
- function messageOf(error) {
155
- const message = failureOf(error).body["message"];
156
- return typeof message === "string" ? message : "no reason given";
157
- }
158
- /**
159
- * The human rendering.
160
- *
161
- * Disagreements go at the BOTTOM and under their own heading. They are the
162
- * finding, and a finding printed above the thing it is about reads as a warning
163
- * to skip past.
164
- */
165
- function render(result) {
166
- const pr = result.pullRequest;
167
- const lines = [
168
- `${pr.repo}#${pr.number} ${pr.title}`,
169
- ` ${pr.state}${pr.isDraft ? " (draft)" : ""} by ${pr.author ?? "unknown"} `
170
- + `${pr.branch} → ${pr.base}`,
171
- ` review: ${pr.review} checks: ${pr.checks}`,
172
- ];
173
- for (const check of pr.failingChecks) {
174
- lines.push(` RED ${check.name} — ${check.conclusion}`);
175
- }
176
- lines.push("");
177
- if (result.closesIssues.length > 0) {
178
- lines.push(`closes issues: ${result.closesIssues.map((n) => `#${n}`).join(", ")}`);
179
- }
180
- if (result.workItems.length === 0) {
181
- lines.push("work items: none — this pull request reaches nothing on the board");
182
- }
183
- else {
184
- lines.push("work items:");
185
- for (const item of result.workItems) {
186
- lines.push(` #${String(item.id).padEnd(6)} ${(item.type ?? "?").padEnd(10)} `
187
- + `${(item.state ?? "?").padEnd(12)} ${item.title ?? "(unreadable)"}`);
188
- }
189
- }
190
- if (result.disagreements.length > 0) {
191
- lines.push("", "THE TWO PLATFORMS DISAGREE");
192
- for (const note of result.disagreements)
193
- lines.push(` - ${note}`);
194
- }
195
- if (result.problems.length > 0) {
196
- lines.push("", "problems:");
197
- for (const problem of result.problems)
198
- lines.push(` - ${problem}`);
199
- }
200
- return lines.join("\n");
201
- }
202
- //# sourceMappingURL=pr.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pr.js","sourceRoot":"","sources":["../../src/commands/pr.ts"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,EACrB,iBAAiB,GAElB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAA0B,MAAM,cAAc,CAAC;AAyD7F,MAAM,CAAC,KAAK,UAAU,KAAK,CACzB,EAAM,EACN,OAAgB,EAChB,IAAuB,EAC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