@onetaskgraph/sdk 0.14.10 → 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,13 +7157,18 @@ 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",
7164
7167
  "task priority set",
7165
7168
  "task content set",
7166
7169
  "task metadata set",
7170
+ "task attest",
7171
+ "task attestation check",
7167
7172
  "task update",
7168
7173
  "task create",
7169
7174
  "task render",
@@ -7176,6 +7181,8 @@ var binaryCommands = [
7176
7181
  "project graph",
7177
7182
  "project copy",
7178
7183
  "project metadata set",
7184
+ "project attest",
7185
+ "project attestation check",
7179
7186
  "project status set",
7180
7187
  "project create",
7181
7188
  "project render",
@@ -7184,6 +7191,8 @@ var binaryCommands = [
7184
7191
  "document show",
7185
7192
  "document copy",
7186
7193
  "document metadata set",
7194
+ "document attest",
7195
+ "document attestation check",
7187
7196
  "document create",
7188
7197
  "document render",
7189
7198
  "document answers",
@@ -7195,7 +7204,7 @@ var binaryCommands = [
7195
7204
  ];
7196
7205
 
7197
7206
  // src/generated/models.ts
7198
- var SCHEMA_BUNDLE_VERSION = 58;
7207
+ var SCHEMA_BUNDLE_VERSION = 61;
7199
7208
 
7200
7209
  // src/generated/schemas.ts
7201
7210
  var runtimeSchemas = {
@@ -7560,6 +7569,495 @@ is, colons included. The engine parses a qualified id by splitting on the
7560
7569
  }
7561
7570
  }
7562
7571
  },
7572
+ Attestation: {
7573
+ $schema: "https://json-schema.org/draft/2020-12/schema",
7574
+ title: "Attestation",
7575
+ description: `One attestation: who cleared the item's authored content, when, which content and against
7576
+ which bar.`,
7577
+ type: "object",
7578
+ properties: {
7579
+ kind: {
7580
+ description: "The kind of attestation this is; the key it is held under.",
7581
+ $ref: "#/$defs/AttestationKind"
7582
+ },
7583
+ by: {
7584
+ description: "Who attested, as the caller labels them.",
7585
+ $ref: "#/$defs/AttestationLabel"
7586
+ },
7587
+ at: {
7588
+ description: "When it was recorded, in RFC 3339 to the second.",
7589
+ type: "string",
7590
+ format: "date-time"
7591
+ },
7592
+ content_digest: {
7593
+ description: `The digest of the item's authored content when it was recorded, computed by the store
7594
+ (see the module's documentation).`,
7595
+ $ref: "#/$defs/Sha256Digest"
7596
+ },
7597
+ bar: {
7598
+ description: "The fingerprint of the bar the content was cleared against, as the caller gave it.",
7599
+ $ref: "#/$defs/AttestationLabel"
7600
+ },
7601
+ note: {
7602
+ description: "What the attester added, when they added anything.",
7603
+ anyOf: [
7604
+ {
7605
+ $ref: "#/$defs/AttestationNote"
7606
+ },
7607
+ {
7608
+ type: "null"
7609
+ }
7610
+ ]
7611
+ },
7612
+ excludes: {
7613
+ description: "The caller-owned metadata keys left out of `content_digest`, sorted; empty when none\nwere.",
7614
+ type: "array",
7615
+ items: {
7616
+ $ref: "#/$defs/MetadataKey"
7617
+ },
7618
+ default: []
7619
+ }
7620
+ },
7621
+ required: [
7622
+ "kind",
7623
+ "by",
7624
+ "at",
7625
+ "content_digest",
7626
+ "bar"
7627
+ ],
7628
+ $defs: {
7629
+ AttestationKind: {
7630
+ description: "One kind of attestation, such as `plan-review` or `design-approval`: one to 200 letters,\ndigits, `.`, `_` or `-`.",
7631
+ type: "string"
7632
+ },
7633
+ AttestationLabel: {
7634
+ description: "Who attested, or the fingerprint of a bar: one line of one to 200 characters, not blank.",
7635
+ type: "string"
7636
+ },
7637
+ Sha256Digest: {
7638
+ description: "`sha256:` and 64 lowercase hex digits.",
7639
+ type: "string",
7640
+ pattern: "^sha256:[0-9a-f]{64}$"
7641
+ },
7642
+ AttestationNote: {
7643
+ description: "What an attester adds: text of any length and any number of lines, not blank.",
7644
+ type: "string"
7645
+ },
7646
+ MetadataKey: {
7647
+ description: "One caller-owned metadata key: `<namespace>.<name>`, at least two non-empty segments\nseparated by dots, whose first segment is not [`MetadataKey::RESERVED_NAMESPACE`].\n\nValidated wherever one is built, deserialized included, so a plugin handed one never has\nto ask whether it names a key this product owns.",
7648
+ type: "string"
7649
+ }
7650
+ }
7651
+ },
7652
+ AttestationCheck: {
7653
+ $schema: "https://json-schema.org/draft/2020-12/schema",
7654
+ title: "AttestationCheck",
7655
+ description: "What `attestation check` answers: one kind on one item.\n\nEvery member is always written, `reason` and `record` as `null` when they have nothing to\nsay.",
7656
+ type: "object",
7657
+ properties: {
7658
+ kind: {
7659
+ description: "The kind asked about.",
7660
+ $ref: "#/$defs/AttestationKind"
7661
+ },
7662
+ state: {
7663
+ description: "What the check found.",
7664
+ $ref: "#/$defs/AttestationState"
7665
+ },
7666
+ reason: {
7667
+ description: "Why the record is void: `null` unless `state` is `void`.",
7668
+ anyOf: [
7669
+ {
7670
+ $ref: "#/$defs/VoidReason"
7671
+ },
7672
+ {
7673
+ type: "null"
7674
+ }
7675
+ ]
7676
+ },
7677
+ record: {
7678
+ description: "The record of the kind the item holds, or `null` when it holds none.",
7679
+ anyOf: [
7680
+ {
7681
+ $ref: "#/$defs/Attestation"
7682
+ },
7683
+ {
7684
+ type: "null"
7685
+ }
7686
+ ]
7687
+ }
7688
+ },
7689
+ required: [
7690
+ "kind",
7691
+ "state"
7692
+ ],
7693
+ $defs: {
7694
+ AttestationKind: {
7695
+ description: "One kind of attestation, such as `plan-review` or `design-approval`: one to 200 letters,\ndigits, `.`, `_` or `-`.",
7696
+ type: "string"
7697
+ },
7698
+ AttestationState: {
7699
+ description: "What a check of one kind of attestation found.",
7700
+ oneOf: [
7701
+ {
7702
+ description: `A record of the kind is there, the item's authored content is the content it cleared,
7703
+ and the bar asked about, when one was, is the bar it cleared it against.`,
7704
+ type: "string",
7705
+ const: "valid"
7706
+ },
7707
+ {
7708
+ description: "A record of the kind is there and no longer holds: `reason` says why.",
7709
+ type: "string",
7710
+ const: "void"
7711
+ },
7712
+ {
7713
+ description: "The item holds no record of the kind.",
7714
+ type: "string",
7715
+ const: "absent"
7716
+ }
7717
+ ]
7718
+ },
7719
+ VoidReason: {
7720
+ description: "Why a record of an attestation no longer holds.",
7721
+ oneOf: [
7722
+ {
7723
+ description: "The item's authored content is not the content the record cleared.",
7724
+ type: "string",
7725
+ const: "content-moved"
7726
+ },
7727
+ {
7728
+ description: "The bar asked about is not the bar the record cleared the content against.",
7729
+ type: "string",
7730
+ const: "bar-moved"
7731
+ }
7732
+ ]
7733
+ },
7734
+ Attestation: {
7735
+ description: `One attestation: who cleared the item's authored content, when, which content and against
7736
+ which bar.`,
7737
+ type: "object",
7738
+ properties: {
7739
+ kind: {
7740
+ description: "The kind of attestation this is; the key it is held under.",
7741
+ $ref: "#/$defs/AttestationKind"
7742
+ },
7743
+ by: {
7744
+ description: "Who attested, as the caller labels them.",
7745
+ $ref: "#/$defs/AttestationLabel"
7746
+ },
7747
+ at: {
7748
+ description: "When it was recorded, in RFC 3339 to the second.",
7749
+ type: "string",
7750
+ format: "date-time"
7751
+ },
7752
+ content_digest: {
7753
+ description: `The digest of the item's authored content when it was recorded, computed by the store
7754
+ (see the module's documentation).`,
7755
+ $ref: "#/$defs/Sha256Digest"
7756
+ },
7757
+ bar: {
7758
+ description: "The fingerprint of the bar the content was cleared against, as the caller gave it.",
7759
+ $ref: "#/$defs/AttestationLabel"
7760
+ },
7761
+ note: {
7762
+ description: "What the attester added, when they added anything.",
7763
+ anyOf: [
7764
+ {
7765
+ $ref: "#/$defs/AttestationNote"
7766
+ },
7767
+ {
7768
+ type: "null"
7769
+ }
7770
+ ]
7771
+ },
7772
+ excludes: {
7773
+ description: "The caller-owned metadata keys left out of `content_digest`, sorted; empty when none\nwere.",
7774
+ type: "array",
7775
+ items: {
7776
+ $ref: "#/$defs/MetadataKey"
7777
+ },
7778
+ default: []
7779
+ }
7780
+ },
7781
+ required: [
7782
+ "kind",
7783
+ "by",
7784
+ "at",
7785
+ "content_digest",
7786
+ "bar"
7787
+ ]
7788
+ },
7789
+ AttestationLabel: {
7790
+ description: "Who attested, or the fingerprint of a bar: one line of one to 200 characters, not blank.",
7791
+ type: "string"
7792
+ },
7793
+ Sha256Digest: {
7794
+ description: "`sha256:` and 64 lowercase hex digits.",
7795
+ type: "string",
7796
+ pattern: "^sha256:[0-9a-f]{64}$"
7797
+ },
7798
+ AttestationNote: {
7799
+ description: "What an attester adds: text of any length and any number of lines, not blank.",
7800
+ type: "string"
7801
+ },
7802
+ MetadataKey: {
7803
+ description: "One caller-owned metadata key: `<namespace>.<name>`, at least two non-empty segments\nseparated by dots, whose first segment is not [`MetadataKey::RESERVED_NAMESPACE`].\n\nValidated wherever one is built, deserialized included, so a plugin handed one never has\nto ask whether it names a key this product owns.",
7804
+ type: "string"
7805
+ }
7806
+ }
7807
+ },
7808
+ AttestationState: {
7809
+ $schema: "https://json-schema.org/draft/2020-12/schema",
7810
+ title: "AttestationState",
7811
+ description: "What a check of one kind of attestation found.",
7812
+ oneOf: [
7813
+ {
7814
+ description: `A record of the kind is there, the item's authored content is the content it cleared,
7815
+ and the bar asked about, when one was, is the bar it cleared it against.`,
7816
+ type: "string",
7817
+ const: "valid"
7818
+ },
7819
+ {
7820
+ description: "A record of the kind is there and no longer holds: `reason` says why.",
7821
+ type: "string",
7822
+ const: "void"
7823
+ },
7824
+ {
7825
+ description: "The item holds no record of the kind.",
7826
+ type: "string",
7827
+ const: "absent"
7828
+ }
7829
+ ]
7830
+ },
7831
+ Attested: {
7832
+ $schema: "https://json-schema.org/draft/2020-12/schema",
7833
+ title: "Attested",
7834
+ description: "What `attest` answers: the record it wrote, on the item it wrote it to.",
7835
+ type: "object",
7836
+ properties: {
7837
+ id: {
7838
+ description: "The item, by qualified id.",
7839
+ $ref: "#/$defs/GlobalId"
7840
+ },
7841
+ record: {
7842
+ description: "The record as the source holds it after the write.",
7843
+ $ref: "#/$defs/Attestation"
7844
+ },
7845
+ sanitization: {
7846
+ anyOf: [
7847
+ {
7848
+ $ref: "#/$defs/Sanitization"
7849
+ },
7850
+ {
7851
+ type: "null"
7852
+ }
7853
+ ]
7854
+ }
7855
+ },
7856
+ required: [
7857
+ "id",
7858
+ "record"
7859
+ ],
7860
+ $defs: {
7861
+ GlobalId: {
7862
+ description: `One item, qualified by the source it came from.
7863
+
7864
+ Rendered \`<source>:<native>\` and parsed by splitting on the **first** colon,
7865
+ so a native id may contain colons freely.`,
7866
+ type: "string"
7867
+ },
7868
+ Attestation: {
7869
+ description: `One attestation: who cleared the item's authored content, when, which content and against
7870
+ which bar.`,
7871
+ type: "object",
7872
+ properties: {
7873
+ kind: {
7874
+ description: "The kind of attestation this is; the key it is held under.",
7875
+ $ref: "#/$defs/AttestationKind"
7876
+ },
7877
+ by: {
7878
+ description: "Who attested, as the caller labels them.",
7879
+ $ref: "#/$defs/AttestationLabel"
7880
+ },
7881
+ at: {
7882
+ description: "When it was recorded, in RFC 3339 to the second.",
7883
+ type: "string",
7884
+ format: "date-time"
7885
+ },
7886
+ content_digest: {
7887
+ description: `The digest of the item's authored content when it was recorded, computed by the store
7888
+ (see the module's documentation).`,
7889
+ $ref: "#/$defs/Sha256Digest"
7890
+ },
7891
+ bar: {
7892
+ description: "The fingerprint of the bar the content was cleared against, as the caller gave it.",
7893
+ $ref: "#/$defs/AttestationLabel"
7894
+ },
7895
+ note: {
7896
+ description: "What the attester added, when they added anything.",
7897
+ anyOf: [
7898
+ {
7899
+ $ref: "#/$defs/AttestationNote"
7900
+ },
7901
+ {
7902
+ type: "null"
7903
+ }
7904
+ ]
7905
+ },
7906
+ excludes: {
7907
+ description: "The caller-owned metadata keys left out of `content_digest`, sorted; empty when none\nwere.",
7908
+ type: "array",
7909
+ items: {
7910
+ $ref: "#/$defs/MetadataKey"
7911
+ },
7912
+ default: []
7913
+ }
7914
+ },
7915
+ required: [
7916
+ "kind",
7917
+ "by",
7918
+ "at",
7919
+ "content_digest",
7920
+ "bar"
7921
+ ]
7922
+ },
7923
+ AttestationKind: {
7924
+ description: "One kind of attestation, such as `plan-review` or `design-approval`: one to 200 letters,\ndigits, `.`, `_` or `-`.",
7925
+ type: "string"
7926
+ },
7927
+ AttestationLabel: {
7928
+ description: "Who attested, or the fingerprint of a bar: one line of one to 200 characters, not blank.",
7929
+ type: "string"
7930
+ },
7931
+ Sha256Digest: {
7932
+ description: "`sha256:` and 64 lowercase hex digits.",
7933
+ type: "string",
7934
+ pattern: "^sha256:[0-9a-f]{64}$"
7935
+ },
7936
+ AttestationNote: {
7937
+ description: "What an attester adds: text of any length and any number of lines, not blank.",
7938
+ type: "string"
7939
+ },
7940
+ MetadataKey: {
7941
+ description: "One caller-owned metadata key: `<namespace>.<name>`, at least two non-empty segments\nseparated by dots, whose first segment is not [`MetadataKey::RESERVED_NAMESPACE`].\n\nValidated wherever one is built, deserialized included, so a plugin handed one never has\nto ask whether it names a key this product owns.",
7942
+ type: "string"
7943
+ },
7944
+ Sanitization: {
7945
+ 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.",
7946
+ type: "object",
7947
+ properties: {
7948
+ replaced: {
7949
+ description: "Spans the writes' own sanitisations rewrote.",
7950
+ type: "integer",
7951
+ format: "uint32",
7952
+ minimum: 0
7953
+ },
7954
+ side_effect: {
7955
+ description: "Each field or comment of an item sanitisation changed beyond the write itself.",
7956
+ type: "array",
7957
+ items: {
7958
+ $ref: "#/$defs/SideEffect"
7959
+ }
7960
+ },
7961
+ dry_run: {
7962
+ description: "Whether nothing was written, the changes only reported.",
7963
+ type: "boolean"
7964
+ }
7965
+ },
7966
+ required: [
7967
+ "replaced",
7968
+ "side_effect",
7969
+ "dry_run"
7970
+ ]
7971
+ },
7972
+ SideEffect: {
7973
+ description: "One field or comment of an item a sanitisation changed, named by screened locators.",
7974
+ type: "object",
7975
+ properties: {
7976
+ item: {
7977
+ description: "The item, by its qualified id as screened.",
7978
+ $ref: "#/$defs/Locator"
7979
+ },
7980
+ field: {
7981
+ description: "The field — `content`, `title`, `label`, `metadata:<key>` — or `comment:<id>`.",
7982
+ $ref: "#/$defs/Locator"
7983
+ }
7984
+ },
7985
+ required: [
7986
+ "item",
7987
+ "field"
7988
+ ]
7989
+ },
7990
+ Locator: {
7991
+ description: "A screened locator: the string verbatim, or its redacted form.",
7992
+ oneOf: [
7993
+ {
7994
+ type: "string"
7995
+ },
7996
+ {
7997
+ type: "object",
7998
+ properties: {
7999
+ redacted: {
8000
+ const: true
8001
+ },
8002
+ kind: {
8003
+ $ref: "#/$defs/LocatorKind"
8004
+ },
8005
+ ordinal: {
8006
+ type: "integer",
8007
+ minimum: 1
8008
+ }
8009
+ },
8010
+ required: [
8011
+ "redacted",
8012
+ "kind",
8013
+ "ordinal"
8014
+ ],
8015
+ additionalProperties: false
8016
+ }
8017
+ ]
8018
+ },
8019
+ LocatorKind: {
8020
+ description: "What a locator names.",
8021
+ oneOf: [
8022
+ {
8023
+ description: "A source name.",
8024
+ type: "string",
8025
+ const: "source"
8026
+ },
8027
+ {
8028
+ description: "An item id.",
8029
+ type: "string",
8030
+ const: "item"
8031
+ },
8032
+ {
8033
+ description: "A user-defined field name.",
8034
+ type: "string",
8035
+ const: "field"
8036
+ },
8037
+ {
8038
+ description: "A metadata key.",
8039
+ type: "string",
8040
+ const: "metadata-key"
8041
+ },
8042
+ {
8043
+ description: "A comment id.",
8044
+ type: "string",
8045
+ const: "comment"
8046
+ },
8047
+ {
8048
+ description: "A file path.",
8049
+ type: "string",
8050
+ const: "path"
8051
+ },
8052
+ {
8053
+ description: "A repository identity.",
8054
+ type: "string",
8055
+ const: "identity"
8056
+ }
8057
+ ]
8058
+ }
8059
+ }
8060
+ },
7563
8061
  AuthorKind: {
7564
8062
  $schema: "https://json-schema.org/draft/2020-12/schema",
7565
8063
  title: "AuthorKind",
@@ -7585,6 +8083,34 @@ say. Decided by the plugin, through
7585
8083
  }
7586
8084
  ]
7587
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
+ },
7588
8114
  CacheCleared: {
7589
8115
  $schema: "https://json-schema.org/draft/2020-12/schema",
7590
8116
  title: "CacheCleared",
@@ -8183,6 +8709,61 @@ say. Decided by the plugin, through
8183
8709
  }
8184
8710
  }
8185
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
+ },
8186
8767
  CommentList: {
8187
8768
  $schema: "https://json-schema.org/draft/2020-12/schema",
8188
8769
  title: "CommentList",
@@ -8988,6 +9569,262 @@ interprets none of them, which is why the budget and unit names are open vocabul
8988
9569
  }
8989
9570
  }
8990
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
+ },
8991
9828
  CommentsSince: {
8992
9829
  $schema: "https://json-schema.org/draft/2020-12/schema",
8993
9830
  title: "CommentsSince",
@@ -10069,6 +10906,33 @@ exits \`4\`. Copying the item again once it has settled lands it.`,
10069
10906
  "action",
10070
10907
  "reason"
10071
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
+ ]
10072
10936
  }
10073
10937
  ],
10074
10938
  $defs: {
@@ -10430,6 +11294,18 @@ name — or the record itself — had landed and their headings could be address
10430
11294
  format: "uint64",
10431
11295
  minimum: 0,
10432
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
10433
11309
  }
10434
11310
  },
10435
11311
  required: [
@@ -10641,6 +11517,33 @@ exits \`4\`. Copying the item again once it has settled lands it.`,
10641
11517
  "action",
10642
11518
  "reason"
10643
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
+ ]
10644
11547
  }
10645
11548
  ],
10646
11549
  $defs: {
@@ -11446,6 +12349,18 @@ name — or the record itself — had landed and their headings could be address
11446
12349
  format: "uint64",
11447
12350
  minimum: 0,
11448
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
11449
12364
  }
11450
12365
  },
11451
12366
  required: [
@@ -11657,6 +12572,33 @@ exits \`4\`. Copying the item again once it has settled lands it.`,
11657
12572
  "action",
11658
12573
  "reason"
11659
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
+ ]
11660
12602
  }
11661
12603
  ]
11662
12604
  },
@@ -15670,6 +16612,14 @@ read included.`,
15670
16612
  type: "boolean",
15671
16613
  default: false
15672
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
+ },
15673
16623
  sanitization: {
15674
16624
  anyOf: [
15675
16625
  {
@@ -16062,6 +17012,45 @@ interprets none of them, which is why the budget and unit names are open vocabul
16062
17012
  "lower_bound"
16063
17013
  ]
16064
17014
  },
17015
+ Oversized: {
17016
+ description: "One item a copy would write whose body is larger than its destination holds.",
17017
+ type: "object",
17018
+ properties: {
17019
+ source: {
17020
+ description: "The qualified id the item was read from.",
17021
+ $ref: "#/$defs/GlobalId"
17022
+ },
17023
+ destination: {
17024
+ description: "The configured source it would have been written to.",
17025
+ $ref: "#/$defs/SourceName"
17026
+ },
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
17032
+ },
17033
+ limit: {
17034
+ description: "The most that destination holds in one body.",
17035
+ type: "integer",
17036
+ format: "uint64",
17037
+ minimum: 0
17038
+ }
17039
+ },
17040
+ required: [
17041
+ "source",
17042
+ "destination",
17043
+ "body_size",
17044
+ "limit"
17045
+ ]
17046
+ },
17047
+ GlobalId: {
17048
+ description: `One item, qualified by the source it came from.
17049
+
17050
+ Rendered \`<source>:<native>\` and parsed by splitting on the **first** colon,
17051
+ so a native id may contain colons freely.`,
17052
+ type: "string"
17053
+ },
16065
17054
  Sanitization: {
16066
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.",
16067
17056
  type: "object",
@@ -16179,6 +17168,621 @@ interprets none of them, which is why the budget and unit names are open vocabul
16179
17168
  }
16180
17169
  }
16181
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
+ },
16182
17786
  GlobalId: {
16183
17787
  $schema: "https://json-schema.org/draft/2020-12/schema",
16184
17788
  title: "GlobalId",
@@ -18608,6 +20212,94 @@ absolute path, so a reader can print the path or read the contents out.`,
18608
20212
  }
18609
20213
  ]
18610
20214
  },
20215
+ MemberDeclaration: {
20216
+ $schema: "https://json-schema.org/draft/2020-12/schema",
20217
+ title: "MemberDeclaration",
20218
+ description: "One member of a plan graph, as a project template's front matter declares it.",
20219
+ type: "object",
20220
+ properties: {
20221
+ id: {
20222
+ description: "The member task's native id, and how other members' `depends_on` name it.",
20223
+ type: "string"
20224
+ },
20225
+ title: {
20226
+ description: "Its title.",
20227
+ type: "string"
20228
+ },
20229
+ template: {
20230
+ description: "The task template its body is rendered from.",
20231
+ $ref: "#/$defs/MemberTemplate"
20232
+ },
20233
+ answers: {
20234
+ description: "The answers its template is rendered with, by variable name.",
20235
+ type: "object",
20236
+ additionalProperties: true,
20237
+ default: {}
20238
+ },
20239
+ depends_on: {
20240
+ description: "The ids of the members it depends on: each one a `blocks` edge, written before it.",
20241
+ type: "array",
20242
+ items: {
20243
+ type: "string"
20244
+ },
20245
+ default: []
20246
+ },
20247
+ metadata: {
20248
+ description: "Caller-owned metadata keys it is created with.",
20249
+ type: "object",
20250
+ additionalProperties: true,
20251
+ default: {}
20252
+ },
20253
+ repositories: {
20254
+ description: "The repositories it concerns, as normalized origins.",
20255
+ type: "array",
20256
+ items: {
20257
+ type: "string"
20258
+ },
20259
+ default: []
20260
+ }
20261
+ },
20262
+ additionalProperties: false,
20263
+ required: [
20264
+ "id",
20265
+ "title",
20266
+ "template"
20267
+ ],
20268
+ $defs: {
20269
+ MemberTemplate: {
20270
+ description: "Which task template a member's body is rendered from.",
20271
+ oneOf: [
20272
+ {
20273
+ description: `A template file: an absolute path, or one relative to the directory the project template
20274
+ was read from and then its search path.`,
20275
+ type: "object",
20276
+ properties: {
20277
+ file: {
20278
+ type: "string"
20279
+ }
20280
+ },
20281
+ required: [
20282
+ "file"
20283
+ ],
20284
+ additionalProperties: false
20285
+ },
20286
+ {
20287
+ description: "A template loader document's file, resolved as `file` is.",
20288
+ type: "object",
20289
+ properties: {
20290
+ loader: {
20291
+ type: "string"
20292
+ }
20293
+ },
20294
+ required: [
20295
+ "loader"
20296
+ ],
20297
+ additionalProperties: false
20298
+ }
20299
+ ]
20300
+ }
20301
+ }
20302
+ },
18611
20303
  MetadataSet: {
18612
20304
  $schema: "https://json-schema.org/draft/2020-12/schema",
18613
20305
  title: "MetadataSet",
@@ -20716,6 +22408,121 @@ which sources are configured and what page ceiling each declares.`,
20716
22408
  }
20717
22409
  }
20718
22410
  },
22411
+ PlannedProject: {
22412
+ $schema: "https://json-schema.org/draft/2020-12/schema",
22413
+ title: "PlannedProject",
22414
+ description: "What `project create --dry-run` answers: the project and every member it would create, in\nthe order it would create them, and nothing written.",
22415
+ type: "object",
22416
+ properties: {
22417
+ source: {
22418
+ description: "The source it would be created in.",
22419
+ $ref: "#/$defs/SourceName"
22420
+ },
22421
+ id: {
22422
+ description: "The id it would be written under.",
22423
+ $ref: "#/$defs/NativeId"
22424
+ },
22425
+ title: {
22426
+ description: "Its title.",
22427
+ type: "string"
22428
+ },
22429
+ content: {
22430
+ description: "Its description, as it would be written.",
22431
+ type: "string"
22432
+ },
22433
+ members: {
22434
+ description: "Each member, in the order it would be created: after every member it depends on.",
22435
+ type: "array",
22436
+ items: {
22437
+ $ref: "#/$defs/PlannedMember"
22438
+ }
22439
+ }
22440
+ },
22441
+ required: [
22442
+ "source",
22443
+ "id",
22444
+ "title",
22445
+ "content",
22446
+ "members"
22447
+ ],
22448
+ $defs: {
22449
+ SourceName: {
22450
+ description: "The name a configuration document gives one configured source.",
22451
+ type: "string",
22452
+ pattern: "^[a-z0-9][a-z0-9-]*$"
22453
+ },
22454
+ NativeId: {
22455
+ description: `A source's own opaque identifier for one item.
22456
+
22457
+ Deliberately unvalidated: a native id is whatever the upstream system says it
22458
+ is, colons included. The engine parses a qualified id by splitting on the
22459
+ *first* colon precisely so this stays true.`,
22460
+ type: "string"
22461
+ },
22462
+ PlannedMember: {
22463
+ description: "One member `project create --dry-run` would create.",
22464
+ type: "object",
22465
+ properties: {
22466
+ id: {
22467
+ description: "The id it would be offered to its source under.",
22468
+ $ref: "#/$defs/NativeId"
22469
+ },
22470
+ title: {
22471
+ description: "Its title.",
22472
+ type: "string"
22473
+ },
22474
+ template: {
22475
+ description: "The template its body is rendered from, as its provenance would record it; `null` for a\nbody given as it is.",
22476
+ type: [
22477
+ "string",
22478
+ "null"
22479
+ ]
22480
+ },
22481
+ content: {
22482
+ description: "Its body, as it would be written.",
22483
+ type: "string"
22484
+ },
22485
+ answers: {
22486
+ description: "The resolved answers its body was rendered with.",
22487
+ type: "object",
22488
+ additionalProperties: true
22489
+ },
22490
+ depends_on: {
22491
+ description: "The members it would depend on, each a `blocks` edge.",
22492
+ type: "array",
22493
+ items: {
22494
+ $ref: "#/$defs/NativeId"
22495
+ }
22496
+ },
22497
+ metadata: {
22498
+ description: "The caller's metadata keys it would carry.",
22499
+ type: "object",
22500
+ additionalProperties: true
22501
+ },
22502
+ repositories: {
22503
+ description: "The repositories it concerns.",
22504
+ type: "array",
22505
+ items: {
22506
+ $ref: "#/$defs/Repository"
22507
+ }
22508
+ }
22509
+ },
22510
+ required: [
22511
+ "id",
22512
+ "title",
22513
+ "content",
22514
+ "answers",
22515
+ "depends_on",
22516
+ "metadata",
22517
+ "repositories"
22518
+ ]
22519
+ },
22520
+ Repository: {
22521
+ description: "A repository identified by its normalized origin, without a URL scheme or `.git` suffix.",
22522
+ type: "string"
22523
+ }
22524
+ }
22525
+ },
20719
22526
  Predicate: {
20720
22527
  $schema: "https://json-schema.org/draft/2020-12/schema",
20721
22528
  title: "Predicate",
@@ -21090,6 +22897,200 @@ reach a public one.`,
21090
22897
  }
21091
22898
  }
21092
22899
  },
22900
+ ProjectAttestationCheck: {
22901
+ $schema: "https://json-schema.org/draft/2020-12/schema",
22902
+ title: "ProjectAttestationCheck",
22903
+ description: "What `project attestation check --tasks` answers: one entry per task filed under the\nproject, in the order the source lists them.",
22904
+ type: "object",
22905
+ properties: {
22906
+ project: {
22907
+ description: "The project, by qualified id.",
22908
+ $ref: "#/$defs/GlobalId"
22909
+ },
22910
+ kind: {
22911
+ description: "The kind asked about.",
22912
+ $ref: "#/$defs/AttestationKind"
22913
+ },
22914
+ tasks: {
22915
+ description: "One entry per task.",
22916
+ type: "array",
22917
+ items: {
22918
+ $ref: "#/$defs/TaskAttestationCheck"
22919
+ }
22920
+ }
22921
+ },
22922
+ required: [
22923
+ "project",
22924
+ "kind",
22925
+ "tasks"
22926
+ ],
22927
+ $defs: {
22928
+ GlobalId: {
22929
+ description: `One item, qualified by the source it came from.
22930
+
22931
+ Rendered \`<source>:<native>\` and parsed by splitting on the **first** colon,
22932
+ so a native id may contain colons freely.`,
22933
+ type: "string"
22934
+ },
22935
+ AttestationKind: {
22936
+ description: "One kind of attestation, such as `plan-review` or `design-approval`: one to 200 letters,\ndigits, `.`, `_` or `-`.",
22937
+ type: "string"
22938
+ },
22939
+ TaskAttestationCheck: {
22940
+ description: "One task's entry in a project's check: the task's qualified id beside what its check found.",
22941
+ type: "object",
22942
+ properties: {
22943
+ id: {
22944
+ description: "The task, by qualified id.",
22945
+ $ref: "#/$defs/GlobalId"
22946
+ },
22947
+ kind: {
22948
+ description: "The kind asked about.",
22949
+ $ref: "#/$defs/AttestationKind"
22950
+ },
22951
+ state: {
22952
+ description: "What the check found.",
22953
+ $ref: "#/$defs/AttestationState"
22954
+ },
22955
+ reason: {
22956
+ description: "Why the record is void: `null` unless `state` is `void`.",
22957
+ anyOf: [
22958
+ {
22959
+ $ref: "#/$defs/VoidReason"
22960
+ },
22961
+ {
22962
+ type: "null"
22963
+ }
22964
+ ]
22965
+ },
22966
+ record: {
22967
+ description: "The record of the kind the item holds, or `null` when it holds none.",
22968
+ anyOf: [
22969
+ {
22970
+ $ref: "#/$defs/Attestation"
22971
+ },
22972
+ {
22973
+ type: "null"
22974
+ }
22975
+ ]
22976
+ }
22977
+ },
22978
+ required: [
22979
+ "id",
22980
+ "kind",
22981
+ "state"
22982
+ ]
22983
+ },
22984
+ AttestationState: {
22985
+ description: "What a check of one kind of attestation found.",
22986
+ oneOf: [
22987
+ {
22988
+ description: `A record of the kind is there, the item's authored content is the content it cleared,
22989
+ and the bar asked about, when one was, is the bar it cleared it against.`,
22990
+ type: "string",
22991
+ const: "valid"
22992
+ },
22993
+ {
22994
+ description: "A record of the kind is there and no longer holds: `reason` says why.",
22995
+ type: "string",
22996
+ const: "void"
22997
+ },
22998
+ {
22999
+ description: "The item holds no record of the kind.",
23000
+ type: "string",
23001
+ const: "absent"
23002
+ }
23003
+ ]
23004
+ },
23005
+ VoidReason: {
23006
+ description: "Why a record of an attestation no longer holds.",
23007
+ oneOf: [
23008
+ {
23009
+ description: "The item's authored content is not the content the record cleared.",
23010
+ type: "string",
23011
+ const: "content-moved"
23012
+ },
23013
+ {
23014
+ description: "The bar asked about is not the bar the record cleared the content against.",
23015
+ type: "string",
23016
+ const: "bar-moved"
23017
+ }
23018
+ ]
23019
+ },
23020
+ Attestation: {
23021
+ description: `One attestation: who cleared the item's authored content, when, which content and against
23022
+ which bar.`,
23023
+ type: "object",
23024
+ properties: {
23025
+ kind: {
23026
+ description: "The kind of attestation this is; the key it is held under.",
23027
+ $ref: "#/$defs/AttestationKind"
23028
+ },
23029
+ by: {
23030
+ description: "Who attested, as the caller labels them.",
23031
+ $ref: "#/$defs/AttestationLabel"
23032
+ },
23033
+ at: {
23034
+ description: "When it was recorded, in RFC 3339 to the second.",
23035
+ type: "string",
23036
+ format: "date-time"
23037
+ },
23038
+ content_digest: {
23039
+ description: `The digest of the item's authored content when it was recorded, computed by the store
23040
+ (see the module's documentation).`,
23041
+ $ref: "#/$defs/Sha256Digest"
23042
+ },
23043
+ bar: {
23044
+ description: "The fingerprint of the bar the content was cleared against, as the caller gave it.",
23045
+ $ref: "#/$defs/AttestationLabel"
23046
+ },
23047
+ note: {
23048
+ description: "What the attester added, when they added anything.",
23049
+ anyOf: [
23050
+ {
23051
+ $ref: "#/$defs/AttestationNote"
23052
+ },
23053
+ {
23054
+ type: "null"
23055
+ }
23056
+ ]
23057
+ },
23058
+ excludes: {
23059
+ description: "The caller-owned metadata keys left out of `content_digest`, sorted; empty when none\nwere.",
23060
+ type: "array",
23061
+ items: {
23062
+ $ref: "#/$defs/MetadataKey"
23063
+ },
23064
+ default: []
23065
+ }
23066
+ },
23067
+ required: [
23068
+ "kind",
23069
+ "by",
23070
+ "at",
23071
+ "content_digest",
23072
+ "bar"
23073
+ ]
23074
+ },
23075
+ AttestationLabel: {
23076
+ description: "Who attested, or the fingerprint of a bar: one line of one to 200 characters, not blank.",
23077
+ type: "string"
23078
+ },
23079
+ Sha256Digest: {
23080
+ description: "`sha256:` and 64 lowercase hex digits.",
23081
+ type: "string",
23082
+ pattern: "^sha256:[0-9a-f]{64}$"
23083
+ },
23084
+ AttestationNote: {
23085
+ description: "What an attester adds: text of any length and any number of lines, not blank.",
23086
+ type: "string"
23087
+ },
23088
+ MetadataKey: {
23089
+ description: "One caller-owned metadata key: `<namespace>.<name>`, at least two non-empty segments\nseparated by dots, whose first segment is not [`MetadataKey::RESERVED_NAMESPACE`].\n\nValidated wherever one is built, deserialized included, so a plugin handed one never has\nto ask whether it names a key this product owns.",
23090
+ type: "string"
23091
+ }
23092
+ }
23093
+ },
21093
23094
  ProjectGraph: {
21094
23095
  $schema: "https://json-schema.org/draft/2020-12/schema",
21095
23096
  title: "ProjectGraph",
@@ -38304,6 +40305,17 @@ update wrote no status, and for a task with no projection.`,
38304
40305
  }
38305
40306
  ]
38306
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
+ },
38307
40319
  sanitization: {
38308
40320
  anyOf: [
38309
40321
  {
@@ -39137,6 +41149,286 @@ Never sent again: doing so could apply it twice.`,
39137
41149
  "reason"
39138
41150
  ]
39139
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
+ },
39140
41432
  Sanitization: {
39141
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.",
39142
41434
  type: "object",
@@ -39339,6 +41631,9 @@ no insignificant whitespace, UTF-8.`,
39339
41631
  default: {
39340
41632
  description: "The value used when no answer is given."
39341
41633
  },
41634
+ schema: {
41635
+ description: "The JSON Schema (draft 2020-12) every answer must satisfy, for an `object` or `list`\nvariable that declares one; absent for every other."
41636
+ },
39342
41637
  declared_in: {
39343
41638
  description: "The chain file whose declaration this is: the one nearest the rendered template.",
39344
41639
  type: "string"
@@ -39404,154 +41699,365 @@ no insignificant whitespace, UTF-8.`,
39404
41699
  }
39405
41700
  }
39406
41701
  },
39407
- TemplateVariables: {
41702
+ TemplateVariables: {
41703
+ $schema: "https://json-schema.org/draft/2020-12/schema",
41704
+ title: "TemplateVariables",
41705
+ description: "What `onetaskgraph template variables` answers with: a template's declared set.",
41706
+ type: "object",
41707
+ properties: {
41708
+ template: {
41709
+ description: "The rendered template's resolved name.",
41710
+ type: "string"
41711
+ },
41712
+ digest: {
41713
+ description: "The chain's digest: `sha256:` and 64 lowercase hex digits, over every file it reads\nin first-load order — each template an expression names counted as it names one when\nevery variable takes its default.",
41714
+ type: "string"
41715
+ },
41716
+ variables: {
41717
+ description: "Every declared variable, in declaration order along the chain.",
41718
+ type: "array",
41719
+ items: {
41720
+ $ref: "#/$defs/TemplateVariable"
41721
+ }
41722
+ }
41723
+ },
41724
+ required: [
41725
+ "template",
41726
+ "digest",
41727
+ "variables"
41728
+ ],
41729
+ $defs: {
41730
+ TemplateVariable: {
41731
+ description: "One variable of a template's declared set, merged down its chain.\n\nBuilt only by loading a template, so `items` is present exactly when `type` is `list`,\na `default` is a value of the variable's type, and `required` is never `true` beside one.",
41732
+ type: "object",
41733
+ properties: {
41734
+ name: {
41735
+ description: "The variable's name, as the template body uses it.",
41736
+ type: "string"
41737
+ },
41738
+ description: {
41739
+ description: "What the variable is for; what a prompt shows.",
41740
+ type: "string"
41741
+ },
41742
+ type: {
41743
+ description: "What the variable holds.",
41744
+ $ref: "#/$defs/VariableType"
41745
+ },
41746
+ items: {
41747
+ description: "What each entry holds, for a `list` variable and no other.",
41748
+ anyOf: [
41749
+ {
41750
+ $ref: "#/$defs/ItemType"
41751
+ },
41752
+ {
41753
+ type: "null"
41754
+ }
41755
+ ]
41756
+ },
41757
+ required: {
41758
+ description: "Whether rendering without an answer is refused. An optional variable with no answer\nand no default renders as `none`.",
41759
+ type: "boolean"
41760
+ },
41761
+ default: {
41762
+ description: "The value used when no answer is given."
41763
+ },
41764
+ schema: {
41765
+ description: "The JSON Schema (draft 2020-12) every answer must satisfy, for an `object` or `list`\nvariable that declares one; absent for every other."
41766
+ },
41767
+ declared_in: {
41768
+ description: "The chain file whose declaration this is: the one nearest the rendered template.",
41769
+ type: "string"
41770
+ }
41771
+ },
41772
+ required: [
41773
+ "name",
41774
+ "description",
41775
+ "type",
41776
+ "required",
41777
+ "declared_in"
41778
+ ]
41779
+ },
41780
+ VariableType: {
41781
+ description: "What one variable holds.",
41782
+ oneOf: [
41783
+ {
41784
+ description: "One line of text.",
41785
+ type: "string",
41786
+ const: "string"
41787
+ },
41788
+ {
41789
+ description: "Text of any number of lines.",
41790
+ type: "string",
41791
+ const: "text"
41792
+ },
41793
+ {
41794
+ description: "A whole number.",
41795
+ type: "string",
41796
+ const: "integer"
41797
+ },
41798
+ {
41799
+ description: "`true` or `false`.",
41800
+ type: "string",
41801
+ const: "boolean"
41802
+ },
41803
+ {
41804
+ description: "A list, of the variable's `items`.",
41805
+ type: "string",
41806
+ const: "list"
41807
+ },
41808
+ {
41809
+ description: "A mapping from string keys to values.",
41810
+ type: "string",
41811
+ const: "object"
41812
+ }
41813
+ ]
41814
+ },
41815
+ ItemType: {
41816
+ description: "What each entry of a `list` variable holds.",
41817
+ oneOf: [
41818
+ {
41819
+ description: "Strings.",
41820
+ type: "string",
41821
+ const: "string"
41822
+ },
41823
+ {
41824
+ description: "Mappings from string keys to values.",
41825
+ type: "string",
41826
+ const: "object"
41827
+ }
41828
+ ]
41829
+ }
41830
+ }
41831
+ },
41832
+ TextFields: {
39408
41833
  $schema: "https://json-schema.org/draft/2020-12/schema",
39409
- title: "TemplateVariables",
39410
- description: "What `onetaskgraph template variables` answers with: a template's declared set.",
41834
+ title: "TextFields",
41835
+ description: "Which fields a [`TextQuery`] searches.",
41836
+ oneOf: [
41837
+ {
41838
+ description: "Titles only.",
41839
+ type: "string",
41840
+ const: "title"
41841
+ },
41842
+ {
41843
+ description: "Bodies only.",
41844
+ type: "string",
41845
+ const: "content"
41846
+ },
41847
+ {
41848
+ description: "Either one matching is a match.",
41849
+ type: "string",
41850
+ const: "title-or-content"
41851
+ }
41852
+ ]
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.",
39411
41858
  type: "object",
39412
41859
  properties: {
39413
- template: {
39414
- description: "The rendered template's resolved name.",
39415
- type: "string"
39416
- },
39417
- digest: {
39418
- description: "The chain's digest: `sha256:` and 64 lowercase hex digits, over every file it reads\nin first-load order — each template an expression names counted as it names one when\nevery variable takes its default.",
39419
- type: "string"
41860
+ schema_version: {
41861
+ description: "`1`.",
41862
+ type: "integer",
41863
+ format: "uint32",
41864
+ minimum: 0
39420
41865
  },
39421
- variables: {
39422
- description: "Every declared variable, in declaration order along the chain.",
41866
+ updates: {
41867
+ description: "The updates, each one held write of every field it names.",
39423
41868
  type: "array",
39424
41869
  items: {
39425
- $ref: "#/$defs/TemplateVariable"
41870
+ $ref: "#/$defs/UpdateBatchItem"
39426
41871
  }
39427
41872
  }
39428
41873
  },
41874
+ additionalProperties: false,
39429
41875
  required: [
39430
- "template",
39431
- "digest",
39432
- "variables"
41876
+ "schema_version",
41877
+ "updates"
39433
41878
  ],
39434
41879
  $defs: {
39435
- TemplateVariable: {
39436
- description: "One variable of a template's declared set, merged down its chain.\n\nBuilt only by loading a template, so `items` is present exactly when `type` is `list`,\na `default` is a value of the variable's type, and `required` is never `true` beside one.",
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.",
39437
41882
  type: "object",
39438
41883
  properties: {
39439
- name: {
39440
- description: "The variable's name, as the template body uses it.",
41884
+ item: {
41885
+ description: "The task's qualified id, `<source>:<native-id>`, of the source the batch names.",
39441
41886
  type: "string"
39442
41887
  },
39443
- description: {
39444
- description: "What the variable is for; what a prompt shows.",
39445
- type: "string"
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
39446
41895
  },
39447
- type: {
39448
- description: "What the variable holds.",
39449
- $ref: "#/$defs/VariableType"
41896
+ title: {
41897
+ description: "Its title.",
41898
+ type: [
41899
+ "string",
41900
+ "null"
41901
+ ],
41902
+ default: null
39450
41903
  },
39451
- items: {
39452
- description: "What each entry holds, for a `list` variable and no other.",
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.",
39453
41914
  anyOf: [
39454
41915
  {
39455
- $ref: "#/$defs/ItemType"
41916
+ $ref: "#/$defs/StatusCategory"
39456
41917
  },
39457
41918
  {
39458
41919
  type: "null"
39459
41920
  }
39460
- ]
41921
+ ],
41922
+ default: null
39461
41923
  },
39462
- required: {
39463
- description: "Whether rendering without an answer is refused. An optional variable with no answer\nand no default renders as `none`.",
39464
- type: "boolean"
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
39465
41935
  },
39466
- default: {
39467
- description: "The value used when no answer is given."
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: []
39468
41943
  },
39469
- declared_in: {
39470
- description: "The chain file whose declaration this is: the one nearest the rendered template.",
39471
- type: "string"
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
39472
41968
  }
39473
41969
  },
41970
+ additionalProperties: false,
39474
41971
  required: [
39475
- "name",
39476
- "description",
39477
- "type",
39478
- "required",
39479
- "declared_in"
41972
+ "item"
39480
41973
  ]
39481
41974
  },
39482
- VariableType: {
39483
- description: "What one variable holds.",
41975
+ StatusCategory: {
41976
+ description: "The normalised status vocabulary shared across every source.",
39484
41977
  oneOf: [
39485
41978
  {
39486
- description: "One line of text.",
41979
+ description: "Written down but not yet committed to as work.",
39487
41980
  type: "string",
39488
- const: "string"
41981
+ const: "draft"
39489
41982
  },
39490
41983
  {
39491
- description: "Text of any number of lines.",
41984
+ description: "Known about, not yet accepted as ready to work.",
39492
41985
  type: "string",
39493
- const: "text"
41986
+ const: "backlog"
39494
41987
  },
39495
41988
  {
39496
- description: "A whole number.",
41989
+ description: "Accepted and ready to be picked up, and nothing has claimed it.",
39497
41990
  type: "string",
39498
- const: "integer"
41991
+ const: "todo"
39499
41992
  },
39500
41993
  {
39501
- description: "`true` or `false`.",
41994
+ description: "Claimed by work that will do it, and not yet started.",
39502
41995
  type: "string",
39503
- const: "boolean"
41996
+ const: "queued"
39504
41997
  },
39505
41998
  {
39506
- description: "A list, of the variable's `items`.",
41999
+ description: "Being worked on.",
39507
42000
  type: "string",
39508
- const: "list"
42001
+ const: "in-progress"
39509
42002
  },
39510
42003
  {
39511
- description: "A mapping from string keys to values.",
42004
+ description: "Finished.",
39512
42005
  type: "string",
39513
- const: "object"
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"
39514
42017
  }
39515
42018
  ]
39516
42019
  },
39517
- ItemType: {
39518
- description: "What each entry of a `list` variable holds.",
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.`,
39519
42028
  oneOf: [
39520
42029
  {
39521
- description: "Strings.",
42030
+ description: "No priority is set.",
39522
42031
  type: "string",
39523
- const: "string"
42032
+ const: "none"
39524
42033
  },
39525
42034
  {
39526
- description: "Mappings from string keys to values.",
42035
+ description: "Drop everything for it.",
39527
42036
  type: "string",
39528
- const: "object"
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"
39529
42053
  }
39530
42054
  ]
39531
- }
39532
- }
39533
- },
39534
- TextFields: {
39535
- $schema: "https://json-schema.org/draft/2020-12/schema",
39536
- title: "TextFields",
39537
- description: "Which fields a [`TextQuery`] searches.",
39538
- oneOf: [
39539
- {
39540
- description: "Titles only.",
39541
- type: "string",
39542
- const: "title"
39543
42055
  },
39544
- {
39545
- description: "Bodies only.",
39546
- type: "string",
39547
- const: "content"
39548
- },
39549
- {
39550
- description: "Either one matching is a match.",
39551
- type: "string",
39552
- const: "title-or-content"
42056
+ Repository: {
42057
+ description: "A repository identified by its normalized origin, without a URL scheme or `.git` suffix.",
42058
+ type: "string"
39553
42059
  }
39554
- ]
42060
+ }
39555
42061
  },
39556
42062
  UpdatedField: {
39557
42063
  $schema: "https://json-schema.org/draft/2020-12/schema",
@@ -39637,6 +42143,23 @@ no insignificant whitespace, UTF-8.`,
39637
42143
  }
39638
42144
  ]
39639
42145
  },
42146
+ VoidReason: {
42147
+ $schema: "https://json-schema.org/draft/2020-12/schema",
42148
+ title: "VoidReason",
42149
+ description: "Why a record of an attestation no longer holds.",
42150
+ oneOf: [
42151
+ {
42152
+ description: "The item's authored content is not the content the record cleared.",
42153
+ type: "string",
42154
+ const: "content-moved"
42155
+ },
42156
+ {
42157
+ description: "The bar asked about is not the bar the record cleared the content against.",
42158
+ type: "string",
42159
+ const: "bar-moved"
42160
+ }
42161
+ ]
42162
+ },
39640
42163
  WritePolicyConfig: {
39641
42164
  $schema: "https://json-schema.org/draft/2020-12/schema",
39642
42165
  title: "WritePolicyConfig",
@@ -40504,13 +43027,20 @@ var commandResponseRoots = {
40504
43027
  "task priority set": "TaskPrioritySet",
40505
43028
  "task content set": "TaskContentSet",
40506
43029
  "task metadata set": "MetadataSet",
43030
+ "task attest": "Attested",
43031
+ "task attestation check": "AttestationCheck",
40507
43032
  "task update": "TaskUpdated",
43033
+ "task find": "FoundTasks",
43034
+ "task update-many": "TasksUpdated",
43035
+ "task comment add-many": "CommentsAdded",
40508
43036
  "project list": "QueryResponseOfQualifiedProject",
40509
43037
  "project show": "QueryResponseOfQualifiedProject",
40510
43038
  "project deps": "QueryResponseOfQualifiedEdge",
40511
43039
  "project graph": "ProjectGraph",
40512
43040
  "project copy": "CopyReport",
40513
43041
  "project metadata set": "MetadataSet",
43042
+ "project attest": "Attested",
43043
+ "project attestation check": "AttestationCheck",
40514
43044
  "project status set": "ProjectStatusSet",
40515
43045
  "project create": "QueryResponseOfQualifiedProject",
40516
43046
  "project render": "Regenerated",
@@ -40519,6 +43049,8 @@ var commandResponseRoots = {
40519
43049
  "document show": "DocumentDetail",
40520
43050
  "document copy": "CopyReport",
40521
43051
  "document metadata set": "MetadataSet",
43052
+ "document attest": "Attested",
43053
+ "document attestation check": "AttestationCheck",
40522
43054
  "label list": "QueryResponseOfQualifiedLabel",
40523
43055
  search: "QueryResponseOfSearchHit",
40524
43056
  "template variables": "TemplateVariables",
@@ -40533,9 +43065,11 @@ var commandResponseRoots = {
40533
43065
  "document answers": "TemplateAnswers"
40534
43066
  };
40535
43067
  var commandAlternateRoots = {
40536
- "sources fields": ["StatusNamesReport"]
43068
+ "sources fields": ["StatusNamesReport"],
43069
+ "project attestation check": ["ProjectAttestationCheck"],
43070
+ "project create": ["PlannedProject"]
40537
43071
  };
40538
- 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 !== "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"));
40539
43073
  function bodyArguments(options) {
40540
43074
  return "bodyFile" in options ? { args: ["--body-file", options.bodyFile] } : { args: [], input: options.body };
40541
43075
  }
@@ -40668,6 +43202,7 @@ var taskUpdateOptionFlags = {
40668
43202
  sanitizeDryRun: "--sanitize-dry-run",
40669
43203
  expect: "--expect",
40670
43204
  ifVersion: "--if-version",
43205
+ whenPriority: "--when-priority",
40671
43206
  repositories: "--repository"
40672
43207
  };
40673
43208
  function stringOption(method, name, value) {
@@ -40723,6 +43258,9 @@ function taskUpdateFlags(options) {
40723
43258
  for (const origin of origins)
40724
43259
  args.push("--repository", origin);
40725
43260
  }
43261
+ for (const priority of stringList(method, "whenPriority", options.whenPriority)) {
43262
+ args.push("--when-priority", priority);
43263
+ }
40726
43264
  args.push(...writePolicyFlags(method, options));
40727
43265
  return args;
40728
43266
  }
@@ -40893,6 +43431,42 @@ function writePolicyFlags(method, options) {
40893
43431
  args.push("--sanitize-dry-run");
40894
43432
  return args;
40895
43433
  }
43434
+ function attestFlags(method, kind, by, bar, options) {
43435
+ if (!isPlainObject(options)) {
43436
+ throw new TypeError(`${method}: options is not an object; next: pass them as a plain object`);
43437
+ }
43438
+ const args = [
43439
+ "--kind",
43440
+ stringOption(method, "kind", kind),
43441
+ "--by",
43442
+ stringOption(method, "by", by),
43443
+ "--bar",
43444
+ stringOption(method, "bar", bar)
43445
+ ];
43446
+ for (const key of stringList(method, "exclude", options.exclude))
43447
+ args.push("--exclude", key);
43448
+ if (options.note !== undefined)
43449
+ args.push("--note", stringOption(method, "note", options.note));
43450
+ if (options.ifVersion !== undefined) {
43451
+ args.push("--if-version", stringOption(method, "ifVersion", options.ifVersion));
43452
+ }
43453
+ return [...args, ...writePolicyFlags(method, options)];
43454
+ }
43455
+ function checkFlags(method, kind, options) {
43456
+ if (!isPlainObject(options)) {
43457
+ throw new TypeError(`${method}: options is not an object; next: pass them as a plain object`);
43458
+ }
43459
+ const args = ["--kind", stringOption(method, "kind", kind)];
43460
+ if (options.bar !== undefined)
43461
+ args.push("--bar", stringOption(method, "bar", options.bar));
43462
+ return args;
43463
+ }
43464
+ function flagOption(method, name, value) {
43465
+ if (value !== undefined && typeof value !== "boolean") {
43466
+ throw new TypeError(`${method}: ${name} is not a boolean; next: pass true or false`);
43467
+ }
43468
+ return value === true;
43469
+ }
40896
43470
  function expectFlags(method, options) {
40897
43471
  if (options.expect === undefined)
40898
43472
  return [];
@@ -40949,13 +43523,21 @@ function taskCopyFlags(options) {
40949
43523
  ...options.create ? ["--create"] : [],
40950
43524
  ...options.targetTask === undefined ? [] : ["--target-task", stringOption("taskCopy", "targetTask", options.targetTask)],
40951
43525
  ...expectFlags("taskCopy", options),
40952
- ...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
+ ])
40953
43530
  ];
40954
43531
  }
40955
43532
  function projectCopyFlags(options) {
40956
43533
  const args = copyFlags("projectCopy", options);
40957
43534
  if (options.noTasks)
40958
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");
40959
43541
  for (const member of options.members ?? [])
40960
43542
  args.push("--member", member);
40961
43543
  if (options.membersOnly !== undefined && typeof options.membersOnly !== "boolean") {
@@ -41297,6 +43879,33 @@ class OnetaskgraphClient {
41297
43879
  documentMetadataSet(id, key, value, options = {}) {
41298
43880
  return this.run("document metadata set", [id, key, value, ...writePolicyFlags("documentMetadataSet", options)], undefined, options.sanitizeDryRun === true);
41299
43881
  }
43882
+ taskAttest(id, kind, by, bar, options = {}) {
43883
+ return this.run("task attest", [id, ...attestFlags("taskAttest", kind, by, bar, options)], undefined, options.sanitizeDryRun === true);
43884
+ }
43885
+ projectAttest(id, kind, by, bar, options = {}) {
43886
+ return this.run("project attest", [id, ...attestFlags("projectAttest", kind, by, bar, options)], undefined, options.sanitizeDryRun === true);
43887
+ }
43888
+ documentAttest(id, kind, by, bar, options = {}) {
43889
+ return this.run("document attest", [id, ...attestFlags("documentAttest", kind, by, bar, options)], undefined, options.sanitizeDryRun === true);
43890
+ }
43891
+ taskAttestationCheck(id, kind, options = {}) {
43892
+ return this.run("task attestation check", [
43893
+ id,
43894
+ ...checkFlags("taskAttestationCheck", kind, options)
43895
+ ]);
43896
+ }
43897
+ documentAttestationCheck(id, kind, options = {}) {
43898
+ return this.run("document attestation check", [
43899
+ id,
43900
+ ...checkFlags("documentAttestationCheck", kind, options)
43901
+ ]);
43902
+ }
43903
+ projectAttestationCheck(id, kind, options = {}) {
43904
+ const args = [id, ...checkFlags("projectAttestationCheck", kind, options)];
43905
+ if (flagOption("projectAttestationCheck", "tasks", options.tasks))
43906
+ args.push("--tasks");
43907
+ return this.run("project attestation check", args);
43908
+ }
41300
43909
  labelList(options = {}) {
41301
43910
  const args = [];
41302
43911
  addQuery(args, options);
@@ -41354,6 +43963,15 @@ class OnetaskgraphClient {
41354
43963
  taskAssets(id, outputDir) {
41355
43964
  return this.run("task assets", [id, "--output-dir", outputDir]);
41356
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
+ }
41357
43975
  taskProjectHuman(input) {
41358
43976
  return this.run("task project-human", [
41359
43977
  "--input",
@@ -41364,6 +43982,8 @@ class OnetaskgraphClient {
41364
43982
  const { args, input } = createArguments("projectCreate", ["--id", id, "--title", title], options);
41365
43983
  if (options.status !== undefined)
41366
43984
  args.push("--status", options.status);
43985
+ if (flagOption("projectCreate", "dryRun", options.dryRun))
43986
+ args.push("--dry-run");
41367
43987
  return this.run("project create", [source, ...args], input, options.sanitizeDryRun === true);
41368
43988
  }
41369
43989
  async projectRender(id, options = {}) {
@@ -41407,7 +44027,7 @@ class OnetaskgraphClient {
41407
44027
  });
41408
44028
  child.on("error", () => reject(new OnetaskgraphExecutionError(null)));
41409
44029
  child.on("close", (code) => {
41410
- const reporting = command === "sources sanitize" && (code === 1 || code === 3) && !("failure" in (safeParse(stdout) ?? { failure: true }));
44030
+ const reporting = (command === "sources sanitize" && (code === 1 || code === 3) || command.endsWith(" attestation check") && code === 3) && !("failure" in (safeParse(stdout) ?? { failure: true }));
41411
44031
  if (stdout.length === 0 || code !== 0 && !reporting && (code !== 4 || !partialResponseCommands.has(command))) {
41412
44032
  reject(new OnetaskgraphExecutionError(code, stderr, failureOf(stdout)));
41413
44033
  return;
@@ -41455,7 +44075,7 @@ function assertCompleteCommandSurface() {
41455
44075
  }
41456
44076
 
41457
44077
  // src/index.ts
41458
- var VERSION = "0.14.10";
44078
+ var VERSION = "0.14.12";
41459
44079
  export {
41460
44080
  taskUpdateOptionFlags,
41461
44081
  taskUpdateFlags,