@onetaskgraph/sdk 0.14.9 → 0.14.10

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,6 +7157,7 @@ var binaryCommands = [
7157
7157
  "task comment list",
7158
7158
  "task comment edit",
7159
7159
  "task comment delete",
7160
+ "task comments",
7160
7161
  "task status set",
7161
7162
  "task status reconcile",
7162
7163
  "task status complete",
@@ -7194,7 +7195,7 @@ var binaryCommands = [
7194
7195
  ];
7195
7196
 
7196
7197
  // src/generated/models.ts
7197
- var SCHEMA_BUNDLE_VERSION = 57;
7198
+ var SCHEMA_BUNDLE_VERSION = 58;
7198
7199
 
7199
7200
  // src/generated/schemas.ts
7200
7201
  var runtimeSchemas = {
@@ -7559,6 +7560,31 @@ is, colons included. The engine parses a qualified id by splitting on the
7559
7560
  }
7560
7561
  }
7561
7562
  },
7563
+ AuthorKind: {
7564
+ $schema: "https://json-schema.org/draft/2020-12/schema",
7565
+ title: "AuthorKind",
7566
+ description: `Who wrote a comment, as the source that holds it can tell: a person, a bot — an
7567
+ integration, an app, an automation acting on its own — or neither, when the source cannot
7568
+ say. Decided by the plugin, through
7569
+ [\`TaskSource::comment_author_kind\`](crate::TaskSource::comment_author_kind).`,
7570
+ oneOf: [
7571
+ {
7572
+ description: "A person.",
7573
+ type: "string",
7574
+ const: "person"
7575
+ },
7576
+ {
7577
+ description: "A bot, an integration or an app.",
7578
+ type: "string",
7579
+ const: "bot"
7580
+ },
7581
+ {
7582
+ description: "The source cannot say — no author at all, a deleted account.",
7583
+ type: "string",
7584
+ const: "unknown"
7585
+ }
7586
+ ]
7587
+ },
7562
7588
  CacheCleared: {
7563
7589
  $schema: "https://json-schema.org/draft/2020-12/schema",
7564
7590
  title: "CacheCleared",
@@ -8055,6 +8081,108 @@ is, colons included. The engine parses a qualified id by splitting on the
8055
8081
  }
8056
8082
  }
8057
8083
  },
8084
+ CommentActivity: {
8085
+ $schema: "https://json-schema.org/draft/2020-12/schema",
8086
+ title: "CommentActivity",
8087
+ description: "One comment of a [`CommentsSince`] answer.",
8088
+ type: "object",
8089
+ properties: {
8090
+ item: {
8091
+ description: "The task it is on, qualified: `<source>:<native id>`.",
8092
+ $ref: "#/$defs/GlobalId"
8093
+ },
8094
+ id: {
8095
+ description: "Its own id, exactly as its source issued it.",
8096
+ $ref: "#/$defs/NativeId"
8097
+ },
8098
+ url: {
8099
+ description: "Where a person can open it, or `null`.",
8100
+ type: [
8101
+ "string",
8102
+ "null"
8103
+ ]
8104
+ },
8105
+ author: {
8106
+ description: "Who wrote it, in the source's own spelling, or `null`.",
8107
+ type: [
8108
+ "string",
8109
+ "null"
8110
+ ]
8111
+ },
8112
+ author_kind: {
8113
+ description: "Whether that is a person, a bot, or neither the source can tell.",
8114
+ $ref: "#/$defs/AuthorKind"
8115
+ },
8116
+ created_at: {
8117
+ description: "When it was written.",
8118
+ type: "string",
8119
+ format: "date-time"
8120
+ },
8121
+ updated_at: {
8122
+ description: "When it last changed — its creation, for one never edited.",
8123
+ type: "string",
8124
+ format: "date-time"
8125
+ },
8126
+ version: {
8127
+ description: `The comment's version: when it last changed, at the backend's own precision. Two reads
8128
+ answering one comment unchanged answer the same version.`,
8129
+ type: "string"
8130
+ },
8131
+ body: {
8132
+ description: "What it says, byte for byte.",
8133
+ type: "string"
8134
+ }
8135
+ },
8136
+ required: [
8137
+ "item",
8138
+ "id",
8139
+ "author_kind",
8140
+ "created_at",
8141
+ "updated_at",
8142
+ "version",
8143
+ "body"
8144
+ ],
8145
+ $defs: {
8146
+ GlobalId: {
8147
+ description: `One item, qualified by the source it came from.
8148
+
8149
+ Rendered \`<source>:<native>\` and parsed by splitting on the **first** colon,
8150
+ so a native id may contain colons freely.`,
8151
+ type: "string"
8152
+ },
8153
+ NativeId: {
8154
+ description: `A source's own opaque identifier for one item.
8155
+
8156
+ Deliberately unvalidated: a native id is whatever the upstream system says it
8157
+ is, colons included. The engine parses a qualified id by splitting on the
8158
+ *first* colon precisely so this stays true.`,
8159
+ type: "string"
8160
+ },
8161
+ AuthorKind: {
8162
+ description: `Who wrote a comment, as the source that holds it can tell: a person, a bot — an
8163
+ integration, an app, an automation acting on its own — or neither, when the source cannot
8164
+ say. Decided by the plugin, through
8165
+ [\`TaskSource::comment_author_kind\`](crate::TaskSource::comment_author_kind).`,
8166
+ oneOf: [
8167
+ {
8168
+ description: "A person.",
8169
+ type: "string",
8170
+ const: "person"
8171
+ },
8172
+ {
8173
+ description: "A bot, an integration or an app.",
8174
+ type: "string",
8175
+ const: "bot"
8176
+ },
8177
+ {
8178
+ description: "The source cannot say — no author at all, a deleted account.",
8179
+ type: "string",
8180
+ const: "unknown"
8181
+ }
8182
+ ]
8183
+ }
8184
+ }
8185
+ },
8058
8186
  CommentList: {
8059
8187
  $schema: "https://json-schema.org/draft/2020-12/schema",
8060
8188
  title: "CommentList",
@@ -8860,6 +8988,138 @@ interprets none of them, which is why the budget and unit names are open vocabul
8860
8988
  }
8861
8989
  }
8862
8990
  },
8991
+ CommentsSince: {
8992
+ $schema: "https://json-schema.org/draft/2020-12/schema",
8993
+ title: "CommentsSince",
8994
+ description: "What `task comments <SOURCE> --since` answers with.",
8995
+ type: "object",
8996
+ properties: {
8997
+ schema_version: {
8998
+ description: "The version of this document's shape: `1`.",
8999
+ type: "integer",
9000
+ format: "uint32",
9001
+ minimum: 0
9002
+ },
9003
+ watermark: {
9004
+ description: "The instant a later read may start from: the earlier of the source's own time and this\nhost's at the read's start, set back by the source's consistency window. A later read\nfrom it may return a comment again, with the same `id` and `version`.",
9005
+ type: "string",
9006
+ format: "date-time"
9007
+ },
9008
+ comments: {
9009
+ description: `Every comment made or edited at or after the instant on a matching task, oldest first by
9010
+ when it last changed.`,
9011
+ type: "array",
9012
+ items: {
9013
+ $ref: "#/$defs/CommentActivity"
9014
+ }
9015
+ }
9016
+ },
9017
+ required: [
9018
+ "schema_version",
9019
+ "watermark",
9020
+ "comments"
9021
+ ],
9022
+ $defs: {
9023
+ CommentActivity: {
9024
+ description: "One comment of a [`CommentsSince`] answer.",
9025
+ type: "object",
9026
+ properties: {
9027
+ item: {
9028
+ description: "The task it is on, qualified: `<source>:<native id>`.",
9029
+ $ref: "#/$defs/GlobalId"
9030
+ },
9031
+ id: {
9032
+ description: "Its own id, exactly as its source issued it.",
9033
+ $ref: "#/$defs/NativeId"
9034
+ },
9035
+ url: {
9036
+ description: "Where a person can open it, or `null`.",
9037
+ type: [
9038
+ "string",
9039
+ "null"
9040
+ ]
9041
+ },
9042
+ author: {
9043
+ description: "Who wrote it, in the source's own spelling, or `null`.",
9044
+ type: [
9045
+ "string",
9046
+ "null"
9047
+ ]
9048
+ },
9049
+ author_kind: {
9050
+ description: "Whether that is a person, a bot, or neither the source can tell.",
9051
+ $ref: "#/$defs/AuthorKind"
9052
+ },
9053
+ created_at: {
9054
+ description: "When it was written.",
9055
+ type: "string",
9056
+ format: "date-time"
9057
+ },
9058
+ updated_at: {
9059
+ description: "When it last changed — its creation, for one never edited.",
9060
+ type: "string",
9061
+ format: "date-time"
9062
+ },
9063
+ version: {
9064
+ description: `The comment's version: when it last changed, at the backend's own precision. Two reads
9065
+ answering one comment unchanged answer the same version.`,
9066
+ type: "string"
9067
+ },
9068
+ body: {
9069
+ description: "What it says, byte for byte.",
9070
+ type: "string"
9071
+ }
9072
+ },
9073
+ required: [
9074
+ "item",
9075
+ "id",
9076
+ "author_kind",
9077
+ "created_at",
9078
+ "updated_at",
9079
+ "version",
9080
+ "body"
9081
+ ]
9082
+ },
9083
+ GlobalId: {
9084
+ description: `One item, qualified by the source it came from.
9085
+
9086
+ Rendered \`<source>:<native>\` and parsed by splitting on the **first** colon,
9087
+ so a native id may contain colons freely.`,
9088
+ type: "string"
9089
+ },
9090
+ NativeId: {
9091
+ description: `A source's own opaque identifier for one item.
9092
+
9093
+ Deliberately unvalidated: a native id is whatever the upstream system says it
9094
+ is, colons included. The engine parses a qualified id by splitting on the
9095
+ *first* colon precisely so this stays true.`,
9096
+ type: "string"
9097
+ },
9098
+ AuthorKind: {
9099
+ description: `Who wrote a comment, as the source that holds it can tell: a person, a bot — an
9100
+ integration, an app, an automation acting on its own — or neither, when the source cannot
9101
+ say. Decided by the plugin, through
9102
+ [\`TaskSource::comment_author_kind\`](crate::TaskSource::comment_author_kind).`,
9103
+ oneOf: [
9104
+ {
9105
+ description: "A person.",
9106
+ type: "string",
9107
+ const: "person"
9108
+ },
9109
+ {
9110
+ description: "A bot, an integration or an app.",
9111
+ type: "string",
9112
+ const: "bot"
9113
+ },
9114
+ {
9115
+ description: "The source cannot say — no author at all, a deleted account.",
9116
+ type: "string",
9117
+ const: "unknown"
9118
+ }
9119
+ ]
9120
+ }
9121
+ }
9122
+ },
8863
9123
  CompleteAction: {
8864
9124
  $schema: "https://json-schema.org/draft/2020-12/schema",
8865
9125
  title: "CompleteAction",
@@ -18122,6 +18382,198 @@ interprets none of them, which is why the budget and unit names are open vocabul
18122
18382
  }
18123
18383
  }
18124
18384
  },
18385
+ Located: {
18386
+ $schema: "https://json-schema.org/draft/2020-12/schema",
18387
+ title: "Located",
18388
+ description: "Where one task would land, what it would update there, and where a create would file it.",
18389
+ type: "object",
18390
+ properties: {
18391
+ source: {
18392
+ description: "The qualified id the task was read from.",
18393
+ $ref: "#/$defs/GlobalId"
18394
+ },
18395
+ classification: {
18396
+ description: `The class it was placed as, as a copy classifies it: its own declaration and, while the
18397
+ store's boundary is active, its repositories' visibility. A source declared private does
18398
+ not by itself make it private; it withholds the task's provenance instead.`,
18399
+ $ref: "#/$defs/Classification"
18400
+ },
18401
+ destination: {
18402
+ description: "The source the item lands in: the routed one, or the source itself.",
18403
+ $ref: "#/$defs/SourceName"
18404
+ },
18405
+ route: {
18406
+ description: "The index of the route entry that matched, or `None` when none did and the item\nstays in the source itself.",
18407
+ type: [
18408
+ "integer",
18409
+ "null"
18410
+ ],
18411
+ format: "uint32",
18412
+ minimum: 0
18413
+ },
18414
+ counterpart: {
18415
+ description: "The item a copy would update, and the rule that found it — `null` when a copy would\ncreate one, and absent under `--no-counterpart`, which looks for none.",
18416
+ anyOf: [
18417
+ {
18418
+ $ref: "#/$defs/LocatedCounterpart"
18419
+ },
18420
+ {
18421
+ type: "null"
18422
+ }
18423
+ ]
18424
+ },
18425
+ carriers: {
18426
+ description: "Every destination item the origin query found carrying this task's origin, in listing\norder — `[]` when the query did not run, and absent under `--no-counterpart`. When it ran,\n`counterpart` is the first.",
18427
+ type: [
18428
+ "array",
18429
+ "null"
18430
+ ],
18431
+ items: {
18432
+ $ref: "#/$defs/GlobalId"
18433
+ }
18434
+ },
18435
+ creates_in: {
18436
+ description: "The repository a create there would file the task's issue in, or `null` where the\ndestination files no issue in a repository. Where a create would file, whether or not a\ncounterpart exists: an existing issue is never moved.",
18437
+ anyOf: [
18438
+ {
18439
+ $ref: "#/$defs/CreatesIn"
18440
+ },
18441
+ {
18442
+ type: "null"
18443
+ }
18444
+ ]
18445
+ }
18446
+ },
18447
+ required: [
18448
+ "source",
18449
+ "classification",
18450
+ "destination"
18451
+ ],
18452
+ $defs: {
18453
+ GlobalId: {
18454
+ description: `One item, qualified by the source it came from.
18455
+
18456
+ Rendered \`<source>:<native>\` and parsed by splitting on the **first** colon,
18457
+ so a native id may contain colons freely.`,
18458
+ type: "string"
18459
+ },
18460
+ Classification: {
18461
+ description: `Who may read an item: anybody, or only those who may read where it is kept.
18462
+
18463
+ Two values, ordered so the stricter is the greater: [\`strictest\`](Self::strictest) of
18464
+ any two is the one an item they both describe carries. Nothing combines them any other
18465
+ way, which is what makes an explicit \`public\` unable to loosen a private repository, or
18466
+ a document's private project — a classification only ever tightens. A task's project
18467
+ never tightens the task.
18468
+
18469
+ It is recorded on the item and travels with it. A source whose backend has no notion of
18470
+ its own records it under [\`Self::METADATA_KEY\`], exactly as it records
18471
+ [\`Repository::METADATA_KEY\`], and only while it is \`private\`: an item without it is
18472
+ public, so every item written before this existed reads as it did.`,
18473
+ oneOf: [
18474
+ {
18475
+ description: "Anybody who may read the destination may read it.",
18476
+ type: "string",
18477
+ const: "public"
18478
+ },
18479
+ {
18480
+ description: `It may be written only to a destination verified private, and nothing of it may
18481
+ reach a public one.`,
18482
+ type: "string",
18483
+ const: "private"
18484
+ }
18485
+ ]
18486
+ },
18487
+ SourceName: {
18488
+ description: "The name a configuration document gives one configured source.",
18489
+ type: "string",
18490
+ pattern: "^[a-z0-9][a-z0-9-]*$"
18491
+ },
18492
+ LocatedCounterpart: {
18493
+ description: "The destination item a copy would update.",
18494
+ type: "object",
18495
+ properties: {
18496
+ id: {
18497
+ description: "Its qualified id at the destination the task is placed in.",
18498
+ $ref: "#/$defs/GlobalId"
18499
+ },
18500
+ via: {
18501
+ description: "Which rule found it, as a copy's report spells it.",
18502
+ $ref: "#/$defs/CopyVia"
18503
+ }
18504
+ },
18505
+ required: [
18506
+ "id",
18507
+ "via"
18508
+ ]
18509
+ },
18510
+ CopyVia: {
18511
+ description: `Which rule found the destination counterpart an item was updated at, or found already
18512
+ reading as it does.
18513
+
18514
+ Tried in this order, and the first that answers is the one reported: the explicit target
18515
+ task, the link the item records, its own origin, a search of the destination for an item
18516
+ recording it as its origin, and the caller's \`--match-by\`. When none answers, the item is created and says
18517
+ so as [\`NoCounterpart\`] instead.`,
18518
+ oneOf: [
18519
+ {
18520
+ description: "The destination task explicitly named by the caller and verified by origin.",
18521
+ type: "string",
18522
+ const: "target-task"
18523
+ },
18524
+ {
18525
+ description: "The item's `onetaskgraph.copies` entry for the destination named an item whose own\norigin names this one back. Found by one read by id, and no scan.",
18526
+ type: "string",
18527
+ const: "link"
18528
+ },
18529
+ {
18530
+ description: "The item's own `onetaskgraph.origin` named the destination item: a copy-back.",
18531
+ type: "string",
18532
+ const: "origin"
18533
+ },
18534
+ {
18535
+ description: "A search of the destination for an item recording this one as its origin.",
18536
+ type: "string",
18537
+ const: "scan"
18538
+ },
18539
+ {
18540
+ description: "A search of the destination by the caller's `--match-by`.",
18541
+ type: "string",
18542
+ const: "match"
18543
+ },
18544
+ {
18545
+ description: "The item the destination holds under the key of a create an earlier attempt of this\ncopy recorded its intent for, at `onetaskgraph.creating`: that attempt's create,\nfinished rather than made twice.",
18546
+ type: "string",
18547
+ const: "intent"
18548
+ }
18549
+ ]
18550
+ },
18551
+ CreatesIn: {
18552
+ description: "Where a create would file a task's issue.",
18553
+ type: "object",
18554
+ properties: {
18555
+ repository: {
18556
+ description: "The repository, as a normalized origin `host/owner/name`.",
18557
+ $ref: "#/$defs/Repository"
18558
+ },
18559
+ refused: {
18560
+ description: "Why the destination's own policy on where it creates — a GitHub Projects source's\n`creation_owners` — would refuse a create there, as the copy's refusal says it; absent\nwhen it would not. The locate itself never fails for it.",
18561
+ type: [
18562
+ "string",
18563
+ "null"
18564
+ ]
18565
+ }
18566
+ },
18567
+ required: [
18568
+ "repository"
18569
+ ]
18570
+ },
18571
+ Repository: {
18572
+ description: "A repository identified by its normalized origin, without a URL scheme or `.git` suffix.",
18573
+ type: "string"
18574
+ }
18575
+ }
18576
+ },
18125
18577
  Location: {
18126
18578
  $schema: "https://json-schema.org/draft/2020-12/schema",
18127
18579
  title: "Location",
@@ -32984,6 +33436,16 @@ naming no configured source.`,
32984
33436
  }
32985
33437
  ]
32986
33438
  },
33439
+ depends_on: {
33440
+ description: "The task's forward dependency edges, exactly as `task deps` answers them — present only\nwhen the read asked for them (`task show --with-deps`), and absent for a task that was not\nfound, or whose edges could not be read, the failure then in the response's `errors`.",
33441
+ type: [
33442
+ "array",
33443
+ "null"
33444
+ ],
33445
+ items: {
33446
+ $ref: "#/$defs/QualifiedEdge"
33447
+ }
33448
+ },
32987
33449
  sanitization: {
32988
33450
  anyOf: [
32989
33451
  {
@@ -34017,6 +34479,83 @@ before it existed reads exactly what it read before.`,
34017
34479
  }
34018
34480
  ]
34019
34481
  },
34482
+ QualifiedEdge: {
34483
+ description: `One dependency edge with both ends qualified.
34484
+
34485
+ An end may belong to another source. The near plugin owns that qualified far id and the
34486
+ engine reports it without resolving or fetching the far source, so it holds no index.`,
34487
+ type: "object",
34488
+ properties: {
34489
+ from: {
34490
+ description: `The item the edge starts at, and the one that **depends on** the other.
34491
+
34492
+ The direction a caller asked in says which end they named, not which end the edge
34493
+ starts at: a forward read and the matching reverse read report the same edge.`,
34494
+ $ref: "#/$defs/QualifiedEndpoint"
34495
+ },
34496
+ to: {
34497
+ description: "The item the edge points at, and the one that must finish first.",
34498
+ $ref: "#/$defs/QualifiedEndpoint"
34499
+ },
34500
+ kind: {
34501
+ description: "What the edge means.",
34502
+ $ref: "#/$defs/DependencyKind"
34503
+ }
34504
+ },
34505
+ required: [
34506
+ "from",
34507
+ "to",
34508
+ "kind"
34509
+ ]
34510
+ },
34511
+ QualifiedEndpoint: {
34512
+ description: "One typed, qualified endpoint in an engine dependency response.",
34513
+ type: "object",
34514
+ properties: {
34515
+ id: {
34516
+ description: "`<source>:<native>`, preserved when a plugin reports another source.",
34517
+ $ref: "#/$defs/GlobalId"
34518
+ },
34519
+ kind: {
34520
+ description: "Whether this endpoint names a task or project.",
34521
+ $ref: "#/$defs/ItemKind"
34522
+ }
34523
+ },
34524
+ required: [
34525
+ "id",
34526
+ "kind"
34527
+ ]
34528
+ },
34529
+ ItemKind: {
34530
+ description: "The kind of work item named by a dependency endpoint.",
34531
+ oneOf: [
34532
+ {
34533
+ description: "A task.",
34534
+ type: "string",
34535
+ const: "task"
34536
+ },
34537
+ {
34538
+ description: "A project.",
34539
+ type: "string",
34540
+ const: "project"
34541
+ }
34542
+ ]
34543
+ },
34544
+ DependencyKind: {
34545
+ description: "What a [`DependencyEdge`] means.\n\nBoth variants are read in the one direction [`DependencyEdge::from`] fixes: `from`\ndepends on `to`. This enum said the opposite of that until the orientation was settled,\nwhich is why it is spelled out twice rather than once.",
34546
+ oneOf: [
34547
+ {
34548
+ description: "`from` depends on `to`, and `to` must finish before `from` can.",
34549
+ type: "string",
34550
+ const: "blocks"
34551
+ },
34552
+ {
34553
+ description: "`from` and `to` are linked without an ordering.",
34554
+ type: "string",
34555
+ const: "related"
34556
+ }
34557
+ ]
34558
+ },
34020
34559
  Sanitization: {
34021
34560
  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.",
34022
34561
  type: "object",
@@ -34239,6 +34778,16 @@ naming no configured source.`,
34239
34778
  type: "null"
34240
34779
  }
34241
34780
  ]
34781
+ },
34782
+ depends_on: {
34783
+ description: "The task's forward dependency edges, exactly as `task deps` answers them — present only\nwhen the read asked for them (`task show --with-deps`), and absent for a task that was not\nfound, or whose edges could not be read, the failure then in the response's `errors`.",
34784
+ type: [
34785
+ "array",
34786
+ "null"
34787
+ ],
34788
+ items: {
34789
+ $ref: "#/$defs/QualifiedEdge"
34790
+ }
34242
34791
  }
34243
34792
  },
34244
34793
  required: [
@@ -35262,6 +35811,83 @@ before it existed reads exactly what it read before.`,
35262
35811
  const: "remote"
35263
35812
  }
35264
35813
  ]
35814
+ },
35815
+ QualifiedEdge: {
35816
+ description: `One dependency edge with both ends qualified.
35817
+
35818
+ An end may belong to another source. The near plugin owns that qualified far id and the
35819
+ engine reports it without resolving or fetching the far source, so it holds no index.`,
35820
+ type: "object",
35821
+ properties: {
35822
+ from: {
35823
+ description: `The item the edge starts at, and the one that **depends on** the other.
35824
+
35825
+ The direction a caller asked in says which end they named, not which end the edge
35826
+ starts at: a forward read and the matching reverse read report the same edge.`,
35827
+ $ref: "#/$defs/QualifiedEndpoint"
35828
+ },
35829
+ to: {
35830
+ description: "The item the edge points at, and the one that must finish first.",
35831
+ $ref: "#/$defs/QualifiedEndpoint"
35832
+ },
35833
+ kind: {
35834
+ description: "What the edge means.",
35835
+ $ref: "#/$defs/DependencyKind"
35836
+ }
35837
+ },
35838
+ required: [
35839
+ "from",
35840
+ "to",
35841
+ "kind"
35842
+ ]
35843
+ },
35844
+ QualifiedEndpoint: {
35845
+ description: "One typed, qualified endpoint in an engine dependency response.",
35846
+ type: "object",
35847
+ properties: {
35848
+ id: {
35849
+ description: "`<source>:<native>`, preserved when a plugin reports another source.",
35850
+ $ref: "#/$defs/GlobalId"
35851
+ },
35852
+ kind: {
35853
+ description: "Whether this endpoint names a task or project.",
35854
+ $ref: "#/$defs/ItemKind"
35855
+ }
35856
+ },
35857
+ required: [
35858
+ "id",
35859
+ "kind"
35860
+ ]
35861
+ },
35862
+ ItemKind: {
35863
+ description: "The kind of work item named by a dependency endpoint.",
35864
+ oneOf: [
35865
+ {
35866
+ description: "A task.",
35867
+ type: "string",
35868
+ const: "task"
35869
+ },
35870
+ {
35871
+ description: "A project.",
35872
+ type: "string",
35873
+ const: "project"
35874
+ }
35875
+ ]
35876
+ },
35877
+ DependencyKind: {
35878
+ description: "What a [`DependencyEdge`] means.\n\nBoth variants are read in the one direction [`DependencyEdge::from`] fixes: `from`\ndepends on `to`. This enum said the opposite of that until the orientation was settled,\nwhich is why it is spelled out twice rather than once.",
35879
+ oneOf: [
35880
+ {
35881
+ description: "`from` depends on `to`, and `to` must finish before `from` can.",
35882
+ type: "string",
35883
+ const: "blocks"
35884
+ },
35885
+ {
35886
+ description: "`from` and `to` are linked without an ordering.",
35887
+ type: "string",
35888
+ const: "related"
35889
+ }
35890
+ ]
35265
35891
  }
35266
35892
  }
35267
35893
  },
@@ -35312,6 +35938,30 @@ before it existed reads exactly what it read before.`,
35312
35938
  }
35313
35939
  ]
35314
35940
  },
35941
+ outcome: {
35942
+ 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.",
35943
+ anyOf: [
35944
+ {
35945
+ $ref: "#/$defs/GuardOutcome"
35946
+ },
35947
+ {
35948
+ type: "null"
35949
+ }
35950
+ ],
35951
+ default: null
35952
+ },
35953
+ priority_condition: {
35954
+ 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.",
35955
+ anyOf: [
35956
+ {
35957
+ $ref: "#/$defs/PriorityCondition"
35958
+ },
35959
+ {
35960
+ type: "null"
35961
+ }
35962
+ ],
35963
+ default: null
35964
+ },
35315
35965
  sanitization: {
35316
35966
  anyOf: [
35317
35967
  {
@@ -35645,6 +36295,39 @@ interprets none of them, which is why the budget and unit names are open vocabul
35645
36295
  "lower_bound"
35646
36296
  ]
35647
36297
  },
36298
+ GuardOutcome: {
36299
+ description: "What a write guarded by a condition on the item's own value came to.",
36300
+ oneOf: [
36301
+ {
36302
+ description: "The item held a value the guard names, and the write was made.",
36303
+ type: "string",
36304
+ const: "written"
36305
+ },
36306
+ {
36307
+ description: "The item held a value the guard does not name, and nothing was written.",
36308
+ type: "string",
36309
+ const: "held"
36310
+ }
36311
+ ]
36312
+ },
36313
+ PriorityCondition: {
36314
+ description: "What a guarded copy found a counterpart's priority at, and whether that met the condition.",
36315
+ type: "object",
36316
+ properties: {
36317
+ held: {
36318
+ description: "The counterpart's priority, as the copy's own pre-write read held it.",
36319
+ $ref: "#/$defs/Priority"
36320
+ },
36321
+ met: {
36322
+ description: "Whether that priority is one the condition names.",
36323
+ type: "boolean"
36324
+ }
36325
+ },
36326
+ required: [
36327
+ "held",
36328
+ "met"
36329
+ ]
36330
+ },
35648
36331
  Sanitization: {
35649
36332
  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.",
35650
36333
  type: "object",
@@ -36786,9 +37469,9 @@ interprets none of them, which is why the budget and unit names are open vocabul
36786
37469
  description: `A targeted update of one existing task. A member left \`None\` (or empty) leaves that field
36787
37470
  exactly as the source holds it.
36788
37471
 
36789
- Labels, repositories and project membership are deliberately outside it — an existing
36790
- item is never moved, and no caller writes labels this way — and so is creation, which is a
36791
- copy's.`,
37472
+ Labels and project membership are deliberately outside it — an existing item is never
37473
+ moved, and no caller writes labels this way — and so is creation, which is a copy's. Its
37474
+ \`repositories\` list is a field of the item like its title, and is replaced whole.`,
36792
37475
  type: "object",
36793
37476
  properties: {
36794
37477
  title: {
@@ -36861,6 +37544,16 @@ copy's.`,
36861
37544
  items: {
36862
37545
  $ref: "#/$defs/DependencyEdge"
36863
37546
  }
37547
+ },
37548
+ repositories: {
37549
+ description: "Replaces the task's [`Task::repositories`] whole; an empty list clears it. Where the\nitem's issue lives is never moved by it: it is the list the item names, as a read\nreports it.",
37550
+ type: [
37551
+ "array",
37552
+ "null"
37553
+ ],
37554
+ items: {
37555
+ $ref: "#/$defs/Repository"
37556
+ }
36864
37557
  }
36865
37558
  },
36866
37559
  $defs: {
@@ -37078,6 +37771,10 @@ recorded; the reverse of a recorded edge is derived, exactly as a
37078
37771
  const: "related"
37079
37772
  }
37080
37773
  ]
37774
+ },
37775
+ Repository: {
37776
+ description: "A repository identified by its normalized origin, without a URL scheme or `.git` suffix.",
37777
+ type: "string"
37081
37778
  }
37082
37779
  }
37083
37780
  },
@@ -37523,6 +38220,11 @@ reach a public one.`,
37523
38220
  description: "[`TaskUpdate::depends_on`].",
37524
38221
  type: "string",
37525
38222
  const: "depends-on"
38223
+ },
38224
+ {
38225
+ description: "[`TaskUpdate::repositories`].",
38226
+ type: "string",
38227
+ const: "repositories"
37526
38228
  }
37527
38229
  ]
37528
38230
  }
@@ -38035,6 +38737,11 @@ reach a public one.`,
38035
38737
  description: "[`TaskUpdate::depends_on`].",
38036
38738
  type: "string",
38037
38739
  const: "depends-on"
38740
+ },
38741
+ {
38742
+ description: "[`TaskUpdate::repositories`].",
38743
+ type: "string",
38744
+ const: "repositories"
38038
38745
  }
38039
38746
  ]
38040
38747
  },
@@ -38885,6 +39592,11 @@ no insignificant whitespace, UTF-8.`,
38885
39592
  description: "[`TaskUpdate::depends_on`].",
38886
39593
  type: "string",
38887
39594
  const: "depends-on"
39595
+ },
39596
+ {
39597
+ description: "[`TaskUpdate::repositories`].",
39598
+ type: "string",
39599
+ const: "repositories"
38888
39600
  }
38889
39601
  ]
38890
39602
  },
@@ -39785,6 +40497,7 @@ var commandResponseRoots = {
39785
40497
  "task comment list": "CommentList",
39786
40498
  "task comment edit": "CommentWritten",
39787
40499
  "task comment delete": "DeletedComment",
40500
+ "task comments": "CommentsSince",
39788
40501
  "task status set": "TaskStatusSet",
39789
40502
  "task status reconcile": "StatusesReconciled",
39790
40503
  "task status complete": "IssuesCompleted",
@@ -39953,7 +40666,9 @@ var taskUpdateOptionFlags = {
39953
40666
  replace: "--replace",
39954
40667
  reject: "--reject",
39955
40668
  sanitizeDryRun: "--sanitize-dry-run",
39956
- expect: "--expect"
40669
+ expect: "--expect",
40670
+ ifVersion: "--if-version",
40671
+ repositories: "--repository"
39957
40672
  };
39958
40673
  function stringOption(method, name, value) {
39959
40674
  if (typeof value !== "string") {
@@ -39972,13 +40687,7 @@ function taskUpdateFlags(options) {
39972
40687
  throw new TypeError(`${method}: options has the member ${unknown}, which names no field; next: name only ` + Object.keys(taskUpdateOptionFlags).join(", "));
39973
40688
  }
39974
40689
  const args = [];
39975
- const scalars = [
39976
- "title",
39977
- "status",
39978
- "statusName",
39979
- "priority",
39980
- "expect"
39981
- ];
40690
+ const scalars = ["title", "status", "statusName", "priority", "expect", "ifVersion"];
39982
40691
  for (const name of scalars) {
39983
40692
  if (options[name] !== undefined) {
39984
40693
  args.push(taskUpdateOptionFlags[name], stringOption(method, name, options[name]));
@@ -40007,6 +40716,13 @@ function taskUpdateFlags(options) {
40007
40716
  for (const id of ids)
40008
40717
  args.push(flag, id);
40009
40718
  }
40719
+ if (options.repositories !== undefined) {
40720
+ const origins = stringList(method, "repositories", options.repositories);
40721
+ if (origins.length === 0)
40722
+ args.push("--no-repositories");
40723
+ for (const origin of origins)
40724
+ args.push("--repository", origin);
40725
+ }
40010
40726
  args.push(...writePolicyFlags(method, options));
40011
40727
  return args;
40012
40728
  }
@@ -40187,6 +40903,29 @@ function pinFlags(method, pin) {
40187
40903
  return [];
40188
40904
  return ["--pin", stringOption(method, "pin", pin)];
40189
40905
  }
40906
+ var taskCommentsOptionFlags = {
40907
+ metadata: "--metadata",
40908
+ statuses: "--status",
40909
+ items: "--item"
40910
+ };
40911
+ function taskCommentsFlags(since, options) {
40912
+ const method = "taskComments";
40913
+ if (!isPlainObject(options)) {
40914
+ throw new TypeError(`${method}: options is not an object; next: pass the narrowing as a plain object`);
40915
+ }
40916
+ const unknown = Object.keys(options).find((key) => !Object.hasOwn(taskCommentsOptionFlags, key));
40917
+ if (unknown !== undefined) {
40918
+ throw new TypeError(`${method}: options has the member ${unknown}, which narrows nothing; next: name only ` + Object.keys(taskCommentsOptionFlags).join(", "));
40919
+ }
40920
+ const args = ["--since", stringOption(method, "since", since)];
40921
+ const names = ["metadata", "statuses", "items"];
40922
+ for (const name of names) {
40923
+ for (const value of stringList(method, name, options[name])) {
40924
+ args.push(taskCommentsOptionFlags[name], value);
40925
+ }
40926
+ }
40927
+ return args;
40928
+ }
40190
40929
  function taskCopyFlags(options) {
40191
40930
  if (options.create !== undefined && typeof options.create !== "boolean") {
40192
40931
  throw new TypeError("taskCopy: create must be a boolean");
@@ -40209,7 +40948,8 @@ function taskCopyFlags(options) {
40209
40948
  ...conditions,
40210
40949
  ...options.create ? ["--create"] : [],
40211
40950
  ...options.targetTask === undefined ? [] : ["--target-task", stringOption("taskCopy", "targetTask", options.targetTask)],
40212
- ...expectFlags("taskCopy", options)
40951
+ ...expectFlags("taskCopy", options),
40952
+ ...options.ifVersion === undefined ? [] : ["--if-version", stringOption("taskCopy", "ifVersion", options.ifVersion)]
40213
40953
  ];
40214
40954
  }
40215
40955
  function projectCopyFlags(options) {
@@ -40390,6 +41130,9 @@ class OnetaskgraphClient {
40390
41130
  args.push(...expectFlags("taskCommentAdd", options));
40391
41131
  return this.run("task comment add", [id, ...args], input, options.sanitizeDryRun === true);
40392
41132
  }
41133
+ taskComments(source, since, options = {}) {
41134
+ return this.run("task comments", [source, ...taskCommentsFlags(since, options)]);
41135
+ }
40393
41136
  taskCommentList(id, options = {}) {
40394
41137
  return this.run("task comment list", [id, ...pinFlags("taskCommentList", options.pin)]);
40395
41138
  }
@@ -40712,11 +41455,13 @@ function assertCompleteCommandSurface() {
40712
41455
  }
40713
41456
 
40714
41457
  // src/index.ts
40715
- var VERSION = "0.14.9";
41458
+ var VERSION = "0.14.10";
40716
41459
  export {
40717
41460
  taskUpdateOptionFlags,
40718
41461
  taskUpdateFlags,
40719
41462
  taskCopyFlags,
41463
+ taskCommentsOptionFlags,
41464
+ taskCommentsFlags,
40720
41465
  statusPolicies,
40721
41466
  projectGraphDirections,
40722
41467
  projectCopyFlags,