@onetaskgraph/sdk 0.14.11 → 0.14.12

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/index.js CHANGED
@@ -7157,7 +7157,10 @@ var binaryCommands = [
7157
7157
  "task comment list",
7158
7158
  "task comment edit",
7159
7159
  "task comment delete",
7160
+ "task comment add-many",
7160
7161
  "task comments",
7162
+ "task find",
7163
+ "task update-many",
7161
7164
  "task status set",
7162
7165
  "task status reconcile",
7163
7166
  "task status complete",
@@ -7201,7 +7204,7 @@ var binaryCommands = [
7201
7204
  ];
7202
7205
 
7203
7206
  // src/generated/models.ts
7204
- var SCHEMA_BUNDLE_VERSION = 59;
7207
+ var SCHEMA_BUNDLE_VERSION = 61;
7205
7208
 
7206
7209
  // src/generated/schemas.ts
7207
7210
  var runtimeSchemas = {
@@ -8080,6 +8083,34 @@ say. Decided by the plugin, through
8080
8083
  }
8081
8084
  ]
8082
8085
  },
8086
+ BatchOutcome: {
8087
+ $schema: "https://json-schema.org/draft/2020-12/schema",
8088
+ title: "BatchOutcome",
8089
+ description: "What became of one item of a batched write.",
8090
+ oneOf: [
8091
+ {
8092
+ description: "It was written.",
8093
+ type: "string",
8094
+ const: "written"
8095
+ },
8096
+ {
8097
+ description: `Its priority guard declined: the task held a priority the guard does not name, and
8098
+ nothing of it was written.`,
8099
+ type: "string",
8100
+ const: "held"
8101
+ },
8102
+ {
8103
+ description: "The task was at another version than the one it was held to, and nothing was written.",
8104
+ type: "string",
8105
+ const: "version-moved"
8106
+ },
8107
+ {
8108
+ description: "It could not be written; `reason` says why, naming it.",
8109
+ type: "string",
8110
+ const: "error"
8111
+ }
8112
+ ]
8113
+ },
8083
8114
  CacheCleared: {
8084
8115
  $schema: "https://json-schema.org/draft/2020-12/schema",
8085
8116
  title: "CacheCleared",
@@ -8678,6 +8709,61 @@ say. Decided by the plugin, through
8678
8709
  }
8679
8710
  }
8680
8711
  },
8712
+ CommentBatch: {
8713
+ $schema: "https://json-schema.org/draft/2020-12/schema",
8714
+ title: "CommentBatch",
8715
+ description: "What `task comment add-many` reads: many comments, each on one task of one source.",
8716
+ type: "object",
8717
+ properties: {
8718
+ schema_version: {
8719
+ description: "`1`.",
8720
+ type: "integer",
8721
+ format: "uint32",
8722
+ minimum: 0
8723
+ },
8724
+ comments: {
8725
+ description: "The comments, each written on its own.",
8726
+ type: "array",
8727
+ items: {
8728
+ $ref: "#/$defs/CommentBatchItem"
8729
+ }
8730
+ }
8731
+ },
8732
+ additionalProperties: false,
8733
+ required: [
8734
+ "schema_version",
8735
+ "comments"
8736
+ ],
8737
+ $defs: {
8738
+ CommentBatchItem: {
8739
+ description: "One comment of a [`CommentBatch`].",
8740
+ type: "object",
8741
+ properties: {
8742
+ item: {
8743
+ description: "The task's qualified id, `<source>:<native-id>`, of the source the batch names.",
8744
+ type: "string"
8745
+ },
8746
+ body: {
8747
+ description: "The comment's Markdown.",
8748
+ type: "string"
8749
+ },
8750
+ if_version: {
8751
+ description: "The version the task must be at for the comment to be written, as a read reported it.",
8752
+ type: [
8753
+ "string",
8754
+ "null"
8755
+ ],
8756
+ default: null
8757
+ }
8758
+ },
8759
+ additionalProperties: false,
8760
+ required: [
8761
+ "item",
8762
+ "body"
8763
+ ]
8764
+ }
8765
+ }
8766
+ },
8681
8767
  CommentList: {
8682
8768
  $schema: "https://json-schema.org/draft/2020-12/schema",
8683
8769
  title: "CommentList",
@@ -9483,6 +9569,262 @@ interprets none of them, which is why the budget and unit names are open vocabul
9483
9569
  }
9484
9570
  }
9485
9571
  },
9572
+ CommentsAdded: {
9573
+ $schema: "https://json-schema.org/draft/2020-12/schema",
9574
+ title: "CommentsAdded",
9575
+ description: "What `task comment add-many` answers: one result per comment, in the order given.",
9576
+ type: "object",
9577
+ properties: {
9578
+ schema_version: {
9579
+ description: "`1`.",
9580
+ type: "integer",
9581
+ format: "uint32",
9582
+ minimum: 0
9583
+ },
9584
+ results: {
9585
+ description: "One per comment.",
9586
+ type: "array",
9587
+ items: {
9588
+ $ref: "#/$defs/CommentAddResult"
9589
+ }
9590
+ },
9591
+ sanitization: {
9592
+ anyOf: [
9593
+ {
9594
+ $ref: "#/$defs/Sanitization"
9595
+ },
9596
+ {
9597
+ type: "null"
9598
+ }
9599
+ ]
9600
+ }
9601
+ },
9602
+ required: [
9603
+ "schema_version",
9604
+ "results"
9605
+ ],
9606
+ $defs: {
9607
+ CommentAddResult: {
9608
+ description: "What became of one comment of a [`CommentBatch`].",
9609
+ type: "object",
9610
+ properties: {
9611
+ item: {
9612
+ description: "The item as the batch named it.",
9613
+ type: "string"
9614
+ },
9615
+ outcome: {
9616
+ description: "What became of it.",
9617
+ $ref: "#/$defs/BatchOutcome"
9618
+ },
9619
+ comment: {
9620
+ description: "The comment written — `null` unless `outcome` is `written`.",
9621
+ anyOf: [
9622
+ {
9623
+ $ref: "#/$defs/AddedComment"
9624
+ },
9625
+ {
9626
+ type: "null"
9627
+ }
9628
+ ]
9629
+ },
9630
+ current_version: {
9631
+ description: "The version the task is at — present when `outcome` is `version-moved` and the source\ncan name it, which it cannot just after another write of this batch moved the task.",
9632
+ type: [
9633
+ "string",
9634
+ "null"
9635
+ ]
9636
+ },
9637
+ reason: {
9638
+ description: "Why it was not written — present when `outcome` is `error`.",
9639
+ type: [
9640
+ "string",
9641
+ "null"
9642
+ ]
9643
+ }
9644
+ },
9645
+ required: [
9646
+ "item",
9647
+ "outcome"
9648
+ ]
9649
+ },
9650
+ BatchOutcome: {
9651
+ description: "What became of one item of a batched write.",
9652
+ oneOf: [
9653
+ {
9654
+ description: "It was written.",
9655
+ type: "string",
9656
+ const: "written"
9657
+ },
9658
+ {
9659
+ description: `Its priority guard declined: the task held a priority the guard does not name, and
9660
+ nothing of it was written.`,
9661
+ type: "string",
9662
+ const: "held"
9663
+ },
9664
+ {
9665
+ description: "The task was at another version than the one it was held to, and nothing was written.",
9666
+ type: "string",
9667
+ const: "version-moved"
9668
+ },
9669
+ {
9670
+ description: "It could not be written; `reason` says why, naming it.",
9671
+ type: "string",
9672
+ const: "error"
9673
+ }
9674
+ ]
9675
+ },
9676
+ AddedComment: {
9677
+ description: "One comment a batch wrote.",
9678
+ type: "object",
9679
+ properties: {
9680
+ id: {
9681
+ description: "Its id in the source.",
9682
+ $ref: "#/$defs/NativeId"
9683
+ },
9684
+ url: {
9685
+ description: "Where it is shown, when the source has an address for it.",
9686
+ type: [
9687
+ "string",
9688
+ "null"
9689
+ ]
9690
+ },
9691
+ version: {
9692
+ description: "Its version, as `task comments` reports one.",
9693
+ type: [
9694
+ "string",
9695
+ "null"
9696
+ ]
9697
+ }
9698
+ },
9699
+ required: [
9700
+ "id"
9701
+ ]
9702
+ },
9703
+ NativeId: {
9704
+ description: `A source's own opaque identifier for one item.
9705
+
9706
+ Deliberately unvalidated: a native id is whatever the upstream system says it
9707
+ is, colons included. The engine parses a qualified id by splitting on the
9708
+ *first* colon precisely so this stays true.`,
9709
+ type: "string"
9710
+ },
9711
+ Sanitization: {
9712
+ description: "What the screened writes of one command replaced, and what sanitise-on-refusal changed:\nthe `sanitization` member a write's answer carries when it is not empty.",
9713
+ type: "object",
9714
+ properties: {
9715
+ replaced: {
9716
+ description: "Spans the writes' own sanitisations rewrote.",
9717
+ type: "integer",
9718
+ format: "uint32",
9719
+ minimum: 0
9720
+ },
9721
+ side_effect: {
9722
+ description: "Each field or comment of an item sanitisation changed beyond the write itself.",
9723
+ type: "array",
9724
+ items: {
9725
+ $ref: "#/$defs/SideEffect"
9726
+ }
9727
+ },
9728
+ dry_run: {
9729
+ description: "Whether nothing was written, the changes only reported.",
9730
+ type: "boolean"
9731
+ }
9732
+ },
9733
+ required: [
9734
+ "replaced",
9735
+ "side_effect",
9736
+ "dry_run"
9737
+ ]
9738
+ },
9739
+ SideEffect: {
9740
+ description: "One field or comment of an item a sanitisation changed, named by screened locators.",
9741
+ type: "object",
9742
+ properties: {
9743
+ item: {
9744
+ description: "The item, by its qualified id as screened.",
9745
+ $ref: "#/$defs/Locator"
9746
+ },
9747
+ field: {
9748
+ description: "The field — `content`, `title`, `label`, `metadata:<key>` — or `comment:<id>`.",
9749
+ $ref: "#/$defs/Locator"
9750
+ }
9751
+ },
9752
+ required: [
9753
+ "item",
9754
+ "field"
9755
+ ]
9756
+ },
9757
+ Locator: {
9758
+ description: "A screened locator: the string verbatim, or its redacted form.",
9759
+ oneOf: [
9760
+ {
9761
+ type: "string"
9762
+ },
9763
+ {
9764
+ type: "object",
9765
+ properties: {
9766
+ redacted: {
9767
+ const: true
9768
+ },
9769
+ kind: {
9770
+ $ref: "#/$defs/LocatorKind"
9771
+ },
9772
+ ordinal: {
9773
+ type: "integer",
9774
+ minimum: 1
9775
+ }
9776
+ },
9777
+ required: [
9778
+ "redacted",
9779
+ "kind",
9780
+ "ordinal"
9781
+ ],
9782
+ additionalProperties: false
9783
+ }
9784
+ ]
9785
+ },
9786
+ LocatorKind: {
9787
+ description: "What a locator names.",
9788
+ oneOf: [
9789
+ {
9790
+ description: "A source name.",
9791
+ type: "string",
9792
+ const: "source"
9793
+ },
9794
+ {
9795
+ description: "An item id.",
9796
+ type: "string",
9797
+ const: "item"
9798
+ },
9799
+ {
9800
+ description: "A user-defined field name.",
9801
+ type: "string",
9802
+ const: "field"
9803
+ },
9804
+ {
9805
+ description: "A metadata key.",
9806
+ type: "string",
9807
+ const: "metadata-key"
9808
+ },
9809
+ {
9810
+ description: "A comment id.",
9811
+ type: "string",
9812
+ const: "comment"
9813
+ },
9814
+ {
9815
+ description: "A file path.",
9816
+ type: "string",
9817
+ const: "path"
9818
+ },
9819
+ {
9820
+ description: "A repository identity.",
9821
+ type: "string",
9822
+ const: "identity"
9823
+ }
9824
+ ]
9825
+ }
9826
+ }
9827
+ },
9486
9828
  CommentsSince: {
9487
9829
  $schema: "https://json-schema.org/draft/2020-12/schema",
9488
9830
  title: "CommentsSince",
@@ -10564,6 +10906,33 @@ exits \`4\`. Copying the item again once it has settled lands it.`,
10564
10906
  "action",
10565
10907
  "reason"
10566
10908
  ]
10909
+ },
10910
+ {
10911
+ description: "A dry run's item whose body is larger than its destination holds: the copy itself would\nrefuse, as `oversize`, before writing anything. The command exits `4`.",
10912
+ type: "object",
10913
+ properties: {
10914
+ size: {
10915
+ description: "The size of the body the item would store, as the destination's plugin counts it —\nwhat [`CopyOutcome::body_size`] reports beside it.",
10916
+ type: "integer",
10917
+ format: "uint64",
10918
+ minimum: 0
10919
+ },
10920
+ limit: {
10921
+ description: "The most the destination holds in one body, as its plugin states it.",
10922
+ type: "integer",
10923
+ format: "uint64",
10924
+ minimum: 0
10925
+ },
10926
+ action: {
10927
+ type: "string",
10928
+ const: "oversize"
10929
+ }
10930
+ },
10931
+ required: [
10932
+ "action",
10933
+ "size",
10934
+ "limit"
10935
+ ]
10567
10936
  }
10568
10937
  ],
10569
10938
  $defs: {
@@ -10925,6 +11294,18 @@ name — or the record itself — had landed and their headings could be address
10925
11294
  format: "uint64",
10926
11295
  minimum: 0,
10927
11296
  default: 0
11297
+ },
11298
+ body_size: {
11299
+ description: `The size of the body the destination would store for the item, in the unit its plugin
11300
+ states its limit in — the metadata slot the destination keeps and every asset reference
11301
+ rewritten to where it is served included. Present on a dry run's item whose destination
11302
+ can say, and absent on every other outcome.`,
11303
+ type: [
11304
+ "integer",
11305
+ "null"
11306
+ ],
11307
+ format: "uint64",
11308
+ minimum: 0
10928
11309
  }
10929
11310
  },
10930
11311
  required: [
@@ -11136,6 +11517,33 @@ exits \`4\`. Copying the item again once it has settled lands it.`,
11136
11517
  "action",
11137
11518
  "reason"
11138
11519
  ]
11520
+ },
11521
+ {
11522
+ description: "A dry run's item whose body is larger than its destination holds: the copy itself would\nrefuse, as `oversize`, before writing anything. The command exits `4`.",
11523
+ type: "object",
11524
+ properties: {
11525
+ size: {
11526
+ description: "The size of the body the item would store, as the destination's plugin counts it —\nwhat [`CopyOutcome::body_size`] reports beside it.",
11527
+ type: "integer",
11528
+ format: "uint64",
11529
+ minimum: 0
11530
+ },
11531
+ limit: {
11532
+ description: "The most the destination holds in one body, as its plugin states it.",
11533
+ type: "integer",
11534
+ format: "uint64",
11535
+ minimum: 0
11536
+ },
11537
+ action: {
11538
+ type: "string",
11539
+ const: "oversize"
11540
+ }
11541
+ },
11542
+ required: [
11543
+ "action",
11544
+ "size",
11545
+ "limit"
11546
+ ]
11139
11547
  }
11140
11548
  ],
11141
11549
  $defs: {
@@ -11941,6 +12349,18 @@ name — or the record itself — had landed and their headings could be address
11941
12349
  format: "uint64",
11942
12350
  minimum: 0,
11943
12351
  default: 0
12352
+ },
12353
+ body_size: {
12354
+ description: `The size of the body the destination would store for the item, in the unit its plugin
12355
+ states its limit in — the metadata slot the destination keeps and every asset reference
12356
+ rewritten to where it is served included. Present on a dry run's item whose destination
12357
+ can say, and absent on every other outcome.`,
12358
+ type: [
12359
+ "integer",
12360
+ "null"
12361
+ ],
12362
+ format: "uint64",
12363
+ minimum: 0
11944
12364
  }
11945
12365
  },
11946
12366
  required: [
@@ -12152,6 +12572,33 @@ exits \`4\`. Copying the item again once it has settled lands it.`,
12152
12572
  "action",
12153
12573
  "reason"
12154
12574
  ]
12575
+ },
12576
+ {
12577
+ description: "A dry run's item whose body is larger than its destination holds: the copy itself would\nrefuse, as `oversize`, before writing anything. The command exits `4`.",
12578
+ type: "object",
12579
+ properties: {
12580
+ size: {
12581
+ description: "The size of the body the item would store, as the destination's plugin counts it —\nwhat [`CopyOutcome::body_size`] reports beside it.",
12582
+ type: "integer",
12583
+ format: "uint64",
12584
+ minimum: 0
12585
+ },
12586
+ limit: {
12587
+ description: "The most the destination holds in one body, as its plugin states it.",
12588
+ type: "integer",
12589
+ format: "uint64",
12590
+ minimum: 0
12591
+ },
12592
+ action: {
12593
+ type: "string",
12594
+ const: "oversize"
12595
+ }
12596
+ },
12597
+ required: [
12598
+ "action",
12599
+ "size",
12600
+ "limit"
12601
+ ]
12155
12602
  }
12156
12603
  ]
12157
12604
  },
@@ -16165,6 +16612,14 @@ read included.`,
16165
16612
  type: "boolean",
16166
16613
  default: false
16167
16614
  },
16615
+ oversize: {
16616
+ description: "Every item a copy refused as `oversize` — its source id, its destination, the size of\nthe body that write would store and the most that destination holds — and absent for\nevery other failure.",
16617
+ type: "array",
16618
+ items: {
16619
+ $ref: "#/$defs/Oversized"
16620
+ },
16621
+ default: []
16622
+ },
16168
16623
  sanitization: {
16169
16624
  anyOf: [
16170
16625
  {
@@ -16557,323 +17012,977 @@ interprets none of them, which is why the budget and unit names are open vocabul
16557
17012
  "lower_bound"
16558
17013
  ]
16559
17014
  },
16560
- Sanitization: {
16561
- description: "What the screened writes of one command replaced, and what sanitise-on-refusal changed:\nthe `sanitization` member a write's answer carries when it is not empty.",
17015
+ Oversized: {
17016
+ description: "One item a copy would write whose body is larger than its destination holds.",
16562
17017
  type: "object",
16563
17018
  properties: {
16564
- replaced: {
16565
- description: "Spans the writes' own sanitisations rewrote.",
16566
- type: "integer",
16567
- format: "uint32",
16568
- minimum: 0
17019
+ source: {
17020
+ description: "The qualified id the item was read from.",
17021
+ $ref: "#/$defs/GlobalId"
16569
17022
  },
16570
- side_effect: {
16571
- description: "Each field or comment of an item sanitisation changed beyond the write itself.",
16572
- type: "array",
16573
- items: {
16574
- $ref: "#/$defs/SideEffect"
16575
- }
17023
+ destination: {
17024
+ description: "The configured source it would have been written to.",
17025
+ $ref: "#/$defs/SourceName"
16576
17026
  },
16577
- dry_run: {
16578
- description: "Whether nothing was written, the changes only reported.",
16579
- type: "boolean"
16580
- }
16581
- },
16582
- required: [
16583
- "replaced",
16584
- "side_effect",
16585
- "dry_run"
16586
- ]
16587
- },
16588
- SideEffect: {
16589
- description: "One field or comment of an item a sanitisation changed, named by screened locators.",
16590
- type: "object",
16591
- properties: {
16592
- item: {
16593
- description: "The item, by its qualified id as screened.",
16594
- $ref: "#/$defs/Locator"
17027
+ body_size: {
17028
+ description: "The size of the body that write would store, as the destination's plugin counts it.",
17029
+ type: "integer",
17030
+ format: "uint64",
17031
+ minimum: 0
16595
17032
  },
16596
- field: {
16597
- description: "The field — `content`, `title`, `label`, `metadata:<key>` — or `comment:<id>`.",
16598
- $ref: "#/$defs/Locator"
17033
+ limit: {
17034
+ description: "The most that destination holds in one body.",
17035
+ type: "integer",
17036
+ format: "uint64",
17037
+ minimum: 0
16599
17038
  }
16600
17039
  },
16601
17040
  required: [
16602
- "item",
16603
- "field"
16604
- ]
16605
- },
16606
- Locator: {
16607
- description: "A screened locator: the string verbatim, or its redacted form.",
16608
- oneOf: [
16609
- {
16610
- type: "string"
16611
- },
16612
- {
16613
- type: "object",
16614
- properties: {
16615
- redacted: {
16616
- const: true
16617
- },
16618
- kind: {
16619
- $ref: "#/$defs/LocatorKind"
16620
- },
16621
- ordinal: {
16622
- type: "integer",
16623
- minimum: 1
16624
- }
16625
- },
16626
- required: [
16627
- "redacted",
16628
- "kind",
16629
- "ordinal"
16630
- ],
16631
- additionalProperties: false
16632
- }
17041
+ "source",
17042
+ "destination",
17043
+ "body_size",
17044
+ "limit"
16633
17045
  ]
16634
17046
  },
16635
- LocatorKind: {
16636
- description: "What a locator names.",
16637
- oneOf: [
16638
- {
16639
- description: "A source name.",
16640
- type: "string",
16641
- const: "source"
16642
- },
16643
- {
16644
- description: "An item id.",
16645
- type: "string",
16646
- const: "item"
16647
- },
16648
- {
16649
- description: "A user-defined field name.",
16650
- type: "string",
16651
- const: "field"
16652
- },
16653
- {
16654
- description: "A metadata key.",
16655
- type: "string",
16656
- const: "metadata-key"
16657
- },
16658
- {
16659
- description: "A comment id.",
16660
- type: "string",
16661
- const: "comment"
16662
- },
16663
- {
16664
- description: "A file path.",
16665
- type: "string",
16666
- const: "path"
16667
- },
16668
- {
16669
- description: "A repository identity.",
16670
- type: "string",
16671
- const: "identity"
16672
- }
16673
- ]
16674
- }
16675
- }
16676
- },
16677
- GlobalId: {
16678
- $schema: "https://json-schema.org/draft/2020-12/schema",
16679
- title: "GlobalId",
16680
- description: `One item, qualified by the source it came from.
17047
+ GlobalId: {
17048
+ description: `One item, qualified by the source it came from.
16681
17049
 
16682
17050
  Rendered \`<source>:<native>\` and parsed by splitting on the **first** colon,
16683
17051
  so a native id may contain colons freely.`,
16684
- type: "string"
16685
- },
16686
- Health: {
16687
- $schema: "https://json-schema.org/draft/2020-12/schema",
16688
- title: "Health",
16689
- description: `Whether a source is answering right now.
16690
-
16691
- # Placement is an open contract question
16692
-
16693
- This type lives here because [\`TaskSource::health\`] returns it and the trait
16694
- lives here: placing it in \`onetaskgraph-core\` would make this crate depend on
16695
- the engine and invert the one direction the crate split exists to establish.
16696
- The approved contract enumerates this crate's contents exhaustively and does
16697
- not name \`Health\`, so the enumeration and the trait as written cannot both
16698
- stand. Compiling forces the placement below; the resolution — add it to the
16699
- enumeration, or redesign \`health\` so no such type crosses the boundary —
16700
- belongs to the contract's owner, not to this crate. See \`AGENTS.md\`.`,
16701
- type: "object",
16702
- properties: {
16703
- reachable: {
16704
- description: 'Whether the source answered.\n\nA bare `bool` beside an untyped `detail` cannot say that an unreachable source\nmust explain itself, or keep "reachable with a warning" apart from "reachable";\nan enum carrying the detail in its unreachable variant would.',
16705
- type: "boolean"
16706
- },
16707
- detail: {
16708
- description: "What the source said, when it said anything useful.",
16709
- type: [
16710
- "string",
16711
- "null"
16712
- ]
16713
- }
16714
- },
16715
- required: [
16716
- "reachable"
16717
- ]
16718
- },
16719
- HeldTask: {
16720
- $schema: "https://json-schema.org/draft/2020-12/schema",
16721
- title: "HeldTask",
16722
- description: `The item one source holds for an issue — a task, or a project such as a plan's home card —
16723
- as far as moving it to \`done\` needs it.
16724
-
16725
- It carries of the item exactly what the write and the rules around it need — which item and
16726
- of which kind, the card it sits at, the tasks it delivers, and what decides where its id may
16727
- be written — rather than the whole item, because the read that answers it is priced per issue
16728
- and a whole item is not what a landing's closure needs.`,
16729
- type: "object",
16730
- properties: {
16731
- id: {
16732
- description: "The item, by this source's own id for it.",
16733
- $ref: "#/$defs/NativeId"
16734
- },
16735
- kind: {
16736
- description: "Which kind of item it is. Defaulted to `task` and left out of the wire while it is one,\nso a plugin written before a project could be held answers exactly what it answered.",
16737
- $ref: "#/$defs/ItemKind",
16738
- default: "task"
16739
- },
16740
- option: {
16741
- description: `The name of the option the task's card sits at, as the source spells it, when it sits
16742
- at one.`,
16743
- type: [
16744
- "string",
16745
- "null"
16746
- ],
16747
- default: null
16748
- },
16749
- classification: {
16750
- description: "The task's own classification.",
16751
- $ref: "#/$defs/Classification",
16752
- default: "public"
16753
- },
16754
- repositories: {
16755
- description: "The repositories the task names.",
16756
- type: "array",
16757
- items: {
16758
- $ref: "#/$defs/Repository"
16759
- }
16760
- },
16761
- delivers: {
16762
- description: "The tasks it delivers, which a write of it to `done` keeps in step — always empty for a\nproject, which delivers none.",
16763
- type: "array",
16764
- items: {
16765
- $ref: "#/$defs/TaskRef"
16766
- }
16767
- }
16768
- },
16769
- required: [
16770
- "id"
16771
- ],
16772
- $defs: {
16773
- NativeId: {
16774
- description: `A source's own opaque identifier for one item.
16775
-
16776
- Deliberately unvalidated: a native id is whatever the upstream system says it
16777
- is, colons included. The engine parses a qualified id by splitting on the
16778
- *first* colon precisely so this stays true.`,
16779
- type: "string"
16780
- },
16781
- ItemKind: {
16782
- description: "The kind of work item named by a dependency endpoint.",
16783
- oneOf: [
16784
- {
16785
- description: "A task.",
16786
- type: "string",
16787
- const: "task"
16788
- },
16789
- {
16790
- description: "A project.",
16791
- type: "string",
16792
- const: "project"
16793
- }
16794
- ]
16795
- },
16796
- Classification: {
16797
- description: `Who may read an item: anybody, or only those who may read where it is kept.
16798
-
16799
- Two values, ordered so the stricter is the greater: [\`strictest\`](Self::strictest) of
16800
- any two is the one an item they both describe carries. Nothing combines them any other
16801
- way, which is what makes an explicit \`public\` unable to loosen a private repository, or
16802
- a document's private project — a classification only ever tightens. A task's project
16803
- never tightens the task.
16804
-
16805
- It is recorded on the item and travels with it. A source whose backend has no notion of
16806
- its own records it under [\`Self::METADATA_KEY\`], exactly as it records
16807
- [\`Repository::METADATA_KEY\`], and only while it is \`private\`: an item without it is
16808
- public, so every item written before this existed reads as it did.`,
16809
- oneOf: [
16810
- {
16811
- description: "Anybody who may read the destination may read it.",
16812
- type: "string",
16813
- const: "public"
16814
- },
16815
- {
16816
- description: `It may be written only to a destination verified private, and nothing of it may
16817
- reach a public one.`,
16818
- type: "string",
16819
- const: "private"
16820
- }
16821
- ]
16822
- },
16823
- Repository: {
16824
- description: "A repository identified by its normalized origin, without a URL scheme or `.git` suffix.",
16825
- type: "string"
16826
- },
16827
- TaskRef: {
16828
- description: "One task named by another task's [`Task::delivers`] or [`Task::delivered_by`].\n\nA string with one of two spellings, decided the way a [`DependencyEndpoint`] decides it:\none holding a colon is `<source>:<native>` and names a task of any source, and one\nwithout is a bare native id naming a task of the source that holds the list. So a\nnative id holding a colon cannot be named bare, exactly as it cannot in\n`onetaskgraph.depends_on`.",
16829
17052
  type: "string"
16830
- }
16831
- }
16832
- },
16833
- HumanTaskProjected: {
16834
- $schema: "https://json-schema.org/draft/2020-12/schema",
16835
- title: "HumanTaskProjected",
16836
- description: "A durable projection's bound tracker identity, suitable for a directly clickable card.",
16837
- type: "object",
16838
- properties: {
16839
- task: {
16840
- description: "The qualified task identity.",
16841
- type: "string"
16842
- },
16843
- url: {
16844
- description: "The canonical tracker issue URL.",
16845
- type: "string"
16846
- },
16847
- project: {
16848
- description: "The resolved destination project.",
16849
- type: "string"
16850
- },
16851
- source: {
16852
- description: "The resolved configured source.",
16853
- $ref: "#/$defs/SourceName"
16854
- },
16855
- sanitization: {
16856
- anyOf: [
16857
- {
16858
- $ref: "#/$defs/Sanitization"
16859
- },
16860
- {
16861
- type: "null"
16862
- }
16863
- ]
16864
- }
16865
- },
16866
- required: [
16867
- "task",
16868
- "url",
16869
- "project",
16870
- "source"
16871
- ],
16872
- $defs: {
16873
- SourceName: {
16874
- description: "The name a configuration document gives one configured source.",
16875
- type: "string",
16876
- pattern: "^[a-z0-9][a-z0-9-]*$"
17053
+ },
17054
+ Sanitization: {
17055
+ description: "What the screened writes of one command replaced, and what sanitise-on-refusal changed:\nthe `sanitization` member a write's answer carries when it is not empty.",
17056
+ type: "object",
17057
+ properties: {
17058
+ replaced: {
17059
+ description: "Spans the writes' own sanitisations rewrote.",
17060
+ type: "integer",
17061
+ format: "uint32",
17062
+ minimum: 0
17063
+ },
17064
+ side_effect: {
17065
+ description: "Each field or comment of an item sanitisation changed beyond the write itself.",
17066
+ type: "array",
17067
+ items: {
17068
+ $ref: "#/$defs/SideEffect"
17069
+ }
17070
+ },
17071
+ dry_run: {
17072
+ description: "Whether nothing was written, the changes only reported.",
17073
+ type: "boolean"
17074
+ }
17075
+ },
17076
+ required: [
17077
+ "replaced",
17078
+ "side_effect",
17079
+ "dry_run"
17080
+ ]
17081
+ },
17082
+ SideEffect: {
17083
+ description: "One field or comment of an item a sanitisation changed, named by screened locators.",
17084
+ type: "object",
17085
+ properties: {
17086
+ item: {
17087
+ description: "The item, by its qualified id as screened.",
17088
+ $ref: "#/$defs/Locator"
17089
+ },
17090
+ field: {
17091
+ description: "The field — `content`, `title`, `label`, `metadata:<key>` — or `comment:<id>`.",
17092
+ $ref: "#/$defs/Locator"
17093
+ }
17094
+ },
17095
+ required: [
17096
+ "item",
17097
+ "field"
17098
+ ]
17099
+ },
17100
+ Locator: {
17101
+ description: "A screened locator: the string verbatim, or its redacted form.",
17102
+ oneOf: [
17103
+ {
17104
+ type: "string"
17105
+ },
17106
+ {
17107
+ type: "object",
17108
+ properties: {
17109
+ redacted: {
17110
+ const: true
17111
+ },
17112
+ kind: {
17113
+ $ref: "#/$defs/LocatorKind"
17114
+ },
17115
+ ordinal: {
17116
+ type: "integer",
17117
+ minimum: 1
17118
+ }
17119
+ },
17120
+ required: [
17121
+ "redacted",
17122
+ "kind",
17123
+ "ordinal"
17124
+ ],
17125
+ additionalProperties: false
17126
+ }
17127
+ ]
17128
+ },
17129
+ LocatorKind: {
17130
+ description: "What a locator names.",
17131
+ oneOf: [
17132
+ {
17133
+ description: "A source name.",
17134
+ type: "string",
17135
+ const: "source"
17136
+ },
17137
+ {
17138
+ description: "An item id.",
17139
+ type: "string",
17140
+ const: "item"
17141
+ },
17142
+ {
17143
+ description: "A user-defined field name.",
17144
+ type: "string",
17145
+ const: "field"
17146
+ },
17147
+ {
17148
+ description: "A metadata key.",
17149
+ type: "string",
17150
+ const: "metadata-key"
17151
+ },
17152
+ {
17153
+ description: "A comment id.",
17154
+ type: "string",
17155
+ const: "comment"
17156
+ },
17157
+ {
17158
+ description: "A file path.",
17159
+ type: "string",
17160
+ const: "path"
17161
+ },
17162
+ {
17163
+ description: "A repository identity.",
17164
+ type: "string",
17165
+ const: "identity"
17166
+ }
17167
+ ]
17168
+ }
17169
+ }
17170
+ },
17171
+ FindRequest: {
17172
+ $schema: "https://json-schema.org/draft/2020-12/schema",
17173
+ title: "FindRequest",
17174
+ description: "What `task find` reads: many narrowed searches of one source.",
17175
+ type: "object",
17176
+ properties: {
17177
+ schema_version: {
17178
+ description: "`1`.",
17179
+ type: "integer",
17180
+ format: "uint32",
17181
+ minimum: 0
17182
+ },
17183
+ queries: {
17184
+ description: "The searches, each answered under its own key.",
17185
+ type: "array",
17186
+ items: {
17187
+ $ref: "#/$defs/FindQuery"
17188
+ }
17189
+ }
17190
+ },
17191
+ additionalProperties: false,
17192
+ required: [
17193
+ "schema_version",
17194
+ "queries"
17195
+ ],
17196
+ $defs: {
17197
+ FindQuery: {
17198
+ description: "One search of a [`FindRequest`]: every task matching all it names.\n\nIt must be narrowed by at least one of `text`, `metadata` and `origin`; one narrowed by none\nwould answer the whole source, and is refused naming its key.",
17199
+ type: "object",
17200
+ properties: {
17201
+ key: {
17202
+ description: `The caller's own name for this search, which its answer carries back. Unique within the
17203
+ request.`,
17204
+ type: "string"
17205
+ },
17206
+ text: {
17207
+ description: "Free text the task's title, content or either holds, as `in` says.",
17208
+ type: [
17209
+ "string",
17210
+ "null"
17211
+ ],
17212
+ default: null
17213
+ },
17214
+ in: {
17215
+ description: "Where `text` is looked for.",
17216
+ $ref: "#/$defs/FindIn",
17217
+ default: "both"
17218
+ },
17219
+ metadata: {
17220
+ description: "Caller-defined metadata values the task holds, each at `<KEY>[/<SEGMENT>…]`, as\n`task list --metadata` takes them.",
17221
+ type: "object",
17222
+ additionalProperties: {
17223
+ type: "string"
17224
+ },
17225
+ default: {}
17226
+ },
17227
+ origin: {
17228
+ description: "The qualified id the task was copied from.",
17229
+ anyOf: [
17230
+ {
17231
+ $ref: "#/$defs/GlobalId"
17232
+ },
17233
+ {
17234
+ type: "null"
17235
+ }
17236
+ ],
17237
+ default: null
17238
+ },
17239
+ status: {
17240
+ description: "The status categories to keep; empty keeps every one.",
17241
+ type: "array",
17242
+ items: {
17243
+ $ref: "#/$defs/StatusCategory"
17244
+ },
17245
+ default: []
17246
+ }
17247
+ },
17248
+ additionalProperties: false,
17249
+ required: [
17250
+ "key"
17251
+ ]
17252
+ },
17253
+ FindIn: {
17254
+ description: "Which fields a [`FindQuery`]'s text is looked for in.",
17255
+ oneOf: [
17256
+ {
17257
+ description: "Titles only.",
17258
+ type: "string",
17259
+ const: "title"
17260
+ },
17261
+ {
17262
+ description: "Contents only.",
17263
+ type: "string",
17264
+ const: "content"
17265
+ },
17266
+ {
17267
+ description: "Either.",
17268
+ type: "string",
17269
+ const: "both"
17270
+ }
17271
+ ]
17272
+ },
17273
+ GlobalId: {
17274
+ description: `One item, qualified by the source it came from.
17275
+
17276
+ Rendered \`<source>:<native>\` and parsed by splitting on the **first** colon,
17277
+ so a native id may contain colons freely.`,
17278
+ type: "string"
17279
+ },
17280
+ StatusCategory: {
17281
+ description: "The normalised status vocabulary shared across every source.",
17282
+ oneOf: [
17283
+ {
17284
+ description: "Written down but not yet committed to as work.",
17285
+ type: "string",
17286
+ const: "draft"
17287
+ },
17288
+ {
17289
+ description: "Known about, not yet accepted as ready to work.",
17290
+ type: "string",
17291
+ const: "backlog"
17292
+ },
17293
+ {
17294
+ description: "Accepted and ready to be picked up, and nothing has claimed it.",
17295
+ type: "string",
17296
+ const: "todo"
17297
+ },
17298
+ {
17299
+ description: "Claimed by work that will do it, and not yet started.",
17300
+ type: "string",
17301
+ const: "queued"
17302
+ },
17303
+ {
17304
+ description: "Being worked on.",
17305
+ type: "string",
17306
+ const: "in-progress"
17307
+ },
17308
+ {
17309
+ description: "Finished.",
17310
+ type: "string",
17311
+ const: "done"
17312
+ },
17313
+ {
17314
+ description: "Abandoned.",
17315
+ type: "string",
17316
+ const: "cancelled"
17317
+ },
17318
+ {
17319
+ description: "The source reported a status this vocabulary cannot place.",
17320
+ type: "string",
17321
+ const: "unknown"
17322
+ }
17323
+ ]
17324
+ }
17325
+ }
17326
+ },
17327
+ FoundTasks: {
17328
+ $schema: "https://json-schema.org/draft/2020-12/schema",
17329
+ title: "FoundTasks",
17330
+ description: "What `task find` answers: one answer per search, in the order asked.",
17331
+ type: "object",
17332
+ properties: {
17333
+ schema_version: {
17334
+ description: "`1`.",
17335
+ type: "integer",
17336
+ format: "uint32",
17337
+ minimum: 0
17338
+ },
17339
+ answers: {
17340
+ description: "One per search.",
17341
+ type: "array",
17342
+ items: {
17343
+ $ref: "#/$defs/FindAnswer"
17344
+ }
17345
+ }
17346
+ },
17347
+ required: [
17348
+ "schema_version",
17349
+ "answers"
17350
+ ],
17351
+ $defs: {
17352
+ FindAnswer: {
17353
+ description: "What one search of a [`FindRequest`] found.",
17354
+ type: "object",
17355
+ properties: {
17356
+ key: {
17357
+ description: "The search's key.",
17358
+ type: "string"
17359
+ },
17360
+ items: {
17361
+ description: "Every task it matched, across every page, each as `task list` reports it.",
17362
+ type: "array",
17363
+ items: {
17364
+ $ref: "#/$defs/Qualified"
17365
+ }
17366
+ },
17367
+ complete: {
17368
+ description: "Whether `items` is every match: `false` when a page of this search could not be read,\nand `items` holds what the pages before it answered.",
17369
+ type: "boolean"
17370
+ },
17371
+ reason: {
17372
+ description: "Why the answer is incomplete, naming the page refused — `null` when it is complete.",
17373
+ type: [
17374
+ "string",
17375
+ "null"
17376
+ ]
17377
+ }
17378
+ },
17379
+ required: [
17380
+ "key",
17381
+ "items",
17382
+ "complete"
17383
+ ]
17384
+ },
17385
+ Qualified: {
17386
+ description: `One item, under the qualified id the engine addresses it by.
17387
+
17388
+ A plugin only ever deals in its own [\`NativeId\`]; qualifying one is the engine's job,
17389
+ so this type is the engine's and a plugin never constructs one.`,
17390
+ type: "object",
17391
+ properties: {
17392
+ id: {
17393
+ description: "`<source>:<native>`, the form a user types back at the command line.",
17394
+ $ref: "#/$defs/GlobalId"
17395
+ },
17396
+ item: {
17397
+ description: "The item as its source reported it, unchanged.",
17398
+ $ref: "#/$defs/Task"
17399
+ }
17400
+ },
17401
+ required: [
17402
+ "id",
17403
+ "item"
17404
+ ]
17405
+ },
17406
+ GlobalId: {
17407
+ description: `One item, qualified by the source it came from.
17408
+
17409
+ Rendered \`<source>:<native>\` and parsed by splitting on the **first** colon,
17410
+ so a native id may contain colons freely.`,
17411
+ type: "string"
17412
+ },
17413
+ Task: {
17414
+ description: "One unit of work as a source reports it.",
17415
+ type: "object",
17416
+ properties: {
17417
+ id: {
17418
+ description: "The source's own opaque identifier.",
17419
+ $ref: "#/$defs/NativeId"
17420
+ },
17421
+ key: {
17422
+ description: "The short handle the backend shows people, beside [`id`](Self::id) and never\ninstead of it — a Linear issue's `ENG-123`, a GitHub issue's `1043`.\n\n**It is human-facing and it may change.** A Linear issue moved between teams gets a\nnew identifier and a GitHub issue transferred between repositories gets a new\nnumber, so nothing stores this in place of [`id`](Self::id) and nothing matches on\nit: `id` is what everything stores and matches on, and this is what a person says\nout loud.\n\nAbsent by default, so a source that predates this field — and every source with no\nseparate handle of its own — reads as `None`, which means *this backend has no\nshort handle for this task* rather than *the handle is the id*. A source never\ncopies [`id`](Self::id) here.\n\n**Read-only.** A source derives it on a read and never stores one it is handed: a\ntask arriving on an [`ItemWrite`](crate::ItemWrite) may still hold its source's key,\nand a destination ignores it.",
17423
+ type: [
17424
+ "string",
17425
+ "null"
17426
+ ],
17427
+ default: null
17428
+ },
17429
+ title: {
17430
+ description: "The one-line summary a user recognises the task by.",
17431
+ type: "string"
17432
+ },
17433
+ content: {
17434
+ description: "The long-form body, when the source has one.",
17435
+ type: [
17436
+ "string",
17437
+ "null"
17438
+ ]
17439
+ },
17440
+ status: {
17441
+ description: "The source's status, normalised and preserved.",
17442
+ $ref: "#/$defs/Status"
17443
+ },
17444
+ priority: {
17445
+ description: "The task's priority; `none` means none is set, and a source that cannot hold one\nreports `none`.\n\nDefaulted when a document omits it, so a task written before this field existed —\nand every task of a plugin that predates it — reads as [`Priority::None`]. Always\nwritten, so a reader never has to tell an absent member from a `none` one. Whether a\nsource can hold one at all is [`Capabilities::priority`](crate::Capabilities::priority),\nand the engine never hands a source declaring it cannot a priority other than `none`.",
17446
+ $ref: "#/$defs/Priority",
17447
+ default: "none"
17448
+ },
17449
+ labels: {
17450
+ description: "Inline rather than by id: a source returning a task already knows them.",
17451
+ type: "array",
17452
+ items: {
17453
+ $ref: "#/$defs/Label"
17454
+ }
17455
+ },
17456
+ project: {
17457
+ description: "`None` is a first-class case — an orphan task — not an edge case.",
17458
+ anyOf: [
17459
+ {
17460
+ $ref: "#/$defs/NativeId"
17461
+ },
17462
+ {
17463
+ type: "null"
17464
+ }
17465
+ ]
17466
+ },
17467
+ url: {
17468
+ description: "Where a human can open this task.",
17469
+ type: [
17470
+ "string",
17471
+ "null"
17472
+ ]
17473
+ },
17474
+ location: {
17475
+ description: "Where this task is, when the source says (see [`Location`]).\n\nAbsent by default, so a source that predates this field — and every source that\nsimply does not say — reads as `None`, which means *the source did not say where\nthis is* rather than *this is nowhere*. It neither replaces nor derives from\n[`url`](Self::url), which goes on meaning exactly what it always did.",
17476
+ anyOf: [
17477
+ {
17478
+ $ref: "#/$defs/Location"
17479
+ },
17480
+ {
17481
+ type: "null"
17482
+ }
17483
+ ],
17484
+ default: null
17485
+ },
17486
+ created_at: {
17487
+ description: "When the source says the task was created.",
17488
+ type: [
17489
+ "string",
17490
+ "null"
17491
+ ],
17492
+ format: "date-time"
17493
+ },
17494
+ updated_at: {
17495
+ description: "When the source says the task last changed.",
17496
+ type: [
17497
+ "string",
17498
+ "null"
17499
+ ],
17500
+ format: "date-time"
17501
+ },
17502
+ metadata: {
17503
+ description: "Caller-defined attributes, preserving their JSON types.\n\nKeys are free-form, with two reserved prefixes: `onetaskgraph.` belongs to this\nproduct — [`Repository::METADATA_KEY`] and [`DependencyEdge::RECORDED_KEY`] are\nthe two every source honours, and [`ItemKind::METADATA_KEY`] is one plugin's —\nand `onepipeline.` belongs to that consumer. Every other key is the caller's, and\na source returns it exactly as it holds it.",
17504
+ type: "object",
17505
+ additionalProperties: true,
17506
+ default: {}
17507
+ },
17508
+ repositories: {
17509
+ description: `Normalized repository origins this task concerns, in source order and without
17510
+ repeats.`,
17511
+ type: "array",
17512
+ items: {
17513
+ $ref: "#/$defs/Repository"
17514
+ },
17515
+ default: []
17516
+ },
17517
+ delivers: {
17518
+ description: `The tasks this one delivers: finishing this task finishes them.
17519
+
17520
+ Each entry is a [\`TaskRef\`] — \`<source>:<native>\` names a task of any source, and a
17521
+ bare native id names a task of the source holding this one — with no repeats and
17522
+ never this task itself. Empty by default, and left out of the wire when empty, so a
17523
+ reader written before the field existed reads exactly what it read before.`,
17524
+ type: "array",
17525
+ items: {
17526
+ $ref: "#/$defs/TaskRef"
17527
+ },
17528
+ default: []
17529
+ },
17530
+ delivered_by: {
17531
+ description: "Every task that delivers this one, by qualified id: the reverse of [`Self::delivers`].\n\n**Owned by the store, not by a source record and not by a copy.** The engine keeps it\nin step whenever it writes a task's `delivers`, through\n[`TaskSource::set_delivered_by`](crate::TaskSource::set_delivered_by); a source holds\nand reports it, and a copy keeps the destination's own rather than taking the\nsource's. Empty by default and left out of the wire when empty, as `delivers` is.",
17532
+ type: "array",
17533
+ items: {
17534
+ $ref: "#/$defs/TaskRef"
17535
+ },
17536
+ default: []
17537
+ },
17538
+ version: {
17539
+ description: `The task's change token: an opaque value its source gives so a reader can tell whether
17540
+ the task changed without reading it whole.
17541
+
17542
+ **Two equal versions of one task from one source mean nothing in it has changed** — its
17543
+ title, body, status, priority, labels, project fields, metadata, edges and comments,
17544
+ comments added, edited and deleted included. A source that cannot promise all of that
17545
+ for a task leaves this absent, which means *always read it*. What each plugin keys its
17546
+ token on, and which change kinds it covers, is stated per plugin in
17547
+ \`docs/plugin-protocol.md\` §4.13d.
17548
+
17549
+ Opaque to every caller: nothing compares one but for equality, and the one reader that
17550
+ looks inside is the source that gave it, through
17551
+ [\`TaskSource::order_versions\`](crate::TaskSource::order_versions). Absent by default and left out of the wire when absent, so a source written
17552
+ before it existed is read as giving none.
17553
+
17554
+ **Read-only.** A source derives it on a read and never stores one it is handed: a task
17555
+ arriving on an [\`ItemWrite\`](crate::ItemWrite) may still hold its source's token, and a
17556
+ destination ignores it.`,
17557
+ type: [
17558
+ "string",
17559
+ "null"
17560
+ ]
17561
+ },
17562
+ classification: {
17563
+ description: `Who may read this task, as it was declared (see [\`Classification\`]).
17564
+
17565
+ Defaulted and left out of the wire while \`public\`, so a task written before this
17566
+ field existed reads as public and a reader written before it reads what it always
17567
+ read. It is the *declared* classification: the engine tightens it by the task's own
17568
+ repositories — any private or unknown one makes the task private — before it decides
17569
+ where the task may be written, and nothing written here can loosen that. The project
17570
+ a task is filed under never tightens it: a task's visibility is its own.`,
17571
+ $ref: "#/$defs/Classification",
17572
+ default: "public"
17573
+ }
17574
+ },
17575
+ required: [
17576
+ "id",
17577
+ "title",
17578
+ "status",
17579
+ "labels"
17580
+ ]
17581
+ },
17582
+ NativeId: {
17583
+ description: `A source's own opaque identifier for one item.
17584
+
17585
+ Deliberately unvalidated: a native id is whatever the upstream system says it
17586
+ is, colons included. The engine parses a qualified id by splitting on the
17587
+ *first* colon precisely so this stays true.`,
17588
+ type: "string"
17589
+ },
17590
+ Status: {
17591
+ description: `A source's status, kept in both normalised and original form.
17592
+
17593
+ \`category\` is what every filter compares against; \`name\` is the source's own
17594
+ wording, preserved so display never flattens "In Review" into "In Progress".`,
17595
+ type: "object",
17596
+ properties: {
17597
+ category: {
17598
+ description: "The normalised value filters compare against.",
17599
+ $ref: "#/$defs/StatusCategory"
17600
+ },
17601
+ name: {
17602
+ description: "The source's own label for this status.",
17603
+ type: "string"
17604
+ }
17605
+ },
17606
+ required: [
17607
+ "category",
17608
+ "name"
17609
+ ]
17610
+ },
17611
+ StatusCategory: {
17612
+ description: "The normalised status vocabulary shared across every source.",
17613
+ oneOf: [
17614
+ {
17615
+ description: "Written down but not yet committed to as work.",
17616
+ type: "string",
17617
+ const: "draft"
17618
+ },
17619
+ {
17620
+ description: "Known about, not yet accepted as ready to work.",
17621
+ type: "string",
17622
+ const: "backlog"
17623
+ },
17624
+ {
17625
+ description: "Accepted and ready to be picked up, and nothing has claimed it.",
17626
+ type: "string",
17627
+ const: "todo"
17628
+ },
17629
+ {
17630
+ description: "Claimed by work that will do it, and not yet started.",
17631
+ type: "string",
17632
+ const: "queued"
17633
+ },
17634
+ {
17635
+ description: "Being worked on.",
17636
+ type: "string",
17637
+ const: "in-progress"
17638
+ },
17639
+ {
17640
+ description: "Finished.",
17641
+ type: "string",
17642
+ const: "done"
17643
+ },
17644
+ {
17645
+ description: "Abandoned.",
17646
+ type: "string",
17647
+ const: "cancelled"
17648
+ },
17649
+ {
17650
+ description: "The source reported a status this vocabulary cannot place.",
17651
+ type: "string",
17652
+ const: "unknown"
17653
+ }
17654
+ ]
17655
+ },
17656
+ Priority: {
17657
+ description: `How much a task matters, in the one vocabulary every source is normalised into.
17658
+
17659
+ Five values, most pressing first after [\`None\`](Self::None): Linear's own priority has
17660
+ exactly these, and a source whose backend has none of its own maps its representation
17661
+ onto them. \`none\` is a value rather than an absent field, because "no priority is set" is
17662
+ something a person sets — writing \`none\` clears a priority — and a reader tells it apart
17663
+ from nothing by the value alone.`,
17664
+ oneOf: [
17665
+ {
17666
+ description: "No priority is set.",
17667
+ type: "string",
17668
+ const: "none"
17669
+ },
17670
+ {
17671
+ description: "Drop everything for it.",
17672
+ type: "string",
17673
+ const: "urgent"
17674
+ },
17675
+ {
17676
+ description: "Next, before the rest.",
17677
+ type: "string",
17678
+ const: "high"
17679
+ },
17680
+ {
17681
+ description: "In its turn.",
17682
+ type: "string",
17683
+ const: "medium"
17684
+ },
17685
+ {
17686
+ description: "When there is nothing more pressing.",
17687
+ type: "string",
17688
+ const: "low"
17689
+ }
17690
+ ]
17691
+ },
17692
+ Label: {
17693
+ description: "A tag a source attaches to work.",
17694
+ type: "object",
17695
+ properties: {
17696
+ id: {
17697
+ description: "The source's own opaque identifier.",
17698
+ $ref: "#/$defs/NativeId"
17699
+ },
17700
+ name: {
17701
+ description: "What a user filtering across sources actually types.",
17702
+ type: "string"
17703
+ },
17704
+ color: {
17705
+ description: "The source's own colour for the label, when it has one.",
17706
+ type: [
17707
+ "string",
17708
+ "null"
17709
+ ]
17710
+ }
17711
+ },
17712
+ required: [
17713
+ "id",
17714
+ "name"
17715
+ ]
17716
+ },
17717
+ Location: {
17718
+ description: 'Where an entity is, in the one form a consumer can act on without knowing the backend.\n\nExternally tagged with exactly two variants, so the JSON is `{"url": "https://…"}` or\n`{"path": "/home/…"}` and a consumer tells them apart by which key is present. A reader\nhanded one of these knows what to *do* with it — open a link, or print a path and read\nthe file out — which is what a bare string could not have said.\n\nIt carries no third case on purpose. `None` on the field is the third case, and it\nmeans the source did not say where the entity is, which is not the same as saying it is\nnowhere.\n\nThis does **not** redefine, replace or derive from the `url` field of [`Task`],\n[`Project`] or [`Document`]: a source that reports a web URL there goes on reporting\nit, and every existing consumer sees exactly what it saw.',
17719
+ oneOf: [
17720
+ {
17721
+ description: "The entity lives at an external website, and this is a link a reader can open.",
17722
+ type: "object",
17723
+ properties: {
17724
+ url: {
17725
+ type: "string"
17726
+ }
17727
+ },
17728
+ required: [
17729
+ "url"
17730
+ ],
17731
+ additionalProperties: false
17732
+ },
17733
+ {
17734
+ description: `The entity is a file on the machine the source runs on, and this is that file's
17735
+ absolute path, so a reader can print the path or read the contents out.`,
17736
+ type: "object",
17737
+ properties: {
17738
+ path: {
17739
+ type: "string"
17740
+ }
17741
+ },
17742
+ required: [
17743
+ "path"
17744
+ ],
17745
+ additionalProperties: false
17746
+ }
17747
+ ]
17748
+ },
17749
+ Repository: {
17750
+ description: "A repository identified by its normalized origin, without a URL scheme or `.git` suffix.",
17751
+ type: "string"
17752
+ },
17753
+ TaskRef: {
17754
+ description: "One task named by another task's [`Task::delivers`] or [`Task::delivered_by`].\n\nA string with one of two spellings, decided the way a [`DependencyEndpoint`] decides it:\none holding a colon is `<source>:<native>` and names a task of any source, and one\nwithout is a bare native id naming a task of the source that holds the list. So a\nnative id holding a colon cannot be named bare, exactly as it cannot in\n`onetaskgraph.depends_on`.",
17755
+ type: "string"
17756
+ },
17757
+ Classification: {
17758
+ description: `Who may read an item: anybody, or only those who may read where it is kept.
17759
+
17760
+ Two values, ordered so the stricter is the greater: [\`strictest\`](Self::strictest) of
17761
+ any two is the one an item they both describe carries. Nothing combines them any other
17762
+ way, which is what makes an explicit \`public\` unable to loosen a private repository, or
17763
+ a document's private project — a classification only ever tightens. A task's project
17764
+ never tightens the task.
17765
+
17766
+ It is recorded on the item and travels with it. A source whose backend has no notion of
17767
+ its own records it under [\`Self::METADATA_KEY\`], exactly as it records
17768
+ [\`Repository::METADATA_KEY\`], and only while it is \`private\`: an item without it is
17769
+ public, so every item written before this existed reads as it did.`,
17770
+ oneOf: [
17771
+ {
17772
+ description: "Anybody who may read the destination may read it.",
17773
+ type: "string",
17774
+ const: "public"
17775
+ },
17776
+ {
17777
+ description: `It may be written only to a destination verified private, and nothing of it may
17778
+ reach a public one.`,
17779
+ type: "string",
17780
+ const: "private"
17781
+ }
17782
+ ]
17783
+ }
17784
+ }
17785
+ },
17786
+ GlobalId: {
17787
+ $schema: "https://json-schema.org/draft/2020-12/schema",
17788
+ title: "GlobalId",
17789
+ description: `One item, qualified by the source it came from.
17790
+
17791
+ Rendered \`<source>:<native>\` and parsed by splitting on the **first** colon,
17792
+ so a native id may contain colons freely.`,
17793
+ type: "string"
17794
+ },
17795
+ Health: {
17796
+ $schema: "https://json-schema.org/draft/2020-12/schema",
17797
+ title: "Health",
17798
+ description: `Whether a source is answering right now.
17799
+
17800
+ # Placement is an open contract question
17801
+
17802
+ This type lives here because [\`TaskSource::health\`] returns it and the trait
17803
+ lives here: placing it in \`onetaskgraph-core\` would make this crate depend on
17804
+ the engine and invert the one direction the crate split exists to establish.
17805
+ The approved contract enumerates this crate's contents exhaustively and does
17806
+ not name \`Health\`, so the enumeration and the trait as written cannot both
17807
+ stand. Compiling forces the placement below; the resolution — add it to the
17808
+ enumeration, or redesign \`health\` so no such type crosses the boundary —
17809
+ belongs to the contract's owner, not to this crate. See \`AGENTS.md\`.`,
17810
+ type: "object",
17811
+ properties: {
17812
+ reachable: {
17813
+ description: 'Whether the source answered.\n\nA bare `bool` beside an untyped `detail` cannot say that an unreachable source\nmust explain itself, or keep "reachable with a warning" apart from "reachable";\nan enum carrying the detail in its unreachable variant would.',
17814
+ type: "boolean"
17815
+ },
17816
+ detail: {
17817
+ description: "What the source said, when it said anything useful.",
17818
+ type: [
17819
+ "string",
17820
+ "null"
17821
+ ]
17822
+ }
17823
+ },
17824
+ required: [
17825
+ "reachable"
17826
+ ]
17827
+ },
17828
+ HeldTask: {
17829
+ $schema: "https://json-schema.org/draft/2020-12/schema",
17830
+ title: "HeldTask",
17831
+ description: `The item one source holds for an issue — a task, or a project such as a plan's home card —
17832
+ as far as moving it to \`done\` needs it.
17833
+
17834
+ It carries of the item exactly what the write and the rules around it need — which item and
17835
+ of which kind, the card it sits at, the tasks it delivers, and what decides where its id may
17836
+ be written — rather than the whole item, because the read that answers it is priced per issue
17837
+ and a whole item is not what a landing's closure needs.`,
17838
+ type: "object",
17839
+ properties: {
17840
+ id: {
17841
+ description: "The item, by this source's own id for it.",
17842
+ $ref: "#/$defs/NativeId"
17843
+ },
17844
+ kind: {
17845
+ description: "Which kind of item it is. Defaulted to `task` and left out of the wire while it is one,\nso a plugin written before a project could be held answers exactly what it answered.",
17846
+ $ref: "#/$defs/ItemKind",
17847
+ default: "task"
17848
+ },
17849
+ option: {
17850
+ description: `The name of the option the task's card sits at, as the source spells it, when it sits
17851
+ at one.`,
17852
+ type: [
17853
+ "string",
17854
+ "null"
17855
+ ],
17856
+ default: null
17857
+ },
17858
+ classification: {
17859
+ description: "The task's own classification.",
17860
+ $ref: "#/$defs/Classification",
17861
+ default: "public"
17862
+ },
17863
+ repositories: {
17864
+ description: "The repositories the task names.",
17865
+ type: "array",
17866
+ items: {
17867
+ $ref: "#/$defs/Repository"
17868
+ }
17869
+ },
17870
+ delivers: {
17871
+ description: "The tasks it delivers, which a write of it to `done` keeps in step — always empty for a\nproject, which delivers none.",
17872
+ type: "array",
17873
+ items: {
17874
+ $ref: "#/$defs/TaskRef"
17875
+ }
17876
+ }
17877
+ },
17878
+ required: [
17879
+ "id"
17880
+ ],
17881
+ $defs: {
17882
+ NativeId: {
17883
+ description: `A source's own opaque identifier for one item.
17884
+
17885
+ Deliberately unvalidated: a native id is whatever the upstream system says it
17886
+ is, colons included. The engine parses a qualified id by splitting on the
17887
+ *first* colon precisely so this stays true.`,
17888
+ type: "string"
17889
+ },
17890
+ ItemKind: {
17891
+ description: "The kind of work item named by a dependency endpoint.",
17892
+ oneOf: [
17893
+ {
17894
+ description: "A task.",
17895
+ type: "string",
17896
+ const: "task"
17897
+ },
17898
+ {
17899
+ description: "A project.",
17900
+ type: "string",
17901
+ const: "project"
17902
+ }
17903
+ ]
17904
+ },
17905
+ Classification: {
17906
+ description: `Who may read an item: anybody, or only those who may read where it is kept.
17907
+
17908
+ Two values, ordered so the stricter is the greater: [\`strictest\`](Self::strictest) of
17909
+ any two is the one an item they both describe carries. Nothing combines them any other
17910
+ way, which is what makes an explicit \`public\` unable to loosen a private repository, or
17911
+ a document's private project — a classification only ever tightens. A task's project
17912
+ never tightens the task.
17913
+
17914
+ It is recorded on the item and travels with it. A source whose backend has no notion of
17915
+ its own records it under [\`Self::METADATA_KEY\`], exactly as it records
17916
+ [\`Repository::METADATA_KEY\`], and only while it is \`private\`: an item without it is
17917
+ public, so every item written before this existed reads as it did.`,
17918
+ oneOf: [
17919
+ {
17920
+ description: "Anybody who may read the destination may read it.",
17921
+ type: "string",
17922
+ const: "public"
17923
+ },
17924
+ {
17925
+ description: `It may be written only to a destination verified private, and nothing of it may
17926
+ reach a public one.`,
17927
+ type: "string",
17928
+ const: "private"
17929
+ }
17930
+ ]
17931
+ },
17932
+ Repository: {
17933
+ description: "A repository identified by its normalized origin, without a URL scheme or `.git` suffix.",
17934
+ type: "string"
17935
+ },
17936
+ TaskRef: {
17937
+ description: "One task named by another task's [`Task::delivers`] or [`Task::delivered_by`].\n\nA string with one of two spellings, decided the way a [`DependencyEndpoint`] decides it:\none holding a colon is `<source>:<native>` and names a task of any source, and one\nwithout is a bare native id naming a task of the source that holds the list. So a\nnative id holding a colon cannot be named bare, exactly as it cannot in\n`onetaskgraph.depends_on`.",
17938
+ type: "string"
17939
+ }
17940
+ }
17941
+ },
17942
+ HumanTaskProjected: {
17943
+ $schema: "https://json-schema.org/draft/2020-12/schema",
17944
+ title: "HumanTaskProjected",
17945
+ description: "A durable projection's bound tracker identity, suitable for a directly clickable card.",
17946
+ type: "object",
17947
+ properties: {
17948
+ task: {
17949
+ description: "The qualified task identity.",
17950
+ type: "string"
17951
+ },
17952
+ url: {
17953
+ description: "The canonical tracker issue URL.",
17954
+ type: "string"
17955
+ },
17956
+ project: {
17957
+ description: "The resolved destination project.",
17958
+ type: "string"
17959
+ },
17960
+ source: {
17961
+ description: "The resolved configured source.",
17962
+ $ref: "#/$defs/SourceName"
17963
+ },
17964
+ sanitization: {
17965
+ anyOf: [
17966
+ {
17967
+ $ref: "#/$defs/Sanitization"
17968
+ },
17969
+ {
17970
+ type: "null"
17971
+ }
17972
+ ]
17973
+ }
17974
+ },
17975
+ required: [
17976
+ "task",
17977
+ "url",
17978
+ "project",
17979
+ "source"
17980
+ ],
17981
+ $defs: {
17982
+ SourceName: {
17983
+ description: "The name a configuration document gives one configured source.",
17984
+ type: "string",
17985
+ pattern: "^[a-z0-9][a-z0-9-]*$"
16877
17986
  },
16878
17987
  Sanitization: {
16879
17988
  description: "What the screened writes of one command replaced, and what sanitise-on-refusal changed:\nthe `sanitization` member a write's answer carries when it is not empty.",
@@ -39196,6 +40305,17 @@ update wrote no status, and for a task with no projection.`,
39196
40305
  }
39197
40306
  ]
39198
40307
  },
40308
+ guard: {
40309
+ description: "What `--when-priority` found the task's priority at, and whether the update was written\nor held — absent for an update given no priority guard.",
40310
+ anyOf: [
40311
+ {
40312
+ $ref: "#/$defs/PriorityGuard"
40313
+ },
40314
+ {
40315
+ type: "null"
40316
+ }
40317
+ ]
40318
+ },
39199
40319
  sanitization: {
39200
40320
  anyOf: [
39201
40321
  {
@@ -40029,6 +41149,286 @@ Never sent again: doing so could apply it twice.`,
40029
41149
  "reason"
40030
41150
  ]
40031
41151
  },
41152
+ PriorityGuard: {
41153
+ description: "What a write guarded by the priority its task holds came to: whether it was `written` or\n`held`, and the condition that decided it. Made only from the condition — read back off the\nwire too, whatever `outcome` it was written with — so the outcome is always the one its\n`met` says, and never stands without it.",
41154
+ type: "object",
41155
+ properties: {
41156
+ outcome: {
41157
+ description: "`written` when the task held a priority the guard names, and `held` when it did not —\nabsent for a write made without the guard.",
41158
+ anyOf: [
41159
+ {
41160
+ $ref: "#/$defs/GuardOutcome"
41161
+ },
41162
+ {
41163
+ type: "null"
41164
+ }
41165
+ ],
41166
+ default: null
41167
+ },
41168
+ priority_condition: {
41169
+ description: "What the guard found the task's priority at before the write, and whether that is one it\nnames — the shape `task copy --when-destination-priority` reports — absent for a write\nmade without the guard.",
41170
+ anyOf: [
41171
+ {
41172
+ $ref: "#/$defs/PriorityCondition"
41173
+ },
41174
+ {
41175
+ type: "null"
41176
+ }
41177
+ ],
41178
+ default: null
41179
+ }
41180
+ }
41181
+ },
41182
+ GuardOutcome: {
41183
+ description: "What a write guarded by a condition on the item's own value came to.",
41184
+ oneOf: [
41185
+ {
41186
+ description: "The item held a value the guard names, and the write was made.",
41187
+ type: "string",
41188
+ const: "written"
41189
+ },
41190
+ {
41191
+ description: "The item held a value the guard does not name, and nothing was written.",
41192
+ type: "string",
41193
+ const: "held"
41194
+ }
41195
+ ]
41196
+ },
41197
+ PriorityCondition: {
41198
+ description: "What a guarded copy found a counterpart's priority at, and whether that met the condition.",
41199
+ type: "object",
41200
+ properties: {
41201
+ held: {
41202
+ description: "The counterpart's priority, as the copy's own pre-write read held it.",
41203
+ $ref: "#/$defs/Priority"
41204
+ },
41205
+ met: {
41206
+ description: "Whether that priority is one the condition names.",
41207
+ type: "boolean"
41208
+ }
41209
+ },
41210
+ required: [
41211
+ "held",
41212
+ "met"
41213
+ ]
41214
+ },
41215
+ Sanitization: {
41216
+ description: "What the screened writes of one command replaced, and what sanitise-on-refusal changed:\nthe `sanitization` member a write's answer carries when it is not empty.",
41217
+ type: "object",
41218
+ properties: {
41219
+ replaced: {
41220
+ description: "Spans the writes' own sanitisations rewrote.",
41221
+ type: "integer",
41222
+ format: "uint32",
41223
+ minimum: 0
41224
+ },
41225
+ side_effect: {
41226
+ description: "Each field or comment of an item sanitisation changed beyond the write itself.",
41227
+ type: "array",
41228
+ items: {
41229
+ $ref: "#/$defs/SideEffect"
41230
+ }
41231
+ },
41232
+ dry_run: {
41233
+ description: "Whether nothing was written, the changes only reported.",
41234
+ type: "boolean"
41235
+ }
41236
+ },
41237
+ required: [
41238
+ "replaced",
41239
+ "side_effect",
41240
+ "dry_run"
41241
+ ]
41242
+ },
41243
+ SideEffect: {
41244
+ description: "One field or comment of an item a sanitisation changed, named by screened locators.",
41245
+ type: "object",
41246
+ properties: {
41247
+ item: {
41248
+ description: "The item, by its qualified id as screened.",
41249
+ $ref: "#/$defs/Locator"
41250
+ },
41251
+ field: {
41252
+ description: "The field — `content`, `title`, `label`, `metadata:<key>` — or `comment:<id>`.",
41253
+ $ref: "#/$defs/Locator"
41254
+ }
41255
+ },
41256
+ required: [
41257
+ "item",
41258
+ "field"
41259
+ ]
41260
+ },
41261
+ Locator: {
41262
+ description: "A screened locator: the string verbatim, or its redacted form.",
41263
+ oneOf: [
41264
+ {
41265
+ type: "string"
41266
+ },
41267
+ {
41268
+ type: "object",
41269
+ properties: {
41270
+ redacted: {
41271
+ const: true
41272
+ },
41273
+ kind: {
41274
+ $ref: "#/$defs/LocatorKind"
41275
+ },
41276
+ ordinal: {
41277
+ type: "integer",
41278
+ minimum: 1
41279
+ }
41280
+ },
41281
+ required: [
41282
+ "redacted",
41283
+ "kind",
41284
+ "ordinal"
41285
+ ],
41286
+ additionalProperties: false
41287
+ }
41288
+ ]
41289
+ },
41290
+ LocatorKind: {
41291
+ description: "What a locator names.",
41292
+ oneOf: [
41293
+ {
41294
+ description: "A source name.",
41295
+ type: "string",
41296
+ const: "source"
41297
+ },
41298
+ {
41299
+ description: "An item id.",
41300
+ type: "string",
41301
+ const: "item"
41302
+ },
41303
+ {
41304
+ description: "A user-defined field name.",
41305
+ type: "string",
41306
+ const: "field"
41307
+ },
41308
+ {
41309
+ description: "A metadata key.",
41310
+ type: "string",
41311
+ const: "metadata-key"
41312
+ },
41313
+ {
41314
+ description: "A comment id.",
41315
+ type: "string",
41316
+ const: "comment"
41317
+ },
41318
+ {
41319
+ description: "A file path.",
41320
+ type: "string",
41321
+ const: "path"
41322
+ },
41323
+ {
41324
+ description: "A repository identity.",
41325
+ type: "string",
41326
+ const: "identity"
41327
+ }
41328
+ ]
41329
+ }
41330
+ }
41331
+ },
41332
+ TasksUpdated: {
41333
+ $schema: "https://json-schema.org/draft/2020-12/schema",
41334
+ title: "TasksUpdated",
41335
+ description: "What `task update-many` answers: one result per update, in the order given.",
41336
+ type: "object",
41337
+ properties: {
41338
+ schema_version: {
41339
+ description: "`1`.",
41340
+ type: "integer",
41341
+ format: "uint32",
41342
+ minimum: 0
41343
+ },
41344
+ results: {
41345
+ description: "One per update.",
41346
+ type: "array",
41347
+ items: {
41348
+ $ref: "#/$defs/UpdateResult"
41349
+ }
41350
+ },
41351
+ sanitization: {
41352
+ anyOf: [
41353
+ {
41354
+ $ref: "#/$defs/Sanitization"
41355
+ },
41356
+ {
41357
+ type: "null"
41358
+ }
41359
+ ]
41360
+ }
41361
+ },
41362
+ required: [
41363
+ "schema_version",
41364
+ "results"
41365
+ ],
41366
+ $defs: {
41367
+ UpdateResult: {
41368
+ description: "What became of one update of an [`UpdateBatch`].",
41369
+ type: "object",
41370
+ properties: {
41371
+ item: {
41372
+ description: "The item as the batch named it.",
41373
+ type: "string"
41374
+ },
41375
+ outcome: {
41376
+ description: "What became of it.",
41377
+ $ref: "#/$defs/BatchOutcome"
41378
+ },
41379
+ version: {
41380
+ description: "The task's version after the write — present when `outcome` is `written` and the\nwrite's own answers determine it, as `task update`'s `result.version` is.",
41381
+ type: [
41382
+ "string",
41383
+ "null"
41384
+ ]
41385
+ },
41386
+ current_version: {
41387
+ description: "The version the task is at — present when `outcome` is `version-moved` and the source\ncan name it, which it cannot just after another write of this batch moved the task.",
41388
+ type: [
41389
+ "string",
41390
+ "null"
41391
+ ]
41392
+ },
41393
+ reason: {
41394
+ description: "Why it is answered `error` — present when `outcome` is `error`: that it was not written,\nor that it was and keeping the tasks it delivers in step then failed.",
41395
+ type: [
41396
+ "string",
41397
+ "null"
41398
+ ]
41399
+ }
41400
+ },
41401
+ required: [
41402
+ "item",
41403
+ "outcome"
41404
+ ]
41405
+ },
41406
+ BatchOutcome: {
41407
+ description: "What became of one item of a batched write.",
41408
+ oneOf: [
41409
+ {
41410
+ description: "It was written.",
41411
+ type: "string",
41412
+ const: "written"
41413
+ },
41414
+ {
41415
+ description: `Its priority guard declined: the task held a priority the guard does not name, and
41416
+ nothing of it was written.`,
41417
+ type: "string",
41418
+ const: "held"
41419
+ },
41420
+ {
41421
+ description: "The task was at another version than the one it was held to, and nothing was written.",
41422
+ type: "string",
41423
+ const: "version-moved"
41424
+ },
41425
+ {
41426
+ description: "It could not be written; `reason` says why, naming it.",
41427
+ type: "string",
41428
+ const: "error"
41429
+ }
41430
+ ]
41431
+ },
40032
41432
  Sanitization: {
40033
41433
  description: "What the screened writes of one command replaced, and what sanitise-on-refusal changed:\nthe `sanitization` member a write's answer carries when it is not empty.",
40034
41434
  type: "object",
@@ -40451,6 +41851,214 @@ no insignificant whitespace, UTF-8.`,
40451
41851
  }
40452
41852
  ]
40453
41853
  },
41854
+ UpdateBatch: {
41855
+ $schema: "https://json-schema.org/draft/2020-12/schema",
41856
+ title: "UpdateBatch",
41857
+ description: "What `task update-many` reads: many held updates of tasks of one source.",
41858
+ type: "object",
41859
+ properties: {
41860
+ schema_version: {
41861
+ description: "`1`.",
41862
+ type: "integer",
41863
+ format: "uint32",
41864
+ minimum: 0
41865
+ },
41866
+ updates: {
41867
+ description: "The updates, each one held write of every field it names.",
41868
+ type: "array",
41869
+ items: {
41870
+ $ref: "#/$defs/UpdateBatchItem"
41871
+ }
41872
+ }
41873
+ },
41874
+ additionalProperties: false,
41875
+ required: [
41876
+ "schema_version",
41877
+ "updates"
41878
+ ],
41879
+ $defs: {
41880
+ UpdateBatchItem: {
41881
+ description: "One update of an [`UpdateBatch`]: every field it names, written together in one held write,\nand nothing else. Every member but `item` is optional.",
41882
+ type: "object",
41883
+ properties: {
41884
+ item: {
41885
+ description: "The task's qualified id, `<source>:<native-id>`, of the source the batch names.",
41886
+ type: "string"
41887
+ },
41888
+ if_version: {
41889
+ description: "The version the task must be at for anything to be written.",
41890
+ type: [
41891
+ "string",
41892
+ "null"
41893
+ ],
41894
+ default: null
41895
+ },
41896
+ title: {
41897
+ description: "Its title.",
41898
+ type: [
41899
+ "string",
41900
+ "null"
41901
+ ],
41902
+ default: null
41903
+ },
41904
+ body: {
41905
+ description: "Its content, replaced whole.",
41906
+ type: [
41907
+ "string",
41908
+ "null"
41909
+ ],
41910
+ default: null
41911
+ },
41912
+ status: {
41913
+ description: "Its status category.",
41914
+ anyOf: [
41915
+ {
41916
+ $ref: "#/$defs/StatusCategory"
41917
+ },
41918
+ {
41919
+ type: "null"
41920
+ }
41921
+ ],
41922
+ default: null
41923
+ },
41924
+ priority: {
41925
+ description: "Its priority; `none` clears it.",
41926
+ anyOf: [
41927
+ {
41928
+ $ref: "#/$defs/Priority"
41929
+ },
41930
+ {
41931
+ type: "null"
41932
+ }
41933
+ ],
41934
+ default: null
41935
+ },
41936
+ when_priority: {
41937
+ description: "Write only while the task holds one of these priorities — `none` for a task with none.\nAt any other, nothing of the update is written and it answers `held`. Empty sets no\nguard.",
41938
+ type: "array",
41939
+ items: {
41940
+ $ref: "#/$defs/Priority"
41941
+ },
41942
+ default: []
41943
+ },
41944
+ metadata: {
41945
+ description: "Caller-owned metadata keys set, each to one JSON value; every other key is kept.",
41946
+ type: "object",
41947
+ additionalProperties: true,
41948
+ default: {}
41949
+ },
41950
+ remove_metadata: {
41951
+ description: "Caller-owned metadata keys removed.",
41952
+ type: "array",
41953
+ items: {
41954
+ type: "string"
41955
+ },
41956
+ default: []
41957
+ },
41958
+ repositories: {
41959
+ description: "Its repositories, replaced whole; an empty list clears them.",
41960
+ type: [
41961
+ "array",
41962
+ "null"
41963
+ ],
41964
+ items: {
41965
+ $ref: "#/$defs/Repository"
41966
+ },
41967
+ default: null
41968
+ }
41969
+ },
41970
+ additionalProperties: false,
41971
+ required: [
41972
+ "item"
41973
+ ]
41974
+ },
41975
+ StatusCategory: {
41976
+ description: "The normalised status vocabulary shared across every source.",
41977
+ oneOf: [
41978
+ {
41979
+ description: "Written down but not yet committed to as work.",
41980
+ type: "string",
41981
+ const: "draft"
41982
+ },
41983
+ {
41984
+ description: "Known about, not yet accepted as ready to work.",
41985
+ type: "string",
41986
+ const: "backlog"
41987
+ },
41988
+ {
41989
+ description: "Accepted and ready to be picked up, and nothing has claimed it.",
41990
+ type: "string",
41991
+ const: "todo"
41992
+ },
41993
+ {
41994
+ description: "Claimed by work that will do it, and not yet started.",
41995
+ type: "string",
41996
+ const: "queued"
41997
+ },
41998
+ {
41999
+ description: "Being worked on.",
42000
+ type: "string",
42001
+ const: "in-progress"
42002
+ },
42003
+ {
42004
+ description: "Finished.",
42005
+ type: "string",
42006
+ const: "done"
42007
+ },
42008
+ {
42009
+ description: "Abandoned.",
42010
+ type: "string",
42011
+ const: "cancelled"
42012
+ },
42013
+ {
42014
+ description: "The source reported a status this vocabulary cannot place.",
42015
+ type: "string",
42016
+ const: "unknown"
42017
+ }
42018
+ ]
42019
+ },
42020
+ Priority: {
42021
+ description: `How much a task matters, in the one vocabulary every source is normalised into.
42022
+
42023
+ Five values, most pressing first after [\`None\`](Self::None): Linear's own priority has
42024
+ exactly these, and a source whose backend has none of its own maps its representation
42025
+ onto them. \`none\` is a value rather than an absent field, because "no priority is set" is
42026
+ something a person sets — writing \`none\` clears a priority — and a reader tells it apart
42027
+ from nothing by the value alone.`,
42028
+ oneOf: [
42029
+ {
42030
+ description: "No priority is set.",
42031
+ type: "string",
42032
+ const: "none"
42033
+ },
42034
+ {
42035
+ description: "Drop everything for it.",
42036
+ type: "string",
42037
+ const: "urgent"
42038
+ },
42039
+ {
42040
+ description: "Next, before the rest.",
42041
+ type: "string",
42042
+ const: "high"
42043
+ },
42044
+ {
42045
+ description: "In its turn.",
42046
+ type: "string",
42047
+ const: "medium"
42048
+ },
42049
+ {
42050
+ description: "When there is nothing more pressing.",
42051
+ type: "string",
42052
+ const: "low"
42053
+ }
42054
+ ]
42055
+ },
42056
+ Repository: {
42057
+ description: "A repository identified by its normalized origin, without a URL scheme or `.git` suffix.",
42058
+ type: "string"
42059
+ }
42060
+ }
42061
+ },
40454
42062
  UpdatedField: {
40455
42063
  $schema: "https://json-schema.org/draft/2020-12/schema",
40456
42064
  title: "UpdatedField",
@@ -41422,6 +43030,9 @@ var commandResponseRoots = {
41422
43030
  "task attest": "Attested",
41423
43031
  "task attestation check": "AttestationCheck",
41424
43032
  "task update": "TaskUpdated",
43033
+ "task find": "FoundTasks",
43034
+ "task update-many": "TasksUpdated",
43035
+ "task comment add-many": "CommentsAdded",
41425
43036
  "project list": "QueryResponseOfQualifiedProject",
41426
43037
  "project show": "QueryResponseOfQualifiedProject",
41427
43038
  "project deps": "QueryResponseOfQualifiedEdge",
@@ -41458,7 +43069,7 @@ var commandAlternateRoots = {
41458
43069
  "project attestation check": ["ProjectAttestationCheck"],
41459
43070
  "project create": ["PlannedProject"]
41460
43071
  };
41461
- var partialResponseCommands = new Set(Object.keys(commandResponseRoots).filter((command) => command !== "config show" && command !== "cache clear" && command !== "sources list" && command !== "sources fields" && command !== "sources route" && command !== "sources sanitize" && command !== "project graph" && !command.startsWith("task comment ") && !command.endsWith(" metadata set") && !command.endsWith(" priority set") && !command.endsWith(" content set") && !command.startsWith("template ") && !command.endsWith(" render") && !command.endsWith(" answers") && command !== "task assets" && command !== "task project-human" && !command.endsWith(" attest") && !command.endsWith(" attestation check") && command !== "project create" && command !== "document create"));
43072
+ var partialResponseCommands = new Set(Object.keys(commandResponseRoots).filter((command) => command !== "config show" && command !== "cache clear" && command !== "sources list" && command !== "sources fields" && command !== "sources route" && command !== "sources sanitize" && command !== "project graph" && (!command.startsWith("task comment ") || command === "task comment add-many") && !command.endsWith(" metadata set") && !command.endsWith(" priority set") && !command.endsWith(" content set") && !command.startsWith("template ") && !command.endsWith(" render") && !command.endsWith(" answers") && command !== "task assets" && command !== "task project-human" && !command.endsWith(" attest") && !command.endsWith(" attestation check") && command !== "project create" && command !== "document create"));
41462
43073
  function bodyArguments(options) {
41463
43074
  return "bodyFile" in options ? { args: ["--body-file", options.bodyFile] } : { args: [], input: options.body };
41464
43075
  }
@@ -41591,6 +43202,7 @@ var taskUpdateOptionFlags = {
41591
43202
  sanitizeDryRun: "--sanitize-dry-run",
41592
43203
  expect: "--expect",
41593
43204
  ifVersion: "--if-version",
43205
+ whenPriority: "--when-priority",
41594
43206
  repositories: "--repository"
41595
43207
  };
41596
43208
  function stringOption(method, name, value) {
@@ -41646,6 +43258,9 @@ function taskUpdateFlags(options) {
41646
43258
  for (const origin of origins)
41647
43259
  args.push("--repository", origin);
41648
43260
  }
43261
+ for (const priority of stringList(method, "whenPriority", options.whenPriority)) {
43262
+ args.push("--when-priority", priority);
43263
+ }
41649
43264
  args.push(...writePolicyFlags(method, options));
41650
43265
  return args;
41651
43266
  }
@@ -41908,13 +43523,21 @@ function taskCopyFlags(options) {
41908
43523
  ...options.create ? ["--create"] : [],
41909
43524
  ...options.targetTask === undefined ? [] : ["--target-task", stringOption("taskCopy", "targetTask", options.targetTask)],
41910
43525
  ...expectFlags("taskCopy", options),
41911
- ...options.ifVersion === undefined ? [] : ["--if-version", stringOption("taskCopy", "ifVersion", options.ifVersion)]
43526
+ ...typeof options.ifVersion === "string" ? ["--if-version", options.ifVersion] : stringList("taskCopy", "ifVersion", options.ifVersion).flatMap((held) => [
43527
+ "--if-version",
43528
+ held
43529
+ ])
41912
43530
  ];
41913
43531
  }
41914
43532
  function projectCopyFlags(options) {
41915
43533
  const args = copyFlags("projectCopy", options);
41916
43534
  if (options.noTasks)
41917
43535
  args.push("--no-tasks");
43536
+ if (options.documents !== undefined && typeof options.documents !== "boolean") {
43537
+ throw new TypeError("projectCopy: documents must be a boolean");
43538
+ }
43539
+ if (options.documents === true)
43540
+ args.push("--documents");
41918
43541
  for (const member of options.members ?? [])
41919
43542
  args.push("--member", member);
41920
43543
  if (options.membersOnly !== undefined && typeof options.membersOnly !== "boolean") {
@@ -42340,6 +43963,15 @@ class OnetaskgraphClient {
42340
43963
  taskAssets(id, outputDir) {
42341
43964
  return this.run("task assets", [id, "--output-dir", outputDir]);
42342
43965
  }
43966
+ taskFind(source, request) {
43967
+ return this.run("task find", [source, "--queries", "-"], jsonDocument(request, "taskFind", "request"));
43968
+ }
43969
+ taskUpdateMany(source, batch, options = {}) {
43970
+ return this.run("task update-many", [source, "--input", "-", ...writePolicyFlags("taskUpdateMany", options)], jsonDocument(batch, "taskUpdateMany", "batch"));
43971
+ }
43972
+ taskCommentAddMany(source, batch, options = {}) {
43973
+ return this.run("task comment add-many", [source, "--input", "-", ...writePolicyFlags("taskCommentAddMany", options)], jsonDocument(batch, "taskCommentAddMany", "batch"));
43974
+ }
42343
43975
  taskProjectHuman(input) {
42344
43976
  return this.run("task project-human", [
42345
43977
  "--input",
@@ -42443,7 +44075,7 @@ function assertCompleteCommandSurface() {
42443
44075
  }
42444
44076
 
42445
44077
  // src/index.ts
42446
- var VERSION = "0.14.11";
44078
+ var VERSION = "0.14.12";
42447
44079
  export {
42448
44080
  taskUpdateOptionFlags,
42449
44081
  taskUpdateFlags,