@floh-solutions/pharos-cli 0.22.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 +111 -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 +406 -4
- 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 +120 -3
- 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 +275 -9
package/dist/output.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AdoAuthError, AdoConcurrencyError, AdoConfigError, AdoError, AdoNetworkError, AdoNotFoundError, AdoRateLimitError, adviceFor, deletionAdvice, namesAResourcePermission, } from "@floh-solutions/ado-core";
|
|
2
|
+
import { GhUnavailableError, GitHubAccountError, GitHubAuthError, GitHubConfigError, GitHubError, GitHubIdentityMismatchError, GitHubNetworkError, GitHubNotFoundError, GitHubRateLimitError, GitHubValidationError, PullRequestNotAnIssueError, } from "@floh-solutions/gh-core";
|
|
2
3
|
/**
|
|
3
4
|
* The output contract.
|
|
4
5
|
*
|
|
@@ -99,6 +100,20 @@ export function reportError(io, error) {
|
|
|
99
100
|
io.stderr(JSON.stringify({ error: body }, undefined, 2));
|
|
100
101
|
return code;
|
|
101
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* The same classification `reportError` uses, without emitting anything.
|
|
105
|
+
*
|
|
106
|
+
* For the one shape that needs it: a verb that has **already written one half of
|
|
107
|
+
* something** when the second half fails. `pharos issue adopt` creates the work
|
|
108
|
+
* item and then comments on the issue, so a failure at the second step must
|
|
109
|
+
* report the first step's result rather than only the error — otherwise the work
|
|
110
|
+
* item exists and nothing anywhere names it. Re-classifying by hand there would
|
|
111
|
+
* be a second, drifting copy of this table.
|
|
112
|
+
*/
|
|
113
|
+
export function failureOf(error) {
|
|
114
|
+
const { body, code } = describe(error);
|
|
115
|
+
return { kind: body["kind"] ?? "internal", code, body };
|
|
116
|
+
}
|
|
102
117
|
function describe(error) {
|
|
103
118
|
if (error instanceof CliError) {
|
|
104
119
|
return {
|
|
@@ -114,6 +129,9 @@ function describe(error) {
|
|
|
114
129
|
code: error.exitCode,
|
|
115
130
|
};
|
|
116
131
|
}
|
|
132
|
+
const github = describeGitHub(error);
|
|
133
|
+
if (github !== undefined)
|
|
134
|
+
return github;
|
|
117
135
|
if (error instanceof AdoConcurrencyError) {
|
|
118
136
|
return {
|
|
119
137
|
body: {
|
|
@@ -206,6 +224,159 @@ function describe(error) {
|
|
|
206
224
|
code: EXIT_FAILED,
|
|
207
225
|
};
|
|
208
226
|
}
|
|
227
|
+
/**
|
|
228
|
+
* The GitHub half of the same table, and the reason it is not optional.
|
|
229
|
+
*
|
|
230
|
+
* Without it every failure from `gh-core` falls through to `kind: "internal"`
|
|
231
|
+
* with exit 1 — so "this repository is not in repos.json" (fix the file, never
|
|
232
|
+
* retry), "`gh` is not installed" (fix the machine), and "you are over the
|
|
233
|
+
* hourly budget" (wait exactly this long and repeat) all arrive looking like one
|
|
234
|
+
* unexplained crash. Exit 1 additionally *invites* a retry, which is wrong for
|
|
235
|
+
* two of those three.
|
|
236
|
+
*
|
|
237
|
+
* Every body here carries `platform: "github"`, because on this bridge a verb
|
|
238
|
+
* touches two platforms in one invocation and "which side said no" is the first
|
|
239
|
+
* thing an agent needs. Its absence means Azure DevOps or this CLI, which is
|
|
240
|
+
* what it already meant.
|
|
241
|
+
*
|
|
242
|
+
* `undefined` when the error is not GitHub's, so the caller falls through.
|
|
243
|
+
*/
|
|
244
|
+
function describeGitHub(error) {
|
|
245
|
+
// A repo that is not in repos.json, an account `gh` has no token for, a
|
|
246
|
+
// missing `gh`: all configuration, all exit 2. Retrying is pure noise, and the
|
|
247
|
+
// messages `gh-core` raises already name the file or the command to run.
|
|
248
|
+
if (error instanceof GitHubConfigError) {
|
|
249
|
+
return { body: { kind: "config", platform: "github", message: error.message }, code: EXIT_USAGE };
|
|
250
|
+
}
|
|
251
|
+
if (error instanceof GitHubAccountError) {
|
|
252
|
+
return {
|
|
253
|
+
body: {
|
|
254
|
+
kind: "auth",
|
|
255
|
+
platform: "github",
|
|
256
|
+
message: error.message,
|
|
257
|
+
account: error.account,
|
|
258
|
+
hint: `gh holds no usable token for "${error.account}". Sign that account in with `
|
|
259
|
+
+ `\`gh auth login\`, or fix the binding with \`pharos setup --repo <owner/name> `
|
|
260
|
+
+ "--gh-account <login>`. `pharos doctor` reports both.",
|
|
261
|
+
},
|
|
262
|
+
code: EXIT_USAGE,
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
if (error instanceof GhUnavailableError) {
|
|
266
|
+
return {
|
|
267
|
+
body: {
|
|
268
|
+
kind: "config",
|
|
269
|
+
platform: "github",
|
|
270
|
+
message: error.message,
|
|
271
|
+
hint: "Install it with `pharos setup --install gh`, then `pharos doctor`.",
|
|
272
|
+
},
|
|
273
|
+
code: EXIT_USAGE,
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
// **A 200 from the wrong identity** — plan §2's whole reason for existing. Not
|
|
277
|
+
// a transport failure and not retryable: the configuration says one thing and
|
|
278
|
+
// the credential answered as somebody else.
|
|
279
|
+
if (error instanceof GitHubIdentityMismatchError) {
|
|
280
|
+
return {
|
|
281
|
+
body: {
|
|
282
|
+
kind: "config",
|
|
283
|
+
platform: "github",
|
|
284
|
+
message: error.message,
|
|
285
|
+
account: error.account,
|
|
286
|
+
expected: error.expected,
|
|
287
|
+
actual: error.actual,
|
|
288
|
+
hint: "The account this repository is bound to is not the one that answered. Check repos.json "
|
|
289
|
+
+ "and confirm with `pharos doctor --verify`.",
|
|
290
|
+
},
|
|
291
|
+
code: EXIT_USAGE,
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
if (error instanceof PullRequestNotAnIssueError) {
|
|
295
|
+
return {
|
|
296
|
+
body: {
|
|
297
|
+
kind: "usage",
|
|
298
|
+
platform: "github",
|
|
299
|
+
message: error.message,
|
|
300
|
+
repo: error.repo,
|
|
301
|
+
number: error.number,
|
|
302
|
+
},
|
|
303
|
+
code: EXIT_USAGE,
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
if (error instanceof GitHubRateLimitError) {
|
|
307
|
+
return {
|
|
308
|
+
body: {
|
|
309
|
+
kind: "rateLimit",
|
|
310
|
+
platform: "github",
|
|
311
|
+
message: error.message,
|
|
312
|
+
status: error.status,
|
|
313
|
+
retryAfterMs: error.retryAfterMs,
|
|
314
|
+
// A primary limit is the hourly 5,000 and can be most of an hour out; a
|
|
315
|
+
// secondary one is a burst and clears in seconds. Same advice, wildly
|
|
316
|
+
// different wait, so the caller is told which it is.
|
|
317
|
+
primary: error.primary,
|
|
318
|
+
requestId: error.requestId,
|
|
319
|
+
hint: "Wait retryAfterMs and repeat the identical call.",
|
|
320
|
+
},
|
|
321
|
+
code: EXIT_FAILED,
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
if (error instanceof GitHubAuthError) {
|
|
325
|
+
return { body: githubBody("auth", error), code: EXIT_USAGE };
|
|
326
|
+
}
|
|
327
|
+
if (error instanceof GitHubNotFoundError) {
|
|
328
|
+
return {
|
|
329
|
+
body: {
|
|
330
|
+
...githubBody("notFound", error),
|
|
331
|
+
// GitHub answers 404 rather than 403 for a private repository you may
|
|
332
|
+
// not see — confirming it existed would be the leak. So "no such issue"
|
|
333
|
+
// and "wrong account" are one status code, and the account is the first
|
|
334
|
+
// thing to check rather than the last.
|
|
335
|
+
hint: "On GitHub a 404 is also how \"not visible to this account\" is spelled. Check the "
|
|
336
|
+
+ "binding with `pharos doctor --verify` before concluding the issue does not exist.",
|
|
337
|
+
},
|
|
338
|
+
code: EXIT_FAILED,
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
if (error instanceof GitHubValidationError) {
|
|
342
|
+
return {
|
|
343
|
+
// 422: understood and refused. Repeating it unchanged cannot work, which
|
|
344
|
+
// is exactly what exit 2 means here.
|
|
345
|
+
body: { ...githubBody("github", error), errors: error.errors },
|
|
346
|
+
code: EXIT_USAGE,
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
if (error instanceof GitHubError) {
|
|
350
|
+
return { body: githubBody("github", error), code: EXIT_FAILED };
|
|
351
|
+
}
|
|
352
|
+
if (error instanceof GitHubNetworkError) {
|
|
353
|
+
return {
|
|
354
|
+
body: {
|
|
355
|
+
kind: "network",
|
|
356
|
+
platform: "github",
|
|
357
|
+
message: error.message,
|
|
358
|
+
method: error.method,
|
|
359
|
+
url: error.url,
|
|
360
|
+
},
|
|
361
|
+
code: EXIT_FAILED,
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
return undefined;
|
|
365
|
+
}
|
|
366
|
+
function githubBody(kind, error) {
|
|
367
|
+
return {
|
|
368
|
+
kind,
|
|
369
|
+
platform: "github",
|
|
370
|
+
message: error.message,
|
|
371
|
+
status: error.status,
|
|
372
|
+
method: error.method,
|
|
373
|
+
url: error.url,
|
|
374
|
+
// GitHub's handle for a request, and the only one their support accepts —
|
|
375
|
+
// the same role `activityId` plays on the Azure DevOps side.
|
|
376
|
+
requestId: error.requestId,
|
|
377
|
+
...(error.documentationUrl === undefined ? {} : { documentationUrl: error.documentationUrl }),
|
|
378
|
+
};
|
|
379
|
+
}
|
|
209
380
|
/**
|
|
210
381
|
* An Azure DevOps failure, with **what to do about it** where that is known.
|
|
211
382
|
*
|
package/dist/output.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output.js","sourceRoot":"","sources":["../src/output.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,cAAc,EACd,QAAQ,EACR,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,SAAS,EACT,cAAc,EACd,wBAAwB,GACzB,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"output.js","sourceRoot":"","sources":["../src/output.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,cAAc,EACd,QAAQ,EACR,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,SAAS,EACT,cAAc,EACd,wBAAwB,GACzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,WAAW,EACX,2BAA2B,EAC3B,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,0BAA0B,GAC3B,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;;;;;;;;GAeG;AAEH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC;AACzB,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC;AAC7B,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC;AAC5B,MA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AAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAE9E,OAAO;QACL,IAAI;QACJ,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,GAAG,EAAE,KAAK,CAAC,GAAG;QACd,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,sEAAsE;QACtE,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,GAAG,CAAC,MAAM,KAAK,SAAS,IAAI,QAAQ,KAAK,SAAS;YAChD,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QAC7D,4EAA4E;QAC5E,2EAA2E;QAC3E,4CAA4C;QAC5C,GAAG,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACtE,CAAC;AACJ,CAAC"}
|
package/dist/session.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { AdoClient, WikiApi } from "@floh-solutions/ado-core";
|
|
2
|
+
import type { GitHubClient } from "@floh-solutions/gh-core";
|
|
2
3
|
import { WriteBudget } from "./budget.js";
|
|
4
|
+
import { HalfLinkJournal } from "./half-link.js";
|
|
3
5
|
import { type ExitCode, type Io } from "./output.js";
|
|
4
6
|
/**
|
|
5
7
|
* One invocation's world: the client, the budget it spends against, the wiki it
|
|
@@ -19,6 +21,8 @@ export interface SessionOptions {
|
|
|
19
21
|
pretty: boolean;
|
|
20
22
|
/** Injected by tests; production passes nothing and gets a real client. */
|
|
21
23
|
client?: AdoClient | undefined;
|
|
24
|
+
/** Injected by tests; production passes nothing and gets one from `repos.json`. */
|
|
25
|
+
github?: GitHubClient | undefined;
|
|
22
26
|
}
|
|
23
27
|
export declare class Session {
|
|
24
28
|
#private;
|
|
@@ -28,7 +32,53 @@ export declare class Session {
|
|
|
28
32
|
readonly apply: boolean;
|
|
29
33
|
readonly previewOnly: boolean;
|
|
30
34
|
readonly pretty: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Adoptions this machine started and did not finish — see `half-link.ts`.
|
|
37
|
+
*
|
|
38
|
+
* Built from the invocation's environment rather than reached for inside the
|
|
39
|
+
* command, so a run whose env names no `HOME` has no journal instead of
|
|
40
|
+
* quietly writing into whichever home directory the process happens to have.
|
|
41
|
+
*/
|
|
42
|
+
readonly halfLinks: HalfLinkJournal;
|
|
31
43
|
constructor(options: SessionOptions);
|
|
44
|
+
/**
|
|
45
|
+
* The GitHub client, resolved once, from `~/.config/pharos/repos.json`.
|
|
46
|
+
*
|
|
47
|
+
* Three things about this are deliberate.
|
|
48
|
+
*
|
|
49
|
+
* **Its fetch is wrapped by the same {@link WriteBudget} the Azure DevOps
|
|
50
|
+
* client uses.** `--max-writes 0` promises that an invocation cannot change
|
|
51
|
+
* anything, and that promise is worthless if it covers one platform of a
|
|
52
|
+
* two-platform verb: `pharos issue adopt` posts a comment on GitHub, and a cap
|
|
53
|
+
* that let that through would be a cap in name only. `gh-core`'s transport
|
|
54
|
+
* already recognises a refusal thrown by a fetch wrapper and rethrows it
|
|
55
|
+
* unretried rather than reporting it as a dead socket.
|
|
56
|
+
*
|
|
57
|
+
* **It is loaded lazily, and imported dynamically.** Twenty-seven of the
|
|
58
|
+
* twenty-eight verbs here never touch GitHub, and `gh-core` reaches for
|
|
59
|
+
* `node:child_process` at import time to talk to `gh`. `doctor` does the same
|
|
60
|
+
* thing for the same reason.
|
|
61
|
+
*
|
|
62
|
+
* **There is no repository default.** `GitHubClient` has no current repo and
|
|
63
|
+
* no current account by construction (plan §2) — every call names both, and an
|
|
64
|
+
* unbound repository is an error naming `repos.json` rather than a guess at
|
|
65
|
+
* whichever `gh` account happens to be active.
|
|
66
|
+
*/
|
|
67
|
+
github(): Promise<GitHubClient>;
|
|
68
|
+
/**
|
|
69
|
+
* The web address of a work item — what a person clicks, not what the API
|
|
70
|
+
* reads.
|
|
71
|
+
*
|
|
72
|
+
* `WorkItem.url` is the REST url and opening it in a browser gives JSON, so a
|
|
73
|
+
* comment on a public GitHub issue carrying it would be worse than carrying
|
|
74
|
+
* nothing. `_links.html.href` is what Azure DevOps itself calls the human
|
|
75
|
+
* address; it is only present when the read asked for links, so the composed
|
|
76
|
+
* form is the fallback rather than the other way round.
|
|
77
|
+
*/
|
|
78
|
+
workItemUrl(item: {
|
|
79
|
+
id: number;
|
|
80
|
+
_links?: Record<string, unknown>;
|
|
81
|
+
}): string;
|
|
32
82
|
/**
|
|
33
83
|
* The wiki to act on, resolved once.
|
|
34
84
|
*
|
package/dist/session.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAgB,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAgB,MAAM,0BAA0B,CAAC;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAsC,KAAK,QAAQ,EAAE,KAAK,EAAE,EAAE,MAAM,aAAa,CAAC;AAEzF;;;GAGG;AAEH,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,OAAO,CAAC,EAAE,MAAM,GA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AAiB;IAChC,kEAAkE;IAClE,IAAI,EAAE,MAAM,CAAC;IACb,mFAAmF;IACnF,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,OAAO,CAAC,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,iBAAiB,GAAG,QAAQ,GAAG,SAAS,CAYjG"}
|
package/dist/session.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AdoClient, WikiApi } from "@floh-solutions/ado-core";
|
|
2
2
|
import { WriteBudget } from "./budget.js";
|
|
3
|
+
import { HalfLinkJournal } from "./half-link.js";
|
|
3
4
|
import { EXIT_OK, emit, refusal, usageError } from "./output.js";
|
|
4
5
|
export class Session {
|
|
5
6
|
client;
|
|
@@ -8,14 +9,27 @@ export class Session {
|
|
|
8
9
|
apply;
|
|
9
10
|
previewOnly;
|
|
10
11
|
pretty;
|
|
12
|
+
/**
|
|
13
|
+
* Adoptions this machine started and did not finish — see `half-link.ts`.
|
|
14
|
+
*
|
|
15
|
+
* Built from the invocation's environment rather than reached for inside the
|
|
16
|
+
* command, so a run whose env names no `HOME` has no journal instead of
|
|
17
|
+
* quietly writing into whichever home directory the process happens to have.
|
|
18
|
+
*/
|
|
19
|
+
halfLinks;
|
|
20
|
+
#env;
|
|
11
21
|
#wikiHint;
|
|
12
22
|
#resolvedWiki;
|
|
23
|
+
#github;
|
|
13
24
|
constructor(options) {
|
|
14
25
|
this.budget = options.budget;
|
|
15
26
|
this.apply = options.apply;
|
|
16
27
|
this.previewOnly = options.previewOnly;
|
|
17
28
|
this.pretty = options.pretty;
|
|
29
|
+
this.#env = options.env;
|
|
18
30
|
this.#wikiHint = options.wiki;
|
|
31
|
+
this.#github = options.github;
|
|
32
|
+
this.halfLinks = new HalfLinkJournal(options.env);
|
|
19
33
|
this.client =
|
|
20
34
|
options.client
|
|
21
35
|
?? AdoClient.fromEnv(options.env, {
|
|
@@ -26,6 +40,62 @@ export class Session {
|
|
|
26
40
|
});
|
|
27
41
|
this.wiki = new WikiApi(this.client.http);
|
|
28
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* The GitHub client, resolved once, from `~/.config/pharos/repos.json`.
|
|
45
|
+
*
|
|
46
|
+
* Three things about this are deliberate.
|
|
47
|
+
*
|
|
48
|
+
* **Its fetch is wrapped by the same {@link WriteBudget} the Azure DevOps
|
|
49
|
+
* client uses.** `--max-writes 0` promises that an invocation cannot change
|
|
50
|
+
* anything, and that promise is worthless if it covers one platform of a
|
|
51
|
+
* two-platform verb: `pharos issue adopt` posts a comment on GitHub, and a cap
|
|
52
|
+
* that let that through would be a cap in name only. `gh-core`'s transport
|
|
53
|
+
* already recognises a refusal thrown by a fetch wrapper and rethrows it
|
|
54
|
+
* unretried rather than reporting it as a dead socket.
|
|
55
|
+
*
|
|
56
|
+
* **It is loaded lazily, and imported dynamically.** Twenty-seven of the
|
|
57
|
+
* twenty-eight verbs here never touch GitHub, and `gh-core` reaches for
|
|
58
|
+
* `node:child_process` at import time to talk to `gh`. `doctor` does the same
|
|
59
|
+
* thing for the same reason.
|
|
60
|
+
*
|
|
61
|
+
* **There is no repository default.** `GitHubClient` has no current repo and
|
|
62
|
+
* no current account by construction (plan §2) — every call names both, and an
|
|
63
|
+
* unbound repository is an error naming `repos.json` rather than a guess at
|
|
64
|
+
* whichever `gh` account happens to be active.
|
|
65
|
+
*/
|
|
66
|
+
async github() {
|
|
67
|
+
if (this.#github !== undefined)
|
|
68
|
+
return this.#github;
|
|
69
|
+
const { GhTokenSource, GitHubClient } = await import("@floh-solutions/gh-core");
|
|
70
|
+
this.#github = await GitHubClient.fromConfig({
|
|
71
|
+
env: this.#env,
|
|
72
|
+
// The invocation's environment, not `process.env` — `gh` is spawned with
|
|
73
|
+
// it (`GhTokenSource` scrubs the ambient GH_TOKEN out on the way), and the
|
|
74
|
+
// PATH it is found on is the PATH this run was given. Same reason `doctor`
|
|
75
|
+
// hands it the path it resolved.
|
|
76
|
+
tokens: new GhTokenSource({ env: this.#env }),
|
|
77
|
+
fetch: this.budget.wrap((input, init) => globalThis.fetch(input, init)),
|
|
78
|
+
});
|
|
79
|
+
return this.#github;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* The web address of a work item — what a person clicks, not what the API
|
|
83
|
+
* reads.
|
|
84
|
+
*
|
|
85
|
+
* `WorkItem.url` is the REST url and opening it in a browser gives JSON, so a
|
|
86
|
+
* comment on a public GitHub issue carrying it would be worse than carrying
|
|
87
|
+
* nothing. `_links.html.href` is what Azure DevOps itself calls the human
|
|
88
|
+
* address; it is only present when the read asked for links, so the composed
|
|
89
|
+
* form is the fallback rather than the other way round.
|
|
90
|
+
*/
|
|
91
|
+
workItemUrl(item) {
|
|
92
|
+
const html = item._links?.["html"]?.href;
|
|
93
|
+
if (typeof html === "string" && html !== "")
|
|
94
|
+
return html;
|
|
95
|
+
const organization = encodeURIComponent(this.client.organization);
|
|
96
|
+
const project = encodeURIComponent(this.client.project ?? "");
|
|
97
|
+
return `${this.client.http.baseUrl}/${organization}/${project}/_workitems/edit/${item.id}`;
|
|
98
|
+
}
|
|
29
99
|
/**
|
|
30
100
|
* The wiki to act on, resolved once.
|
|
31
101
|
*
|
package/dist/session.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.js","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAgB,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAgB,MAAM,0BAA0B,CAAC;AAG5E,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EA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,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;QAC5D,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QACnB,MAAM,OAAO,CAAC,eAAe,MAAM,CAAC,IAAI,sCAAsC,EAAE;YAC9E,GAAG,MAAM,CAAC,KAAK;YACf,IAAI,EAAE,8EAA8E;SACrF,CAAC,CAAC;IACL,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@floh-solutions/pharos-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "Azure DevOps from a headless shell, for an agent: the whole context of a task in one call, and the wiki/comment verbs Microsoft's MCP server does not ship.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "FLOH Solutions",
|
|
@@ -24,8 +24,9 @@
|
|
|
24
24
|
"node": ">=22"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@floh-solutions/
|
|
28
|
-
"@floh-solutions/
|
|
27
|
+
"@floh-solutions/plan-to-board": "0.1.1",
|
|
28
|
+
"@floh-solutions/gh-core": "0.1.0",
|
|
29
|
+
"@floh-solutions/ado-core": "0.9.1"
|
|
29
30
|
},
|
|
30
31
|
"devDependencies": {
|
|
31
32
|
"@types/node": "^22.10.2",
|