@floh-solutions/pharos-cli 0.18.0 → 0.19.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/output.js CHANGED
@@ -162,6 +162,25 @@ function describe(error) {
162
162
  code: EXIT_FAILED,
163
163
  };
164
164
  }
165
+ // **A wiki lost update is a CONFLICT, whatever status Azure DevOps gives it.**
166
+ //
167
+ // The work item path answers 409/412 and arrives as `AdoConcurrencyError`
168
+ // above. The wiki path answers **400 with `WikiAlreadyUpdatedException`** and
169
+ // has no error class of its own — `AdoConcurrencyError` needs a `workItemId`
170
+ // and a numeric `expectedRev`, and a page has neither.
171
+ //
172
+ // Reported as `kind: "ado"` it was actively misleading. The contract this
173
+ // file defines says exit 1 means "check `kind`, retry only if transient", and
174
+ // the skill teaches branching on `conflict` to mean re-read and re-apply — so
175
+ // an agent hitting a wiki lost update read a 400 as a call it got wrong and
176
+ // must never repeat, while Azure DevOps' own message said to try again.
177
+ //
178
+ // The guard was working the entire time; only its label was wrong, which is
179
+ // the worst shape for a guard because it looks handled. Measured live in the
180
+ // #751 field run.
181
+ if (error instanceof AdoError && error.typeKey === "WikiAlreadyUpdatedException") {
182
+ return { body: adoBody("conflict", error), code: EXIT_FAILED };
183
+ }
165
184
  if (error instanceof AdoError) {
166
185
  return { body: adoBody("ado", error), code: EXIT_FAILED };
167
186
  }
@@ -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;AAElC;;;;;;;;;;;;;;;GAeG;AAEH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC;AACzB,MAAM,CAAC,MAAM,WAAW,GAAG,CA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SAAS,CAAC,IAAI,CAAC,CAAC;IAC/B,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,cAAc,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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floh-solutions/pharos-cli",
3
- "version": "0.18.0",
3
+ "version": "0.19.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,8 @@
24
24
  "node": ">=22"
25
25
  },
26
26
  "dependencies": {
27
- "@floh-solutions/ado-core": "0.9.0",
28
- "@floh-solutions/plan-to-board": "0.1.1"
27
+ "@floh-solutions/plan-to-board": "0.1.1",
28
+ "@floh-solutions/ado-core": "0.9.1"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/node": "^22.10.2",
package/skill/SKILL.md CHANGED
@@ -26,6 +26,7 @@ task <id> one work item, whole: fields, comments,
26
26
  create <type> --title "…" one work item. --parent goes in the SAME patch
27
27
  update <id> change a field: --state --priority --assignee
28
28
  --title, or --field Name=value for anything else
29
+ --expect-rev <n> pins a revision you read earlier
29
30
  link <id> --parent <id> relate two items. Also --child --related
30
31
  unlink <id> --parent <id> --predecessor --successor --duplicate
31
32
  link <id> --wiki-page <path> link a WIKI PAGE to a work item — the item side
@@ -132,7 +133,12 @@ pharos attach 225 ./bestsellers.xlsx --comment "The numbers"
132
133
 
133
134
  `update` **reads the item and applies the change under a `test` op on `/rev`**,
134
135
  so somebody who wrote between your read and your write gets you a `conflict`
135
- rather than losing their edit. Setting a value it already has writes nothing and
136
+ rather than losing their edit. Confirmed live against real concurrent writers:
137
+ three rounds, one winner each round, the loser always a 412 `conflict` carrying
138
+ both revisions, and no lost update. **`--expect-rev <n>` pins a revision you
139
+ read earlier** instead of re-reading — reach for it when your read and your
140
+ write are separate calls with thinking in between, which is where a
141
+ read-modify-write actually goes wrong. Setting a value it already has writes nothing and
136
142
  says so — a pointless PATCH still bumps `System.Rev` and invalidates every other
137
143
  cached revision on the item. `--dry-run` shows the before → after and writes
138
144
  nothing. There is no `--yes`: a field edit is an ordinary edit and Azure DevOps
@@ -361,6 +367,19 @@ pharos people ada # filter by name or email
361
367
  pharos comment add 225 --text "Ready for review @<0f45a818-878d-6d7a-ba8c-1f5568a89ed4>"
362
368
  ```
363
369
 
370
+ **A mention only works in a COMMENT.** Measured live: the same `@<guid>` written
371
+ into `System.Description` is stored as literal text — no anchor, no mention
372
+ registered, nobody notified. Azure DevOps parses that shorthand on the comments
373
+ endpoint and nowhere else. So a mention put in a description or any other field
374
+ fails in precisely the silent way this section exists to prevent: it reads like
375
+ a mention to every human who sees it and reaches no one.
376
+
377
+ If you need somebody told, post a comment. Editing a field is not a substitute —
378
+ and note that **every work item write here suppresses notifications on purpose**
379
+ (`update`, `create`, `attach`, `detach`, `link`, `unlink`), so an agent doing
380
+ bookkeeping does not mail the assignee about each step. `comment` is the one
381
+ write that notifies.
382
+
364
383
  The names come from the board's own work items — everyone assigned, creating or
365
384
  changing anything — rather than from an identity endpoint, because those live on
366
385
  another host and want scopes a work-scoped PAT does not have. So somebody who
@@ -383,12 +402,17 @@ text still import and everything else is refused by name with the reason.
383
402
 
384
403
  Three rules, because each of them is a way to lose work:
385
404
 
386
- - **A name collision SKIPS and says so.** A page write with an empty version is
387
- a *create*, so writing over an existing page is silent data loss.
405
+ - **A derived name never collides it COUNTS UP.** Importing `Notes.md` when
406
+ `/Guides/Notes` already exists creates `/Guides/Notes 2`, reports
407
+ `created: 1, skipped: 0`, and exits 0. Your page is never overwritten, which
408
+ is the property that matters. But **a blind re-import does not fail, it
409
+ quietly accumulates** `Notes`, `Notes 2`, `Notes 3` — and every run reports
410
+ complete success. If you are re-running an import, check the wiki first.
411
+ - **`--as <name>` is the one that SKIPS.** A name you typed is an instruction,
412
+ so it is never renamed: onto an existing page it skips, says so, and exits 3
413
+ when nothing else landed. Use it when you want a collision to stop you.
388
414
  - **Names are settled against the batch as well as the wiki**, so importing
389
415
  `Notes.docx` beside `Notes.pdf` gives two pages rather than one written twice.
390
- A name you give with `--as` is never renamed — it is an instruction, so it is
391
- allowed to collide and skip.
392
416
  - **An empty document is refused.** A scanned PDF carries no extractable text at
393
417
  all and PDFKit returns an empty string with no error; an empty page would look
394
418
  like a successful import until somebody opened it.
@@ -400,8 +424,10 @@ Three rules, because each of them is a way to lose work:
400
424
  empty-document rule would not catch it either — the text is short, not empty.
401
425
  If the deck must become a page, read it (above) and write the page yourself.
402
426
 
403
- Exit 3 when **nothing** landed. A partial batch exits 0 and names what skipped
404
- retrying it blindly would collide with the pages it just made.
427
+ Exit 3 when **nothing** landed. A partial batch exits 0 and names what skipped.
428
+ Do not retry a partial batch blindly: the files that succeeded will import a
429
+ second time under counted-up names, so you end with duplicates and an exit 0
430
+ saying it all worked. Re-run only the files that skipped.
405
431
 
406
432
  ## Do not guess a state name — ask
407
433