@hasna/todos 0.15.51 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1884 -0
- package/README.md +314 -37
- package/dist/ai-tools.d.ts.map +1 -1
- package/dist/ai.d.ts.map +1 -1
- package/dist/cli/cloud-router.d.ts +99 -51
- package/dist/cli/cloud-router.d.ts.map +1 -1
- package/dist/cli/commands/agent-commands.d.ts.map +1 -1
- package/dist/cli/commands/config-serve-commands.d.ts.map +1 -1
- package/dist/cli/commands/delegate.d.ts.map +1 -1
- package/dist/cli/commands/environment-snapshots.d.ts.map +1 -1
- package/dist/cli/commands/machines-api.d.ts +4 -0
- package/dist/cli/commands/machines-api.d.ts.map +1 -0
- package/dist/cli/commands/machines.d.ts.map +1 -1
- package/dist/cli/commands/mcp-hooks-commands.d.ts.map +1 -1
- package/dist/cli/commands/plan-commands.d.ts +3 -0
- package/dist/cli/commands/plan-commands.d.ts.map +1 -0
- package/dist/cli/commands/plan-template-commands.d.ts.map +1 -1
- package/dist/cli/commands/pr-group-commands.d.ts.map +1 -1
- package/dist/cli/commands/project-commands.d.ts +15 -0
- package/dist/cli/commands/project-commands.d.ts.map +1 -1
- package/dist/cli/commands/query-commands.d.ts.map +1 -1
- package/dist/cli/commands/storage-commands.d.ts.map +1 -1
- package/dist/cli/commands/task-list-commands.d.ts +3 -0
- package/dist/cli/commands/task-list-commands.d.ts.map +1 -0
- package/dist/cli/commands/template-commands.d.ts +3 -0
- package/dist/cli/commands/template-commands.d.ts.map +1 -0
- package/dist/cli/helpers.d.ts.map +1 -1
- package/dist/cli/index.js +15156 -11088
- package/dist/cli/machine-api.d.ts +7 -0
- package/dist/cli/machine-api.d.ts.map +1 -0
- package/dist/cli/plan-read-api.d.ts +6 -0
- package/dist/cli/plan-read-api.d.ts.map +1 -0
- package/dist/cli/project-api.d.ts +119 -0
- package/dist/cli/project-api.d.ts.map +1 -0
- package/dist/cli/stage-a.d.ts +34 -4
- package/dist/cli/stage-a.d.ts.map +1 -1
- package/dist/cli/task-query-api.d.ts +21 -0
- package/dist/cli/task-query-api.d.ts.map +1 -0
- package/dist/cli/template-api.d.ts +7 -0
- package/dist/cli/template-api.d.ts.map +1 -0
- package/dist/contracts.js +836 -266
- package/dist/db/builtin-templates.d.ts +2 -33
- package/dist/db/builtin-templates.d.ts.map +1 -1
- package/dist/db/database.d.ts.map +1 -1
- package/dist/db/handoffs.d.ts.map +1 -1
- package/dist/db/machines.d.ts.map +1 -1
- package/dist/db/migrations.d.ts.map +1 -1
- package/dist/db/plans.d.ts.map +1 -1
- package/dist/db/retrospectives.d.ts.map +1 -1
- package/dist/db/schema.d.ts.map +1 -1
- package/dist/db/task-lists.d.ts.map +1 -1
- package/dist/db/task-runs.d.ts +2 -0
- package/dist/db/task-runs.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3863 -1708
- package/dist/lib/assignee-validation.d.ts.map +1 -1
- package/dist/lib/builtin-template-library.d.ts +32 -0
- package/dist/lib/builtin-template-library.d.ts.map +1 -0
- package/dist/lib/cli-reference.d.ts.map +1 -1
- package/dist/lib/config.d.ts +10 -13
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/db-backup.d.ts +1 -1
- package/dist/lib/db-backup.d.ts.map +1 -1
- package/dist/lib/env.d.ts +18 -0
- package/dist/lib/env.d.ts.map +1 -0
- package/dist/lib/environment-snapshots.d.ts.map +1 -1
- package/dist/lib/gatherer.d.ts.map +1 -1
- package/dist/lib/headless-boundaries.d.ts +4 -3
- package/dist/lib/headless-boundaries.d.ts.map +1 -1
- package/dist/lib/local-encryption.d.ts +12 -0
- package/dist/lib/local-encryption.d.ts.map +1 -1
- package/dist/lib/local-opt-in.d.ts +90 -0
- package/dist/lib/local-opt-in.d.ts.map +1 -0
- package/dist/lib/paths.d.ts +9 -0
- package/dist/lib/paths.d.ts.map +1 -1
- package/dist/lib/plan-artifacts.d.ts +1 -0
- package/dist/lib/plan-artifacts.d.ts.map +1 -1
- package/dist/lib/plan-client-boundary.d.ts +2 -0
- package/dist/lib/plan-client-boundary.d.ts.map +1 -0
- package/dist/lib/plan-schedule.d.ts +6 -0
- package/dist/lib/plan-schedule.d.ts.map +1 -0
- package/dist/lib/project-panel.d.ts +6 -0
- package/dist/lib/project-panel.d.ts.map +1 -1
- package/dist/lib/project-receipt.d.ts +3 -0
- package/dist/lib/project-receipt.d.ts.map +1 -0
- package/dist/lib/sandbox-profiles.d.ts.map +1 -1
- package/dist/lib/shared-plan-artifacts.d.ts +14 -0
- package/dist/lib/shared-plan-artifacts.d.ts.map +1 -0
- package/dist/lib/sync.d.ts.map +1 -1
- package/dist/lib/task-list-client-boundary.d.ts +3 -0
- package/dist/lib/task-list-client-boundary.d.ts.map +1 -0
- package/dist/lib/task-routing.d.ts.map +1 -1
- package/dist/lib/template-client-boundary.d.ts +2 -0
- package/dist/lib/template-client-boundary.d.ts.map +1 -0
- package/dist/mcp/index.d.ts +1 -0
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +45195 -40368
- package/dist/mcp/plan-api.d.ts +6 -0
- package/dist/mcp/plan-api.d.ts.map +1 -0
- package/dist/mcp/remote-authority.d.ts +49 -0
- package/dist/mcp/remote-authority.d.ts.map +1 -0
- package/dist/mcp/task-coordination-api.d.ts +15 -0
- package/dist/mcp/task-coordination-api.d.ts.map +1 -0
- package/dist/mcp/task-list-api.d.ts +8 -0
- package/dist/mcp/task-list-api.d.ts.map +1 -0
- package/dist/mcp/token-utils.d.ts.map +1 -1
- package/dist/mcp/tools/environment-snapshots.d.ts.map +1 -1
- package/dist/mcp/tools/machines.d.ts.map +1 -1
- package/dist/mcp/tools/task-project-tools.d.ts.map +1 -1
- package/dist/mcp/tools/task-resources.d.ts.map +1 -1
- package/dist/mcp.d.ts +2 -2
- package/dist/mcp.d.ts.map +1 -1
- package/dist/mcp.js +45 -19
- package/dist/project-registration.js +2830 -557
- package/dist/registry.js +837 -267
- package/dist/release-provenance.json +6 -6
- package/dist/sdk/client.d.ts +51 -4
- package/dist/sdk/client.d.ts.map +1 -1
- package/dist/sdk/index.d.ts +2 -0
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +1209 -1080
- package/dist/sdk/resolve.d.ts +91 -0
- package/dist/sdk/resolve.d.ts.map +1 -0
- package/dist/sdk/v1.generated.d.ts +219 -3
- package/dist/sdk/v1.generated.d.ts.map +1 -1
- package/dist/server/auth-posture.d.ts +66 -7
- package/dist/server/auth-posture.d.ts.map +1 -1
- package/dist/server/client-ip.d.ts +39 -0
- package/dist/server/client-ip.d.ts.map +1 -0
- package/dist/server/cloud.d.ts +2 -1
- package/dist/server/cloud.d.ts.map +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +20556 -15533
- package/dist/server/openapi.d.ts +1341 -83
- package/dist/server/openapi.d.ts.map +1 -1
- package/dist/server/port.d.ts +2 -2
- package/dist/server/port.d.ts.map +1 -1
- package/dist/server/routes.d.ts +3 -6
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/serve.d.ts +2 -6
- package/dist/server/serve.d.ts.map +1 -1
- package/dist/server/v1.d.ts +3 -1
- package/dist/server/v1.d.ts.map +1 -1
- package/dist/storage/atomic-project-migration.d.ts +53 -0
- package/dist/storage/atomic-project-migration.d.ts.map +1 -0
- package/dist/storage/index.d.ts +3 -1
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/interfaces.d.ts +61 -0
- package/dist/storage/interfaces.d.ts.map +1 -1
- package/dist/storage/machine-registry.d.ts +36 -0
- package/dist/storage/machine-registry.d.ts.map +1 -0
- package/dist/storage/postgres-adapter.d.ts.map +1 -1
- package/dist/storage/postgres-sync.d.ts +2 -2
- package/dist/storage/postgres-sync.d.ts.map +1 -1
- package/dist/storage/run-artifact-creation-upload.d.ts +50 -0
- package/dist/storage/run-artifact-creation-upload.d.ts.map +1 -0
- package/dist/storage/s3-artifact-sync.d.ts +18 -0
- package/dist/storage/s3-artifact-sync.d.ts.map +1 -1
- package/dist/storage/sqlite-snapshot.d.ts +2 -0
- package/dist/storage/sqlite-snapshot.d.ts.map +1 -1
- package/dist/storage.d.ts +2 -2
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +2695 -322
- package/dist/task-manifest/postgres.d.ts +1 -1
- package/dist/task-manifest/sqlite.d.ts +1 -1
- package/dist/task-manifest.js +244 -73
- package/dist/task-subtree-transfer.js +198 -4
- package/dist/testing.d.ts +90 -29
- package/dist/testing.d.ts.map +1 -1
- package/dist/testing.js +34 -10
- package/dist/types/index.d.ts +40 -4
- package/dist/types/index.d.ts.map +1 -1
- package/docs/PLAN_API.md +93 -0
- package/docs/TASK_LIST_API.md +58 -0
- package/docs/TASK_QUERY_API.md +14 -0
- package/docs/TEMPLATE_API.md +18 -0
- package/docs/native-storage.md +405 -0
- package/package.json +19 -16
- package/postinstall.js +52 -1
- package/dashboard/dist/assets/index-BNQ4gJua.js +0 -342
- package/dashboard/dist/assets/index-DjzvHUWt.css +0 -1
- package/dashboard/dist/index.html +0 -13
- package/dashboard/dist/logo.jpg +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { HasnaStorageClient } from "@hasna/contracts/client/storage";
|
|
2
|
+
import type { Machine } from "../types/index.js";
|
|
3
|
+
import { type MachineRegistryInput, type MachineRegistryReceipt } from "../storage/machine-registry.js";
|
|
4
|
+
export declare function cloudMachines(client: HasnaStorageClient): Promise<Machine[]>;
|
|
5
|
+
export declare function localMachineOptions(options?: Record<string, unknown>): Record<string, unknown>;
|
|
6
|
+
export declare function cloudMachineAction(client: HasnaStorageClient, input: MachineRegistryInput): Promise<MachineRegistryReceipt>;
|
|
7
|
+
//# sourceMappingURL=machine-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"machine-api.d.ts","sourceRoot":"","sources":["../../src/cli/machine-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAE1E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAoB,KAAK,oBAAoB,EAAE,KAAK,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAW1H,wBAAsB,aAAa,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAOlF;AACD,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAIlG;AACD,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,kBAAkB,EAAE,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CA0BjI"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { HasnaStorageClient } from "@hasna/contracts/client/storage";
|
|
2
|
+
import { type Task, type PlanComment } from "../types/index.js";
|
|
3
|
+
/** Explicit versioned evidence prevents older APIs silently ignoring archived/subtask filters. */
|
|
4
|
+
export declare function readCompletePlanTasks(client: HasnaStorageClient, planId: string, includeArchived?: boolean): Promise<Task[]>;
|
|
5
|
+
export declare function readCompletePlanComments(client: HasnaStorageClient, planId: string): Promise<PlanComment[]>;
|
|
6
|
+
//# sourceMappingURL=plan-read-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan-read-api.d.ts","sourceRoot":"","sources":["../../src/cli/plan-read-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAGL,KAAK,IAAI,EACT,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAC;AAM3B,kGAAkG;AAClG,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,MAAM,EACd,eAAe,UAAQ,GACtB,OAAO,CAAC,IAAI,EAAE,CAAC,CAuDjB;AACD,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,WAAW,EAAE,CAAC,CAwCxB"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import type { HasnaStorageClient } from "@hasna/contracts/client/storage";
|
|
2
|
+
import type { Project } from "../types/index.js";
|
|
3
|
+
export declare function cloudProjectPanel(client: HasnaStorageClient, project: Project, limit: number): Promise<{
|
|
4
|
+
id: string;
|
|
5
|
+
kind: "custom" | "knowledge" | "actions" | "files" | "mailery" | "conversations" | "mementos" | "reports" | "documents" | "overview" | "tasks" | "timeline" | "risks";
|
|
6
|
+
provider: {
|
|
7
|
+
id: string;
|
|
8
|
+
kind: "custom" | "knowledge" | "render" | "actions" | "todos" | "files" | "mailery" | "conversations" | "mementos" | "reports" | "contracts";
|
|
9
|
+
name?: string | undefined;
|
|
10
|
+
externalId?: string | undefined;
|
|
11
|
+
sourcePackage?: string | undefined;
|
|
12
|
+
};
|
|
13
|
+
schema: "hasna.project_panel.v1";
|
|
14
|
+
createdAt: string;
|
|
15
|
+
resourceRefs: {
|
|
16
|
+
id: string;
|
|
17
|
+
kind: "app" | "email" | "feedback" | "report" | "run" | "unknown" | "file" | "url" | "model" | "workflow" | "budget" | "task" | "project" | "repo" | "loop" | "action" | "event" | "integration" | "session" | "machine" | "tool" | "document" | "artifact" | "knowledge" | "conversation" | "dashboard" | "render" | "panel" | "commit" | "branch" | "pull_request" | "issue" | "comment" | "verification" | "finding" | "context_pack" | "proof_bundle" | "memento" | "eval" | "cost" | "alert" | "incident" | "release" | "rollout" | "announcement" | "audience";
|
|
18
|
+
tags: string[];
|
|
19
|
+
name?: string | undefined;
|
|
20
|
+
uri?: string | undefined;
|
|
21
|
+
externalId?: string | undefined;
|
|
22
|
+
sourcePackage?: string | undefined;
|
|
23
|
+
}[];
|
|
24
|
+
evidenceRefs: {
|
|
25
|
+
id: string;
|
|
26
|
+
kind?: "report" | "video" | "file" | "url" | "artifact" | "other" | "command_output" | "screenshot" | "log" | "diff" | "har" | "test_result" | "metric" | "trace" | undefined;
|
|
27
|
+
sha256?: string | undefined;
|
|
28
|
+
uri?: string | undefined;
|
|
29
|
+
summary?: string | undefined;
|
|
30
|
+
}[];
|
|
31
|
+
projectId: string;
|
|
32
|
+
actions: {
|
|
33
|
+
id: string;
|
|
34
|
+
kind: "app" | "email" | "feedback" | "report" | "run" | "unknown" | "file" | "url" | "model" | "workflow" | "budget" | "task" | "project" | "repo" | "loop" | "action" | "event" | "integration" | "session" | "machine" | "tool" | "document" | "artifact" | "knowledge" | "conversation" | "dashboard" | "render" | "panel" | "commit" | "branch" | "pull_request" | "issue" | "comment" | "verification" | "finding" | "context_pack" | "proof_bundle" | "memento" | "eval" | "cost" | "alert" | "incident" | "release" | "rollout" | "announcement" | "audience";
|
|
35
|
+
tags: string[];
|
|
36
|
+
name?: string | undefined;
|
|
37
|
+
uri?: string | undefined;
|
|
38
|
+
externalId?: string | undefined;
|
|
39
|
+
sourcePackage?: string | undefined;
|
|
40
|
+
}[];
|
|
41
|
+
state: "error" | "ready" | "unavailable" | "stale" | "empty" | "loading" | "auth_required";
|
|
42
|
+
title: string;
|
|
43
|
+
items: {
|
|
44
|
+
id: string;
|
|
45
|
+
resourceRefs: {
|
|
46
|
+
id: string;
|
|
47
|
+
kind: "app" | "email" | "feedback" | "report" | "run" | "unknown" | "file" | "url" | "model" | "workflow" | "budget" | "task" | "project" | "repo" | "loop" | "action" | "event" | "integration" | "session" | "machine" | "tool" | "document" | "artifact" | "knowledge" | "conversation" | "dashboard" | "render" | "panel" | "commit" | "branch" | "pull_request" | "issue" | "comment" | "verification" | "finding" | "context_pack" | "proof_bundle" | "memento" | "eval" | "cost" | "alert" | "incident" | "release" | "rollout" | "announcement" | "audience";
|
|
48
|
+
tags: string[];
|
|
49
|
+
name?: string | undefined;
|
|
50
|
+
uri?: string | undefined;
|
|
51
|
+
externalId?: string | undefined;
|
|
52
|
+
sourcePackage?: string | undefined;
|
|
53
|
+
}[];
|
|
54
|
+
evidenceRefs: {
|
|
55
|
+
id: string;
|
|
56
|
+
kind?: "report" | "video" | "file" | "url" | "artifact" | "other" | "command_output" | "screenshot" | "log" | "diff" | "har" | "test_result" | "metric" | "trace" | undefined;
|
|
57
|
+
sha256?: string | undefined;
|
|
58
|
+
uri?: string | undefined;
|
|
59
|
+
summary?: string | undefined;
|
|
60
|
+
}[];
|
|
61
|
+
priority: "unknown" | "low" | "medium" | "high" | "critical";
|
|
62
|
+
title: string;
|
|
63
|
+
status?: string | undefined;
|
|
64
|
+
metadata?: Record<string, unknown> | undefined;
|
|
65
|
+
summary?: string | undefined;
|
|
66
|
+
timestamp?: string | undefined;
|
|
67
|
+
}[];
|
|
68
|
+
freshness: "unknown" | "fresh" | "stale";
|
|
69
|
+
generatedAt: string;
|
|
70
|
+
metrics: {
|
|
71
|
+
id: string;
|
|
72
|
+
value: string | number | boolean;
|
|
73
|
+
status: "unknown" | "critical" | "good" | "warning";
|
|
74
|
+
resourceRefs: {
|
|
75
|
+
id: string;
|
|
76
|
+
kind: "app" | "email" | "feedback" | "report" | "run" | "unknown" | "file" | "url" | "model" | "workflow" | "budget" | "task" | "project" | "repo" | "loop" | "action" | "event" | "integration" | "session" | "machine" | "tool" | "document" | "artifact" | "knowledge" | "conversation" | "dashboard" | "render" | "panel" | "commit" | "branch" | "pull_request" | "issue" | "comment" | "verification" | "finding" | "context_pack" | "proof_bundle" | "memento" | "eval" | "cost" | "alert" | "incident" | "release" | "rollout" | "announcement" | "audience";
|
|
77
|
+
tags: string[];
|
|
78
|
+
name?: string | undefined;
|
|
79
|
+
uri?: string | undefined;
|
|
80
|
+
externalId?: string | undefined;
|
|
81
|
+
sourcePackage?: string | undefined;
|
|
82
|
+
}[];
|
|
83
|
+
label: string;
|
|
84
|
+
unit?: string | undefined;
|
|
85
|
+
}[];
|
|
86
|
+
warnings: string[];
|
|
87
|
+
updatedAt?: string | null | undefined;
|
|
88
|
+
metadata?: Record<string, unknown> | undefined;
|
|
89
|
+
summary?: string | undefined;
|
|
90
|
+
stateReason?: string | undefined;
|
|
91
|
+
renderFragment?: {
|
|
92
|
+
imports: {
|
|
93
|
+
id: string;
|
|
94
|
+
optional: boolean;
|
|
95
|
+
kind: "local" | "url" | "provider" | "package";
|
|
96
|
+
specifier: string;
|
|
97
|
+
path?: string | undefined;
|
|
98
|
+
provider?: "custom" | "knowledge" | "render" | "actions" | "todos" | "files" | "mailery" | "conversations" | "mementos" | "reports" | "contracts" | undefined;
|
|
99
|
+
uri?: string | undefined;
|
|
100
|
+
packageName?: string | undefined;
|
|
101
|
+
resourceRef?: {
|
|
102
|
+
id: string;
|
|
103
|
+
kind: "app" | "email" | "feedback" | "report" | "run" | "unknown" | "file" | "url" | "model" | "workflow" | "budget" | "task" | "project" | "repo" | "loop" | "action" | "event" | "integration" | "session" | "machine" | "tool" | "document" | "artifact" | "knowledge" | "conversation" | "dashboard" | "render" | "panel" | "commit" | "branch" | "pull_request" | "issue" | "comment" | "verification" | "finding" | "context_pack" | "proof_bundle" | "memento" | "eval" | "cost" | "alert" | "incident" | "release" | "rollout" | "announcement" | "audience";
|
|
104
|
+
tags: string[];
|
|
105
|
+
name?: string | undefined;
|
|
106
|
+
uri?: string | undefined;
|
|
107
|
+
externalId?: string | undefined;
|
|
108
|
+
sourcePackage?: string | undefined;
|
|
109
|
+
} | undefined;
|
|
110
|
+
schemaId?: string | undefined;
|
|
111
|
+
integrity?: string | undefined;
|
|
112
|
+
}[];
|
|
113
|
+
renderer: "custom" | "json_render" | "react_flow" | "markdown" | "html";
|
|
114
|
+
spec: Record<string, unknown>;
|
|
115
|
+
title?: string | undefined;
|
|
116
|
+
entry?: string | undefined;
|
|
117
|
+
} | undefined;
|
|
118
|
+
}>;
|
|
119
|
+
//# sourceMappingURL=project-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-api.d.ts","sourceRoot":"","sources":["../../src/cli/project-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,KAAK,EAAQ,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAIvD,wBAAsB,iBAAiB,CAAC,MAAM,EAAC,kBAAkB,EAAC,OAAO,EAAC,OAAO,EAAC,KAAK,EAAC,MAAM;;;;;;YAe80zgB,CAAC;kBAAwC,CAAC;qBAA2C,CAAC;;;;;;;;YAAotB,CAAC;WAAiC,CAAC;kBAAwC,CAAC;qBAA2C,CAAC;;;;YAAmF,CAAC;cAAwL,CAAC;WAAiC,CAAC;eAAqC,CAAC;;;;;;;YAA2qB,CAAC;WAAiC,CAAC;kBAAwC,CAAC;qBAA2C,CAAC;;;;;;;;;;gBAAi0B,CAAC;eAAqC,CAAC;sBAA4C,CAAC;yBAA+C,CAAC;;;;gBAAmG,CAAC;kBAA4L,CAAC;eAAqC,CAAC;mBAAyC,CAAC;;;;cAA8I,CAAC;gBAAsC,CAAC;eAAsD,CAAC;iBAAuC,CAAC;;;;;;;;;;;;gBAA83B,CAAC;eAAqC,CAAC;sBAA4C,CAAC;yBAA+C,CAAC;;;YAAsE,CAAC;;;;;;;;;;;;;gBAA0a,CAAC;oBAA0C,CAAC;eAAqK,CAAC;uBAA6C,CAAC;uBAA6C,CAAC;;;;oBAA0oB,CAAC;mBAAyC,CAAC;0BAAgD,CAAC;6BAAmD,CAAC;;oBAAqE,CAAC;qBAA2C,CAAC;;;;aAAwK,CAAC;aAAmC,CAAC;;GAD14ghB"}
|
package/dist/cli/stage-a.d.ts
CHANGED
|
@@ -17,11 +17,41 @@ export type TodosCliCommandOwner = "diagnostic" | "remote-http" | "local-only";
|
|
|
17
17
|
* Stage A is intentionally pure: it decides the authority route without
|
|
18
18
|
* mutating the caller's environment. The executable applies an admitted local
|
|
19
19
|
* redaction decision before importing command modules so any later
|
|
20
|
-
* `getTodosCloudClient()` call cannot reconstruct hosted routing
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
20
|
+
* `getTodosCloudClient()` call cannot reconstruct hosted routing.
|
|
21
|
+
*
|
|
22
|
+
* The load-bearing line is the OPT-IN, not the redaction. Since the credential
|
|
23
|
+
* chain moved into @hasna/contracts (hasna/apps#1720) a key can arrive from the
|
|
24
|
+
* macOS Keychain or from `~/.hasna/todos/config/credentials`, neither of which
|
|
25
|
+
* an environment dictionary can redact — so clearing the API variables alone
|
|
26
|
+
* would leave a later `getTodosCloudClient()` resolving a real hosted client
|
|
27
|
+
* for a command that was admitted precisely because it must stay local.
|
|
28
|
+
* `HASNA_TODOS_LOCAL=1` is answered BEFORE the resolver runs, so it is what
|
|
29
|
+
* actually holds the decision; the variables are cleared alongside it so a
|
|
30
|
+
* child process inherits an environment that says the same thing.
|
|
31
|
+
*
|
|
32
|
+
* DELETED, not blanked: a declared-but-blank authority variable is normalised
|
|
33
|
+
* to absent by this package's own resolver seam, but the inherited environment
|
|
34
|
+
* is read by other consumers too, and @hasna/contracts refuses a
|
|
35
|
+
* declared-but-blank variable loudly. Deleting is the one spelling that means
|
|
36
|
+
* "absent" everywhere, so a blank can never turn "no cloud client" into a hard
|
|
37
|
+
* error.
|
|
24
38
|
*/
|
|
39
|
+
/**
|
|
40
|
+
* The one line a local run prints, and the reason it prints at all.
|
|
41
|
+
*
|
|
42
|
+
* An unhosted CLI that says nothing looks exactly like a hosted one whose store
|
|
43
|
+
* happens to be empty — that is the false green the 2026-09-04 ruling
|
|
44
|
+
* (hasna/apps#1720) closes, and it is why the notice is unconditional rather
|
|
45
|
+
* than behind a verbosity flag. It goes to STDERR so `--json` output stays a
|
|
46
|
+
* clean parseable document on stdout, and it names the credential the run did
|
|
47
|
+
* NOT find, so the fix is in the message rather than in the docs.
|
|
48
|
+
*/
|
|
49
|
+
export declare function todosLocalModeNotice(reason?: "local-opt-in" | "local-only-command"): string;
|
|
50
|
+
/**
|
|
51
|
+
* Print {@link todosLocalModeNotice} once for a run that resolved to the local
|
|
52
|
+
* store. A no-op for every hosted route, so a hosted run's stderr stays empty.
|
|
53
|
+
*/
|
|
54
|
+
export declare function announceTodosCliLocalMode(authority: TodosCliAuthorityInitialization, write?: (line: string) => void): boolean;
|
|
25
55
|
export declare function applyTodosCliAuthorityEnvironment(authority: TodosCliAuthorityInitialization, env?: Env): void;
|
|
26
56
|
export declare const TODOS_CLI_COMMAND_ALIASES: {
|
|
27
57
|
readonly onboarding: readonly ["demo-fixtures"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stage-a.d.ts","sourceRoot":"","sources":["../../src/cli/stage-a.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stage-a.d.ts","sourceRoot":"","sources":["../../src/cli/stage-a.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAQ,MAAM,WAAW,CAAC;AAC1C,OAAO,EAKL,KAAK,4BAA4B,EAClC,MAAM,mBAAmB,CAAC;AAE3B,KAAK,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;AAE9C,MAAM,MAAM,+BAA+B,GACvC;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,WAAW,EAAE,IAAI,CAAC;IAAC,WAAW,CAAC,EAAE,oBAAoB,CAAA;CAAE,GACzE;IAAE,KAAK,EAAE,mBAAmB,CAAC;IAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAC1D;IAAE,KAAK,EAAE,aAAa,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC;AAElD,MAAM,MAAM,oBAAoB,GAAG,YAAY,GAAG,aAAa,GAAG,YAAY,CAAC;AAE/E;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,GAAE,cAAc,GAAG,oBAAqC,GAAG,MAAM,CAa3G;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,+BAA+B,EAC1C,KAAK,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAkD,GAC1E,OAAO,CAIT;AAED,wBAAgB,iCAAiC,CAC/C,SAAS,EAAE,+BAA+B,EAC1C,GAAG,GAAE,GAAwB,GAC5B,IAAI,CAWN;AAyBD,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;CA8BgB,CAAC;AAoFvD,wBAAgB,kCAAkC,IAAI,WAAW,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAE9F;AAED;;;;;;;GAOG;AACH,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,+BAA+B,CAAC,OAAO,CAAC,EAC/C,kBAAkB,GAAE,WAAW,CAAC,4BAA4B,CAAa,GACxE,OAAO,CAOT;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,+BAA+B,CAAC,OAAO,CAAC,EAC/C,kBAAkB,GAAE,WAAW,CAAC,4BAA4B,CAAa,GACxE,IAAI,CAUN;AAED;;;;;;;;GAQG;AACH,wBAAgB,2CAA2C,CACzD,KAAK,EAAE,+BAA+B,CAAC,OAAO,CAAC,EAC/C,kBAAkB,GAAE,WAAW,CAAC,4BAA4B,CAAa,EACzE,IAAI,GAAE,SAAS,MAAM,EAAO,GAC3B,MAAM,GAAG,IAAI,CAYf;AA+XD;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,IAAI,GAAE,MAAM,EAA0B,EACtC,GAAG,GAAE,GAAwB,GAC5B,+BAA+B,CA6DjC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { HasnaStorageClient } from "@hasna/contracts/client/storage";
|
|
2
|
+
import type { Task } from "../types/index.js";
|
|
3
|
+
type Query = {
|
|
4
|
+
project_id?: string;
|
|
5
|
+
status?: string;
|
|
6
|
+
assigned_to?: string;
|
|
7
|
+
agent_id?: string;
|
|
8
|
+
include_subtasks?: boolean;
|
|
9
|
+
};
|
|
10
|
+
/** Exhaust an advertised total; never present a capped or changing page as complete. */
|
|
11
|
+
export declare function cloudQueryTasks(client: HasnaStorageClient, query?: Query): Promise<Task[]>;
|
|
12
|
+
export declare function cloudQueryBlockingDeps(client: HasnaStorageClient, tasks: readonly Task[]): Promise<Map<string, Task[]>>;
|
|
13
|
+
export declare function taskTimestamp(value: unknown): number;
|
|
14
|
+
/** A local calendar day; advancing the date also handles 23/25-hour DST days. */
|
|
15
|
+
export declare function taskDayWindow(daysAgo?: number, now?: Date): {
|
|
16
|
+
start: Date;
|
|
17
|
+
end: Date;
|
|
18
|
+
date: string;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=task-query-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-query-api.d.ts","sourceRoot":"","sources":["../../src/cli/task-query-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAI9C,KAAK,KAAK,GAAG;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAC3H,wFAAwF;AACxF,wBAAsB,eAAe,CAAC,MAAM,EAAE,kBAAkB,EAAE,KAAK,GAAE,KAAU,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CAqBpG;AAED,wBAAsB,sBAAsB,CAAC,MAAM,EAAC,kBAAkB,EAAC,KAAK,EAAC,SAAS,IAAI,EAAE,gCAkB3F;AACD,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAMpD;AAED,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,OAAO,SAAI,EAAE,GAAG,OAAa,GAAG;IAAC,KAAK,EAAE,IAAI,CAAC;IAAC,GAAG,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,CAQnG"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { HasnaStorageClient } from "@hasna/contracts/client/storage";
|
|
2
|
+
import type { TodosTemplateHistory, TodosTemplateInitialization } from "../storage/interfaces.js";
|
|
3
|
+
export declare function initializeSharedTemplates(client: HasnaStorageClient): Promise<TodosTemplateInitialization>;
|
|
4
|
+
export declare function readSharedTemplateHistory(client: HasnaStorageClient, id: string): Promise<TodosTemplateHistory>;
|
|
5
|
+
export declare function listSharedTemplates(client: HasnaStorageClient, projectId?: string): Promise<import("../types/index.js").TaskTemplate[]>;
|
|
6
|
+
export declare function updateSharedTemplate(client: HasnaStorageClient, id: string, patch: import("../storage/interfaces.js").UpdateTemplateInput): Promise<import("../types/index.js").TemplateWithTasks>;
|
|
7
|
+
//# sourceMappingURL=template-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-api.d.ts","sourceRoot":"","sources":["../../src/cli/template-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,KAAK,EACV,oBAAoB,EACpB,2BAA2B,EAC5B,MAAM,0BAA0B,CAAC;AAElC,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,2BAA2B,CAAC,CA6CtC;AAED,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,kBAAkB,EAC1B,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,oBAAoB,CAAC,CAmD/B;AAED,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,kBAAkB,EAC1B,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,OAAO,mBAAmB,EAAE,YAAY,EAAE,CAAC,CA2BrD;AAED,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,kBAAkB,EAC1B,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,OAAO,0BAA0B,EAAE,mBAAmB,GAC5D,OAAO,CAAC,OAAO,mBAAmB,EAAE,iBAAiB,CAAC,CA6BxD"}
|