@hasna/todos 0.15.29 → 0.15.32
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/cli/cloud-router.d.ts +13 -1
- package/dist/cli/cloud-router.d.ts.map +1 -1
- package/dist/cli/commands/project-registration-commands.d.ts +2 -0
- package/dist/cli/commands/project-registration-commands.d.ts.map +1 -1
- package/dist/cli/commands/task-commands.d.ts.map +1 -1
- package/dist/cli/commands/task-manifest-commands.d.ts.map +1 -1
- package/dist/cli/index.js +2835 -334
- package/dist/contracts.js +52 -2
- package/dist/db/task-crud.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1447 -144
- package/dist/lib/task-parent-integrity.d.ts +14 -0
- package/dist/lib/task-parent-integrity.d.ts.map +1 -0
- package/dist/mcp/index.js +2031 -135
- package/dist/mcp/tools/task-crud.d.ts.map +1 -1
- package/dist/mcp.js +1 -1
- package/dist/project-registration/adoption-validation.d.ts +3 -0
- package/dist/project-registration/adoption-validation.d.ts.map +1 -0
- package/dist/project-registration/authority.d.ts +3 -1
- package/dist/project-registration/authority.d.ts.map +1 -1
- package/dist/project-registration/backend.d.ts +24 -1
- package/dist/project-registration/backend.d.ts.map +1 -1
- package/dist/project-registration/http.d.ts +3 -1
- package/dist/project-registration/http.d.ts.map +1 -1
- package/dist/project-registration/index.d.ts +2 -1
- package/dist/project-registration/index.d.ts.map +1 -1
- package/dist/project-registration/page-validation.d.ts +5 -0
- package/dist/project-registration/page-validation.d.ts.map +1 -0
- package/dist/project-registration/postgres.d.ts +13 -1
- package/dist/project-registration/postgres.d.ts.map +1 -1
- package/dist/project-registration/sqlite.d.ts +13 -1
- package/dist/project-registration/sqlite.d.ts.map +1 -1
- package/dist/project-registration/types.d.ts +68 -1
- package/dist/project-registration/types.d.ts.map +1 -1
- package/dist/project-registration.js +831 -58
- package/dist/registry.js +52 -2
- package/dist/release-provenance.json +5 -5
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +151 -0
- package/dist/sdk/v1.generated.d.ts +282 -0
- package/dist/sdk/v1.generated.d.ts.map +1 -1
- package/dist/server/index.js +2022 -126
- package/dist/server/openapi.d.ts +2856 -1357
- package/dist/server/openapi.d.ts.map +1 -1
- package/dist/server/v1.d.ts.map +1 -1
- package/dist/storage/postgres-adapter.d.ts.map +1 -1
- package/dist/storage/postgres-sync.d.ts +8 -0
- package/dist/storage/postgres-sync.d.ts.map +1 -1
- package/dist/storage.js +232 -19
- package/dist/task-manifest/authority.d.ts +13 -1
- package/dist/task-manifest/authority.d.ts.map +1 -1
- package/dist/task-manifest/backend.d.ts +5 -0
- package/dist/task-manifest/backend.d.ts.map +1 -1
- package/dist/task-manifest/index.d.ts +2 -2
- package/dist/task-manifest/index.d.ts.map +1 -1
- package/dist/task-manifest/plan-slug.d.ts +20 -0
- package/dist/task-manifest/plan-slug.d.ts.map +1 -1
- package/dist/task-manifest/postgres.d.ts +1 -0
- package/dist/task-manifest/postgres.d.ts.map +1 -1
- package/dist/task-manifest/schema-sql.d.ts.map +1 -1
- package/dist/task-manifest/schema.d.ts.map +1 -1
- package/dist/task-manifest/sqlite.d.ts +1 -0
- package/dist/task-manifest/sqlite.d.ts.map +1 -1
- package/dist/task-manifest/types.d.ts +21 -1
- package/dist/task-manifest/types.d.ts.map +1 -1
- package/dist/task-manifest.js +592 -61
- package/dist/types/index.d.ts +4 -2
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/registry.js
CHANGED
|
@@ -7917,6 +7917,46 @@ function guardPlanRowsSqlite(planIds, db) {
|
|
|
7917
7917
|
}
|
|
7918
7918
|
}
|
|
7919
7919
|
|
|
7920
|
+
// src/lib/task-parent-integrity.ts
|
|
7921
|
+
function parentCycleError(taskId, parentId) {
|
|
7922
|
+
return new ResourceConflictError("TASK_PARENT_CYCLE", `TASK_PARENT_CYCLE: assigning parent ${parentId} to task ${taskId} would create or retain a parent cycle`);
|
|
7923
|
+
}
|
|
7924
|
+
function assertTaskParentIntegrity(taskId, parentId, getTask) {
|
|
7925
|
+
if (parentId === undefined || parentId === null)
|
|
7926
|
+
return;
|
|
7927
|
+
const visited = new Set;
|
|
7928
|
+
let cursor = parentId;
|
|
7929
|
+
while (cursor) {
|
|
7930
|
+
if (cursor === taskId || visited.has(cursor)) {
|
|
7931
|
+
throw parentCycleError(taskId, parentId);
|
|
7932
|
+
}
|
|
7933
|
+
visited.add(cursor);
|
|
7934
|
+
const parent = getTask(cursor);
|
|
7935
|
+
if (!parent)
|
|
7936
|
+
throw new TaskNotFoundError(cursor);
|
|
7937
|
+
cursor = parent.parent_id;
|
|
7938
|
+
}
|
|
7939
|
+
}
|
|
7940
|
+
async function assertTaskParentIntegrityAsync(taskId, parentId, getTask) {
|
|
7941
|
+
if (parentId === undefined || parentId === null)
|
|
7942
|
+
return;
|
|
7943
|
+
const visited = new Set;
|
|
7944
|
+
let cursor = parentId;
|
|
7945
|
+
while (cursor) {
|
|
7946
|
+
if (cursor === taskId || visited.has(cursor)) {
|
|
7947
|
+
throw parentCycleError(taskId, parentId);
|
|
7948
|
+
}
|
|
7949
|
+
visited.add(cursor);
|
|
7950
|
+
const parent = await getTask(cursor);
|
|
7951
|
+
if (!parent)
|
|
7952
|
+
throw new TaskNotFoundError(cursor);
|
|
7953
|
+
cursor = parent.parent_id;
|
|
7954
|
+
}
|
|
7955
|
+
}
|
|
7956
|
+
var init_task_parent_integrity = __esm(() => {
|
|
7957
|
+
init_types();
|
|
7958
|
+
});
|
|
7959
|
+
|
|
7920
7960
|
// src/lib/creator-identity.ts
|
|
7921
7961
|
function canonicalAgentRef(value) {
|
|
7922
7962
|
return value.trim().toLowerCase();
|
|
@@ -9440,6 +9480,7 @@ function createTaskStored(input, d) {
|
|
|
9440
9480
|
let id = uuid();
|
|
9441
9481
|
for (let attempt = 0;attempt < 3; attempt++) {
|
|
9442
9482
|
try {
|
|
9483
|
+
assertTaskParentIntegrity(id, input.parent_id, (candidateId) => getTask(candidateId, d));
|
|
9443
9484
|
d.run(`INSERT INTO tasks (id, short_id, project_id, parent_id, plan_id, task_list_id, cycle_id, title, description, status, priority, agent_id, assigned_to, session_id, working_dir, tags, metadata, version, created_at, updated_at, due_at, estimated_minutes, sla_minutes, confidence, retry_count, max_retries, retry_after, requires_approval, approved_by, approved_at, recurrence_rule, recurrence_parent_id, spawns_template_id, reason, spawned_from_session, assigned_by, created_by, assigned_from_project, task_type, machine_id)
|
|
9444
9485
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 1, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`, [
|
|
9445
9486
|
id,
|
|
@@ -9818,6 +9859,7 @@ function updateTaskStored(id, input, db) {
|
|
|
9818
9859
|
throw new VersionConflictError(id, input.version, task.version);
|
|
9819
9860
|
}
|
|
9820
9861
|
input = sanitizeUpdateTaskInput(input);
|
|
9862
|
+
assertTaskParentIntegrity(id, input.parent_id, (candidateId) => getTask(candidateId, d));
|
|
9821
9863
|
const effectivePlanId = input.plan_id !== undefined ? input.plan_id : task.plan_id;
|
|
9822
9864
|
const linkedProjectId = linkedPlanProjectId(effectivePlanId, d);
|
|
9823
9865
|
if (linkedProjectId) {
|
|
@@ -9871,6 +9913,10 @@ function updateTaskStored(id, input, db) {
|
|
|
9871
9913
|
sets.push("project_id = ?");
|
|
9872
9914
|
params.push(input.project_id);
|
|
9873
9915
|
}
|
|
9916
|
+
if (input.parent_id !== undefined) {
|
|
9917
|
+
sets.push("parent_id = ?");
|
|
9918
|
+
params.push(input.parent_id);
|
|
9919
|
+
}
|
|
9874
9920
|
if (input.assigned_to !== undefined) {
|
|
9875
9921
|
sets.push("assigned_to = ?");
|
|
9876
9922
|
params.push(input.assigned_to);
|
|
@@ -9986,6 +10032,8 @@ function updateTaskStored(id, input, db) {
|
|
|
9986
10032
|
logTaskChange(id, "update", "priority", task.priority, input.priority, agentId, d);
|
|
9987
10033
|
if (input.title !== undefined && input.title !== task.title)
|
|
9988
10034
|
logTaskChange(id, "update", "title", task.title, input.title, agentId, d);
|
|
10035
|
+
if (input.parent_id !== undefined && input.parent_id !== task.parent_id)
|
|
10036
|
+
logTaskChange(id, "update", "parent_id", task.parent_id, input.parent_id, agentId, d);
|
|
9989
10037
|
if (input.assigned_to !== undefined && input.assigned_to !== task.assigned_to)
|
|
9990
10038
|
logTaskChange(id, "update", "assigned_to", task.assigned_to, input.assigned_to, agentId, d);
|
|
9991
10039
|
if (input.working_dir !== undefined && input.working_dir !== task.working_dir)
|
|
@@ -10043,7 +10091,8 @@ function updateTask(id, input, db) {
|
|
|
10043
10091
|
if (!before)
|
|
10044
10092
|
throw new TaskNotFoundError(id);
|
|
10045
10093
|
const guardedPlanIds = [before.plan_id, input.plan_id];
|
|
10046
|
-
|
|
10094
|
+
const needsSerializedWrite = input.parent_id !== undefined || guardedPlanIds.some(Boolean);
|
|
10095
|
+
if (!needsSerializedWrite)
|
|
10047
10096
|
return updateTaskStored(id, input, d);
|
|
10048
10097
|
return d.transaction(() => {
|
|
10049
10098
|
guardPlanRowsSqlite(guardedPlanIds, d);
|
|
@@ -10079,6 +10128,7 @@ var init_task_crud = __esm(() => {
|
|
|
10079
10128
|
init_checklists();
|
|
10080
10129
|
init_storage_tombstones();
|
|
10081
10130
|
init_prewrite_secrets();
|
|
10131
|
+
init_task_parent_integrity();
|
|
10082
10132
|
});
|
|
10083
10133
|
|
|
10084
10134
|
// src/db/task-status.ts
|
|
@@ -12670,7 +12720,7 @@ var init_tasks = __esm(() => {
|
|
|
12670
12720
|
// package.json
|
|
12671
12721
|
var package_default = {
|
|
12672
12722
|
name: "@hasna/todos",
|
|
12673
|
-
version: "0.15.
|
|
12723
|
+
version: "0.15.32",
|
|
12674
12724
|
description: "Universal task management for AI coding agents - CLI + MCP server + interactive TUI",
|
|
12675
12725
|
type: "module",
|
|
12676
12726
|
main: "dist/index.js",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"packageName": "@hasna/todos",
|
|
3
|
-
"packageVersion": "0.15.
|
|
3
|
+
"packageVersion": "0.15.32",
|
|
4
4
|
"repository": "https://github.com/hasna/todos.git",
|
|
5
|
-
"gitCommit": "
|
|
6
|
-
"gitTree": "
|
|
7
|
-
"sourceTreeSha256": "
|
|
8
|
-
"generatedAt": "2026-08-
|
|
5
|
+
"gitCommit": "1d458a0ef6acb9e821cba89b3b7cf1ae316781d7",
|
|
6
|
+
"gitTree": "c8bbdfbedab0c0af164640532aaaebc102441968",
|
|
7
|
+
"sourceTreeSha256": "defc279f0e698221d01999e646dfa52f5012c930cfa97fb20a596c936ad21060",
|
|
8
|
+
"generatedAt": "2026-08-12T17:50:57.000Z"
|
|
9
9
|
}
|
package/dist/sdk/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
export { TodosClient, createClient } from "./client.js";
|
|
11
11
|
export type { TodosClientOptions } from "./client.js";
|
|
12
12
|
export { TodosV1Client, ApiError as TodosV1ApiError } from "./v1.generated.js";
|
|
13
|
-
export type { TodosV1ClientOptions, Task as TodosV1Task, Project as TodosV1Project, TaskManifestBindingLookupRequest as TodosV1TaskManifestBindingLookupRequest, TaskManifestBindingLookupResult as TodosV1TaskManifestBindingLookupResult, TaskManifestBindingLookupResponse as TodosV1TaskManifestBindingLookupResponse, TaskComment as TodosV1TaskComment, CreateTaskInput as TodosV1CreateTaskInput, UpdateTaskInput as TodosV1UpdateTaskInput, FailTaskInput as TodosV1FailTaskInput, TaskFailureResult as TodosV1TaskFailureResult, CreateProjectInput as TodosV1CreateProjectInput, ProjectTaskListEnsureApplyInput as TodosV1ProjectTaskListEnsureApplyInput, ProjectTaskListRollbackInput as TodosV1ProjectTaskListRollbackInput, ProjectTaskListEnsureReceipt as TodosV1ProjectTaskListEnsureReceipt, ProjectTaskListEnsureResult as TodosV1ProjectTaskListEnsureResult, ProjectTaskListRollbackResult as TodosV1ProjectTaskListRollbackResult, CreateTaskCommentInput as TodosV1CreateTaskCommentInput, AdmitPrGroupInput as TodosV1AdmitPrGroupInput, RecoverPrGroupInput as TodosV1RecoverPrGroupInput, AppendPrGroupEventInput as TodosV1AppendPrGroupEventInput, PrGroupCiProof as TodosV1PrGroupCiProof, PrGroupCleanupProof as TodosV1PrGroupCleanupProof, PrGroupRecord as TodosV1PrGroupRecord, PrGroupAttemptRecord as TodosV1PrGroupAttemptRecord, PrGroupEventRecord as TodosV1PrGroupEventRecord, PrGroupStateView as TodosV1PrGroupStateView, PrGroupEventPage as TodosV1PrGroupEventPage, PrGroupMutationResult as TodosV1PrGroupMutationResult, } from "./v1.generated.js";
|
|
13
|
+
export type { TodosV1ClientOptions, Task as TodosV1Task, Project as TodosV1Project, TaskManifestBindingLookupRequest as TodosV1TaskManifestBindingLookupRequest, TaskManifestBindingLookupResult as TodosV1TaskManifestBindingLookupResult, TaskManifestBindingLookupResponse as TodosV1TaskManifestBindingLookupResponse, ProjectRegistrationCapability as TodosV1ProjectRegistrationCapability, ProjectRegistrationReceipt as TodosV1ProjectRegistrationReceipt, ProjectRegistrationRequest as TodosV1ProjectRegistrationRequest, ProjectRegistrationLookupRequest as TodosV1ProjectRegistrationLookupRequest, ProjectResource as TodosV1ProjectResource, ProjectResourcePage as TodosV1ProjectResourcePage, TaskComment as TodosV1TaskComment, CreateTaskInput as TodosV1CreateTaskInput, UpdateTaskInput as TodosV1UpdateTaskInput, FailTaskInput as TodosV1FailTaskInput, TaskFailureResult as TodosV1TaskFailureResult, CreateProjectInput as TodosV1CreateProjectInput, ProjectTaskListEnsureApplyInput as TodosV1ProjectTaskListEnsureApplyInput, ProjectTaskListRollbackInput as TodosV1ProjectTaskListRollbackInput, ProjectTaskListEnsureReceipt as TodosV1ProjectTaskListEnsureReceipt, ProjectTaskListEnsureResult as TodosV1ProjectTaskListEnsureResult, ProjectTaskListRollbackResult as TodosV1ProjectTaskListRollbackResult, CreateTaskCommentInput as TodosV1CreateTaskCommentInput, AdmitPrGroupInput as TodosV1AdmitPrGroupInput, RecoverPrGroupInput as TodosV1RecoverPrGroupInput, AppendPrGroupEventInput as TodosV1AppendPrGroupEventInput, PrGroupCiProof as TodosV1PrGroupCiProof, PrGroupCleanupProof as TodosV1PrGroupCleanupProof, PrGroupRecord as TodosV1PrGroupRecord, PrGroupAttemptRecord as TodosV1PrGroupAttemptRecord, PrGroupEventRecord as TodosV1PrGroupEventRecord, PrGroupStateView as TodosV1PrGroupStateView, PrGroupEventPage as TodosV1PrGroupEventPage, PrGroupMutationResult as TodosV1PrGroupMutationResult, } from "./v1.generated.js";
|
|
14
14
|
export type { AdmitPrGroupInput, AppendPrGroupEventInput, PrGroupAdapterViews, PrGroupAttemptRecord, PrGroupCiProof, PrGroupCleanupProof, PrGroupDecisionEnvelopeAdapter, PrGroupEventListOptions, PrGroupEventPage, PrGroupEventRecord, PrGroupEvidenceRefAdapter, PrGroupMutationResult, PrGroupProofBundleAdapter, PrGroupRecord, PrGroupStateView, PrGroupWorkRunAdapter, RecoverPrGroupInput, } from "../pr-groups/types.js";
|
|
15
15
|
export { TodosAPIError, TodosNotFoundError, TodosConflictError, TodosUnauthorizedError, TodosRateLimitError, TodosTimeoutError, } from "./types.js";
|
|
16
16
|
export type { SSEEvent, CursorPage, ListOptions, TaskListResponse, TaskStatusResponse, TaskNextResponse, TaskActiveResponse, TaskStaleResponse, TaskChangedResponse, TaskContextResponse, TaskProgressResponse, TaskAttachmentsResponse, TaskFailResponse, TaskBulkResponse, AgentMeResponse, AgentQueueResponse, OrgNode, PlanWithTasks, ReportResponse, DoctorResponse, DoctorIssue, } from "./types.js";
|
package/dist/sdk/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OA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c,EACd,cAAc,EACd,WAAW,GACZ,MAAM,YAAY,CAAC"}
|
package/dist/sdk/index.js
CHANGED
|
@@ -652,6 +652,77 @@ class TodosClient {
|
|
|
652
652
|
function createClient(options) {
|
|
653
653
|
return new TodosClient(options);
|
|
654
654
|
}
|
|
655
|
+
// src/project-registration/types.ts
|
|
656
|
+
class TodosProjectRegistrationError extends Error {
|
|
657
|
+
code;
|
|
658
|
+
details;
|
|
659
|
+
constructor(code, message, details = {}) {
|
|
660
|
+
super(message);
|
|
661
|
+
this.code = code;
|
|
662
|
+
this.details = details;
|
|
663
|
+
this.name = "TodosProjectRegistrationError";
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
// src/project-registration/adoption-validation.ts
|
|
668
|
+
var VALIDATION_KEYS = [
|
|
669
|
+
"valid",
|
|
670
|
+
"resource_kind",
|
|
671
|
+
"target_id",
|
|
672
|
+
"source_receipt_id",
|
|
673
|
+
"accepted_receipt_id",
|
|
674
|
+
"source_outcome",
|
|
675
|
+
"created_at",
|
|
676
|
+
"current_revision",
|
|
677
|
+
"accepted_result_digest"
|
|
678
|
+
];
|
|
679
|
+
function isRecord(value) {
|
|
680
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
681
|
+
}
|
|
682
|
+
function isNonEmptyString(value) {
|
|
683
|
+
return typeof value === "string" && value.length > 0;
|
|
684
|
+
}
|
|
685
|
+
function hasExactKeys(value, expected) {
|
|
686
|
+
const actual = Object.keys(value).sort();
|
|
687
|
+
const wanted = [...expected].sort();
|
|
688
|
+
return actual.length === wanted.length && actual.every((key, index) => key === wanted[index]);
|
|
689
|
+
}
|
|
690
|
+
function adoptionRejected(message) {
|
|
691
|
+
throw new TodosProjectRegistrationError("TODOS_PROJECT_REGISTRATION_ADOPTION_REJECTED", `TODOS_PROJECT_REGISTRATION_ADOPTION_REJECTED: ${message}`);
|
|
692
|
+
}
|
|
693
|
+
function assertTodosPriorRegistrationAdoptionValidationEnvelope(value, input) {
|
|
694
|
+
if (!isRecord(input) || !hasExactKeys(input, [
|
|
695
|
+
"source_request",
|
|
696
|
+
"source_receipt",
|
|
697
|
+
"current_record"
|
|
698
|
+
])) {
|
|
699
|
+
adoptionRejected("prior-adoption validation input is incomplete");
|
|
700
|
+
}
|
|
701
|
+
const request = input["source_request"];
|
|
702
|
+
const receipt = input["source_receipt"];
|
|
703
|
+
const current = input["current_record"];
|
|
704
|
+
if (!isRecord(request) || !isRecord(receipt) || !isRecord(current)) {
|
|
705
|
+
adoptionRejected("prior-adoption validation input records are incomplete");
|
|
706
|
+
}
|
|
707
|
+
const resourceKind = request["resource_kind"];
|
|
708
|
+
const sourceOutcome = receipt["outcome"];
|
|
709
|
+
const acceptedReceiptId = sourceOutcome === "accepted" ? receipt["receipt_id"] : sourceOutcome === "duplicate_of_accepted" ? receipt["duplicate_of_receipt_id"] : null;
|
|
710
|
+
if (resourceKind !== "project" && resourceKind !== "task_list" || request["direction"] !== "forward" || sourceOutcome !== "accepted" && sourceOutcome !== "duplicate_of_accepted" || !isNonEmptyString(acceptedReceiptId) || !isNonEmptyString(receipt["receipt_id"]) || !isNonEmptyString(receipt["target_id"]) || !isNonEmptyString(receipt["result_revision"]) || !isNonEmptyString(receipt["result_digest"]) || !isNonEmptyString(current["id"]) || !isNonEmptyString(current["created_at"]) || !isNonEmptyString(current["updated_at"]) || receipt["authority"] !== "todos" || receipt["route"] !== request["authority_route"] || receipt["package_version"] !== request["package_version"] || receipt["authority_id"] !== request["authority_id"] || receipt["tenant_id"] !== request["tenant_id"] || receipt["corpus_id"] !== request["corpus_id"] || receipt["operation_id"] !== request["operation_id"] || receipt["step_id"] !== request["step_id"] || receipt["resource_kind"] !== resourceKind || receipt["direction"] !== "forward" || receipt["idempotency_key"] !== request["idempotency_key"] || receipt["request_digest"] !== request["request_digest"] || receipt["precondition_digest"] !== request["precondition_digest"] || receipt["accepted_receipt_id"] !== null || receipt["target_id"] !== current["id"] || receipt["result_revision"] !== current["created_at"]) {
|
|
711
|
+
adoptionRejected("prior-adoption validation input does not carry one complete accepted receipt and current target incarnation");
|
|
712
|
+
}
|
|
713
|
+
if (sourceOutcome === "accepted" && receipt["duplicate_of_receipt_id"] !== null || sourceOutcome === "duplicate_of_accepted" && receipt["duplicate_of_receipt_id"] !== acceptedReceiptId) {
|
|
714
|
+
adoptionRejected("prior-adoption validation source receipt lineage is incomplete");
|
|
715
|
+
}
|
|
716
|
+
if (!isRecord(value) || !hasExactKeys(value, ["validation"]) || !isRecord(value["validation"]) || !hasExactKeys(value["validation"], VALIDATION_KEYS)) {
|
|
717
|
+
adoptionRejected("prior-adoption validation response envelope is incomplete");
|
|
718
|
+
}
|
|
719
|
+
const validation = value["validation"];
|
|
720
|
+
if (validation["valid"] !== true || validation["resource_kind"] !== resourceKind || validation["target_id"] !== current["id"] || validation["source_receipt_id"] !== receipt["receipt_id"] || validation["accepted_receipt_id"] !== acceptedReceiptId || validation["source_outcome"] !== sourceOutcome || validation["created_at"] !== current["created_at"] || validation["current_revision"] !== current["updated_at"] || validation["accepted_result_digest"] !== receipt["result_digest"]) {
|
|
721
|
+
adoptionRejected("prior-adoption validation response does not prove the exact accepted receipt and current target");
|
|
722
|
+
}
|
|
723
|
+
return validation;
|
|
724
|
+
}
|
|
725
|
+
|
|
655
726
|
// src/sdk/v1.generated.ts
|
|
656
727
|
class ApiError extends Error {
|
|
657
728
|
status;
|
|
@@ -805,6 +876,65 @@ class TodosV1Client {
|
|
|
805
876
|
init
|
|
806
877
|
});
|
|
807
878
|
}
|
|
879
|
+
async getProjectRegistrationCapability(init) {
|
|
880
|
+
return this.request("GET", `/v1/project-registration/capability`, {
|
|
881
|
+
body: undefined,
|
|
882
|
+
query: undefined,
|
|
883
|
+
init
|
|
884
|
+
});
|
|
885
|
+
}
|
|
886
|
+
async compensateProjectRegistrationResource(body, init) {
|
|
887
|
+
return this.request("POST", `/v1/project-registration/compensate`, {
|
|
888
|
+
body,
|
|
889
|
+
query: undefined,
|
|
890
|
+
init
|
|
891
|
+
});
|
|
892
|
+
}
|
|
893
|
+
async createProjectRegistrationResource(body, init) {
|
|
894
|
+
return this.request("POST", `/v1/project-registration/create`, {
|
|
895
|
+
body,
|
|
896
|
+
query: undefined,
|
|
897
|
+
init
|
|
898
|
+
});
|
|
899
|
+
}
|
|
900
|
+
async readExactProjectRegistrationResource(body, init) {
|
|
901
|
+
return this.request("POST", `/v1/project-registration/read-exact`, {
|
|
902
|
+
body,
|
|
903
|
+
query: undefined,
|
|
904
|
+
init
|
|
905
|
+
});
|
|
906
|
+
}
|
|
907
|
+
async lookupProjectRegistrationReceipt(body, init) {
|
|
908
|
+
return this.request("POST", `/v1/project-registration/receipts/lookup`, {
|
|
909
|
+
body,
|
|
910
|
+
query: undefined,
|
|
911
|
+
init
|
|
912
|
+
});
|
|
913
|
+
}
|
|
914
|
+
async listProjectRegistrationResources(query, init) {
|
|
915
|
+
return this.request("GET", `/v1/project-registration/resources`, {
|
|
916
|
+
body: undefined,
|
|
917
|
+
query,
|
|
918
|
+
init
|
|
919
|
+
});
|
|
920
|
+
}
|
|
921
|
+
async validatePriorRegistrationAdoption(body, init) {
|
|
922
|
+
const response = await this.request("POST", `/v1/project-registration/validate-prior-adoption`, {
|
|
923
|
+
body,
|
|
924
|
+
query: undefined,
|
|
925
|
+
init
|
|
926
|
+
});
|
|
927
|
+
return {
|
|
928
|
+
validation: assertTodosPriorRegistrationAdoptionValidationEnvelope(response, body)
|
|
929
|
+
};
|
|
930
|
+
}
|
|
931
|
+
async verifyInverseProjectRegistrationResource(body, init) {
|
|
932
|
+
return this.request("POST", `/v1/project-registration/verify-inverse`, {
|
|
933
|
+
body,
|
|
934
|
+
query: undefined,
|
|
935
|
+
init
|
|
936
|
+
});
|
|
937
|
+
}
|
|
808
938
|
async listProjects(init) {
|
|
809
939
|
return this.request("GET", `/v1/projects`, {
|
|
810
940
|
body: undefined,
|
|
@@ -917,6 +1047,13 @@ class TodosV1Client {
|
|
|
917
1047
|
init
|
|
918
1048
|
});
|
|
919
1049
|
}
|
|
1050
|
+
async applyTaskManifest(body, init) {
|
|
1051
|
+
return this.request("POST", `/v1/task-manifest/apply`, {
|
|
1052
|
+
body,
|
|
1053
|
+
query: undefined,
|
|
1054
|
+
init
|
|
1055
|
+
});
|
|
1056
|
+
}
|
|
920
1057
|
async lookupTaskManifestBinding(body, init) {
|
|
921
1058
|
return this.request("POST", `/v1/task-manifest/bindings/lookup`, {
|
|
922
1059
|
body,
|
|
@@ -931,6 +1068,20 @@ class TodosV1Client {
|
|
|
931
1068
|
init
|
|
932
1069
|
});
|
|
933
1070
|
}
|
|
1071
|
+
async compensateTaskManifest(body, init) {
|
|
1072
|
+
return this.request("POST", `/v1/task-manifest/compensate`, {
|
|
1073
|
+
body,
|
|
1074
|
+
query: undefined,
|
|
1075
|
+
init
|
|
1076
|
+
});
|
|
1077
|
+
}
|
|
1078
|
+
async readExactTaskManifest(body, init) {
|
|
1079
|
+
return this.request("POST", `/v1/task-manifest/read-exact`, {
|
|
1080
|
+
body,
|
|
1081
|
+
query: undefined,
|
|
1082
|
+
init
|
|
1083
|
+
});
|
|
1084
|
+
}
|
|
934
1085
|
async listTasks(query, init) {
|
|
935
1086
|
return this.request("GET", `/v1/tasks`, {
|
|
936
1087
|
body: undefined,
|
|
@@ -46,6 +46,10 @@ export interface TaskManifestCapability {
|
|
|
46
46
|
"tenant_id": string;
|
|
47
47
|
"backend": "sqlite" | "postgresql" | "http";
|
|
48
48
|
"deterministic_ids": true;
|
|
49
|
+
"operation_step_identity": true;
|
|
50
|
+
"deterministic_idempotency_keys": true;
|
|
51
|
+
"terminal_nonacceptance_receipts": true;
|
|
52
|
+
"plan_slug_provenance": "deterministic-v1";
|
|
49
53
|
"immutable_receipts": true;
|
|
50
54
|
"transactional_outbox": true;
|
|
51
55
|
"idempotent_outbox_delivery": true;
|
|
@@ -57,6 +61,87 @@ export interface TaskManifestCapability {
|
|
|
57
61
|
export interface TaskManifestCapabilityResponse {
|
|
58
62
|
"capability": TaskManifestCapability;
|
|
59
63
|
}
|
|
64
|
+
export interface TaskManifest {
|
|
65
|
+
"version": 1;
|
|
66
|
+
"operation_id": string;
|
|
67
|
+
"step_id": string;
|
|
68
|
+
"idempotency_key": string;
|
|
69
|
+
"precondition_digest": string;
|
|
70
|
+
"project_id": string;
|
|
71
|
+
"task_list_id"?: string;
|
|
72
|
+
"if_binding_version"?: number;
|
|
73
|
+
"plan": {
|
|
74
|
+
"key": string;
|
|
75
|
+
"name": string;
|
|
76
|
+
"description"?: string;
|
|
77
|
+
"status"?: "active" | "completed" | "archived";
|
|
78
|
+
};
|
|
79
|
+
"tasks": Array<{
|
|
80
|
+
"key": string;
|
|
81
|
+
"title": string;
|
|
82
|
+
"description"?: string;
|
|
83
|
+
"status"?: "pending" | "in_progress" | "completed" | "failed" | "cancelled";
|
|
84
|
+
"priority"?: "low" | "medium" | "high" | "critical";
|
|
85
|
+
"assigned_to"?: string;
|
|
86
|
+
"created_by"?: string;
|
|
87
|
+
"tags"?: Array<string>;
|
|
88
|
+
"metadata"?: Record<string, unknown>;
|
|
89
|
+
"comments"?: Array<Record<string, unknown>>;
|
|
90
|
+
"verifications"?: Array<Record<string, unknown>>;
|
|
91
|
+
}>;
|
|
92
|
+
"dependencies"?: Array<Record<string, unknown>>;
|
|
93
|
+
"effects"?: Array<Record<string, unknown>>;
|
|
94
|
+
}
|
|
95
|
+
export interface TaskManifestReceipt {
|
|
96
|
+
"receipt_id": string;
|
|
97
|
+
"authority": "todos";
|
|
98
|
+
"route": "todos.task-manifest.v1";
|
|
99
|
+
"schema_version": 1;
|
|
100
|
+
"kind": "apply" | "compensate";
|
|
101
|
+
"operation_id": string;
|
|
102
|
+
"step_id": string;
|
|
103
|
+
"idempotency_key": string;
|
|
104
|
+
"request_digest": string;
|
|
105
|
+
"precondition_digest": string;
|
|
106
|
+
"result_digest": string;
|
|
107
|
+
"outcome": "accepted" | "duplicate_of_accepted" | "terminal_nonacceptance";
|
|
108
|
+
"reason": string | null;
|
|
109
|
+
"duplicate_of_receipt_id": string | null;
|
|
110
|
+
"binding_version": number;
|
|
111
|
+
"apply_receipt_id": string | null;
|
|
112
|
+
"created_at": string;
|
|
113
|
+
}
|
|
114
|
+
export interface TaskManifestApplyResult {
|
|
115
|
+
"duplicate": boolean;
|
|
116
|
+
"receipt": TaskManifestReceipt;
|
|
117
|
+
"graph": Record<string, unknown>;
|
|
118
|
+
"readback": Record<string, unknown>;
|
|
119
|
+
"outbox_ids": Array<string>;
|
|
120
|
+
"result_digest": string;
|
|
121
|
+
}
|
|
122
|
+
export interface TaskManifestApplyResponse {
|
|
123
|
+
"result": TaskManifestApplyResult;
|
|
124
|
+
}
|
|
125
|
+
export interface TaskManifestCompensateRequest {
|
|
126
|
+
"receipt_id": string;
|
|
127
|
+
"operation_id": string;
|
|
128
|
+
"step_id": string;
|
|
129
|
+
"idempotency_key": string;
|
|
130
|
+
"precondition_digest": string;
|
|
131
|
+
"if_binding_version": number;
|
|
132
|
+
}
|
|
133
|
+
export interface TaskManifestCompensationResult {
|
|
134
|
+
"duplicate": boolean;
|
|
135
|
+
"receipt": TaskManifestReceipt;
|
|
136
|
+
"absent": true;
|
|
137
|
+
"readback": Record<string, unknown>;
|
|
138
|
+
}
|
|
139
|
+
export interface TaskManifestCompensateResponse {
|
|
140
|
+
"result": TaskManifestCompensationResult;
|
|
141
|
+
}
|
|
142
|
+
export interface TaskManifestReadExactRequest {
|
|
143
|
+
"receipt_id": string;
|
|
144
|
+
}
|
|
60
145
|
export interface TaskManifestBindingLookupRequest {
|
|
61
146
|
"authority": "todos";
|
|
62
147
|
"route": "todos.task-manifest.v1";
|
|
@@ -71,6 +156,8 @@ export interface TaskManifestBindingLookupResult {
|
|
|
71
156
|
"schema_version": 1;
|
|
72
157
|
"tenant_id": string;
|
|
73
158
|
"plan_id": string;
|
|
159
|
+
"operation_id": string;
|
|
160
|
+
"step_id": string;
|
|
74
161
|
"apply_receipt_id": string;
|
|
75
162
|
"binding_version": number;
|
|
76
163
|
"state": "applied" | "compensated";
|
|
@@ -78,6 +165,131 @@ export interface TaskManifestBindingLookupResult {
|
|
|
78
165
|
export interface TaskManifestBindingLookupResponse {
|
|
79
166
|
"result": TaskManifestBindingLookupResult;
|
|
80
167
|
}
|
|
168
|
+
export interface ProjectRegistrationCapability {
|
|
169
|
+
"authority": "todos";
|
|
170
|
+
"route": "todos.project-registration.v1";
|
|
171
|
+
"package_version": string;
|
|
172
|
+
"authority_id": string;
|
|
173
|
+
"tenant_id": string;
|
|
174
|
+
"corpus_id": string;
|
|
175
|
+
"supported_resources": Array<"project" | "task_list">;
|
|
176
|
+
"conditional_create": true;
|
|
177
|
+
"immutable_receipts": true;
|
|
178
|
+
"exact_terminal_lookup": true;
|
|
179
|
+
"exact_readback": true;
|
|
180
|
+
"bind_existing_adoption": true;
|
|
181
|
+
"prior_registration_adoption_validation": true;
|
|
182
|
+
"project_resource_enumeration": true;
|
|
183
|
+
"project_resource_page_limit": number;
|
|
184
|
+
"conditional_inverse": true;
|
|
185
|
+
"ambiguous_outcome_reconciliation": true;
|
|
186
|
+
}
|
|
187
|
+
export interface ProjectRegistrationReceipt {
|
|
188
|
+
"receipt_id": string;
|
|
189
|
+
"authority": "todos";
|
|
190
|
+
"route": "todos.project-registration.v1";
|
|
191
|
+
"package_version": string;
|
|
192
|
+
"authority_id": string;
|
|
193
|
+
"tenant_id": string;
|
|
194
|
+
"corpus_id": string;
|
|
195
|
+
"operation_id": string;
|
|
196
|
+
"step_id": string;
|
|
197
|
+
"resource_kind": "project" | "task_list";
|
|
198
|
+
"direction": "forward" | "inverse";
|
|
199
|
+
"idempotency_key": string;
|
|
200
|
+
"request_digest": string;
|
|
201
|
+
"precondition_digest": string;
|
|
202
|
+
"outcome": "accepted" | "duplicate_of_accepted" | "terminal_nonacceptance";
|
|
203
|
+
"reason": string | null;
|
|
204
|
+
"target_id": string | null;
|
|
205
|
+
"result_revision": string | null;
|
|
206
|
+
"result_digest": string | null;
|
|
207
|
+
"duplicate_of_receipt_id": string | null;
|
|
208
|
+
"accepted_receipt_id": string | null;
|
|
209
|
+
"created_by_operation": boolean;
|
|
210
|
+
"created_at": string;
|
|
211
|
+
}
|
|
212
|
+
export interface ProjectRegistrationRequest {
|
|
213
|
+
"operation_id": string;
|
|
214
|
+
"step_id": string;
|
|
215
|
+
"resource_kind": "project" | "task_list";
|
|
216
|
+
"direction": "forward" | "inverse";
|
|
217
|
+
"authority_route": string;
|
|
218
|
+
"package_version": string;
|
|
219
|
+
"authority_id": string;
|
|
220
|
+
"tenant_id": string;
|
|
221
|
+
"corpus_id": string;
|
|
222
|
+
"target_selector": string;
|
|
223
|
+
"idempotency_key": string;
|
|
224
|
+
"request_digest": string;
|
|
225
|
+
"precondition_digest": string;
|
|
226
|
+
"project_id": string;
|
|
227
|
+
"project_slug": string;
|
|
228
|
+
"project_name": string;
|
|
229
|
+
"desired": Record<string, unknown>;
|
|
230
|
+
"bind_existing"?: boolean;
|
|
231
|
+
"accepted_receipt"?: ProjectRegistrationReceipt;
|
|
232
|
+
"response_byte_limit": number;
|
|
233
|
+
"time_budget_ms": number;
|
|
234
|
+
}
|
|
235
|
+
export interface ProjectRegistrationLookupRequest {
|
|
236
|
+
"operation_id": string;
|
|
237
|
+
"step_id": string;
|
|
238
|
+
"resource_kind": "project" | "task_list";
|
|
239
|
+
"direction": "forward" | "inverse";
|
|
240
|
+
"authority": "todos";
|
|
241
|
+
"authority_route": string;
|
|
242
|
+
"package_version": string;
|
|
243
|
+
"authority_id": string;
|
|
244
|
+
"tenant_id": string;
|
|
245
|
+
"corpus_id": string;
|
|
246
|
+
"target_selector": string;
|
|
247
|
+
"idempotency_key": string;
|
|
248
|
+
"target_id"?: string;
|
|
249
|
+
"max_items": 1;
|
|
250
|
+
"response_byte_limit": number;
|
|
251
|
+
"time_budget_ms": number;
|
|
252
|
+
}
|
|
253
|
+
export interface PriorRegistrationAdoptionValidation {
|
|
254
|
+
"valid": true;
|
|
255
|
+
"resource_kind": "project" | "task_list";
|
|
256
|
+
"target_id": string;
|
|
257
|
+
"source_receipt_id": string;
|
|
258
|
+
"accepted_receipt_id": string;
|
|
259
|
+
"source_outcome": "accepted" | "duplicate_of_accepted";
|
|
260
|
+
"created_at": string;
|
|
261
|
+
"current_revision": string;
|
|
262
|
+
"accepted_result_digest": string;
|
|
263
|
+
}
|
|
264
|
+
export interface ProjectResource {
|
|
265
|
+
"source_project_id": string;
|
|
266
|
+
"kind": "project" | "task_list" | "plan" | "task";
|
|
267
|
+
"scope": "collection" | "resource";
|
|
268
|
+
"target_id": string;
|
|
269
|
+
"parent_id": string | null;
|
|
270
|
+
"revision": string;
|
|
271
|
+
"digest": string;
|
|
272
|
+
}
|
|
273
|
+
export interface ProjectResourcePage {
|
|
274
|
+
"authority": "todos";
|
|
275
|
+
"route": "todos.project-registration.v1";
|
|
276
|
+
"package_version": string;
|
|
277
|
+
"authority_id": string;
|
|
278
|
+
"tenant_id": string;
|
|
279
|
+
"corpus_id": string;
|
|
280
|
+
"source_project_id": string;
|
|
281
|
+
"todos_project_id": string;
|
|
282
|
+
"task_list_id": string;
|
|
283
|
+
"include_anchors": boolean;
|
|
284
|
+
"collection_revision": string;
|
|
285
|
+
"limit": number;
|
|
286
|
+
"count": number;
|
|
287
|
+
"resources": Array<ProjectResource>;
|
|
288
|
+
"has_more": boolean;
|
|
289
|
+
"next_cursor": string | null;
|
|
290
|
+
"complete": boolean;
|
|
291
|
+
"truncated": false;
|
|
292
|
+
}
|
|
81
293
|
export interface TaskList {
|
|
82
294
|
"id"?: string;
|
|
83
295
|
"project_id"?: string | null;
|
|
@@ -277,6 +489,7 @@ export interface UpdateTaskInput {
|
|
|
277
489
|
"priority"?: "low" | "medium" | "high" | "critical";
|
|
278
490
|
"assigned_to"?: string;
|
|
279
491
|
"project_id"?: string | null;
|
|
492
|
+
"parent_id"?: string | null;
|
|
280
493
|
"plan_id"?: string | null;
|
|
281
494
|
"task_list_id"?: string | null;
|
|
282
495
|
"version"?: number;
|
|
@@ -774,6 +987,69 @@ export declare class TodosV1Client {
|
|
|
774
987
|
appendPrGroupEvent(id: string, body: AppendPrGroupEventInput, init?: RequestInit): Promise<PrGroupMutationResult>;
|
|
775
988
|
/** Fence the prior attempt and create or adopt a recovery generation */
|
|
776
989
|
recoverPrGroup(id: string, body: RecoverPrGroupInput, init?: RequestInit): Promise<PrGroupMutationResult>;
|
|
990
|
+
/** Read the live package-owned Projects to Todos registration capability */
|
|
991
|
+
getProjectRegistrationCapability(init?: RequestInit): Promise<{
|
|
992
|
+
"capability": ProjectRegistrationCapability;
|
|
993
|
+
}>;
|
|
994
|
+
/** Conditionally remove an unchanged receipt-owned registration resource */
|
|
995
|
+
compensateProjectRegistrationResource(body: ProjectRegistrationRequest, init?: RequestInit): Promise<{
|
|
996
|
+
"receipt": ProjectRegistrationReceipt;
|
|
997
|
+
}>;
|
|
998
|
+
/** Create or deterministically bind one Projects to Todos resource */
|
|
999
|
+
createProjectRegistrationResource(body: ProjectRegistrationRequest, init?: RequestInit): Promise<{
|
|
1000
|
+
"receipt": ProjectRegistrationReceipt;
|
|
1001
|
+
}>;
|
|
1002
|
+
/** Read one registered project or task list by exact full UUID */
|
|
1003
|
+
readExactProjectRegistrationResource(body: {
|
|
1004
|
+
"resource_kind": "project" | "task_list";
|
|
1005
|
+
"target_id": string;
|
|
1006
|
+
"response_byte_limit": number;
|
|
1007
|
+
"time_budget_ms": number;
|
|
1008
|
+
}, init?: RequestInit): Promise<{
|
|
1009
|
+
"record": {
|
|
1010
|
+
"target_id": string;
|
|
1011
|
+
"revision": string;
|
|
1012
|
+
"digest": string;
|
|
1013
|
+
};
|
|
1014
|
+
}>;
|
|
1015
|
+
/** Recover one exact immutable terminal registration receipt */
|
|
1016
|
+
lookupProjectRegistrationReceipt(body: ProjectRegistrationLookupRequest, init?: RequestInit): Promise<{
|
|
1017
|
+
"receipt": ProjectRegistrationReceipt;
|
|
1018
|
+
"response_control": {
|
|
1019
|
+
"response_byte_limit": number;
|
|
1020
|
+
"time_budget_ms": number;
|
|
1021
|
+
"response_bytes": number;
|
|
1022
|
+
"elapsed_ms": number;
|
|
1023
|
+
"complete": true;
|
|
1024
|
+
"truncated": false;
|
|
1025
|
+
};
|
|
1026
|
+
}>;
|
|
1027
|
+
/** List one bounded page of stable Todos identities for an exact Projects workspace id */
|
|
1028
|
+
listProjectRegistrationResources(query?: {
|
|
1029
|
+
"source_project_id": string;
|
|
1030
|
+
"include_anchors"?: boolean;
|
|
1031
|
+
"limit"?: number;
|
|
1032
|
+
"cursor"?: string;
|
|
1033
|
+
}, init?: RequestInit): Promise<{
|
|
1034
|
+
"page": ProjectResourcePage;
|
|
1035
|
+
}>;
|
|
1036
|
+
/** Fail closed unless one prior accepted registration still matches its exact current resource */
|
|
1037
|
+
validatePriorRegistrationAdoption(body: {
|
|
1038
|
+
"source_request": ProjectRegistrationRequest;
|
|
1039
|
+
"source_receipt": ProjectRegistrationReceipt;
|
|
1040
|
+
"current_record": Project | TaskList;
|
|
1041
|
+
}, init?: RequestInit): Promise<{
|
|
1042
|
+
"validation": PriorRegistrationAdoptionValidation;
|
|
1043
|
+
}>;
|
|
1044
|
+
/** Verify exact absence after conditional registration compensation */
|
|
1045
|
+
verifyInverseProjectRegistrationResource(body: ProjectRegistrationRequest, init?: RequestInit): Promise<{
|
|
1046
|
+
"verification": {
|
|
1047
|
+
"target_id": string;
|
|
1048
|
+
"accepted_receipt_id": string;
|
|
1049
|
+
"absent": true;
|
|
1050
|
+
"digest": string;
|
|
1051
|
+
};
|
|
1052
|
+
}>;
|
|
777
1053
|
/** List projects */
|
|
778
1054
|
listProjects(init?: RequestInit): Promise<{
|
|
779
1055
|
"projects"?: Array<Project>;
|
|
@@ -841,10 +1117,16 @@ export declare class TodosV1Client {
|
|
|
841
1117
|
updateTaskList(id: string, body: UpdateTaskListInput, init?: RequestInit): Promise<{
|
|
842
1118
|
"task_list"?: TaskList;
|
|
843
1119
|
}>;
|
|
1120
|
+
/** Apply one exact task-manifest graph through the Todos authority */
|
|
1121
|
+
applyTaskManifest(body: TaskManifest, init?: RequestInit): Promise<TaskManifestApplyResponse>;
|
|
844
1122
|
/** Recover one exact task-manifest apply receipt from its managed plan id */
|
|
845
1123
|
lookupTaskManifestBinding(body: TaskManifestBindingLookupRequest, init?: RequestInit): Promise<TaskManifestBindingLookupResponse>;
|
|
846
1124
|
/** Read the current task-manifest authority capability and tenant */
|
|
847
1125
|
getTaskManifestCapability(init?: RequestInit): Promise<TaskManifestCapabilityResponse>;
|
|
1126
|
+
/** Compensate one exact untouched task-manifest graph with CAS protection */
|
|
1127
|
+
compensateTaskManifest(body: TaskManifestCompensateRequest, init?: RequestInit): Promise<TaskManifestCompensateResponse>;
|
|
1128
|
+
/** Read one exact immutable task-manifest apply receipt */
|
|
1129
|
+
readExactTaskManifest(body: TaskManifestReadExactRequest, init?: RequestInit): Promise<TaskManifestApplyResponse>;
|
|
848
1130
|
/** List tasks */
|
|
849
1131
|
listTasks(query?: {
|
|
850
1132
|
"status"?: "pending" | "in_progress" | "completed" | "failed" | "cancelled" | Array<"pending" | "in_progress" | "completed" | "failed" | "cancelled">;
|