@onetaskgraph/sdk 0.14.18 → 0.14.20
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 +4 -1
- package/dist/generated/commands.d.ts +1 -1
- package/dist/generated/models.d.ts +74 -3
- package/dist/generated/schemas.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +148 -5
- package/package.json +2 -2
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, 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, 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[];
|
|
@@ -207,6 +207,9 @@ export declare class OnetaskgraphClient {
|
|
|
207
207
|
repositories?: string[];
|
|
208
208
|
classification?: Classification;
|
|
209
209
|
}): Promise<SourceRoute>;
|
|
210
|
+
sourcesMigrate(source: string, options?: {
|
|
211
|
+
dryRun?: boolean;
|
|
212
|
+
}): Promise<StoredFormsMigrated>;
|
|
210
213
|
sourcesSanitize(source: string, options?: Omit<WriteOptions, "sanitizeDryRun" | "termScope"> & {
|
|
211
214
|
dryRun?: boolean;
|
|
212
215
|
complete?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const binaryCommands: readonly ["schema", "config show", "sources list", "sources status-options", "sources fields", "sources route", "sources sanitize", "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", "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:
|
|
1
|
+
export declare const SCHEMA_BUNDLE_VERSION: 67;
|
|
2
2
|
export declare namespace GeneratedAsset {
|
|
3
3
|
/**
|
|
4
4
|
* One asset a record holds, as a read reports it.
|
|
@@ -6604,8 +6604,9 @@ export declare namespace GeneratedLinearConfig {
|
|
|
6604
6604
|
assignees?: boolean;
|
|
6605
6605
|
/**
|
|
6606
6606
|
* Caller metadata values this source shows in one collapsed `Fields` section at the end
|
|
6607
|
-
* of each task's, project's and document's
|
|
6608
|
-
*
|
|
6607
|
+
* of each task's, project's and document's description, directly before the collapsed
|
|
6608
|
+
* block the metadata is kept in, since Linear has no custom fields and shows that block's
|
|
6609
|
+
* JSON only to a reader who opens it.
|
|
6609
6610
|
*
|
|
6610
6611
|
* Absent or empty, no section is written. Each entry names the `field` a value is shown
|
|
6611
6612
|
* under, a top-level metadata `key` and an optional `path` of object keys walked inside
|
|
@@ -14110,6 +14111,76 @@ export declare namespace GeneratedStatusesReconciled {
|
|
|
14110
14111
|
}
|
|
14111
14112
|
}
|
|
14112
14113
|
export type StatusesReconciled = GeneratedStatusesReconciled.StatusesReconciled;
|
|
14114
|
+
export declare namespace GeneratedStoredFormsMigrated {
|
|
14115
|
+
/**
|
|
14116
|
+
* What one `sources migrate` did.
|
|
14117
|
+
*/
|
|
14118
|
+
interface StoredFormsMigrated {
|
|
14119
|
+
/**
|
|
14120
|
+
* The source migrated.
|
|
14121
|
+
*/
|
|
14122
|
+
source: string;
|
|
14123
|
+
/**
|
|
14124
|
+
* Whether nothing was written: every entry of `rewritten` is one that would be.
|
|
14125
|
+
*/
|
|
14126
|
+
dry_run: boolean;
|
|
14127
|
+
/**
|
|
14128
|
+
* Each item rewritten into the form its source writes now, in the order the source listed
|
|
14129
|
+
* it.
|
|
14130
|
+
*/
|
|
14131
|
+
rewritten: MigratedRecord[];
|
|
14132
|
+
/**
|
|
14133
|
+
* How many of the items examined already held the current form, and were sent nothing.
|
|
14134
|
+
*/
|
|
14135
|
+
current: number;
|
|
14136
|
+
/**
|
|
14137
|
+
* Each item left in a superseded form, with why.
|
|
14138
|
+
*/
|
|
14139
|
+
failed: MigrationRefused[];
|
|
14140
|
+
[k: string]: any;
|
|
14141
|
+
}
|
|
14142
|
+
/**
|
|
14143
|
+
* One item a migration rewrote, or under `--dry-run` would rewrite.
|
|
14144
|
+
*/
|
|
14145
|
+
interface MigratedRecord {
|
|
14146
|
+
/**
|
|
14147
|
+
* What kind of record it is.
|
|
14148
|
+
*/
|
|
14149
|
+
kind: ("task" | "project" | "document");
|
|
14150
|
+
/**
|
|
14151
|
+
* Its qualified id.
|
|
14152
|
+
*/
|
|
14153
|
+
id: string;
|
|
14154
|
+
/**
|
|
14155
|
+
* The superseded stored form it was held in, as its plugin names it.
|
|
14156
|
+
*/
|
|
14157
|
+
from: string;
|
|
14158
|
+
[k: string]: any;
|
|
14159
|
+
}
|
|
14160
|
+
/**
|
|
14161
|
+
* One item a migration found in a superseded form and could not rewrite.
|
|
14162
|
+
*/
|
|
14163
|
+
interface MigrationRefused {
|
|
14164
|
+
/**
|
|
14165
|
+
* What kind of record it is.
|
|
14166
|
+
*/
|
|
14167
|
+
kind: ("task" | "project" | "document");
|
|
14168
|
+
/**
|
|
14169
|
+
* Its qualified id.
|
|
14170
|
+
*/
|
|
14171
|
+
id: string;
|
|
14172
|
+
/**
|
|
14173
|
+
* The superseded stored form it is still held in.
|
|
14174
|
+
*/
|
|
14175
|
+
from: string;
|
|
14176
|
+
/**
|
|
14177
|
+
* Why it was not rewritten, as the source said it.
|
|
14178
|
+
*/
|
|
14179
|
+
reason: string;
|
|
14180
|
+
[k: string]: any;
|
|
14181
|
+
}
|
|
14182
|
+
}
|
|
14183
|
+
export type StoredFormsMigrated = GeneratedStoredFormsMigrated.StoredFormsMigrated;
|
|
14113
14184
|
export declare namespace GeneratedSweepReport {
|
|
14114
14185
|
/**
|
|
14115
14186
|
* What a locator names.
|
|
@@ -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" | "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" | "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";
|
|
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.
|
|
9
|
+
export declare const VERSION = "0.14.20";
|
|
10
10
|
export * from "./client.ts";
|
|
11
11
|
export type * from "./generated/models.ts";
|
package/dist/index.js
CHANGED
|
@@ -7147,6 +7147,7 @@ var binaryCommands = [
|
|
|
7147
7147
|
"sources fields",
|
|
7148
7148
|
"sources route",
|
|
7149
7149
|
"sources sanitize",
|
|
7150
|
+
"sources migrate",
|
|
7150
7151
|
"task list",
|
|
7151
7152
|
"task show",
|
|
7152
7153
|
"task show-many",
|
|
@@ -7210,7 +7211,7 @@ var binaryCommands = [
|
|
|
7210
7211
|
];
|
|
7211
7212
|
|
|
7212
7213
|
// src/generated/models.ts
|
|
7213
|
-
var SCHEMA_BUNDLE_VERSION =
|
|
7214
|
+
var SCHEMA_BUNDLE_VERSION = 67;
|
|
7214
7215
|
|
|
7215
7216
|
// src/generated/schemas.ts
|
|
7216
7217
|
var runtimeSchemas = {
|
|
@@ -19706,7 +19707,7 @@ source reads and writes team-wide.`,
|
|
|
19706
19707
|
default: false
|
|
19707
19708
|
},
|
|
19708
19709
|
metadata_fields: {
|
|
19709
|
-
description: "Caller metadata values this source shows in one collapsed `Fields` section at the end\nof each task's, project's and document's
|
|
19710
|
+
description: "Caller metadata values this source shows in one collapsed `Fields` section at the end\nof each task's, project's and document's description, directly before the collapsed\nblock the metadata is kept in, since Linear has no custom fields and shows that block's\nJSON only to a reader who opens it.\n\nAbsent or empty, no section is written. Each entry names the `field` a value is shown\nunder, a top-level metadata `key` and an optional `path` of object keys walked inside\nthat key's value — the entries a `github-projects` source takes, refused at read for the\nsame reasons but for that source's own board field names. A string, an array of strings\nand an object of string values are shown, an empty one or nothing not at all; any other\nJSON type is refused before any mutation. The section is display only: the slot stays\nthe metadata's one home, every read gives back the caller's content without it, and\nevery write regenerates it. `docs/metadata.md` states its shape.",
|
|
19710
19711
|
type: "array",
|
|
19711
19712
|
items: {
|
|
19712
19713
|
$ref: "#/$defs/LinearMetadataField"
|
|
@@ -35328,6 +35329,135 @@ later.`,
|
|
|
35328
35329
|
}
|
|
35329
35330
|
}
|
|
35330
35331
|
},
|
|
35332
|
+
StoredFormsMigrated: {
|
|
35333
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
35334
|
+
title: "StoredFormsMigrated",
|
|
35335
|
+
description: "What one `sources migrate` did.",
|
|
35336
|
+
type: "object",
|
|
35337
|
+
properties: {
|
|
35338
|
+
source: {
|
|
35339
|
+
description: "The source migrated.",
|
|
35340
|
+
$ref: "#/$defs/SourceName"
|
|
35341
|
+
},
|
|
35342
|
+
dry_run: {
|
|
35343
|
+
description: "Whether nothing was written: every entry of `rewritten` is one that would be.",
|
|
35344
|
+
type: "boolean"
|
|
35345
|
+
},
|
|
35346
|
+
rewritten: {
|
|
35347
|
+
description: `Each item rewritten into the form its source writes now, in the order the source listed
|
|
35348
|
+
it.`,
|
|
35349
|
+
type: "array",
|
|
35350
|
+
items: {
|
|
35351
|
+
$ref: "#/$defs/MigratedRecord"
|
|
35352
|
+
}
|
|
35353
|
+
},
|
|
35354
|
+
current: {
|
|
35355
|
+
description: "How many of the items examined already held the current form, and were sent nothing.",
|
|
35356
|
+
type: "integer",
|
|
35357
|
+
format: "uint64",
|
|
35358
|
+
minimum: 0
|
|
35359
|
+
},
|
|
35360
|
+
failed: {
|
|
35361
|
+
description: "Each item left in a superseded form, with why.",
|
|
35362
|
+
type: "array",
|
|
35363
|
+
items: {
|
|
35364
|
+
$ref: "#/$defs/MigrationRefused"
|
|
35365
|
+
}
|
|
35366
|
+
}
|
|
35367
|
+
},
|
|
35368
|
+
required: [
|
|
35369
|
+
"source",
|
|
35370
|
+
"dry_run",
|
|
35371
|
+
"rewritten",
|
|
35372
|
+
"current",
|
|
35373
|
+
"failed"
|
|
35374
|
+
],
|
|
35375
|
+
$defs: {
|
|
35376
|
+
SourceName: {
|
|
35377
|
+
description: "The name a configuration document gives one configured source.",
|
|
35378
|
+
type: "string",
|
|
35379
|
+
pattern: "^[a-z0-9][a-z0-9-]*$"
|
|
35380
|
+
},
|
|
35381
|
+
MigratedRecord: {
|
|
35382
|
+
description: "One item a migration rewrote, or under `--dry-run` would rewrite.",
|
|
35383
|
+
type: "object",
|
|
35384
|
+
properties: {
|
|
35385
|
+
kind: {
|
|
35386
|
+
description: "What kind of record it is.",
|
|
35387
|
+
$ref: "#/$defs/MigratedKind"
|
|
35388
|
+
},
|
|
35389
|
+
id: {
|
|
35390
|
+
description: "Its qualified id.",
|
|
35391
|
+
$ref: "#/$defs/GlobalId"
|
|
35392
|
+
},
|
|
35393
|
+
from: {
|
|
35394
|
+
description: "The superseded stored form it was held in, as its plugin names it.",
|
|
35395
|
+
type: "string"
|
|
35396
|
+
}
|
|
35397
|
+
},
|
|
35398
|
+
required: [
|
|
35399
|
+
"kind",
|
|
35400
|
+
"id",
|
|
35401
|
+
"from"
|
|
35402
|
+
]
|
|
35403
|
+
},
|
|
35404
|
+
MigratedKind: {
|
|
35405
|
+
description: "Which kind of record a migrated item is.",
|
|
35406
|
+
oneOf: [
|
|
35407
|
+
{
|
|
35408
|
+
description: "A task.",
|
|
35409
|
+
type: "string",
|
|
35410
|
+
const: "task"
|
|
35411
|
+
},
|
|
35412
|
+
{
|
|
35413
|
+
description: "A project.",
|
|
35414
|
+
type: "string",
|
|
35415
|
+
const: "project"
|
|
35416
|
+
},
|
|
35417
|
+
{
|
|
35418
|
+
description: "A document.",
|
|
35419
|
+
type: "string",
|
|
35420
|
+
const: "document"
|
|
35421
|
+
}
|
|
35422
|
+
]
|
|
35423
|
+
},
|
|
35424
|
+
GlobalId: {
|
|
35425
|
+
description: `One item, qualified by the source it came from.
|
|
35426
|
+
|
|
35427
|
+
Rendered \`<source>:<native>\` and parsed by splitting on the **first** colon,
|
|
35428
|
+
so a native id may contain colons freely.`,
|
|
35429
|
+
type: "string"
|
|
35430
|
+
},
|
|
35431
|
+
MigrationRefused: {
|
|
35432
|
+
description: "One item a migration found in a superseded form and could not rewrite.",
|
|
35433
|
+
type: "object",
|
|
35434
|
+
properties: {
|
|
35435
|
+
kind: {
|
|
35436
|
+
description: "What kind of record it is.",
|
|
35437
|
+
$ref: "#/$defs/MigratedKind"
|
|
35438
|
+
},
|
|
35439
|
+
id: {
|
|
35440
|
+
description: "Its qualified id.",
|
|
35441
|
+
$ref: "#/$defs/GlobalId"
|
|
35442
|
+
},
|
|
35443
|
+
from: {
|
|
35444
|
+
description: "The superseded stored form it is still held in.",
|
|
35445
|
+
type: "string"
|
|
35446
|
+
},
|
|
35447
|
+
reason: {
|
|
35448
|
+
description: "Why it was not rewritten, as the source said it.",
|
|
35449
|
+
type: "string"
|
|
35450
|
+
}
|
|
35451
|
+
},
|
|
35452
|
+
required: [
|
|
35453
|
+
"kind",
|
|
35454
|
+
"id",
|
|
35455
|
+
"from",
|
|
35456
|
+
"reason"
|
|
35457
|
+
]
|
|
35458
|
+
}
|
|
35459
|
+
}
|
|
35460
|
+
},
|
|
35331
35461
|
SweepReport: {
|
|
35332
35462
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
35333
35463
|
title: "SweepReport",
|
|
@@ -45045,6 +45175,7 @@ var commandResponseRoots = {
|
|
|
45045
45175
|
"sources fields": "FieldsReport",
|
|
45046
45176
|
"sources route": "SourceRoute",
|
|
45047
45177
|
"sources sanitize": "SweepReport",
|
|
45178
|
+
"sources migrate": "StoredFormsMigrated",
|
|
45048
45179
|
"task list": "QueryResponseOfQualifiedTask",
|
|
45049
45180
|
"task show": "TaskDetail",
|
|
45050
45181
|
"task show-many": "TaskDetails",
|
|
@@ -45110,7 +45241,7 @@ var commandAlternateRoots = {
|
|
|
45110
45241
|
"project attestation check": ["ProjectAttestationCheck"],
|
|
45111
45242
|
"project create": ["PlannedProject"]
|
|
45112
45243
|
};
|
|
45113
|
-
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 !== "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"));
|
|
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"));
|
|
45114
45245
|
function bodyArguments(options) {
|
|
45115
45246
|
return "bodyFile" in options ? { args: ["--body-file", options.bodyFile] } : { args: [], input: options.body };
|
|
45116
45247
|
}
|
|
@@ -45673,6 +45804,18 @@ class OnetaskgraphClient {
|
|
|
45673
45804
|
}
|
|
45674
45805
|
return this.run("sources route", args);
|
|
45675
45806
|
}
|
|
45807
|
+
sourcesMigrate(source, options = {}) {
|
|
45808
|
+
if (typeof source !== "string") {
|
|
45809
|
+
throw new TypeError("sourcesMigrate: source is not a string; next: name a configured source");
|
|
45810
|
+
}
|
|
45811
|
+
if (!isPlainObject(options)) {
|
|
45812
|
+
throw new TypeError("sourcesMigrate: options is not a plain object; next: pass an options object");
|
|
45813
|
+
}
|
|
45814
|
+
if (options.dryRun !== undefined && typeof options.dryRun !== "boolean") {
|
|
45815
|
+
throw new TypeError("sourcesMigrate: dryRun is not a boolean; next: pass true or false");
|
|
45816
|
+
}
|
|
45817
|
+
return this.run("sources migrate", [source, ...options.dryRun ? ["--dry-run"] : []]);
|
|
45818
|
+
}
|
|
45676
45819
|
sourcesSanitize(source, options = {}) {
|
|
45677
45820
|
if (typeof source !== "string") {
|
|
45678
45821
|
throw new TypeError("sourcesSanitize: source is not a string; next: name a configured source");
|
|
@@ -46125,7 +46268,7 @@ class OnetaskgraphClient {
|
|
|
46125
46268
|
});
|
|
46126
46269
|
child.on("error", () => reject(new OnetaskgraphExecutionError(null)));
|
|
46127
46270
|
child.on("close", (code) => {
|
|
46128
|
-
const reporting = (command === "sources sanitize" && (code === 1 || code === 3) || command.endsWith(" attestation check") && code === 3) && !("failure" in (safeParse(stdout) ?? { failure: true }));
|
|
46271
|
+
const reporting = (command === "sources sanitize" && (code === 1 || code === 3) || command === "sources migrate" && code === 1 || command.endsWith(" attestation check") && code === 3) && !("failure" in (safeParse(stdout) ?? { failure: true }));
|
|
46129
46272
|
if (stdout.length === 0 || code !== 0 && !reporting && (code !== 4 || !partialResponseCommands.has(command))) {
|
|
46130
46273
|
reject(new OnetaskgraphExecutionError(code, stderr, failureOf(stdout)));
|
|
46131
46274
|
return;
|
|
@@ -46173,7 +46316,7 @@ function assertCompleteCommandSurface() {
|
|
|
46173
46316
|
}
|
|
46174
46317
|
|
|
46175
46318
|
// src/index.ts
|
|
46176
|
-
var VERSION = "0.14.
|
|
46319
|
+
var VERSION = "0.14.20";
|
|
46177
46320
|
export {
|
|
46178
46321
|
updateFieldChoices,
|
|
46179
46322
|
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.
|
|
4
|
+
"version": "0.14.20",
|
|
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.
|
|
31
|
+
"@onetaskgraph/cli": "0.14.20"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"ajv": "8.17.1",
|