@hasna/todos 0.15.9 → 0.15.11
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 +14 -1
- package/dist/cli/cloud-router.d.ts.map +1 -1
- package/dist/cli/commands/plan-template-commands.d.ts.map +1 -1
- package/dist/cli/index.js +4831 -3259
- package/dist/contracts.js +109 -10
- package/dist/db/migrations.d.ts.map +1 -1
- package/dist/db/plan-project-links.d.ts +8 -0
- package/dist/db/plan-project-links.d.ts.map +1 -0
- package/dist/db/plan-row-serialization.d.ts +8 -0
- package/dist/db/plan-row-serialization.d.ts.map +1 -0
- package/dist/db/plans.d.ts.map +1 -1
- package/dist/db/task-crud.d.ts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7747 -1275
- package/dist/lib/plan-project-link-contract.d.ts +32 -0
- package/dist/lib/plan-project-link-contract.d.ts.map +1 -0
- package/dist/lib/plan-project-link.d.ts +14 -0
- package/dist/lib/plan-project-link.d.ts.map +1 -0
- package/dist/mcp/index.js +1175 -50
- package/dist/mcp.js +7 -3
- package/dist/project-registration.js +846 -26
- package/dist/registry.d.ts +1 -1
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +116 -10
- package/dist/release-provenance.json +5 -5
- package/dist/sdk/index.js +21 -0
- package/dist/sdk/v1.generated.d.ts +53 -0
- package/dist/sdk/v1.generated.d.ts.map +1 -1
- package/dist/server/index.js +1179 -54
- package/dist/server/openapi.d.ts +370 -0
- package/dist/server/openapi.d.ts.map +1 -1
- package/dist/server/v1.d.ts.map +1 -1
- package/dist/storage/interfaces.d.ts +26 -1
- package/dist/storage/interfaces.d.ts.map +1 -1
- package/dist/storage/local-sqlite.d.ts.map +1 -1
- package/dist/storage/postgres-adapter.d.ts.map +1 -1
- package/dist/storage/postgres-sync.d.ts.map +1 -1
- package/dist/storage.js +835 -19
- package/dist/task-manifest/authority.d.ts +19 -0
- package/dist/task-manifest/authority.d.ts.map +1 -0
- package/dist/task-manifest/backend.d.ts +27 -0
- package/dist/task-manifest/backend.d.ts.map +1 -0
- package/dist/task-manifest/canonical.d.ts +4 -0
- package/dist/task-manifest/canonical.d.ts.map +1 -0
- package/dist/task-manifest/http.d.ts +16 -0
- package/dist/task-manifest/http.d.ts.map +1 -0
- package/dist/task-manifest/index.d.ts +10 -0
- package/dist/task-manifest/index.d.ts.map +1 -0
- package/dist/task-manifest/postgres.d.ts +18 -0
- package/dist/task-manifest/postgres.d.ts.map +1 -0
- package/dist/task-manifest/reference-guard.d.ts +27 -0
- package/dist/task-manifest/reference-guard.d.ts.map +1 -0
- package/dist/task-manifest/schema-sql.d.ts +3 -0
- package/dist/task-manifest/schema-sql.d.ts.map +1 -0
- package/dist/task-manifest/schema.d.ts +15 -0
- package/dist/task-manifest/schema.d.ts.map +1 -0
- package/dist/task-manifest/sqlite.d.ts +15 -0
- package/dist/task-manifest/sqlite.d.ts.map +1 -0
- package/dist/task-manifest/types.d.ts +166 -0
- package/dist/task-manifest/types.d.ts.map +1 -0
- package/dist/task-manifest.d.ts +2 -0
- package/dist/task-manifest.d.ts.map +1 -0
- package/dist/task-manifest.js +6816 -0
- package/dist/types/index.d.ts +60 -2
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +7 -3
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Plan, PlanProjectLinkReceipt, PlanProjectLinkResult, PlanProjectLinkRollbackResult, Task } from "../types/index.js";
|
|
2
|
+
export declare const PLAN_PROJECT_LINK_SCHEMA_VERSION: "todos.plan-project-link.v1";
|
|
3
|
+
export type PlanProjectLinkErrorCode = "PLAN_PROJECT_LINK_PLAN_NOT_FOUND" | "PLAN_PROJECT_LINK_PROJECT_NOT_FOUND" | "PLAN_PROJECT_LINK_PLAN_REVISION_CONFLICT" | "PLAN_PROJECT_LINK_PROJECT_REVISION_CONFLICT" | "PLAN_PROJECT_LINK_SCOPE_COLLISION" | "PLAN_PROJECT_LINK_IDEMPOTENCY_KEY_INVALID" | "PLAN_PROJECT_LINK_IDEMPOTENCY_CONFLICT" | "PLAN_PROJECT_LINK_RECEIPT_NOT_FOUND" | "PLAN_PROJECT_LINK_RESULT_DRIFT" | "PLAN_PROJECT_LINK_ROLLBACK_CONFLICT" | "PLAN_PROJECT_LINK_UNSUPPORTED";
|
|
4
|
+
export declare class PlanProjectLinkError extends Error {
|
|
5
|
+
readonly code: PlanProjectLinkErrorCode;
|
|
6
|
+
readonly details: Record<string, unknown>;
|
|
7
|
+
constructor(code: PlanProjectLinkErrorCode, message: string, details?: Record<string, unknown>);
|
|
8
|
+
}
|
|
9
|
+
export declare function canonicalPlanProjectLinkJson(value: unknown): string;
|
|
10
|
+
export declare function planProjectLinkDigest(value: unknown): string;
|
|
11
|
+
export declare function normalizePlanProjectLinkIdempotencyKey(value: string | undefined): string;
|
|
12
|
+
export declare function planProjectLinkReceiptId(idempotencyKey: string): string;
|
|
13
|
+
export declare function planProjectLinkRollbackReceiptId(receiptId: string): string;
|
|
14
|
+
export declare function planProjectLinkRequestHash(planId: string, projectId: string): string;
|
|
15
|
+
export declare function planProjectLinkResultDigest(plan: Pick<Plan, "id" | "project_id">, tasks: Task[]): string;
|
|
16
|
+
export declare function assertPlanProjectLinkReceipt(value: unknown): PlanProjectLinkReceipt;
|
|
17
|
+
type PlanProjectLinkResponseExpectation = {
|
|
18
|
+
mode: "plan" | "apply";
|
|
19
|
+
plan_id: string;
|
|
20
|
+
project_id: string;
|
|
21
|
+
idempotency_key?: string;
|
|
22
|
+
};
|
|
23
|
+
type PlanProjectLinkRollbackResponseExpectation = {
|
|
24
|
+
plan_id: string;
|
|
25
|
+
receipt_id: string;
|
|
26
|
+
};
|
|
27
|
+
/** Validate an untrusted HTTP plan/apply response before the CLI can report success. */
|
|
28
|
+
export declare function assertPlanProjectLinkResponse(value: unknown, expectation: PlanProjectLinkResponseExpectation): PlanProjectLinkResult;
|
|
29
|
+
/** Validate an untrusted HTTP rollback response before the CLI can report success. */
|
|
30
|
+
export declare function assertPlanProjectLinkRollbackResponse(value: unknown, expectation: PlanProjectLinkRollbackResponseExpectation): PlanProjectLinkRollbackResult;
|
|
31
|
+
export {};
|
|
32
|
+
//# sourceMappingURL=plan-project-link-contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan-project-link-contract.d.ts","sourceRoot":"","sources":["../../src/lib/plan-project-link-contract.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,IAAI,EACJ,sBAAsB,EACtB,qBAAqB,EACrB,6BAA6B,EAC7B,IAAI,EACL,MAAM,mBAAmB,CAAC;AAE3B,eAAO,MAAM,gCAAgC,EAAG,4BAAqC,CAAC;AAEtF,MAAM,MAAM,wBAAwB,GAChC,kCAAkC,GAClC,qCAAqC,GACrC,0CAA0C,GAC1C,6CAA6C,GAC7C,mCAAmC,GACnC,2CAA2C,GAC3C,wCAAwC,GACxC,qCAAqC,GACrC,gCAAgC,GAChC,qCAAqC,GACrC,+BAA+B,CAAC;AAEpC,qBAAa,oBAAqB,SAAQ,KAAK;IAE3C,QAAQ,CAAC,IAAI,EAAE,wBAAwB;IAEvC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;gBAFhC,IAAI,EAAE,wBAAwB,EACvC,OAAO,EAAE,MAAM,EACN,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM;CAKjD;AAED,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAQnE;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAE5D;AAED,wBAAgB,sCAAsC,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CASxF;AAED,wBAAgB,wBAAwB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAEvE;AAED,wBAAgB,gCAAgC,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAE1E;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAEpF;AAED,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,YAAY,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,MAAM,CAQxG;AAED,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,OAAO,GAAG,sBAAsB,CAsBnF;AAED,KAAK,kCAAkC,GAAG;IACxC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,KAAK,0CAA0C,GAAG;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AA8RF,wFAAwF;AACxF,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,OAAO,EACd,WAAW,EAAE,kCAAkC,GAC9C,qBAAqB,CA2CvB;AAED,sFAAsF;AACtF,wBAAgB,qCAAqC,CACnD,KAAK,EAAE,OAAO,EACd,WAAW,EAAE,0CAA0C,GACtD,6BAA6B,CA6B/B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PlanProjectLinkResult, PlanProjectLinkRollbackResult } from "../types/index.js";
|
|
2
|
+
import type { TodosStorageAdapter } from "../storage/interfaces.js";
|
|
3
|
+
export { PLAN_PROJECT_LINK_SCHEMA_VERSION, PlanProjectLinkError, } from "./plan-project-link-contract.js";
|
|
4
|
+
export declare function planPlanProjectLink(store: TodosStorageAdapter, planId: string, projectId: string): Promise<PlanProjectLinkResult>;
|
|
5
|
+
export declare function applyPlanProjectLink(store: TodosStorageAdapter, planId: string, projectId: string, options: {
|
|
6
|
+
expected_plan_revision: string;
|
|
7
|
+
expected_project_revision: string;
|
|
8
|
+
idempotency_key: string;
|
|
9
|
+
}): Promise<PlanProjectLinkResult>;
|
|
10
|
+
export declare function rollbackPlanProjectLink(store: TodosStorageAdapter, planId: string, projectId: string, options: {
|
|
11
|
+
receipt_id: string;
|
|
12
|
+
expected_plan_revision: string;
|
|
13
|
+
}): Promise<PlanProjectLinkRollbackResult>;
|
|
14
|
+
//# sourceMappingURL=plan-project-link.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan-project-link.d.ts","sourceRoot":"","sources":["../../src/lib/plan-project-link.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,6BAA6B,EAC9B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAQpE,OAAO,EACL,gCAAgC,EAChC,oBAAoB,GACrB,MAAM,iCAAiC,CAAC;AA8CzC,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,mBAAmB,EAC1B,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,qBAAqB,CAAC,CAUhC;AAED,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,mBAAmB,EAC1B,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE;IACP,sBAAsB,EAAE,MAAM,CAAC;IAC/B,yBAAyB,EAAE,MAAM,CAAC;IAClC,eAAe,EAAE,MAAM,CAAC;CACzB,GACA,OAAO,CAAC,qBAAqB,CAAC,CAkBhC;AAED,wBAAsB,uBAAuB,CAC3C,KAAK,EAAE,mBAAmB,EAC1B,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,sBAAsB,EAAE,MAAM,CAAA;CAAE,GAC9D,OAAO,CAAC,6BAA6B,CAAC,CAgBxC"}
|