@floh-solutions/pharos-cli 0.4.0 → 0.12.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/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +381 -7
- package/dist/cli.js.map +1 -1
- package/dist/commands/attach.d.ts +30 -0
- package/dist/commands/attach.d.ts.map +1 -0
- package/dist/commands/attach.js +55 -0
- package/dist/commands/attach.js.map +1 -0
- package/dist/commands/create.d.ts +35 -0
- package/dist/commands/create.d.ts.map +1 -0
- package/dist/commands/create.js +82 -0
- package/dist/commands/create.js.map +1 -0
- package/dist/commands/detach.d.ts +34 -0
- package/dist/commands/detach.d.ts.map +1 -0
- package/dist/commands/detach.js +117 -0
- package/dist/commands/detach.js.map +1 -0
- package/dist/commands/discover.d.ts +66 -0
- package/dist/commands/discover.d.ts.map +1 -0
- package/dist/commands/discover.js +128 -0
- package/dist/commands/discover.js.map +1 -0
- package/dist/commands/hooks.d.ts +24 -0
- package/dist/commands/hooks.d.ts.map +1 -0
- package/dist/commands/hooks.js +184 -0
- package/dist/commands/hooks.js.map +1 -0
- package/dist/commands/image.d.ts +44 -0
- package/dist/commands/image.d.ts.map +1 -0
- package/dist/commands/image.js +114 -0
- package/dist/commands/image.js.map +1 -0
- package/dist/commands/import.d.ts +51 -0
- package/dist/commands/import.d.ts.map +1 -0
- package/dist/commands/import.js +190 -0
- package/dist/commands/import.js.map +1 -0
- package/dist/commands/link.d.ts +40 -0
- package/dist/commands/link.d.ts.map +1 -0
- package/dist/commands/link.js +150 -0
- package/dist/commands/link.js.map +1 -0
- package/dist/commands/people.d.ts +39 -0
- package/dist/commands/people.d.ts.map +1 -0
- package/dist/commands/people.js +64 -0
- package/dist/commands/people.js.map +1 -0
- package/dist/commands/query.d.ts +43 -0
- package/dist/commands/query.d.ts.map +1 -0
- package/dist/commands/query.js +202 -0
- package/dist/commands/query.js.map +1 -0
- package/dist/commands/recycle.d.ts +10 -0
- package/dist/commands/recycle.d.ts.map +1 -0
- package/dist/commands/recycle.js +118 -0
- package/dist/commands/recycle.js.map +1 -0
- package/dist/commands/update.d.ts +52 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +181 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/commands/wiki.d.ts.map +1 -1
- package/dist/commands/wiki.js +133 -2
- package/dist/commands/wiki.js.map +1 -1
- package/dist/output.d.ts.map +1 -1
- package/dist/output.js +32 -2
- package/dist/output.js.map +1 -1
- package/dist/wiql-build.d.ts +92 -0
- package/dist/wiql-build.d.ts.map +1 -0
- package/dist/wiql-build.js +147 -0
- package/dist/wiql-build.js.map +1 -0
- package/package.json +3 -3
- package/skill/SKILL.md +315 -65
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;AAoB1D,OAAO,EAKL,KAAK,QAAQ,EAEd,MAAM,aAAa,CAAC;AA6PrB,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;CAChC;AAED,wBAAsB,GAAG,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,QAAQ,CAAC,CAOhE"}
|
package/dist/cli.js
CHANGED
|
@@ -3,9 +3,21 @@ import { resolve } from "node:path";
|
|
|
3
3
|
import { parseArgs } from "node:util";
|
|
4
4
|
import { run as runPlanToBoard } from "@floh-solutions/plan-to-board";
|
|
5
5
|
import { DEFAULT_WRITE_BUDGET, WriteBudget } from "./budget.js";
|
|
6
|
+
import { runAttach } from "./commands/attach.js";
|
|
6
7
|
import { runComment } from "./commands/comment.js";
|
|
8
|
+
import { runCreate } from "./commands/create.js";
|
|
9
|
+
import { runDetach } from "./commands/detach.js";
|
|
10
|
+
import { runDownload, runTypes, runWhoami } from "./commands/discover.js";
|
|
11
|
+
import { runImage, runWikiImage } from "./commands/image.js";
|
|
12
|
+
import { runWikiImport } from "./commands/import.js";
|
|
13
|
+
import { runPeople } from "./commands/people.js";
|
|
14
|
+
import { LINK_KINDS, runLink, runUnlink } from "./commands/link.js";
|
|
15
|
+
import { runDelete, runDeleted, runRestore } from "./commands/recycle.js";
|
|
16
|
+
import { runHooks } from "./commands/hooks.js";
|
|
17
|
+
import { runQuery } from "./commands/query.js";
|
|
7
18
|
import { runSetup } from "./commands/setup.js";
|
|
8
19
|
import { runTask } from "./commands/task.js";
|
|
20
|
+
import { runUpdate } from "./commands/update.js";
|
|
9
21
|
import { runWiki } from "./commands/wiki.js";
|
|
10
22
|
import { EXIT_OK, emitText, reportError, usageError, } from "./output.js";
|
|
11
23
|
import { Session } from "./session.js";
|
|
@@ -60,6 +72,42 @@ START HERE
|
|
|
60
72
|
|
|
61
73
|
COMMANDS
|
|
62
74
|
|
|
75
|
+
whoami Who ADO_PAT belongs to. @Me resolves to this,
|
|
76
|
+
and every write is attributed to it — a shared
|
|
77
|
+
or service token quietly makes "assigned to me"
|
|
78
|
+
mean somebody else. Org-scoped, so it answers
|
|
79
|
+
even when --project is wrong.
|
|
80
|
+
|
|
81
|
+
types What --state and --type will ACCEPT, read from
|
|
82
|
+
this project, with each state's category so you
|
|
83
|
+
can tell "exists" from "means finished".
|
|
84
|
+
--type <name> just one
|
|
85
|
+
Run this before guessing a state name.
|
|
86
|
+
|
|
87
|
+
query Which work items — the question a session opens
|
|
88
|
+
with. Returns HYDRATED items (id, type, title,
|
|
89
|
+
state, assignee, iteration, tags, priority,
|
|
90
|
+
changed), not the bare ids WIQL hands back.
|
|
91
|
+
--mine assigned to whoever owns ADO_PAT, still open
|
|
92
|
+
--assignee <name|email> somebody else. Not with --mine.
|
|
93
|
+
--state <name> exact states; repeatable. Turns OFF the open
|
|
94
|
+
filter, because you have said what you want.
|
|
95
|
+
--type <name> Epic, Issue, Task…; repeatable
|
|
96
|
+
--sprint <name|path> a leaf name resolves under the project.
|
|
97
|
+
--sprint current means @currentIteration,
|
|
98
|
+
which needs --team to resolve.
|
|
99
|
+
--area <name|path> same resolution as --sprint
|
|
100
|
+
--tag <name> repeatable; substring match
|
|
101
|
+
--team <name> scopes the team macros
|
|
102
|
+
--all include finished work
|
|
103
|
+
--top <n> cap the matches
|
|
104
|
+
--wiql <statement> write it yourself. Used verbatim, alone.
|
|
105
|
+
|
|
106
|
+
"Open" is read from THIS PROJECT'S OWN state
|
|
107
|
+
categories, so it is right whatever the process
|
|
108
|
+
template renamed things to; the output says
|
|
109
|
+
which states it treated as finished.
|
|
110
|
+
|
|
63
111
|
task <id> Everything about one work item in a single call:
|
|
64
112
|
fields, comments, attachments, relations with
|
|
65
113
|
their titles, and the CONTENT of any linked wiki
|
|
@@ -69,10 +117,106 @@ COMMANDS
|
|
|
69
117
|
--no-wiki-comments do not fetch comments on linked pages
|
|
70
118
|
--no-related-titles ids only; skip the batch that names them
|
|
71
119
|
|
|
120
|
+
create <type> --title <text> One work item, in one call. --parent goes into
|
|
121
|
+
the SAME patch, so a child is never briefly an
|
|
122
|
+
orphan. Same flag names as update.
|
|
123
|
+
--parent <id> --state --priority --assignee --tag
|
|
124
|
+
--field <Name=value> repeatable
|
|
125
|
+
--text/--file/--stdin the description, written as Markdown
|
|
126
|
+
|
|
127
|
+
link <id> --parent <id> Relate two work items. One relationship per
|
|
128
|
+
unlink <id> --parent <id> call — each is its own revision, so a partial
|
|
129
|
+
failure could not be reported honestly.
|
|
130
|
+
--parent --child --related --predecessor --successor --duplicate
|
|
131
|
+
--comment <text> on link only
|
|
132
|
+
UNLINK finds the relation BY IDENTITY and
|
|
133
|
+
removes it under a \`test\` op on the revision it
|
|
134
|
+
was found in. Azure DevOps removes by POSITION,
|
|
135
|
+
so a stale index cuts a different link and the
|
|
136
|
+
request still succeeds. If the relation is not
|
|
137
|
+
there it REFUSES (exit 3) rather than guessing.
|
|
138
|
+
|
|
139
|
+
delete <id> Move to the Recycle Bin. Needs --yes; the
|
|
140
|
+
refusal quotes the title first.
|
|
141
|
+
There is no permanent delete here on purpose:
|
|
142
|
+
it is the only irreversible verb Azure DevOps
|
|
143
|
+
has, and the web UI owns it.
|
|
144
|
+
restore <id> Bring one back. No flag needed — this is the
|
|
145
|
+
recoverable direction.
|
|
146
|
+
deleted What is in the Recycle Bin, WITH names — the
|
|
147
|
+
list endpoint returns bare ids, so this
|
|
148
|
+
hydrates them.
|
|
149
|
+
--top <n> how many to name (default 50)
|
|
150
|
+
|
|
151
|
+
update <id> Change a field. Guarded by a \`test\` op on the
|
|
152
|
+
revision read in the same call, so a teammate
|
|
153
|
+
who wrote first gets a conflict rather than
|
|
154
|
+
losing their edit.
|
|
155
|
+
--state <name> --priority <n> --assignee <who> --title <text>
|
|
156
|
+
--field <Name=value> anything else; repeatable
|
|
157
|
+
--expect-rev <n> pin the revision instead of reading it
|
|
158
|
+
--dry-run shows the before → after and writes
|
|
159
|
+
nothing. Setting a value it already has is a
|
|
160
|
+
no-op, because a pointless PATCH still bumps
|
|
161
|
+
System.Rev.
|
|
162
|
+
|
|
163
|
+
image <file> Upload a picture for use INSIDE text — a
|
|
164
|
+
description or a comment. Prints the
|
|
165
|
+
markdown line to paste. NOT attach: an
|
|
166
|
+
inline image creates no relation and never
|
|
167
|
+
appears in the Attachments list.
|
|
168
|
+
--alt <text> alt text; defaults to the file name
|
|
169
|
+
|
|
170
|
+
people [query] Who can be @mentioned, WITH the @<guid> form
|
|
171
|
+
ready to paste. A mention is @<guid> and
|
|
172
|
+
nothing else notifies — @Name is plain text
|
|
173
|
+
that reaches nobody and says so to no one.
|
|
174
|
+
--top <n> items to scan for names (default 200)
|
|
175
|
+
|
|
176
|
+
detach <id> <url-or-guid> Take a file off a work item. Needs --yes.
|
|
177
|
+
Finds the attachment BY IDENTITY and removes it
|
|
178
|
+
under a test op, because ADO removes by
|
|
179
|
+
POSITION and a stale index cuts a different
|
|
180
|
+
link while still reporting success.
|
|
181
|
+
|
|
182
|
+
attach <id> <file> Put a file on a work item. The MCP server
|
|
183
|
+
CANNOT do this — its attachment tool is
|
|
184
|
+
download-only.
|
|
185
|
+
--comment <text> shown beside the file
|
|
186
|
+
--allow-oversize past the ~60 MB hosted limit, for on-prem
|
|
187
|
+
|
|
188
|
+
download <id-or-url> Read an attachment back. Takes the url \`task\`
|
|
189
|
+
prints, or the bare GUID.
|
|
190
|
+
--out <path> where to write it. WITHOUT THIS NOTHING IS
|
|
191
|
+
WRITTEN — raw bytes on stdout would corrupt the
|
|
192
|
+
JSON contract every other verb keeps.
|
|
193
|
+
--name <filename> what Azure DevOps should call it
|
|
194
|
+
|
|
72
195
|
wiki list Every wiki, with the ids links and hooks need
|
|
73
196
|
wiki tree The page tree, WITH page ids (two calls, joined)
|
|
74
197
|
wiki read <path> Content plus the version a write must carry
|
|
75
198
|
wiki write <path> Create, or replace (replacing needs --yes)
|
|
199
|
+
wiki move <path> <new path> Move a page. Sub-pages come with it.
|
|
200
|
+
wiki rename <path> <new name> The same call with the leaf changed.
|
|
201
|
+
BOTH NEED --yes: a page has no id, so its path
|
|
202
|
+
IS its identity — anything pointing at the old
|
|
203
|
+
one stops resolving, work item links included,
|
|
204
|
+
and nothing reports it.
|
|
205
|
+
wiki duplicate <path> [to] Copy a page. Defaults to "<path> - Copy N".
|
|
206
|
+
wiki image <file> Upload a picture for a PAGE or a page comment.
|
|
207
|
+
A different endpoint from image, and the name
|
|
208
|
+
is the identity — it is a file in a git repo, so
|
|
209
|
+
this makes it unique before sending. Prints the
|
|
210
|
+
/.attachments/ markdown line.
|
|
211
|
+
--alt <text>
|
|
212
|
+
wiki import <file...> Documents in, pages out. .md and .txt verbatim;
|
|
213
|
+
.docx .pdf .rtf .html through pharos-convert,
|
|
214
|
+
which shares the macOS app's converter rather
|
|
215
|
+
than being a second one. A name collision SKIPS
|
|
216
|
+
and says so — a page write with an empty version
|
|
217
|
+
is a create, so overwriting is silent data loss.
|
|
218
|
+
--under <path> the parent every page goes under
|
|
219
|
+
--as <name> name the page (one file only)
|
|
76
220
|
wiki delete <path> Needs --yes
|
|
77
221
|
|
|
78
222
|
comment list <target> <target> is a work item id (210) or a wiki page
|
|
@@ -83,6 +227,15 @@ COMMANDS
|
|
|
83
227
|
comment unreact <target> <id> <type>
|
|
84
228
|
comment reactors <target> <id> <type> who reacted, by name
|
|
85
229
|
|
|
230
|
+
hooks list The service hook subscriptions that feed realtime
|
|
231
|
+
hooks check --hub <url> What is set up, missing, or pointing elsewhere
|
|
232
|
+
hooks create --hub --user --password Create the missing ones. Needs --yes
|
|
233
|
+
hooks repoint --hub --user --password Move them to a new URL. Needs --yes
|
|
234
|
+
hooks delete <id> Needs --yes
|
|
235
|
+
There is no MCP tool for any of this, and the
|
|
236
|
+
wiki subscription CANNOT be made in the web UI:
|
|
237
|
+
the repo picker hides wiki repositories.
|
|
238
|
+
|
|
86
239
|
plan <file> [...] Turn an implementation plan into a work item
|
|
87
240
|
tree. Passed through to plan-to-board verbatim,
|
|
88
241
|
including its flags and its human output.
|
|
@@ -136,13 +289,92 @@ async function dispatch(io, options) {
|
|
|
136
289
|
"no-wiki-comments": { type: "boolean" },
|
|
137
290
|
"no-related-titles": { type: "boolean" },
|
|
138
291
|
}
|
|
139
|
-
: command === "
|
|
292
|
+
: command === "query"
|
|
140
293
|
? {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
294
|
+
mine: { type: "boolean" },
|
|
295
|
+
assignee: { type: "string" },
|
|
296
|
+
// Repeatable, so `--state Doing --state Ready` is two states rather
|
|
297
|
+
// than the second silently winning.
|
|
298
|
+
state: { type: "string", multiple: true },
|
|
299
|
+
type: { type: "string", multiple: true },
|
|
300
|
+
tag: { type: "string", multiple: true },
|
|
301
|
+
sprint: { type: "string" },
|
|
302
|
+
area: { type: "string" },
|
|
303
|
+
team: { type: "string" },
|
|
304
|
+
all: { type: "boolean" },
|
|
305
|
+
top: { type: "string" },
|
|
306
|
+
wiql: { type: "string" },
|
|
144
307
|
}
|
|
145
|
-
:
|
|
308
|
+
: command === "update"
|
|
309
|
+
? {
|
|
310
|
+
state: { type: "string" },
|
|
311
|
+
priority: { type: "string" },
|
|
312
|
+
assignee: { type: "string" },
|
|
313
|
+
title: { type: "string" },
|
|
314
|
+
field: { type: "string", multiple: true },
|
|
315
|
+
"expect-rev": { type: "string" },
|
|
316
|
+
}
|
|
317
|
+
: command === "attach"
|
|
318
|
+
? {
|
|
319
|
+
comment: { type: "string" },
|
|
320
|
+
"allow-oversize": { type: "boolean" },
|
|
321
|
+
}
|
|
322
|
+
: command === "image"
|
|
323
|
+
? {
|
|
324
|
+
alt: { type: "string" },
|
|
325
|
+
"allow-oversize": { type: "boolean" },
|
|
326
|
+
}
|
|
327
|
+
: command === "wiki"
|
|
328
|
+
? {
|
|
329
|
+
// **`CONTENT_OPTIONS` is spread in, and leaving it out broke four
|
|
330
|
+
// tests.** Every other verb here has its own flags INSTEAD of the
|
|
331
|
+
// text ones; `wiki` is the first that needs both, because
|
|
332
|
+
// `wiki write` takes a body while `wiki image` and `wiki import`
|
|
333
|
+
// take files and a destination.
|
|
334
|
+
...CONTENT_OPTIONS,
|
|
335
|
+
alt: { type: "string" },
|
|
336
|
+
"allow-oversize": { type: "boolean" },
|
|
337
|
+
under: { type: "string" },
|
|
338
|
+
as: { type: "string" },
|
|
339
|
+
}
|
|
340
|
+
: command === "download"
|
|
341
|
+
? {
|
|
342
|
+
out: { type: "string" },
|
|
343
|
+
name: { type: "string" },
|
|
344
|
+
}
|
|
345
|
+
: command === "types"
|
|
346
|
+
? { type: { type: "string" } }
|
|
347
|
+
: command === "create"
|
|
348
|
+
? {
|
|
349
|
+
title: { type: "string" },
|
|
350
|
+
parent: { type: "string" },
|
|
351
|
+
state: { type: "string" },
|
|
352
|
+
priority: { type: "string" },
|
|
353
|
+
assignee: { type: "string" },
|
|
354
|
+
field: { type: "string", multiple: true },
|
|
355
|
+
tag: { type: "string", multiple: true },
|
|
356
|
+
...CONTENT_OPTIONS,
|
|
357
|
+
}
|
|
358
|
+
: command === "link" || command === "unlink"
|
|
359
|
+
? {
|
|
360
|
+
...Object.fromEntries(Object.keys(LINK_KINDS).map((kind) => [kind, { type: "string" }])),
|
|
361
|
+
comment: { type: "string" },
|
|
362
|
+
}
|
|
363
|
+
: command === "deleted"
|
|
364
|
+
? { top: { type: "string" } }
|
|
365
|
+
: command === "hooks"
|
|
366
|
+
? {
|
|
367
|
+
hub: { type: "string" },
|
|
368
|
+
user: { type: "string" },
|
|
369
|
+
password: { type: "string" },
|
|
370
|
+
}
|
|
371
|
+
: command === "setup"
|
|
372
|
+
? {
|
|
373
|
+
print: { type: "boolean" },
|
|
374
|
+
stdin: { type: "boolean" },
|
|
375
|
+
skill: { type: "boolean" },
|
|
376
|
+
}
|
|
377
|
+
: CONTENT_OPTIONS;
|
|
146
378
|
const { values, positionals } = parse(options.argv, { ...GLOBAL_OPTIONS, ...extras });
|
|
147
379
|
if (values["version"] === true)
|
|
148
380
|
return emitText(io, await version(options.cwd));
|
|
@@ -174,6 +406,73 @@ async function dispatch(io, options) {
|
|
|
174
406
|
});
|
|
175
407
|
const rest = positionals.slice(1);
|
|
176
408
|
switch (command) {
|
|
409
|
+
case "query":
|
|
410
|
+
return runQuery(io, session, {
|
|
411
|
+
mine: values["mine"] === true,
|
|
412
|
+
assignee: asString(values["assignee"]),
|
|
413
|
+
states: asStrings(values["state"]),
|
|
414
|
+
types: asStrings(values["type"]),
|
|
415
|
+
tags: asStrings(values["tag"]),
|
|
416
|
+
sprint: asString(values["sprint"]),
|
|
417
|
+
area: asString(values["area"]),
|
|
418
|
+
team: asString(values["team"]),
|
|
419
|
+
all: values["all"] === true,
|
|
420
|
+
top: top(values["top"]),
|
|
421
|
+
wiql: asString(values["wiql"]),
|
|
422
|
+
});
|
|
423
|
+
case "update":
|
|
424
|
+
return runUpdate(io, session, rest, {
|
|
425
|
+
state: asString(values["state"]),
|
|
426
|
+
priority: asString(values["priority"]),
|
|
427
|
+
assignee: asString(values["assignee"]),
|
|
428
|
+
title: asString(values["title"]),
|
|
429
|
+
fields: asStrings(values["field"]),
|
|
430
|
+
expectRev: expectRev(values["expect-rev"]),
|
|
431
|
+
});
|
|
432
|
+
case "image":
|
|
433
|
+
return runImage(io, session, options.cwd, rest, {
|
|
434
|
+
alt: asString(values["alt"]),
|
|
435
|
+
allowOversize: values["allow-oversize"] === true,
|
|
436
|
+
});
|
|
437
|
+
case "detach":
|
|
438
|
+
return runDetach(io, session, rest);
|
|
439
|
+
case "people":
|
|
440
|
+
return runPeople(io, session, rest, { top: top(values["top"]) });
|
|
441
|
+
case "attach":
|
|
442
|
+
return runAttach(io, session, options.cwd, rest, {
|
|
443
|
+
comment: asString(values["comment"]),
|
|
444
|
+
allowOversize: values["allow-oversize"] === true,
|
|
445
|
+
});
|
|
446
|
+
case "download":
|
|
447
|
+
return runDownload(io, session, options.cwd, rest, {
|
|
448
|
+
out: asString(values["out"]),
|
|
449
|
+
name: asString(values["name"]),
|
|
450
|
+
});
|
|
451
|
+
case "types":
|
|
452
|
+
return runTypes(io, session, { type: asString(values["type"]) });
|
|
453
|
+
case "whoami":
|
|
454
|
+
return runWhoami(io, session);
|
|
455
|
+
case "create":
|
|
456
|
+
return runCreate(io, session, rest, {
|
|
457
|
+
title: asString(values["title"]),
|
|
458
|
+
parent: workItemRef(values["parent"], "--parent"),
|
|
459
|
+
state: asString(values["state"]),
|
|
460
|
+
priority: asString(values["priority"]),
|
|
461
|
+
assignee: asString(values["assignee"]),
|
|
462
|
+
fields: asStrings(values["field"]),
|
|
463
|
+
tags: asStrings(values["tag"]),
|
|
464
|
+
description: await content(options, values),
|
|
465
|
+
});
|
|
466
|
+
case "link":
|
|
467
|
+
return runLink(io, session, rest, linkOptions(values));
|
|
468
|
+
case "unlink":
|
|
469
|
+
return runUnlink(io, session, rest, linkOptions(values));
|
|
470
|
+
case "delete":
|
|
471
|
+
return runDelete(io, session, rest);
|
|
472
|
+
case "restore":
|
|
473
|
+
return runRestore(io, session, rest);
|
|
474
|
+
case "deleted":
|
|
475
|
+
return runDeleted(io, session, { top: top(values["top"]) ?? 50 });
|
|
177
476
|
case "task":
|
|
178
477
|
return runTask(io, session, rest, {
|
|
179
478
|
wikiContent: values["no-wiki-content"] !== true,
|
|
@@ -181,6 +480,22 @@ async function dispatch(io, options) {
|
|
|
181
480
|
relatedTitles: values["no-related-titles"] !== true,
|
|
182
481
|
});
|
|
183
482
|
case "wiki":
|
|
483
|
+
// Two wiki verbs are not page verbs and are handled before `runWiki` sees
|
|
484
|
+
// them: an image goes to the wiki's ATTACHMENT endpoint, and an import
|
|
485
|
+
// reads files off the disk. Neither takes a page path first, which is
|
|
486
|
+
// what every other wiki verb is shaped around.
|
|
487
|
+
if (rest[0] === "image") {
|
|
488
|
+
return runWikiImage(io, session, options.cwd, rest.slice(1), {
|
|
489
|
+
alt: asString(values["alt"]),
|
|
490
|
+
allowOversize: values["allow-oversize"] === true,
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
if (rest[0] === "import") {
|
|
494
|
+
return runWikiImport(io, session, options.cwd, rest.slice(1), {
|
|
495
|
+
under: asString(values["under"]),
|
|
496
|
+
as: asString(values["as"]),
|
|
497
|
+
});
|
|
498
|
+
}
|
|
184
499
|
return runWiki(io, session, rest, {
|
|
185
500
|
content: await content(options, values),
|
|
186
501
|
});
|
|
@@ -188,9 +503,20 @@ async function dispatch(io, options) {
|
|
|
188
503
|
return runComment(io, session, rest, {
|
|
189
504
|
text: await content(options, values),
|
|
190
505
|
});
|
|
506
|
+
case "hooks":
|
|
507
|
+
return runHooks(io, session, rest, {
|
|
508
|
+
hub: asString(values["hub"]),
|
|
509
|
+
user: asString(values["user"]),
|
|
510
|
+
password: asString(values["password"]),
|
|
511
|
+
});
|
|
191
512
|
default:
|
|
192
|
-
throw usageError(`Unknown command "${command}". Try setup, task,
|
|
193
|
-
|
|
513
|
+
throw usageError(`Unknown command "${command}". Try setup, whoami, query, task, types, create, update, `
|
|
514
|
+
+ "link, unlink, attach, download, delete, restore, deleted, wiki, comment, hooks or plan.", {
|
|
515
|
+
commands: [
|
|
516
|
+
"setup", "whoami", "query", "task", "types", "create", "update", "link", "unlink",
|
|
517
|
+
"attach", "download", "delete", "restore", "deleted", "wiki", "comment", "hooks",
|
|
518
|
+
"plan",
|
|
519
|
+
],
|
|
194
520
|
});
|
|
195
521
|
}
|
|
196
522
|
}
|
|
@@ -284,4 +610,52 @@ async function version(cwd) {
|
|
|
284
610
|
function asString(value) {
|
|
285
611
|
return typeof value === "string" && value !== "" ? value : undefined;
|
|
286
612
|
}
|
|
613
|
+
/** A repeatable flag. `parseArgs` gives an array only once `multiple` is set. */
|
|
614
|
+
function asStrings(value) {
|
|
615
|
+
if (!Array.isArray(value))
|
|
616
|
+
return [];
|
|
617
|
+
return value.filter((item) => typeof item === "string" && item !== "");
|
|
618
|
+
}
|
|
619
|
+
/**
|
|
620
|
+
* `--top`, which must not silently become `NaN`.
|
|
621
|
+
*
|
|
622
|
+
* A bad `$top` is passed straight into the query string, and Azure DevOps
|
|
623
|
+
* answers a NaN with the whole result set rather than an error — so a typo'd cap
|
|
624
|
+
* reads as "there really are 2000 of them".
|
|
625
|
+
*/
|
|
626
|
+
/** A work item id passed as a flag value. */
|
|
627
|
+
function workItemRef(raw, flag) {
|
|
628
|
+
if (typeof raw !== "string" || raw === "")
|
|
629
|
+
return undefined;
|
|
630
|
+
if (!/^\d+$/.test(raw))
|
|
631
|
+
throw usageError(`${flag} takes a work item id, not "${raw}".`);
|
|
632
|
+
return Number(raw);
|
|
633
|
+
}
|
|
634
|
+
/** The link kinds, read off whichever `--parent`/`--related`/… was passed. */
|
|
635
|
+
function linkOptions(values) {
|
|
636
|
+
const kinds = {};
|
|
637
|
+
for (const kind of Object.keys(LINK_KINDS)) {
|
|
638
|
+
kinds[kind] = workItemRef(values[kind], `--${kind}`);
|
|
639
|
+
}
|
|
640
|
+
return { kinds, comment: asString(values["comment"]) };
|
|
641
|
+
}
|
|
642
|
+
/** `--expect-rev`, which is only useful if it is a real revision. */
|
|
643
|
+
function expectRev(raw) {
|
|
644
|
+
if (typeof raw !== "string")
|
|
645
|
+
return undefined;
|
|
646
|
+
const value = Number(raw);
|
|
647
|
+
if (!Number.isInteger(value) || value < 1) {
|
|
648
|
+
throw usageError(`--expect-rev takes a whole number of 1 or more, not "${raw}".`);
|
|
649
|
+
}
|
|
650
|
+
return value;
|
|
651
|
+
}
|
|
652
|
+
function top(raw) {
|
|
653
|
+
if (typeof raw !== "string")
|
|
654
|
+
return undefined;
|
|
655
|
+
const value = Number(raw);
|
|
656
|
+
if (!Number.isInteger(value) || value < 1) {
|
|
657
|
+
throw usageError(`--top takes a whole number of 1 or more, not "${raw}".`);
|
|
658
|
+
}
|
|
659
|
+
return value;
|
|
660
|
+
}
|
|
287
661
|
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAwB,MA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,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IAC9C,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IAC1B,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;QAC1C,MAAM,UAAU,CAAC,iDAAiD,GAAG,IAAI,CAAC,CAAC;IAC7E,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type ExitCode, type Io } from "../output.js";
|
|
2
|
+
import type { Session } from "../session.js";
|
|
3
|
+
/**
|
|
4
|
+
* `pharos attach <id> <file>` — put a file on a work item.
|
|
5
|
+
*
|
|
6
|
+
* **Neither tool could do this, and one of them looked like it could.** The MCP
|
|
7
|
+
* server's `wit_work_item_attachment` is DOWNLOAD-only — its schema takes an
|
|
8
|
+
* `attachmentId` and a `savePath`, and there is no upload anywhere in it
|
|
9
|
+
* (PLAN.md §9, re-confirmed against the live schema 2026-08-05). `ado-core` has
|
|
10
|
+
* had the upload since the beginning, because covering that gap is one of the
|
|
11
|
+
* four reasons the package exists. It just had no verb, so the capability was
|
|
12
|
+
* invisible to anybody reading the skill — and a session that needed it spent
|
|
13
|
+
* several calls rediscovering it before writing a throwaway script.
|
|
14
|
+
*
|
|
15
|
+
* Two steps, both inside the guarded client: POST the bytes to
|
|
16
|
+
* `/_apis/wit/attachments?fileName=…`, then PATCH the work item with an
|
|
17
|
+
* `AttachedFile` relation pointing at the returned url.
|
|
18
|
+
*
|
|
19
|
+
* Attachments are **immutable**. Attaching the same file twice makes two of
|
|
20
|
+
* them; there is no versioning and no replace, which is also why a download can
|
|
21
|
+
* be cached by GUID forever.
|
|
22
|
+
*/
|
|
23
|
+
export interface AttachCommandOptions {
|
|
24
|
+
/** Shown beside the file in the work item's Attachments tab. */
|
|
25
|
+
comment: string | undefined;
|
|
26
|
+
/** Send bytes over the ~60 MB hosted limit, for an on-prem install. */
|
|
27
|
+
allowOversize: boolean;
|
|
28
|
+
}
|
|
29
|
+
export declare function runAttach(io: Io, session: Session, cwd: string, positionals: readonly string[], options: AttachCommandOptions): Promise<ExitCode>;
|
|
30
|
+
//# sourceMappingURL=attach.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attach.d.ts","sourceRoot":"","sources":["../../src/commands/attach.ts"],"names":[],"mappings":"AAGA,OAAO,EAA8B,KAAK,QAAQ,EAAE,KAAK,EAAE,EAAE,MAAM,cAAc,CAAC;AAClF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAG7C;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,MAAM,WAAW,oBAAoB;IACnC,gEAAgE;IAChE,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,uEAAuE;IACvE,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,wBAAsB,SAAS,CAC7B,EAAE,EAAE,EAAE,EACN,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,SAAS,MAAM,EAAE,EAC9B,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,QAAQ,CAAC,CAiDnB"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
2
|
+
import { basename, resolve } from "node:path";
|
|
3
|
+
import { emit, emitText, usageError } from "../output.js";
|
|
4
|
+
import { workItemId } from "./update.js";
|
|
5
|
+
export async function runAttach(io, session, cwd, positionals, options) {
|
|
6
|
+
const id = workItemId(positionals[0], "Which work item? `pharos attach <id> <file>`.");
|
|
7
|
+
const given = positionals[1];
|
|
8
|
+
if (given === undefined) {
|
|
9
|
+
throw usageError(`Which file? \`pharos attach ${id} ./report.xlsx\`.`);
|
|
10
|
+
}
|
|
11
|
+
const path = resolve(cwd, given);
|
|
12
|
+
let bytes;
|
|
13
|
+
try {
|
|
14
|
+
bytes = await readFile(path);
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
// Exit 2, not 1: a missing file is the call being wrong, and repeating it
|
|
18
|
+
// unchanged will never work.
|
|
19
|
+
throw usageError(`Cannot read "${given}": ${error instanceof Error ? error.message : error}`, {
|
|
20
|
+
path,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
const name = basename(path);
|
|
24
|
+
if (session.previewOnly) {
|
|
25
|
+
return report(io, session, {
|
|
26
|
+
applied: false,
|
|
27
|
+
dryRun: true,
|
|
28
|
+
id,
|
|
29
|
+
name,
|
|
30
|
+
bytes: bytes.length,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
const reference = await session.client.attachments.upload(name, bytes, {
|
|
34
|
+
...(options.allowOversize ? { allowOversize: true } : {}),
|
|
35
|
+
});
|
|
36
|
+
await session.client.attachments.attach(id, reference.url, {
|
|
37
|
+
...(options.comment === undefined ? {} : { comment: options.comment }),
|
|
38
|
+
suppressNotifications: true,
|
|
39
|
+
});
|
|
40
|
+
return report(io, session, {
|
|
41
|
+
applied: true,
|
|
42
|
+
id,
|
|
43
|
+
name,
|
|
44
|
+
bytes: bytes.length,
|
|
45
|
+
attachmentId: reference.id,
|
|
46
|
+
url: reference.url,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function report(io, session, result) {
|
|
50
|
+
if (!session.pretty)
|
|
51
|
+
return emit(io, result);
|
|
52
|
+
const verb = result.applied ? "attached to" : "would attach to";
|
|
53
|
+
return emitText(io, `${result.name} (${result.bytes} bytes) ${verb} #${result.id}`);
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=attach.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attach.js","sourceRoot":"","sources":["../../src/commands/attach.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAA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>` — one work item, in one call.
|
|
5
|
+
*
|
|
6
|
+
* **Why this exists when `az boards work-item create` does.** It passes the
|
|
7
|
+
* scope test (#590) on two counts and neither is coverage:
|
|
8
|
+
*
|
|
9
|
+
* - **Composition.** `--parent` goes into the SAME patch as the fields, so a
|
|
10
|
+
* child arrives already attached. Doing it with az is a create followed by a
|
|
11
|
+
* `relation add`, and the gap between them is an orphan on the board if the
|
|
12
|
+
* second call fails.
|
|
13
|
+
* - **Shared vocabulary.** `--state`, `--priority`, `--assignee`, `--title`
|
|
14
|
+
* and `--field` mean exactly what they mean on `pharos update`, because both
|
|
15
|
+
* read the same {@link SHORTHAND} map. A session that has learned one verb
|
|
16
|
+
* has learned the other, and that is worth more than either verb alone.
|
|
17
|
+
*
|
|
18
|
+
* The description is markdown, declared as such in the patch. `setMarkdown`
|
|
19
|
+
* writes the value verbatim AND sets `/multilineFieldsFormat`, which is what
|
|
20
|
+
* keeps `> quoted` and `Array<String>` intact — the mangling that is half the
|
|
21
|
+
* reason `ado-core` exists.
|
|
22
|
+
*/
|
|
23
|
+
export interface CreateCommandOptions {
|
|
24
|
+
title: string | undefined;
|
|
25
|
+
parent: number | undefined;
|
|
26
|
+
state: string | undefined;
|
|
27
|
+
priority: string | undefined;
|
|
28
|
+
assignee: string | undefined;
|
|
29
|
+
fields: readonly string[];
|
|
30
|
+
tags: readonly string[];
|
|
31
|
+
/** From --text / --file / --stdin. Becomes System.Description. */
|
|
32
|
+
description: string | undefined;
|
|
33
|
+
}
|
|
34
|
+
export declare function runCreate(io: Io, session: Session, positionals: readonly string[], options: CreateCommandOptions): Promise<ExitCode>;
|
|
35
|
+
//# sourceMappingURL=create.d.ts.map
|