@onetaskgraph/sdk 0.14.20 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { AttestationCheck, AttestationState, Attested, CacheCleared, Classification, CommentBatch, CommentList, CommentsAdded, CommentsSince, CommentWritten, CopyReport, DeletedComment, DocumentDetail, EffectiveConfig, FailureDocument, FieldsReport, FindRequest, FoundTasks, HumanTaskProjected, IssuesCompleted, LinkBatch, LinksWritten, LocateReport, MetadataSet, NativeId, ParentBatch, ParentsSet, PlannedProject, Priority, ProjectAttestationCheck, ProjectGraph, ProjectStatusSet, QueryResponseOfQualifiedDocument, QueryResponseOfQualifiedEdge, QueryResponseOfQualifiedLabel, QueryResponseOfQualifiedProject, QueryResponseOfQualifiedTask, QueryResponseOfSearchHit, Regenerated, RenderedTemplate, SanitizeDryRun, SourceListings, SourceRoute, StatusCategory, StatusesReconciled, StatusNamesReport, StatusOptionsReport, StoredFormsMigrated, SweepReport, TaskAssetNames, TaskAssigneeSet, TaskContentDigest, TaskContentSet, TaskDetail, TaskDetails, TaskPrioritySet, TaskRelations, TaskStatusSet, TasksUpdated, TaskUpdated, TemplateAnswers, TemplateVariables, UpdateBatch } from "./generated/models.ts";
1
+ import type { AttestationCheck, AttestationState, Attested, CacheCleared, Classification, CommentBatch, CommentList, CommentsAdded, CommentsSince, CommentWritten, CopyReport, DeletedComment, DocumentDetail, EffectiveConfig, FailureDocument, FieldsReport, FindRequest, FoundTasks, HumanTaskProjected, IssuesCompleted, LinkBatch, LinksWritten, LocateReport, MetadataSet, NativeId, ParentBatch, ParentsSet, PlannedProject, Priority, ProjectAttestationCheck, ProjectGraph, ProjectStatusSet, QueryResponseOfQualifiedDocument, QueryResponseOfQualifiedEdge, QueryResponseOfQualifiedLabel, QueryResponseOfQualifiedProject, QueryResponseOfQualifiedTask, QueryResponseOfSearchHit, Regenerated, RenderedTemplate, SanitizeDryRun, SourceListings, SourceQuota, SourceRoute, StatusCategory, StatusesReconciled, StatusNamesReport, StatusOptionsReport, StoredFormsMigrated, SweepReport, TaskAssetNames, TaskAssigneeSet, TaskContentDigest, TaskContentSet, TaskDetail, TaskDetails, TaskPrioritySet, TaskRelations, TaskStatusSet, TasksUpdated, TaskUpdated, TemplateAnswers, TemplateVariables, UpdateBatch } from "./generated/models.ts";
2
2
  import { runtimeSchemas } from "./generated/schemas.ts";
3
3
  export type QueryOptions = {
4
4
  sources?: string[];
@@ -149,6 +149,7 @@ export type TaskUpdateOptions = WriteOptions & ExpectOptions & HeldOptions & {
149
149
  dependsOn?: string[];
150
150
  repositories?: string[];
151
151
  whenPriority?: Priority[];
152
+ duplicateOf?: string;
152
153
  };
153
154
  export type RenderOptions = TemplateSourceOptions & WriteOptions & {
154
155
  unset?: string[];
@@ -210,6 +211,7 @@ export declare class OnetaskgraphClient {
210
211
  sourcesMigrate(source: string, options?: {
211
212
  dryRun?: boolean;
212
213
  }): Promise<StoredFormsMigrated>;
214
+ sourcesQuota(source: string): Promise<SourceQuota>;
213
215
  sourcesSanitize(source: string, options?: Omit<WriteOptions, "sanitizeDryRun" | "termScope"> & {
214
216
  dryRun?: boolean;
215
217
  complete?: boolean;
@@ -245,10 +247,14 @@ export declare class OnetaskgraphClient {
245
247
  }): Promise<CommentWritten>;
246
248
  taskCommentEdit(id: string, commentId: string, options: CommentBodyOptions): Promise<CommentWritten | SanitizeDryRun>;
247
249
  taskCommentDelete(id: string, commentId: string, options?: ExpectOptions): Promise<DeletedComment>;
248
- taskStatusSet(id: string, category: StatusCategory, options?: (WriteOptions & ExpectOptions) & {
250
+ taskStatusSet(id: string, category: StatusCategory, options?: (WriteOptions & ExpectOptions & {
251
+ duplicateOf?: string;
252
+ }) & {
249
253
  sanitizeDryRun?: false;
250
254
  }): Promise<TaskStatusSet>;
251
- taskStatusSet(id: string, category: StatusCategory, options?: WriteOptions & ExpectOptions): Promise<TaskStatusSet | SanitizeDryRun>;
255
+ taskStatusSet(id: string, category: StatusCategory, options?: WriteOptions & ExpectOptions & {
256
+ duplicateOf?: string;
257
+ }): Promise<TaskStatusSet | SanitizeDryRun>;
252
258
  taskStatusReconcile(source: string, options?: (WriteOptions & {
253
259
  dryRun?: boolean;
254
260
  }) & {
@@ -1 +1 @@
1
- export declare const binaryCommands: readonly ["schema", "config show", "sources list", "sources status-options", "sources fields", "sources route", "sources sanitize", "sources migrate", "task list", "task show", "task show-many", "task deps", "task copy", "task locate", "task comment add", "task comment list", "task comment edit", "task comment delete", "task comment add-many", "task comments", "task find", "task update-many", "task parent set-many", "task link add-many", "task link remove-many", "task relations", "task status set", "task status reconcile", "task status complete", "task priority set", "task assignee set", "task content set", "task metadata set", "task attest", "task attestation check", "task digest", "task update", "task create", "task render", "task answers", "task assets", "task project-human", "project list", "project show", "project deps", "project graph", "project copy", "project metadata set", "project attest", "project attestation check", "project status set", "project create", "project render", "project answers", "document list", "document show", "document copy", "document metadata set", "document attest", "document attestation check", "document create", "document render", "document answers", "label list", "search", "cache clear", "template variables", "template render"];
1
+ export declare const binaryCommands: readonly ["schema", "config show", "sources list", "sources status-options", "sources fields", "sources route", "sources sanitize", "sources migrate", "sources quota", "task list", "task show", "task show-many", "task deps", "task copy", "task locate", "task comment add", "task comment list", "task comment edit", "task comment delete", "task comment add-many", "task comments", "task find", "task update-many", "task parent set-many", "task link add-many", "task link remove-many", "task relations", "task status set", "task status reconcile", "task status complete", "task priority set", "task assignee set", "task content set", "task metadata set", "task attest", "task attestation check", "task digest", "task update", "task create", "task render", "task answers", "task assets", "task project-human", "project list", "project show", "project deps", "project graph", "project copy", "project metadata set", "project attest", "project attestation check", "project status set", "project create", "project render", "project answers", "document list", "document show", "document copy", "document metadata set", "document attest", "document attestation check", "document create", "document render", "document answers", "label list", "search", "cache clear", "template variables", "template render"];
@@ -1,4 +1,4 @@
1
- export declare const SCHEMA_BUNDLE_VERSION: 67;
1
+ export declare const SCHEMA_BUNDLE_VERSION: 69;
2
2
  export declare namespace GeneratedAsset {
3
3
  /**
4
4
  * One asset a record holds, as a read reports it.
@@ -12180,6 +12180,44 @@ export declare namespace GeneratedQueryResponseOfSearchHit {
12180
12180
  }
12181
12181
  }
12182
12182
  export type QueryResponseOfSearchHit = GeneratedQueryResponseOfSearchHit.QueryResponseOfSearchHit;
12183
+ export declare namespace GeneratedQuotaReading {
12184
+ /**
12185
+ * What one response — or one read of the backend's own allowance endpoint — said about one
12186
+ * rate-limit window of the backend.
12187
+ *
12188
+ * **One window, never merged.** A credential may be metered by several windows of the same
12189
+ * resource at once — GitHub was measured answering one token from two concurrent GraphQL
12190
+ * windows, each with its own reset, while `GET /rate_limit` reported only one of them — so a
12191
+ * source reports each reading as the response that carried it said it, with its own
12192
+ * [`resets_at`](Self::resets_at). Choosing the least of several is the caller's.
12193
+ */
12194
+ interface QuotaReading {
12195
+ /**
12196
+ * The backend's own name for what is metered — GitHub's resource names (`graphql`,
12197
+ * `core`, `search` and so on), Linear's `requests` and `complexity`.
12198
+ */
12199
+ resource: string;
12200
+ /**
12201
+ * The whole allowance of the window.
12202
+ */
12203
+ limit: number;
12204
+ /**
12205
+ * What was left of it when the backend answered.
12206
+ */
12207
+ remaining: number;
12208
+ /**
12209
+ * What the credential had spent of it — everything that shares the credential, not only
12210
+ * this source.
12211
+ */
12212
+ used: number;
12213
+ /**
12214
+ * When the window resets and the allowance comes back.
12215
+ */
12216
+ resets_at: string;
12217
+ [k: string]: any;
12218
+ }
12219
+ }
12220
+ export type QuotaReading = GeneratedQuotaReading.QuotaReading;
12183
12221
  export declare namespace GeneratedReadLink {
12184
12222
  /**
12185
12223
  * One link as one endpoint holds it.
@@ -13453,6 +13491,62 @@ export declare namespace GeneratedSourcePlan {
13453
13491
  }
13454
13492
  }
13455
13493
  export type SourcePlan = GeneratedSourcePlan.SourcePlan;
13494
+ export declare namespace GeneratedSourceQuota {
13495
+ /**
13496
+ * What `sources quota` answers: every rate-limit window one source's backend reported, each
13497
+ * as it reported it.
13498
+ *
13499
+ * A source with nothing to report — a folder of Markdown, an in-memory source, a stdio
13500
+ * plugin whose handshake does not declare `quota` — answers no resources at all.
13501
+ */
13502
+ interface SourceQuota {
13503
+ /**
13504
+ * The source asked.
13505
+ */
13506
+ source: string;
13507
+ /**
13508
+ * One reading per window, never merged with another; choosing the least is the caller's.
13509
+ */
13510
+ resources: QuotaReading[];
13511
+ [k: string]: any;
13512
+ }
13513
+ /**
13514
+ * What one response — or one read of the backend's own allowance endpoint — said about one
13515
+ * rate-limit window of the backend.
13516
+ *
13517
+ * **One window, never merged.** A credential may be metered by several windows of the same
13518
+ * resource at once — GitHub was measured answering one token from two concurrent GraphQL
13519
+ * windows, each with its own reset, while `GET /rate_limit` reported only one of them — so a
13520
+ * source reports each reading as the response that carried it said it, with its own
13521
+ * [`resets_at`](Self::resets_at). Choosing the least of several is the caller's.
13522
+ */
13523
+ interface QuotaReading {
13524
+ /**
13525
+ * The backend's own name for what is metered — GitHub's resource names (`graphql`,
13526
+ * `core`, `search` and so on), Linear's `requests` and `complexity`.
13527
+ */
13528
+ resource: string;
13529
+ /**
13530
+ * The whole allowance of the window.
13531
+ */
13532
+ limit: number;
13533
+ /**
13534
+ * What was left of it when the backend answered.
13535
+ */
13536
+ remaining: number;
13537
+ /**
13538
+ * What the credential had spent of it — everything that shares the credential, not only
13539
+ * this source.
13540
+ */
13541
+ used: number;
13542
+ /**
13543
+ * When the window resets and the allowance comes back.
13544
+ */
13545
+ resets_at: string;
13546
+ [k: string]: any;
13547
+ }
13548
+ }
13549
+ export type SourceQuota = GeneratedSourceQuota.SourceQuota;
13456
13550
  export declare namespace GeneratedSourceRoute {
13457
13551
  /**
13458
13552
  * The name a configuration document gives one configured source.
@@ -17513,6 +17607,17 @@ export declare namespace GeneratedTaskUpdate {
17513
17607
  * it cannot assign, naming them, rather than writing the rest without them.
17514
17608
  */
17515
17609
  assignees?: (string[] | null);
17610
+ /**
17611
+ * Close the task as a duplicate of this one, the survivor — a decision its caller made,
17612
+ * which the store never makes on its own. Valid only beside a `cancelled` status, or with
17613
+ * no status named, when it implies `cancelled`; any other status is refused by
17614
+ * [`consistent`](Self::consistent), writing nothing.
17615
+ *
17616
+ * A source closes it natively where its backend can — GitHub's duplicate closure, Linear's
17617
+ * duplicate relation — and every source records the typed `duplicate` link in the task's
17618
+ * metadata, so a later read reports it `cancelled` with that link.
17619
+ */
17620
+ duplicate_of?: (TaskRef | null);
17516
17621
  [k: string]: any;
17517
17622
  }
17518
17623
  /**
@@ -17631,7 +17736,7 @@ export declare namespace GeneratedTaskUpdateOutcome {
17631
17736
  * kebab-case on the wire. [`Metadata`](Self::Metadata) stands for every metadata key the
17632
17737
  * update set or removed together; [`DependsOn`](Self::DependsOn) for the task's forward edges.
17633
17738
  */
17634
- type UpdatedField = ("title" | "content" | "status" | "priority" | "metadata" | "delivers" | "depends-on" | "repositories" | "assignees");
17739
+ type UpdatedField = ("title" | "content" | "status" | "priority" | "metadata" | "delivers" | "depends-on" | "repositories" | "assignees" | "duplicate-of");
17635
17740
  /**
17636
17741
  * What a source answers a [`TaskUpdate`] of a task it holds with.
17637
17742
  *
@@ -17901,7 +18006,7 @@ export declare namespace GeneratedTaskUpdated {
17901
18006
  * kebab-case on the wire. [`Metadata`](Self::Metadata) stands for every metadata key the
17902
18007
  * update set or removed together; [`DependsOn`](Self::DependsOn) for the task's forward edges.
17903
18008
  */
17904
- type UpdatedField = ("title" | "content" | "status" | "priority" | "metadata" | "delivers" | "depends-on" | "repositories" | "assignees");
18009
+ type UpdatedField = ("title" | "content" | "status" | "priority" | "metadata" | "delivers" | "depends-on" | "repositories" | "assignees" | "duplicate-of");
17905
18010
  /**
17906
18011
  * What keeping one delivered task in step with one deliverer came to.
17907
18012
  */
@@ -18840,6 +18945,11 @@ export declare namespace GeneratedUpdateBatch {
18840
18945
  * answers `held`. Left out, it sets no guard.
18841
18946
  */
18842
18947
  when_assignees?: (string[] | null);
18948
+ /**
18949
+ * Close it as a duplicate of this task, the survivor, qualified or of the batch's source —
18950
+ * valid only beside `status: cancelled` or no status, which it then implies.
18951
+ */
18952
+ duplicate_of?: (string | null);
18843
18953
  }
18844
18954
  }
18845
18955
  export type UpdateBatch = GeneratedUpdateBatch.UpdateBatch;
@@ -18850,7 +18960,7 @@ export declare namespace GeneratedUpdatedField {
18850
18960
  * kebab-case on the wire. [`Metadata`](Self::Metadata) stands for every metadata key the
18851
18961
  * update set or removed together; [`DependsOn`](Self::DependsOn) for the task's forward edges.
18852
18962
  */
18853
- type UpdatedField = ("title" | "content" | "status" | "priority" | "metadata" | "delivers" | "depends-on" | "repositories" | "assignees");
18963
+ type UpdatedField = ("title" | "content" | "status" | "priority" | "metadata" | "delivers" | "depends-on" | "repositories" | "assignees" | "duplicate-of");
18854
18964
  }
18855
18965
  export type UpdatedField = GeneratedUpdatedField.UpdatedField;
18856
18966
  export declare namespace GeneratedVariableType {
@@ -7,7 +7,7 @@ export type JsonSchemaDocument = {
7
7
  readonly [key: string]: JsonSchemaValue;
8
8
  };
9
9
  /** Every root name the binary emitted, so a validator selects only an emitted root. */
10
- export type RuntimeSchemaRoot = "Asset" | "AssetContentType" | "AssetName" | "AssetPayload" | "AssetUpload" | "AssetUploads" | "AssetWrite" | "AssetsWritten" | "Attestation" | "AttestationCheck" | "AttestationState" | "Attested" | "AuthorKind" | "BatchOutcome" | "CacheCleared" | "CacheUse" | "Capabilities" | "Classification" | "ClosedAs" | "Comment" | "CommentActivity" | "CommentBatch" | "CommentList" | "CommentWritten" | "CommentsAdded" | "CommentsSince" | "CompleteAction" | "Completion" | "ContradictedItem" | "CopyAction" | "CopyLink" | "CopyOutcome" | "CopyReport" | "CopyVia" | "CreateSettings" | "CredentialLayer" | "DeletedComment" | "Delivered" | "DeliveryOutcome" | "DependencyEdge" | "DependencyEndpoint" | "DependencyKind" | "Direction" | "Document" | "DocumentDetail" | "DocumentQuery" | "EffectiveConfig" | "ExpectedWrite" | "Failure" | "FailureClass" | "FailureDocument" | "FindRequest" | "FoundTasks" | "GlobalId" | "Health" | "HeldTask" | "HumanTaskProjected" | "HumanTaskProjection" | "IssueCompleted" | "IssueHolding" | "IssueRef" | "IssuesCompleted" | "ItemKind" | "ItemType" | "Label" | "LinearConfig" | "LinkBatch" | "LinkOutcome" | "LinksWritten" | "LocateReport" | "Located" | "Location" | "MemberDeclaration" | "MetadataSet" | "NativeId" | "NewComment" | "Origin" | "OtherEnd" | "OutputFormat" | "PageOfComment" | "PageOfDependencyEdge" | "PageOfDocument" | "PageOfLabel" | "PageOfProject" | "PageOfTask" | "PageRequest" | "PageToken" | "ParentBatch" | "ParentOutcome" | "ParentsSet" | "Placement" | "PlannedProject" | "Predicate" | "Priority" | "Project" | "ProjectAttestationCheck" | "ProjectGraph" | "ProjectQuery" | "ProjectStatusSet" | "PublicProjections" | "PublicWriteInput" | "QualifiedDocument" | "QualifiedEdge" | "QualifiedEndpoint" | "QualifiedLabel" | "QualifiedProject" | "QualifiedTask" | "QueryPlan" | "QueryResponseOfQualifiedDocument" | "QueryResponseOfQualifiedEdge" | "QueryResponseOfQualifiedLabel" | "QueryResponseOfQualifiedProject" | "QueryResponseOfQualifiedTask" | "QueryResponseOfSearchHit" | "ReadLink" | "ReconcileOutcome" | "Regenerated" | "RelationsItem" | "RenderedTemplate" | "Repository" | "RepositoryVisibility" | "ResolvedCredential" | "Sanitization" | "SanitizeDryRun" | "SearchHit" | "SearchKind" | "SecretsReport" | "Setting" | "SourceCacheConfig" | "SourceError" | "SourceFailure" | "SourceListing" | "SourceListings" | "SourceName" | "SourcePlan" | "SourceRoute" | "SourceVisibility" | "Status" | "StatusCategory" | "StatusContradiction" | "StatusMapping" | "StatusReconciled" | "StatusesReconciled" | "StoredFormsMigrated" | "SweepReport" | "Task" | "TaskAssetNames" | "TaskAssigneeSet" | "TaskContentDigest" | "TaskContentSet" | "TaskDetail" | "TaskDetails" | "TaskLink" | "TaskPrioritySet" | "TaskQuery" | "TaskRef" | "TaskRelations" | "TaskStatusSet" | "TaskUpdate" | "TaskUpdateOutcome" | "TaskUpdated" | "TasksUpdated" | "TemplateAnswers" | "TemplateProvenance" | "TemplateVariable" | "TemplateVariables" | "TextFields" | "UpdateBatch" | "UpdatedField" | "VariableType" | "VoidReason" | "WritePolicyConfig" | "WriteVerdict" | "StatusOptionsReport" | "FieldsReport" | "StatusNamesReport";
10
+ export type RuntimeSchemaRoot = "Asset" | "AssetContentType" | "AssetName" | "AssetPayload" | "AssetUpload" | "AssetUploads" | "AssetWrite" | "AssetsWritten" | "Attestation" | "AttestationCheck" | "AttestationState" | "Attested" | "AuthorKind" | "BatchOutcome" | "CacheCleared" | "CacheUse" | "Capabilities" | "Classification" | "ClosedAs" | "Comment" | "CommentActivity" | "CommentBatch" | "CommentList" | "CommentWritten" | "CommentsAdded" | "CommentsSince" | "CompleteAction" | "Completion" | "ContradictedItem" | "CopyAction" | "CopyLink" | "CopyOutcome" | "CopyReport" | "CopyVia" | "CreateSettings" | "CredentialLayer" | "DeletedComment" | "Delivered" | "DeliveryOutcome" | "DependencyEdge" | "DependencyEndpoint" | "DependencyKind" | "Direction" | "Document" | "DocumentDetail" | "DocumentQuery" | "EffectiveConfig" | "ExpectedWrite" | "Failure" | "FailureClass" | "FailureDocument" | "FindRequest" | "FoundTasks" | "GlobalId" | "Health" | "HeldTask" | "HumanTaskProjected" | "HumanTaskProjection" | "IssueCompleted" | "IssueHolding" | "IssueRef" | "IssuesCompleted" | "ItemKind" | "ItemType" | "Label" | "LinearConfig" | "LinkBatch" | "LinkOutcome" | "LinksWritten" | "LocateReport" | "Located" | "Location" | "MemberDeclaration" | "MetadataSet" | "NativeId" | "NewComment" | "Origin" | "OtherEnd" | "OutputFormat" | "PageOfComment" | "PageOfDependencyEdge" | "PageOfDocument" | "PageOfLabel" | "PageOfProject" | "PageOfTask" | "PageRequest" | "PageToken" | "ParentBatch" | "ParentOutcome" | "ParentsSet" | "Placement" | "PlannedProject" | "Predicate" | "Priority" | "Project" | "ProjectAttestationCheck" | "ProjectGraph" | "ProjectQuery" | "ProjectStatusSet" | "PublicProjections" | "PublicWriteInput" | "QualifiedDocument" | "QualifiedEdge" | "QualifiedEndpoint" | "QualifiedLabel" | "QualifiedProject" | "QualifiedTask" | "QueryPlan" | "QueryResponseOfQualifiedDocument" | "QueryResponseOfQualifiedEdge" | "QueryResponseOfQualifiedLabel" | "QueryResponseOfQualifiedProject" | "QueryResponseOfQualifiedTask" | "QueryResponseOfSearchHit" | "QuotaReading" | "ReadLink" | "ReconcileOutcome" | "Regenerated" | "RelationsItem" | "RenderedTemplate" | "Repository" | "RepositoryVisibility" | "ResolvedCredential" | "Sanitization" | "SanitizeDryRun" | "SearchHit" | "SearchKind" | "SecretsReport" | "Setting" | "SourceCacheConfig" | "SourceError" | "SourceFailure" | "SourceListing" | "SourceListings" | "SourceName" | "SourcePlan" | "SourceQuota" | "SourceRoute" | "SourceVisibility" | "Status" | "StatusCategory" | "StatusContradiction" | "StatusMapping" | "StatusReconciled" | "StatusesReconciled" | "StoredFormsMigrated" | "SweepReport" | "Task" | "TaskAssetNames" | "TaskAssigneeSet" | "TaskContentDigest" | "TaskContentSet" | "TaskDetail" | "TaskDetails" | "TaskLink" | "TaskPrioritySet" | "TaskQuery" | "TaskRef" | "TaskRelations" | "TaskStatusSet" | "TaskUpdate" | "TaskUpdateOutcome" | "TaskUpdated" | "TasksUpdated" | "TemplateAnswers" | "TemplateProvenance" | "TemplateVariable" | "TemplateVariables" | "TextFields" | "UpdateBatch" | "UpdatedField" | "VariableType" | "VoidReason" | "WritePolicyConfig" | "WriteVerdict" | "StatusOptionsReport" | "FieldsReport" | "StatusNamesReport";
11
11
  export declare const runtimeSchemas: {
12
12
  readonly [Root in RuntimeSchemaRoot]: JsonSchemaDocument;
13
13
  };
package/dist/index.d.ts CHANGED
@@ -6,6 +6,6 @@
6
6
  * implementation of the query semantics across the CLI and both SDKs.
7
7
  */
8
8
  /** The version this package publishes. `package.json` must agree; see the tests. */
9
- export declare const VERSION = "0.14.20";
9
+ export declare const VERSION = "0.15.0";
10
10
  export * from "./client.ts";
11
11
  export type * from "./generated/models.ts";
package/dist/index.js CHANGED
@@ -7148,6 +7148,7 @@ var binaryCommands = [
7148
7148
  "sources route",
7149
7149
  "sources sanitize",
7150
7150
  "sources migrate",
7151
+ "sources quota",
7151
7152
  "task list",
7152
7153
  "task show",
7153
7154
  "task show-many",
@@ -7211,7 +7212,7 @@ var binaryCommands = [
7211
7212
  ];
7212
7213
 
7213
7214
  // src/generated/models.ts
7214
- var SCHEMA_BUNDLE_VERSION = 67;
7215
+ var SCHEMA_BUNDLE_VERSION = 69;
7215
7216
 
7216
7217
  // src/generated/schemas.ts
7217
7218
  var runtimeSchemas = {
@@ -30835,6 +30836,56 @@ later.`,
30835
30836
  }
30836
30837
  }
30837
30838
  },
30839
+ QuotaReading: {
30840
+ $schema: "https://json-schema.org/draft/2020-12/schema",
30841
+ title: "QuotaReading",
30842
+ description: `What one response — or one read of the backend's own allowance endpoint — said about one
30843
+ rate-limit window of the backend.
30844
+
30845
+ **One window, never merged.** A credential may be metered by several windows of the same
30846
+ resource at once — GitHub was measured answering one token from two concurrent GraphQL
30847
+ windows, each with its own reset, while \`GET /rate_limit\` reported only one of them — so a
30848
+ source reports each reading as the response that carried it said it, with its own
30849
+ [\`resets_at\`](Self::resets_at). Choosing the least of several is the caller's.`,
30850
+ type: "object",
30851
+ properties: {
30852
+ resource: {
30853
+ description: "The backend's own name for what is metered — GitHub's resource names (`graphql`,\n`core`, `search` and so on), Linear's `requests` and `complexity`.",
30854
+ type: "string"
30855
+ },
30856
+ limit: {
30857
+ description: "The whole allowance of the window.",
30858
+ type: "integer",
30859
+ format: "uint64",
30860
+ minimum: 0
30861
+ },
30862
+ remaining: {
30863
+ description: "What was left of it when the backend answered.",
30864
+ type: "integer",
30865
+ format: "uint64",
30866
+ minimum: 0
30867
+ },
30868
+ used: {
30869
+ description: `What the credential had spent of it — everything that shares the credential, not only
30870
+ this source.`,
30871
+ type: "integer",
30872
+ format: "uint64",
30873
+ minimum: 0
30874
+ },
30875
+ resets_at: {
30876
+ description: "When the window resets and the allowance comes back.",
30877
+ type: "string",
30878
+ format: "date-time"
30879
+ }
30880
+ },
30881
+ required: [
30882
+ "resource",
30883
+ "limit",
30884
+ "remaining",
30885
+ "used",
30886
+ "resets_at"
30887
+ ]
30888
+ },
30838
30889
  ReadLink: {
30839
30890
  $schema: "https://json-schema.org/draft/2020-12/schema",
30840
30891
  title: "ReadLink",
@@ -33851,6 +33902,84 @@ source with no project table.`,
33851
33902
  }
33852
33903
  }
33853
33904
  },
33905
+ SourceQuota: {
33906
+ $schema: "https://json-schema.org/draft/2020-12/schema",
33907
+ title: "SourceQuota",
33908
+ description: "What `sources quota` answers: every rate-limit window one source's backend reported, each\nas it reported it.\n\nA source with nothing to report — a folder of Markdown, an in-memory source, a stdio\nplugin whose handshake does not declare `quota` — answers no resources at all.",
33909
+ type: "object",
33910
+ properties: {
33911
+ source: {
33912
+ description: "The source asked.",
33913
+ $ref: "#/$defs/SourceName"
33914
+ },
33915
+ resources: {
33916
+ description: "One reading per window, never merged with another; choosing the least is the caller's.",
33917
+ type: "array",
33918
+ items: {
33919
+ $ref: "#/$defs/QuotaReading"
33920
+ }
33921
+ }
33922
+ },
33923
+ required: [
33924
+ "source",
33925
+ "resources"
33926
+ ],
33927
+ $defs: {
33928
+ SourceName: {
33929
+ description: "The name a configuration document gives one configured source.",
33930
+ type: "string",
33931
+ pattern: "^[a-z0-9][a-z0-9-]*$"
33932
+ },
33933
+ QuotaReading: {
33934
+ description: `What one response — or one read of the backend's own allowance endpoint — said about one
33935
+ rate-limit window of the backend.
33936
+
33937
+ **One window, never merged.** A credential may be metered by several windows of the same
33938
+ resource at once — GitHub was measured answering one token from two concurrent GraphQL
33939
+ windows, each with its own reset, while \`GET /rate_limit\` reported only one of them — so a
33940
+ source reports each reading as the response that carried it said it, with its own
33941
+ [\`resets_at\`](Self::resets_at). Choosing the least of several is the caller's.`,
33942
+ type: "object",
33943
+ properties: {
33944
+ resource: {
33945
+ description: "The backend's own name for what is metered — GitHub's resource names (`graphql`,\n`core`, `search` and so on), Linear's `requests` and `complexity`.",
33946
+ type: "string"
33947
+ },
33948
+ limit: {
33949
+ description: "The whole allowance of the window.",
33950
+ type: "integer",
33951
+ format: "uint64",
33952
+ minimum: 0
33953
+ },
33954
+ remaining: {
33955
+ description: "What was left of it when the backend answered.",
33956
+ type: "integer",
33957
+ format: "uint64",
33958
+ minimum: 0
33959
+ },
33960
+ used: {
33961
+ description: `What the credential had spent of it — everything that shares the credential, not only
33962
+ this source.`,
33963
+ type: "integer",
33964
+ format: "uint64",
33965
+ minimum: 0
33966
+ },
33967
+ resets_at: {
33968
+ description: "When the window resets and the allowance comes back.",
33969
+ type: "string",
33970
+ format: "date-time"
33971
+ }
33972
+ },
33973
+ required: [
33974
+ "resource",
33975
+ "limit",
33976
+ "remaining",
33977
+ "used",
33978
+ "resets_at"
33979
+ ]
33980
+ }
33981
+ }
33982
+ },
33854
33983
  SourceRoute: {
33855
33984
  $schema: "https://json-schema.org/draft/2020-12/schema",
33856
33985
  title: "SourceRoute",
@@ -41598,6 +41727,17 @@ it cannot assign, naming them, rather than writing the rest without them.`,
41598
41727
  items: {
41599
41728
  type: "string"
41600
41729
  }
41730
+ },
41731
+ duplicate_of: {
41732
+ description: "Close the task as a duplicate of this one, the survivor — a decision its caller made,\nwhich the store never makes on its own. Valid only beside a `cancelled` status, or with\nno status named, when it implies `cancelled`; any other status is refused by\n[`consistent`](Self::consistent), writing nothing.\n\nA source closes it natively where its backend can — GitHub's duplicate closure, Linear's\nduplicate relation — and every source records the typed `duplicate` link in the task's\nmetadata, so a later read reports it `cancelled` with that link.",
41733
+ anyOf: [
41734
+ {
41735
+ $ref: "#/$defs/TaskRef"
41736
+ },
41737
+ {
41738
+ type: "null"
41739
+ }
41740
+ ]
41601
41741
  }
41602
41742
  },
41603
41743
  $defs: {
@@ -42294,6 +42434,11 @@ reach a public one.`,
42294
42434
  description: "[`TaskUpdate::assignees`].",
42295
42435
  type: "string",
42296
42436
  const: "assignees"
42437
+ },
42438
+ {
42439
+ description: "[`TaskUpdate::duplicate_of`]: the task was closed as a duplicate, natively or by the\nlink the store records.",
42440
+ type: "string",
42441
+ const: "duplicate-of"
42297
42442
  }
42298
42443
  ]
42299
42444
  }
@@ -42847,6 +42992,11 @@ reach a public one.`,
42847
42992
  description: "[`TaskUpdate::assignees`].",
42848
42993
  type: "string",
42849
42994
  const: "assignees"
42995
+ },
42996
+ {
42997
+ description: "[`TaskUpdate::duplicate_of`]: the task was closed as a duplicate, natively or by the\nlink the store records.",
42998
+ type: "string",
42999
+ const: "duplicate-of"
42850
43000
  }
42851
43001
  ]
42852
43002
  },
@@ -44075,6 +44225,13 @@ no insignificant whitespace, UTF-8.`,
44075
44225
  items: {
44076
44226
  type: "string"
44077
44227
  }
44228
+ },
44229
+ duplicate_of: {
44230
+ description: "Close it as a duplicate of this task, the survivor, qualified or of the batch's source —\nvalid only beside `status: cancelled` or no status, which it then implies.",
44231
+ type: [
44232
+ "string",
44233
+ "null"
44234
+ ]
44078
44235
  }
44079
44236
  },
44080
44237
  additionalProperties: false,
@@ -44218,6 +44375,11 @@ from nothing by the value alone.`,
44218
44375
  description: "[`TaskUpdate::assignees`].",
44219
44376
  type: "string",
44220
44377
  const: "assignees"
44378
+ },
44379
+ {
44380
+ description: "[`TaskUpdate::duplicate_of`]: the task was closed as a duplicate, natively or by the\nlink the store records.",
44381
+ type: "string",
44382
+ const: "duplicate-of"
44221
44383
  }
44222
44384
  ]
44223
44385
  },
@@ -45176,6 +45338,7 @@ var commandResponseRoots = {
45176
45338
  "sources route": "SourceRoute",
45177
45339
  "sources sanitize": "SweepReport",
45178
45340
  "sources migrate": "StoredFormsMigrated",
45341
+ "sources quota": "SourceQuota",
45179
45342
  "task list": "QueryResponseOfQualifiedTask",
45180
45343
  "task show": "TaskDetail",
45181
45344
  "task show-many": "TaskDetails",
@@ -45241,7 +45404,7 @@ var commandAlternateRoots = {
45241
45404
  "project attestation check": ["ProjectAttestationCheck"],
45242
45405
  "project create": ["PlannedProject"]
45243
45406
  };
45244
- 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 !== "sources migrate" && command !== "project graph" && (!command.startsWith("task comment ") || command === "task comment add-many") && !command.endsWith(" metadata set") && !command.endsWith(" priority set") && command !== "task assignee set" && !command.endsWith(" content set") && !command.startsWith("template ") && !command.endsWith(" render") && !command.endsWith(" answers") && command !== "task assets" && command !== "task relations" && command !== "task project-human" && !command.endsWith(" attest") && !command.endsWith(" attestation check") && command !== "task digest" && command !== "project create" && command !== "document create"));
45407
+ 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 !== "sources migrate" && command !== "sources quota" && command !== "project graph" && (!command.startsWith("task comment ") || command === "task comment add-many") && !command.endsWith(" metadata set") && !command.endsWith(" priority set") && command !== "task assignee set" && !command.endsWith(" content set") && !command.startsWith("template ") && !command.endsWith(" render") && !command.endsWith(" answers") && command !== "task assets" && command !== "task relations" && command !== "task project-human" && !command.endsWith(" attest") && !command.endsWith(" attestation check") && command !== "task digest" && command !== "project create" && command !== "document create"));
45245
45408
  function bodyArguments(options) {
45246
45409
  return "bodyFile" in options ? { args: ["--body-file", options.bodyFile] } : { args: [], input: options.body };
45247
45410
  }
@@ -45375,6 +45538,7 @@ var taskUpdateOptionFlags = {
45375
45538
  expect: "--expect",
45376
45539
  ifVersion: "--if-version",
45377
45540
  whenPriority: "--when-priority",
45541
+ duplicateOf: "--duplicate-of",
45378
45542
  repositories: "--repository"
45379
45543
  };
45380
45544
  function stringOption(method, name, value) {
@@ -45394,7 +45558,7 @@ function taskUpdateFlags(options) {
45394
45558
  throw new TypeError(`${method}: options has the member ${unknown}, which names no field; next: name only ` + Object.keys(taskUpdateOptionFlags).join(", "));
45395
45559
  }
45396
45560
  const args = [];
45397
- const scalars = ["title", "status", "statusName", "priority", "expect", "ifVersion"];
45561
+ const scalars = ["title", "status", "statusName", "priority", "expect", "ifVersion", "duplicateOf"];
45398
45562
  for (const name of scalars) {
45399
45563
  if (options[name] !== undefined) {
45400
45564
  args.push(taskUpdateOptionFlags[name], stringOption(method, name, options[name]));
@@ -45816,6 +45980,12 @@ class OnetaskgraphClient {
45816
45980
  }
45817
45981
  return this.run("sources migrate", [source, ...options.dryRun ? ["--dry-run"] : []]);
45818
45982
  }
45983
+ sourcesQuota(source) {
45984
+ if (typeof source !== "string") {
45985
+ throw new TypeError("sourcesQuota: source is not a string; next: name a configured source");
45986
+ }
45987
+ return this.run("sources quota", [source]);
45988
+ }
45819
45989
  sourcesSanitize(source, options = {}) {
45820
45990
  if (typeof source !== "string") {
45821
45991
  throw new TypeError("sourcesSanitize: source is not a string; next: name a configured source");
@@ -45928,9 +46098,11 @@ class OnetaskgraphClient {
45928
46098
  ]);
45929
46099
  }
45930
46100
  taskStatusSet(id, category, options = {}) {
46101
+ const duplicateOf = options.duplicateOf === undefined ? [] : ["--duplicate-of", stringOption("taskStatusSet", "duplicateOf", options.duplicateOf)];
45931
46102
  return this.run("task status set", [
45932
46103
  id,
45933
46104
  category,
46105
+ ...duplicateOf,
45934
46106
  ...writePolicyFlags("taskStatusSet", options),
45935
46107
  ...expectFlags("taskStatusSet", options)
45936
46108
  ], undefined, options.sanitizeDryRun === true);
@@ -46316,7 +46488,7 @@ function assertCompleteCommandSurface() {
46316
46488
  }
46317
46489
 
46318
46490
  // src/index.ts
46319
- var VERSION = "0.14.20";
46491
+ var VERSION = "0.15.0";
46320
46492
  export {
46321
46493
  updateFieldChoices,
46322
46494
  taskUpdateOptionFlags,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@onetaskgraph/sdk",
3
3
  "//": "llmlint: ignore-file[projects_stay_in_one_js_workspace] This package IS the JS workspace's one member; what the rule reads as a second is the optionalDependency below, which is the published launcher an end user installs beside the SDK and resolves from the registry at their own install. `workspace:*` names nothing there, and npm/cli is not a workspace member for the reason its own manifest records. scripts/set-version.sh writes this number and `--check` refuses any other, under distribution-check. JSON has no comment to scope this to the one line.",
4
- "version": "0.14.20",
4
+ "version": "0.15.0",
5
5
  "description": "The TypeScript SDK for onetaskgraph, generated from the binary's own JSON Schema bundle.",
6
6
  "license": "MIT",
7
7
  "type": "module",
@@ -28,7 +28,7 @@
28
28
  "generate:check": "bun scripts/generate.ts --check"
29
29
  },
30
30
  "optionalDependencies": {
31
- "@onetaskgraph/cli": "0.14.20"
31
+ "@onetaskgraph/cli": "0.15.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "ajv": "8.17.1",