@onetaskgraph/sdk 0.14.16 → 0.14.18
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 +24 -20
- package/dist/generated/commands.d.ts +1 -1
- package/dist/generated/models.d.ts +63 -1
- package/dist/generated/schemas.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +126 -5
- package/package.json +2 -2
package/dist/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AttestationCheck, 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, 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, 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[];
|
|
@@ -37,6 +37,21 @@ export type AttestOptions = WriteOptions & {
|
|
|
37
37
|
export type AttestationCheckOptions = {
|
|
38
38
|
bar?: string;
|
|
39
39
|
};
|
|
40
|
+
export type ProjectAttestationTaskFilters = {
|
|
41
|
+
statuses?: StatusCategory[];
|
|
42
|
+
notStatuses?: StatusCategory[];
|
|
43
|
+
states?: AttestationState[];
|
|
44
|
+
};
|
|
45
|
+
export declare const updateFieldChoices: readonly ["status"];
|
|
46
|
+
export type UpdateFields = (typeof updateFieldChoices)[number];
|
|
47
|
+
export type ProjectCopyOptions = CopyOptions & StatusCopyOptions & {
|
|
48
|
+
noTasks?: boolean;
|
|
49
|
+
documents?: boolean;
|
|
50
|
+
members?: string[];
|
|
51
|
+
membersOnly?: boolean;
|
|
52
|
+
updateFields?: UpdateFields;
|
|
53
|
+
metadata?: string[];
|
|
54
|
+
};
|
|
40
55
|
export type ExpectOptions = {
|
|
41
56
|
expect?: string;
|
|
42
57
|
};
|
|
@@ -172,12 +187,7 @@ export type TaskCommentsOptions = {
|
|
|
172
187
|
export declare const taskCommentsOptionFlags: Readonly<Record<keyof TaskCommentsOptions, string>>;
|
|
173
188
|
export declare function taskCommentsFlags(since: string, options: unknown): string[];
|
|
174
189
|
export declare function taskCopyFlags(options: TaskCopyOptions): string[];
|
|
175
|
-
export declare function projectCopyFlags(options:
|
|
176
|
-
noTasks?: boolean;
|
|
177
|
-
documents?: boolean;
|
|
178
|
-
members?: string[];
|
|
179
|
-
membersOnly?: boolean;
|
|
180
|
-
}): string[];
|
|
190
|
+
export declare function projectCopyFlags(options: ProjectCopyOptions): string[];
|
|
181
191
|
export declare class OnetaskgraphClient {
|
|
182
192
|
readonly binaryPath: string;
|
|
183
193
|
readonly cwd: string | undefined;
|
|
@@ -209,6 +219,7 @@ export declare class OnetaskgraphClient {
|
|
|
209
219
|
metadata?: string[];
|
|
210
220
|
origin?: string;
|
|
211
221
|
members?: boolean;
|
|
222
|
+
notStatuses?: StatusCategory[];
|
|
212
223
|
}): Promise<QueryResponseOfQualifiedTask>;
|
|
213
224
|
taskShow(id: string, options?: Pick<QueryOptions, "allowPartial"> & {
|
|
214
225
|
noComments?: boolean;
|
|
@@ -289,20 +300,10 @@ export declare class OnetaskgraphClient {
|
|
|
289
300
|
}): Promise<QueryResponseOfQualifiedProject>;
|
|
290
301
|
projectDeps(id: string, options?: DependencyOptions): Promise<QueryResponseOfQualifiedEdge>;
|
|
291
302
|
projectGraph(id: string, options?: ProjectGraphOptions): Promise<ProjectGraph>;
|
|
292
|
-
projectCopy(id: string, to: string, options?:
|
|
293
|
-
noTasks?: boolean;
|
|
294
|
-
documents?: boolean;
|
|
295
|
-
members?: string[];
|
|
296
|
-
membersOnly?: boolean;
|
|
297
|
-
}) & {
|
|
303
|
+
projectCopy(id: string, to: string, options?: ProjectCopyOptions & {
|
|
298
304
|
sanitizeDryRun?: false;
|
|
299
305
|
}): Promise<CopyReport>;
|
|
300
|
-
projectCopy(id: string, to: string, options?:
|
|
301
|
-
noTasks?: boolean;
|
|
302
|
-
documents?: boolean;
|
|
303
|
-
members?: string[];
|
|
304
|
-
membersOnly?: boolean;
|
|
305
|
-
}): Promise<CopyReport | SanitizeDryRun>;
|
|
306
|
+
projectCopy(id: string, to: string, options?: ProjectCopyOptions): Promise<CopyReport | SanitizeDryRun>;
|
|
306
307
|
projectMetadataSet(id: string, key: string, value: string, options?: WriteOptions & {
|
|
307
308
|
sanitizeDryRun?: false;
|
|
308
309
|
}): Promise<MetadataSet>;
|
|
@@ -339,8 +340,11 @@ export declare class OnetaskgraphClient {
|
|
|
339
340
|
}): Promise<Attested>;
|
|
340
341
|
documentAttest(id: string, kind: string, by: string, bar: string, options?: AttestOptions): Promise<Attested | SanitizeDryRun>;
|
|
341
342
|
taskAttestationCheck(id: string, kind: string, options?: AttestationCheckOptions): Promise<AttestationCheck>;
|
|
343
|
+
taskDigest(id: string, options?: {
|
|
344
|
+
exclude?: string[];
|
|
345
|
+
}): Promise<TaskContentDigest>;
|
|
342
346
|
documentAttestationCheck(id: string, kind: string, options?: AttestationCheckOptions): Promise<AttestationCheck>;
|
|
343
|
-
projectAttestationCheck(id: string, kind: string, options?: AttestationCheckOptions & {
|
|
347
|
+
projectAttestationCheck(id: string, kind: string, options?: AttestationCheckOptions & ProjectAttestationTaskFilters & {
|
|
344
348
|
tasks?: boolean;
|
|
345
349
|
}): Promise<AttestationCheck | ProjectAttestationCheck>;
|
|
346
350
|
labelList(options?: QueryOptions): Promise<QueryResponseOfQualifiedLabel>;
|
|
@@ -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 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", "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: 66;
|
|
2
2
|
export declare namespace GeneratedAsset {
|
|
3
3
|
/**
|
|
4
4
|
* One asset a record holds, as a read reports it.
|
|
@@ -8744,6 +8744,27 @@ export declare namespace GeneratedProjectGraph {
|
|
|
8744
8744
|
* `orchestrator.unit`.
|
|
8745
8745
|
*/
|
|
8746
8746
|
type GroupKey = string;
|
|
8747
|
+
/**
|
|
8748
|
+
* Where an entity is, in the one form a consumer can act on without knowing the backend.
|
|
8749
|
+
*
|
|
8750
|
+
* Externally tagged with exactly two variants, so the JSON is `{"url": "https://…"}` or
|
|
8751
|
+
* `{"path": "/home/…"}` and a consumer tells them apart by which key is present. A reader
|
|
8752
|
+
* handed one of these knows what to *do* with it — open a link, or print a path and read
|
|
8753
|
+
* the file out — which is what a bare string could not have said.
|
|
8754
|
+
*
|
|
8755
|
+
* It carries no third case on purpose. `None` on the field is the third case, and it
|
|
8756
|
+
* means the source did not say where the entity is, which is not the same as saying it is
|
|
8757
|
+
* nowhere.
|
|
8758
|
+
*
|
|
8759
|
+
* This does **not** redefine, replace or derive from the `url` field of [`Task`],
|
|
8760
|
+
* [`Project`] or [`Document`]: a source that reports a web URL there goes on reporting
|
|
8761
|
+
* it, and every existing consumer sees exactly what it saw.
|
|
8762
|
+
*/
|
|
8763
|
+
type Location = ({
|
|
8764
|
+
url: string;
|
|
8765
|
+
} | {
|
|
8766
|
+
path: string;
|
|
8767
|
+
});
|
|
8747
8768
|
/**
|
|
8748
8769
|
* One thing a dependency read could not ask.
|
|
8749
8770
|
*/
|
|
@@ -8816,6 +8837,12 @@ export declare namespace GeneratedProjectGraph {
|
|
|
8816
8837
|
* external task, and for every task when no key was given.
|
|
8817
8838
|
*/
|
|
8818
8839
|
group?: (string | null);
|
|
8840
|
+
/**
|
|
8841
|
+
* Where the task is, exactly as `task show` reports it: `{"path": …}`, `{"url": …}`,
|
|
8842
|
+
* or `null` when its source reports none — and for an external task whose source could
|
|
8843
|
+
* not be asked, of which nothing was read.
|
|
8844
|
+
*/
|
|
8845
|
+
location?: (Location | null);
|
|
8819
8846
|
[k: string]: any;
|
|
8820
8847
|
}
|
|
8821
8848
|
/**
|
|
@@ -14642,6 +14669,41 @@ export declare namespace GeneratedTaskAssigneeSet {
|
|
|
14642
14669
|
}
|
|
14643
14670
|
}
|
|
14644
14671
|
export type TaskAssigneeSet = GeneratedTaskAssigneeSet.TaskAssigneeSet;
|
|
14672
|
+
export declare namespace GeneratedTaskContentDigest {
|
|
14673
|
+
/**
|
|
14674
|
+
* One caller-owned metadata key: `<namespace>.<name>`, at least two non-empty segments
|
|
14675
|
+
* separated by dots, whose first segment is not [`MetadataKey::RESERVED_NAMESPACE`].
|
|
14676
|
+
*
|
|
14677
|
+
* Validated wherever one is built, deserialized included, so a plugin handed one never has
|
|
14678
|
+
* to ask whether it names a key this product owns.
|
|
14679
|
+
*/
|
|
14680
|
+
type MetadataKey = string;
|
|
14681
|
+
/**
|
|
14682
|
+
* What `task digest` answers: the digest of one task's authored content, the one an
|
|
14683
|
+
* attestation records as its `content_digest` for the same content and the same `excludes`.
|
|
14684
|
+
*
|
|
14685
|
+
* A caller holding a settlement, a review or any other decision taken against a task's
|
|
14686
|
+
* content records this, and a later read of it says whether the content is still the one the
|
|
14687
|
+
* decision was taken against, without reaching into the attestation record.
|
|
14688
|
+
*/
|
|
14689
|
+
interface TaskContentDigest {
|
|
14690
|
+
/**
|
|
14691
|
+
* The task, by qualified id.
|
|
14692
|
+
*/
|
|
14693
|
+
id: string;
|
|
14694
|
+
/**
|
|
14695
|
+
* `sha256:<hex>` over the task's title, content, repositories, caller-owned metadata
|
|
14696
|
+
* not excluded and forward dependency edges.
|
|
14697
|
+
*/
|
|
14698
|
+
content_digest: string;
|
|
14699
|
+
/**
|
|
14700
|
+
* The caller-owned metadata keys left out of it, sorted and without repeats.
|
|
14701
|
+
*/
|
|
14702
|
+
excludes: MetadataKey[];
|
|
14703
|
+
[k: string]: any;
|
|
14704
|
+
}
|
|
14705
|
+
}
|
|
14706
|
+
export type TaskContentDigest = GeneratedTaskContentDigest.TaskContentDigest;
|
|
14645
14707
|
export declare namespace GeneratedTaskContentSet {
|
|
14646
14708
|
/**
|
|
14647
14709
|
* One mutation of an expected write.
|
|
@@ -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" | "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" | "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.18";
|
|
10
10
|
export * from "./client.ts";
|
|
11
11
|
export type * from "./generated/models.ts";
|
package/dist/index.js
CHANGED
|
@@ -7174,6 +7174,7 @@ var binaryCommands = [
|
|
|
7174
7174
|
"task metadata set",
|
|
7175
7175
|
"task attest",
|
|
7176
7176
|
"task attestation check",
|
|
7177
|
+
"task digest",
|
|
7177
7178
|
"task update",
|
|
7178
7179
|
"task create",
|
|
7179
7180
|
"task render",
|
|
@@ -7209,7 +7210,7 @@ var binaryCommands = [
|
|
|
7209
7210
|
];
|
|
7210
7211
|
|
|
7211
7212
|
// src/generated/models.ts
|
|
7212
|
-
var SCHEMA_BUNDLE_VERSION =
|
|
7213
|
+
var SCHEMA_BUNDLE_VERSION = 66;
|
|
7213
7214
|
|
|
7214
7215
|
// src/generated/schemas.ts
|
|
7215
7216
|
var runtimeSchemas = {
|
|
@@ -24055,6 +24056,17 @@ so a native id may contain colons freely.`,
|
|
|
24055
24056
|
"string",
|
|
24056
24057
|
"null"
|
|
24057
24058
|
]
|
|
24059
|
+
},
|
|
24060
|
+
location: {
|
|
24061
|
+
description: 'Where the task is, exactly as `task show` reports it: `{"path": …}`, `{"url": …}`,\nor `null` when its source reports none — and for an external task whose source could\nnot be asked, of which nothing was read.',
|
|
24062
|
+
anyOf: [
|
|
24063
|
+
{
|
|
24064
|
+
$ref: "#/$defs/Location"
|
|
24065
|
+
},
|
|
24066
|
+
{
|
|
24067
|
+
type: "null"
|
|
24068
|
+
}
|
|
24069
|
+
]
|
|
24058
24070
|
}
|
|
24059
24071
|
},
|
|
24060
24072
|
required: [
|
|
@@ -24064,6 +24076,38 @@ so a native id may contain colons freely.`,
|
|
|
24064
24076
|
"external"
|
|
24065
24077
|
]
|
|
24066
24078
|
},
|
|
24079
|
+
Location: {
|
|
24080
|
+
description: 'Where an entity is, in the one form a consumer can act on without knowing the backend.\n\nExternally tagged with exactly two variants, so the JSON is `{"url": "https://…"}` or\n`{"path": "/home/…"}` and a consumer tells them apart by which key is present. A reader\nhanded one of these knows what to *do* with it — open a link, or print a path and read\nthe file out — which is what a bare string could not have said.\n\nIt carries no third case on purpose. `None` on the field is the third case, and it\nmeans the source did not say where the entity is, which is not the same as saying it is\nnowhere.\n\nThis does **not** redefine, replace or derive from the `url` field of [`Task`],\n[`Project`] or [`Document`]: a source that reports a web URL there goes on reporting\nit, and every existing consumer sees exactly what it saw.',
|
|
24081
|
+
oneOf: [
|
|
24082
|
+
{
|
|
24083
|
+
description: "The entity lives at an external website, and this is a link a reader can open.",
|
|
24084
|
+
type: "object",
|
|
24085
|
+
properties: {
|
|
24086
|
+
url: {
|
|
24087
|
+
type: "string"
|
|
24088
|
+
}
|
|
24089
|
+
},
|
|
24090
|
+
required: [
|
|
24091
|
+
"url"
|
|
24092
|
+
],
|
|
24093
|
+
additionalProperties: false
|
|
24094
|
+
},
|
|
24095
|
+
{
|
|
24096
|
+
description: `The entity is a file on the machine the source runs on, and this is that file's
|
|
24097
|
+
absolute path, so a reader can print the path or read the contents out.`,
|
|
24098
|
+
type: "object",
|
|
24099
|
+
properties: {
|
|
24100
|
+
path: {
|
|
24101
|
+
type: "string"
|
|
24102
|
+
}
|
|
24103
|
+
},
|
|
24104
|
+
required: [
|
|
24105
|
+
"path"
|
|
24106
|
+
],
|
|
24107
|
+
additionalProperties: false
|
|
24108
|
+
}
|
|
24109
|
+
]
|
|
24110
|
+
},
|
|
24067
24111
|
GraphEdge: {
|
|
24068
24112
|
description: "One edge of a [`ProjectGraph`], pointing from the task depended on to the task that\ndepends on it.",
|
|
24069
24113
|
type: "object",
|
|
@@ -36427,6 +36471,52 @@ from nothing by the value alone.`,
|
|
|
36427
36471
|
}
|
|
36428
36472
|
}
|
|
36429
36473
|
},
|
|
36474
|
+
TaskContentDigest: {
|
|
36475
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
36476
|
+
title: "TaskContentDigest",
|
|
36477
|
+
description: "What `task digest` answers: the digest of one task's authored content, the one an\nattestation records as its `content_digest` for the same content and the same `excludes`.\n\nA caller holding a settlement, a review or any other decision taken against a task's\ncontent records this, and a later read of it says whether the content is still the one the\ndecision was taken against, without reaching into the attestation record.",
|
|
36478
|
+
type: "object",
|
|
36479
|
+
properties: {
|
|
36480
|
+
id: {
|
|
36481
|
+
description: "The task, by qualified id.",
|
|
36482
|
+
$ref: "#/$defs/GlobalId"
|
|
36483
|
+
},
|
|
36484
|
+
content_digest: {
|
|
36485
|
+
description: "`sha256:<hex>` over the task's title, content, repositories, caller-owned metadata\nnot excluded and forward dependency edges.",
|
|
36486
|
+
$ref: "#/$defs/Sha256Digest"
|
|
36487
|
+
},
|
|
36488
|
+
excludes: {
|
|
36489
|
+
description: "The caller-owned metadata keys left out of it, sorted and without repeats.",
|
|
36490
|
+
type: "array",
|
|
36491
|
+
items: {
|
|
36492
|
+
$ref: "#/$defs/MetadataKey"
|
|
36493
|
+
}
|
|
36494
|
+
}
|
|
36495
|
+
},
|
|
36496
|
+
required: [
|
|
36497
|
+
"id",
|
|
36498
|
+
"content_digest",
|
|
36499
|
+
"excludes"
|
|
36500
|
+
],
|
|
36501
|
+
$defs: {
|
|
36502
|
+
GlobalId: {
|
|
36503
|
+
description: `One item, qualified by the source it came from.
|
|
36504
|
+
|
|
36505
|
+
Rendered \`<source>:<native>\` and parsed by splitting on the **first** colon,
|
|
36506
|
+
so a native id may contain colons freely.`,
|
|
36507
|
+
type: "string"
|
|
36508
|
+
},
|
|
36509
|
+
Sha256Digest: {
|
|
36510
|
+
description: "`sha256:` and 64 lowercase hex digits.",
|
|
36511
|
+
type: "string",
|
|
36512
|
+
pattern: "^sha256:[0-9a-f]{64}$"
|
|
36513
|
+
},
|
|
36514
|
+
MetadataKey: {
|
|
36515
|
+
description: "One caller-owned metadata key: `<namespace>.<name>`, at least two non-empty segments\nseparated by dots, whose first segment is not [`MetadataKey::RESERVED_NAMESPACE`].\n\nValidated wherever one is built, deserialized included, so a plugin handed one never has\nto ask whether it names a key this product owns.",
|
|
36516
|
+
type: "string"
|
|
36517
|
+
}
|
|
36518
|
+
}
|
|
36519
|
+
},
|
|
36430
36520
|
TaskContentSet: {
|
|
36431
36521
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
36432
36522
|
title: "TaskContentSet",
|
|
@@ -44919,6 +45009,7 @@ it is; absent — and left out of the JSON — when there is none.`,
|
|
|
44919
45009
|
|
|
44920
45010
|
// src/client.ts
|
|
44921
45011
|
var projectGraphDirections = ["auto", "td", "lr"];
|
|
45012
|
+
var updateFieldChoices = ["status"];
|
|
44922
45013
|
var statusPolicies = ["source", "preserve-destination"];
|
|
44923
45014
|
var otherwiseChoices = ["refuse", "preserve-destination"];
|
|
44924
45015
|
|
|
@@ -44974,6 +45065,7 @@ var commandResponseRoots = {
|
|
|
44974
45065
|
"task metadata set": "MetadataSet",
|
|
44975
45066
|
"task attest": "Attested",
|
|
44976
45067
|
"task attestation check": "AttestationCheck",
|
|
45068
|
+
"task digest": "TaskContentDigest",
|
|
44977
45069
|
"task update": "TaskUpdated",
|
|
44978
45070
|
"task find": "FoundTasks",
|
|
44979
45071
|
"task update-many": "TasksUpdated",
|
|
@@ -45018,7 +45110,7 @@ var commandAlternateRoots = {
|
|
|
45018
45110
|
"project attestation check": ["ProjectAttestationCheck"],
|
|
45019
45111
|
"project create": ["PlannedProject"]
|
|
45020
45112
|
};
|
|
45021
|
-
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 !== "project create" && command !== "document create"));
|
|
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"));
|
|
45022
45114
|
function bodyArguments(options) {
|
|
45023
45115
|
return "bodyFile" in options ? { args: ["--body-file", options.bodyFile] } : { args: [], input: options.body };
|
|
45024
45116
|
}
|
|
@@ -45483,6 +45575,12 @@ function taskCopyFlags(options) {
|
|
|
45483
45575
|
}
|
|
45484
45576
|
function projectCopyFlags(options) {
|
|
45485
45577
|
const args = copyFlags("projectCopy", options);
|
|
45578
|
+
if (options.updateFields !== undefined) {
|
|
45579
|
+
if (!updateFieldChoices.some((choice) => choice === options.updateFields)) {
|
|
45580
|
+
throw new TypeError(`projectCopy: updateFields must be ${updateFieldChoices.join(" or ")}`);
|
|
45581
|
+
}
|
|
45582
|
+
args.push("--update-fields", options.updateFields);
|
|
45583
|
+
}
|
|
45486
45584
|
if (options.noTasks)
|
|
45487
45585
|
args.push("--no-tasks");
|
|
45488
45586
|
if (options.documents !== undefined && typeof options.documents !== "boolean") {
|
|
@@ -45615,6 +45713,9 @@ class OnetaskgraphClient {
|
|
|
45615
45713
|
args.push("--no-project");
|
|
45616
45714
|
if (options.members)
|
|
45617
45715
|
args.push("--members");
|
|
45716
|
+
for (const status of stringList("taskList", "notStatuses", options.notStatuses)) {
|
|
45717
|
+
args.push("--not-status", status);
|
|
45718
|
+
}
|
|
45618
45719
|
for (const priority of options.priorities ?? [])
|
|
45619
45720
|
args.push("--priority", priority);
|
|
45620
45721
|
if (options.commentedSince !== undefined) {
|
|
@@ -45854,6 +45955,16 @@ class OnetaskgraphClient {
|
|
|
45854
45955
|
...checkFlags("taskAttestationCheck", kind, options)
|
|
45855
45956
|
]);
|
|
45856
45957
|
}
|
|
45958
|
+
taskDigest(id, options = {}) {
|
|
45959
|
+
if (!isPlainObject(options)) {
|
|
45960
|
+
throw new TypeError("taskDigest: options is not an object; next: pass them as a plain object");
|
|
45961
|
+
}
|
|
45962
|
+
const args = [stringOption("taskDigest", "id", id)];
|
|
45963
|
+
for (const key of stringList("taskDigest", "exclude", options.exclude)) {
|
|
45964
|
+
args.push("--exclude", key);
|
|
45965
|
+
}
|
|
45966
|
+
return this.run("task digest", args);
|
|
45967
|
+
}
|
|
45857
45968
|
documentAttestationCheck(id, kind, options = {}) {
|
|
45858
45969
|
return this.run("document attestation check", [
|
|
45859
45970
|
id,
|
|
@@ -45861,9 +45972,18 @@ class OnetaskgraphClient {
|
|
|
45861
45972
|
]);
|
|
45862
45973
|
}
|
|
45863
45974
|
projectAttestationCheck(id, kind, options = {}) {
|
|
45864
|
-
const
|
|
45865
|
-
|
|
45975
|
+
const method = "projectAttestationCheck";
|
|
45976
|
+
const args = [id, ...checkFlags(method, kind, options)];
|
|
45977
|
+
if (flagOption(method, "tasks", options.tasks))
|
|
45866
45978
|
args.push("--tasks");
|
|
45979
|
+
for (const status of stringList(method, "statuses", options.statuses)) {
|
|
45980
|
+
args.push("--status", status);
|
|
45981
|
+
}
|
|
45982
|
+
for (const status of stringList(method, "notStatuses", options.notStatuses)) {
|
|
45983
|
+
args.push("--not-status", status);
|
|
45984
|
+
}
|
|
45985
|
+
for (const state of stringList(method, "states", options.states))
|
|
45986
|
+
args.push("--state", state);
|
|
45867
45987
|
return this.run("project attestation check", args);
|
|
45868
45988
|
}
|
|
45869
45989
|
labelList(options = {}) {
|
|
@@ -46053,8 +46173,9 @@ function assertCompleteCommandSurface() {
|
|
|
46053
46173
|
}
|
|
46054
46174
|
|
|
46055
46175
|
// src/index.ts
|
|
46056
|
-
var VERSION = "0.14.
|
|
46176
|
+
var VERSION = "0.14.18";
|
|
46057
46177
|
export {
|
|
46178
|
+
updateFieldChoices,
|
|
46058
46179
|
taskUpdateOptionFlags,
|
|
46059
46180
|
taskUpdateFlags,
|
|
46060
46181
|
taskCopyFlags,
|
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.18",
|
|
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.18"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"ajv": "8.17.1",
|