@scardis/omnifocus-mcp 0.1.0 → 0.1.2
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/schemas/shapes.d.ts +3 -33
- package/dist/schemas/shapes.d.ts.map +1 -1
- package/dist/schemas/shapes.js +3 -5
- package/dist/schemas/shapes.js.map +1 -1
- package/dist/server.js +3 -5
- package/dist/server.js.map +1 -1
- package/dist/tools/createTask.d.ts +1 -11
- package/dist/tools/createTask.d.ts.map +1 -1
- package/dist/tools/editTask.d.ts +1 -11
- package/dist/tools/editTask.d.ts.map +1 -1
- package/dist/tools/index.d.ts +2 -22
- package/dist/tools/index.d.ts.map +1 -1
- package/package.json +7 -1
- package/src/snippets/edit_task.js +4 -6
- package/.claude/commands/opsx/apply.md +0 -152
- package/.claude/commands/opsx/archive.md +0 -157
- package/.claude/commands/opsx/bulk-archive.md +0 -242
- package/.claude/commands/opsx/continue.md +0 -114
- package/.claude/commands/opsx/explore.md +0 -173
- package/.claude/commands/opsx/ff.md +0 -97
- package/.claude/commands/opsx/new.md +0 -69
- package/.claude/commands/opsx/onboard.md +0 -550
- package/.claude/commands/opsx/propose.md +0 -106
- package/.claude/commands/opsx/sync.md +0 -134
- package/.claude/commands/opsx/verify.md +0 -164
- package/.claude/skills/openspec-apply-change/SKILL.md +0 -156
- package/.claude/skills/openspec-archive-change/SKILL.md +0 -114
- package/.claude/skills/openspec-bulk-archive-change/SKILL.md +0 -246
- package/.claude/skills/openspec-continue-change/SKILL.md +0 -118
- package/.claude/skills/openspec-explore/SKILL.md +0 -288
- package/.claude/skills/openspec-ff-change/SKILL.md +0 -101
- package/.claude/skills/openspec-new-change/SKILL.md +0 -74
- package/.claude/skills/openspec-onboard/SKILL.md +0 -554
- package/.claude/skills/openspec-propose/SKILL.md +0 -110
- package/.claude/skills/openspec-sync-specs/SKILL.md +0 -138
- package/.claude/skills/openspec-verify-change/SKILL.md +0 -168
- package/CONTRIBUTING.md +0 -83
- package/openspec/changes/archive/2026-04-09-bootstrap-omnifocus-mcp/.openspec.yaml +0 -2
- package/openspec/changes/archive/2026-04-09-bootstrap-omnifocus-mcp/design.md +0 -162
- package/openspec/changes/archive/2026-04-09-bootstrap-omnifocus-mcp/proposal.md +0 -49
- package/openspec/changes/archive/2026-04-09-bootstrap-omnifocus-mcp/specs/attachments/spec.md +0 -9
- package/openspec/changes/archive/2026-04-09-bootstrap-omnifocus-mcp/specs/batch-operations/spec.md +0 -9
- package/openspec/changes/archive/2026-04-09-bootstrap-omnifocus-mcp/specs/database-inspection/spec.md +0 -9
- package/openspec/changes/archive/2026-04-09-bootstrap-omnifocus-mcp/specs/execution-runtime/spec.md +0 -69
- package/openspec/changes/archive/2026-04-09-bootstrap-omnifocus-mcp/specs/folder-management/spec.md +0 -25
- package/openspec/changes/archive/2026-04-09-bootstrap-omnifocus-mcp/specs/forecast/spec.md +0 -9
- package/openspec/changes/archive/2026-04-09-bootstrap-omnifocus-mcp/specs/identity-resolution/spec.md +0 -45
- package/openspec/changes/archive/2026-04-09-bootstrap-omnifocus-mcp/specs/perspective-management/spec.md +0 -9
- package/openspec/changes/archive/2026-04-09-bootstrap-omnifocus-mcp/specs/project-management/spec.md +0 -25
- package/openspec/changes/archive/2026-04-09-bootstrap-omnifocus-mcp/specs/recurrence/spec.md +0 -9
- package/openspec/changes/archive/2026-04-09-bootstrap-omnifocus-mcp/specs/settings/spec.md +0 -9
- package/openspec/changes/archive/2026-04-09-bootstrap-omnifocus-mcp/specs/tag-management/spec.md +0 -25
- package/openspec/changes/archive/2026-04-09-bootstrap-omnifocus-mcp/specs/task-management/spec.md +0 -29
- package/openspec/changes/archive/2026-04-09-bootstrap-omnifocus-mcp/specs/url-automation/spec.md +0 -9
- package/openspec/changes/archive/2026-04-09-bootstrap-omnifocus-mcp/specs/window-state/spec.md +0 -9
- package/openspec/changes/archive/2026-04-09-bootstrap-omnifocus-mcp/tasks.md +0 -84
- package/openspec/changes/archive/2026-04-09-folder-crud/.openspec.yaml +0 -2
- package/openspec/changes/archive/2026-04-09-folder-crud/design.md +0 -58
- package/openspec/changes/archive/2026-04-09-folder-crud/proposal.md +0 -28
- package/openspec/changes/archive/2026-04-09-folder-crud/specs/folder-write/spec.md +0 -45
- package/openspec/changes/archive/2026-04-09-folder-crud/tasks.md +0 -41
- package/openspec/changes/archive/2026-04-09-folder-tag-list-filtering/.openspec.yaml +0 -2
- package/openspec/changes/archive/2026-04-09-folder-tag-list-filtering/design.md +0 -38
- package/openspec/changes/archive/2026-04-09-folder-tag-list-filtering/proposal.md +0 -30
- package/openspec/changes/archive/2026-04-09-folder-tag-list-filtering/specs/folder-management/spec.md +0 -21
- package/openspec/changes/archive/2026-04-09-folder-tag-list-filtering/specs/tag-management/spec.md +0 -21
- package/openspec/changes/archive/2026-04-09-folder-tag-list-filtering/tasks.md +0 -35
- package/openspec/changes/archive/2026-04-09-move-operations/.openspec.yaml +0 -2
- package/openspec/changes/archive/2026-04-09-move-operations/design.md +0 -43
- package/openspec/changes/archive/2026-04-09-move-operations/proposal.md +0 -25
- package/openspec/changes/archive/2026-04-09-move-operations/specs/move-operations/spec.md +0 -41
- package/openspec/changes/archive/2026-04-09-move-operations/tasks.md +0 -40
- package/openspec/changes/archive/2026-04-09-project-crud/.openspec.yaml +0 -2
- package/openspec/changes/archive/2026-04-09-project-crud/design.md +0 -60
- package/openspec/changes/archive/2026-04-09-project-crud/proposal.md +0 -29
- package/openspec/changes/archive/2026-04-09-project-crud/specs/project-write/spec.md +0 -74
- package/openspec/changes/archive/2026-04-09-project-crud/tasks.md +0 -48
- package/openspec/changes/archive/2026-04-09-project-filtering/.openspec.yaml +0 -2
- package/openspec/changes/archive/2026-04-09-project-filtering/design.md +0 -52
- package/openspec/changes/archive/2026-04-09-project-filtering/proposal.md +0 -26
- package/openspec/changes/archive/2026-04-09-project-filtering/specs/project-filtering/spec.md +0 -66
- package/openspec/changes/archive/2026-04-09-project-filtering/specs/project-management/spec.md +0 -13
- package/openspec/changes/archive/2026-04-09-project-filtering/tasks.md +0 -41
- package/openspec/changes/archive/2026-04-09-tag-crud/.openspec.yaml +0 -2
- package/openspec/changes/archive/2026-04-09-tag-crud/design.md +0 -45
- package/openspec/changes/archive/2026-04-09-tag-crud/proposal.md +0 -28
- package/openspec/changes/archive/2026-04-09-tag-crud/specs/tag-write/spec.md +0 -49
- package/openspec/changes/archive/2026-04-09-tag-crud/tasks.md +0 -41
- package/openspec/changes/archive/2026-04-09-task-crud/.openspec.yaml +0 -2
- package/openspec/changes/archive/2026-04-09-task-crud/design.md +0 -62
- package/openspec/changes/archive/2026-04-09-task-crud/proposal.md +0 -29
- package/openspec/changes/archive/2026-04-09-task-crud/specs/task-management/spec.md +0 -17
- package/openspec/changes/archive/2026-04-09-task-crud/specs/task-write/spec.md +0 -89
- package/openspec/changes/archive/2026-04-09-task-crud/tasks.md +0 -55
- package/openspec/changes/archive/2026-04-09-task-filtering/.openspec.yaml +0 -2
- package/openspec/changes/archive/2026-04-09-task-filtering/design.md +0 -61
- package/openspec/changes/archive/2026-04-09-task-filtering/proposal.md +0 -26
- package/openspec/changes/archive/2026-04-09-task-filtering/specs/task-filtering/spec.md +0 -63
- package/openspec/changes/archive/2026-04-09-task-filtering/specs/task-management/spec.md +0 -17
- package/openspec/changes/archive/2026-04-09-task-filtering/tasks.md +0 -42
- package/openspec/changes/archive/2026-04-10-planned-date/.openspec.yaml +0 -2
- package/openspec/changes/archive/2026-04-10-planned-date/design.md +0 -27
- package/openspec/changes/archive/2026-04-10-planned-date/proposal.md +0 -29
- package/openspec/changes/archive/2026-04-10-planned-date/specs/task-management/spec.md +0 -29
- package/openspec/changes/archive/2026-04-10-planned-date/specs/task-write/spec.md +0 -69
- package/openspec/changes/archive/2026-04-10-planned-date/tasks.md +0 -26
- package/openspec/changes/archive/2026-04-10-task-recurrence/.openspec.yaml +0 -2
- package/openspec/changes/archive/2026-04-10-task-recurrence/design.md +0 -81
- package/openspec/changes/archive/2026-04-10-task-recurrence/proposal.md +0 -28
- package/openspec/changes/archive/2026-04-10-task-recurrence/specs/recurrence/spec.md +0 -47
- package/openspec/changes/archive/2026-04-10-task-recurrence/specs/task-management/spec.md +0 -25
- package/openspec/changes/archive/2026-04-10-task-recurrence/specs/task-write/spec.md +0 -61
- package/openspec/changes/archive/2026-04-10-task-recurrence/tasks.md +0 -39
- package/openspec/config.yaml +0 -20
- package/openspec/specs/attachments/spec.md +0 -15
- package/openspec/specs/batch-operations/spec.md +0 -15
- package/openspec/specs/database-inspection/spec.md +0 -15
- package/openspec/specs/execution-runtime/spec.md +0 -75
- package/openspec/specs/folder-management/spec.md +0 -39
- package/openspec/specs/folder-write/spec.md +0 -45
- package/openspec/specs/forecast/spec.md +0 -15
- package/openspec/specs/identity-resolution/spec.md +0 -51
- package/openspec/specs/move-operations/spec.md +0 -41
- package/openspec/specs/perspective-management/spec.md +0 -15
- package/openspec/specs/project-filtering/spec.md +0 -72
- package/openspec/specs/project-management/spec.md +0 -31
- package/openspec/specs/project-write/spec.md +0 -79
- package/openspec/specs/recurrence/spec.md +0 -51
- package/openspec/specs/settings/spec.md +0 -15
- package/openspec/specs/tag-management/spec.md +0 -39
- package/openspec/specs/tag-write/spec.md +0 -49
- package/openspec/specs/task-filtering/spec.md +0 -63
- package/openspec/specs/task-management/spec.md +0 -51
- package/openspec/specs/task-write/spec.md +0 -115
- package/openspec/specs/url-automation/spec.md +0 -15
- package/openspec/specs/window-state/spec.md +0 -15
- package/scripts/cleanup-fixtures.ts +0 -89
- package/server.json +0 -21
- package/src/runtime/bridge.ts +0 -97
- package/src/runtime/index.ts +0 -4
- package/src/runtime/jxaShim.ts +0 -55
- package/src/runtime/resultProtocol.ts +0 -62
- package/src/runtime/snippetLoader.ts +0 -79
- package/src/schemas/enums.ts +0 -32
- package/src/schemas/index.ts +0 -38
- package/src/schemas/shapes.ts +0 -267
- package/src/server.ts +0 -58
- package/src/tools/completeProject.ts +0 -21
- package/src/tools/completeTask.ts +0 -23
- package/src/tools/createFolder.ts +0 -20
- package/src/tools/createProject.ts +0 -20
- package/src/tools/createTag.ts +0 -20
- package/src/tools/createTask.ts +0 -20
- package/src/tools/deleteFolder.ts +0 -24
- package/src/tools/deleteProject.ts +0 -24
- package/src/tools/deleteTag.ts +0 -24
- package/src/tools/deleteTask.ts +0 -26
- package/src/tools/dropProject.ts +0 -21
- package/src/tools/dropTask.ts +0 -23
- package/src/tools/editFolder.ts +0 -19
- package/src/tools/editProject.ts +0 -20
- package/src/tools/editTag.ts +0 -20
- package/src/tools/editTask.ts +0 -20
- package/src/tools/getFolder.ts +0 -24
- package/src/tools/getProject.ts +0 -24
- package/src/tools/getTag.ts +0 -24
- package/src/tools/getTask.ts +0 -24
- package/src/tools/index.ts +0 -85
- package/src/tools/listFolders.ts +0 -32
- package/src/tools/listProjects.ts +0 -32
- package/src/tools/listTags.ts +0 -32
- package/src/tools/listTasks.ts +0 -56
- package/src/tools/moveProject.ts +0 -20
- package/src/tools/moveTask.ts +0 -20
- package/src/tools/resolveName.ts +0 -37
- package/test/integration/.gitkeep +0 -0
- package/test/integration/completeProject.int.test.ts +0 -25
- package/test/integration/completeTask.int.test.ts +0 -30
- package/test/integration/createFolder.int.test.ts +0 -50
- package/test/integration/createProject.int.test.ts +0 -49
- package/test/integration/createTag.int.test.ts +0 -52
- package/test/integration/createTask.int.test.ts +0 -55
- package/test/integration/deleteFolder.int.test.ts +0 -64
- package/test/integration/deleteProject.int.test.ts +0 -31
- package/test/integration/deleteTag.int.test.ts +0 -61
- package/test/integration/deleteTask.int.test.ts +0 -36
- package/test/integration/dropProject.int.test.ts +0 -24
- package/test/integration/dropTask.int.test.ts +0 -29
- package/test/integration/editFolder.int.test.ts +0 -43
- package/test/integration/editProject.int.test.ts +0 -39
- package/test/integration/editTag.int.test.ts +0 -43
- package/test/integration/editTask.int.test.ts +0 -56
- package/test/integration/fixtures.ts +0 -219
- package/test/integration/getTask.int.test.ts +0 -64
- package/test/integration/listFoldersFiltered.int.test.ts +0 -98
- package/test/integration/listProjects.int.test.ts +0 -73
- package/test/integration/listProjectsFiltered.int.test.ts +0 -96
- package/test/integration/listTagsFiltered.int.test.ts +0 -54
- package/test/integration/listTasksFiltered.int.test.ts +0 -141
- package/test/integration/moveProject.int.test.ts +0 -57
- package/test/integration/moveTask.int.test.ts +0 -61
- package/test/integration/plannedDate.int.test.ts +0 -72
- package/test/integration/preflight.ts +0 -60
- package/test/integration/resolveName.int.test.ts +0 -86
- package/test/integration/taskRecurrence.int.test.ts +0 -106
- package/test/unit/.gitkeep +0 -0
- package/test/unit/bridge.injection.test.ts +0 -66
- package/test/unit/resultProtocol.test.ts +0 -71
- package/test/unit/schemas.createFolder.test.ts +0 -38
- package/test/unit/schemas.createProject.test.ts +0 -115
- package/test/unit/schemas.createTask.test.ts +0 -87
- package/test/unit/schemas.editTag.test.ts +0 -64
- package/test/unit/schemas.folderTagFiltering.test.ts +0 -42
- package/test/unit/schemas.listProjects.test.ts +0 -44
- package/test/unit/schemas.moveOperations.test.ts +0 -60
- package/test/unit/schemas.recurrence.test.ts +0 -120
- package/test/unit/schemas.test.ts +0 -126
- package/test/unit/snippetLoader.test.ts +0 -56
- package/test/unit/tools.deleteTask.test.ts +0 -19
- package/test/unit/tools.listTasks.test.ts +0 -126
- package/tsconfig.json +0 -19
- package/vitest.config.ts +0 -8
- package/vitest.integration.config.ts +0 -18
package/src/tools/createTag.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { runSnippet } from "../runtime/index.js";
|
|
3
|
-
import { CreateTagInput, TagDetail } from "../schemas/index.js";
|
|
4
|
-
|
|
5
|
-
export type CreateTagInputType = z.infer<typeof CreateTagInput>;
|
|
6
|
-
|
|
7
|
-
export async function createTagHandler(
|
|
8
|
-
input: CreateTagInputType
|
|
9
|
-
): Promise<z.infer<typeof TagDetail>> {
|
|
10
|
-
const raw = await runSnippet("create_tag", input);
|
|
11
|
-
return TagDetail.parse(raw);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const createTagTool = {
|
|
15
|
-
name: "create_tag",
|
|
16
|
-
description:
|
|
17
|
-
"Create a new OmniFocus tag. Omit parentTagId to create at the top level; provide parentTagId to nest it under an existing tag.",
|
|
18
|
-
inputSchema: CreateTagInput,
|
|
19
|
-
handler: createTagHandler,
|
|
20
|
-
} as const;
|
package/src/tools/createTask.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { runSnippet } from "../runtime/index.js";
|
|
3
|
-
import { CreateTaskInput, TaskDetail } from "../schemas/index.js";
|
|
4
|
-
|
|
5
|
-
export type CreateTaskInputType = z.infer<typeof CreateTaskInput>;
|
|
6
|
-
|
|
7
|
-
export async function createTaskHandler(
|
|
8
|
-
input: CreateTaskInputType
|
|
9
|
-
): Promise<z.infer<typeof TaskDetail>> {
|
|
10
|
-
const raw = await runSnippet("create_task", input);
|
|
11
|
-
return TaskDetail.parse(raw);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const createTaskTool = {
|
|
15
|
-
name: "create_task",
|
|
16
|
-
description:
|
|
17
|
-
"Create a new task. Placement: omit projectId and parentTaskId for inbox; provide projectId to add to a project; provide parentTaskId to create a subtask. Providing both projectId and parentTaskId is an error.",
|
|
18
|
-
inputSchema: CreateTaskInput,
|
|
19
|
-
handler: createTaskHandler,
|
|
20
|
-
} as const;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { runSnippet } from "../runtime/index.js";
|
|
3
|
-
import { IdSchema } from "../schemas/index.js";
|
|
4
|
-
|
|
5
|
-
const DeleteFolderInput = z.object({
|
|
6
|
-
id: IdSchema.describe("The folder's id.primaryKey"),
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
const DeleteFolderResult = z.object({ id: z.string() });
|
|
10
|
-
|
|
11
|
-
export async function deleteFolderHandler(
|
|
12
|
-
input: z.infer<typeof DeleteFolderInput>
|
|
13
|
-
): Promise<z.infer<typeof DeleteFolderResult>> {
|
|
14
|
-
const raw = await runSnippet("delete_folder", { id: input.id });
|
|
15
|
-
return DeleteFolderResult.parse(raw);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export const deleteFolderTool = {
|
|
19
|
-
name: "delete_folder",
|
|
20
|
-
description:
|
|
21
|
-
"Permanently and recursively delete an OmniFocus folder. THIS ACTION CANNOT BE UNDONE. The ENTIRE subtree is destroyed: all child folders, all projects within those folders, and all tasks within those projects. Before calling this tool you MUST ask the user to explicitly confirm they want to permanently delete the folder and all of its contents.",
|
|
22
|
-
inputSchema: DeleteFolderInput,
|
|
23
|
-
handler: deleteFolderHandler,
|
|
24
|
-
} as const;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { runSnippet } from "../runtime/index.js";
|
|
3
|
-
import { IdSchema } from "../schemas/index.js";
|
|
4
|
-
|
|
5
|
-
const DeleteProjectInput = z.object({
|
|
6
|
-
id: IdSchema.describe("The project's id.primaryKey"),
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
const DeleteProjectResult = z.object({ id: z.string() });
|
|
10
|
-
|
|
11
|
-
export async function deleteProjectHandler(
|
|
12
|
-
input: z.infer<typeof DeleteProjectInput>
|
|
13
|
-
): Promise<z.infer<typeof DeleteProjectResult>> {
|
|
14
|
-
const raw = await runSnippet("delete_project", { id: input.id });
|
|
15
|
-
return DeleteProjectResult.parse(raw);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export const deleteProjectTool = {
|
|
19
|
-
name: "delete_project",
|
|
20
|
-
description:
|
|
21
|
-
"Permanently delete a project and ALL its tasks. THIS ACTION CANNOT BE UNDONE. Before calling this tool you MUST ask the user to explicitly confirm they want to permanently delete the project, and inform them that all tasks within the project will also be deleted.",
|
|
22
|
-
inputSchema: DeleteProjectInput,
|
|
23
|
-
handler: deleteProjectHandler,
|
|
24
|
-
} as const;
|
package/src/tools/deleteTag.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { runSnippet } from "../runtime/index.js";
|
|
3
|
-
import { IdSchema } from "../schemas/index.js";
|
|
4
|
-
|
|
5
|
-
const DeleteTagInput = z.object({
|
|
6
|
-
id: IdSchema.describe("The tag's id.primaryKey"),
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
const DeleteTagResult = z.object({ id: z.string() });
|
|
10
|
-
|
|
11
|
-
export async function deleteTagHandler(
|
|
12
|
-
input: z.infer<typeof DeleteTagInput>
|
|
13
|
-
): Promise<z.infer<typeof DeleteTagResult>> {
|
|
14
|
-
const raw = await runSnippet("delete_tag", { id: input.id });
|
|
15
|
-
return DeleteTagResult.parse(raw);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export const deleteTagTool = {
|
|
19
|
-
name: "delete_tag",
|
|
20
|
-
description:
|
|
21
|
-
"Permanently delete an OmniFocus tag. THIS ACTION CANNOT BE UNDONE. All child tags are also deleted, and all tasks/projects that held this tag have it removed automatically. Before calling this tool you MUST ask the user to explicitly confirm they want to permanently delete the tag and all its child tags.",
|
|
22
|
-
inputSchema: DeleteTagInput,
|
|
23
|
-
handler: deleteTagHandler,
|
|
24
|
-
} as const;
|
package/src/tools/deleteTask.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { runSnippet } from "../runtime/index.js";
|
|
3
|
-
import { IdSchema } from "../schemas/index.js";
|
|
4
|
-
|
|
5
|
-
const deleteTaskSchema = z.object({
|
|
6
|
-
id: IdSchema.describe("The task's id.primaryKey"),
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
export type DeleteTaskInput = z.infer<typeof deleteTaskSchema>;
|
|
10
|
-
|
|
11
|
-
const DeleteTaskResult = z.object({ id: IdSchema });
|
|
12
|
-
|
|
13
|
-
export async function deleteTaskHandler(
|
|
14
|
-
input: DeleteTaskInput
|
|
15
|
-
): Promise<z.infer<typeof DeleteTaskResult>> {
|
|
16
|
-
const raw = await runSnippet("delete_task", { id: input.id });
|
|
17
|
-
return DeleteTaskResult.parse(raw);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export const deleteTaskTool = {
|
|
21
|
-
name: "delete_task",
|
|
22
|
-
description:
|
|
23
|
-
"Permanently delete a task and all its subtasks. THIS ACTION CANNOT BE UNDONE. Before calling this tool you MUST ask the user to explicitly confirm they want to permanently delete the task, and inform them that all subtasks will also be deleted.",
|
|
24
|
-
inputSchema: deleteTaskSchema,
|
|
25
|
-
handler: deleteTaskHandler,
|
|
26
|
-
} as const;
|
package/src/tools/dropProject.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { runSnippet } from "../runtime/index.js";
|
|
3
|
-
import { IdSchema, ProjectDetail } from "../schemas/index.js";
|
|
4
|
-
|
|
5
|
-
const DropProjectInput = z.object({
|
|
6
|
-
id: IdSchema.describe("The project's id.primaryKey"),
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
export async function dropProjectHandler(
|
|
10
|
-
input: z.infer<typeof DropProjectInput>
|
|
11
|
-
): Promise<z.infer<typeof ProjectDetail>> {
|
|
12
|
-
const raw = await runSnippet("drop_project", { id: input.id });
|
|
13
|
-
return ProjectDetail.parse(raw);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export const dropProjectTool = {
|
|
17
|
-
name: "drop_project",
|
|
18
|
-
description: "Mark a project as dropped. Returns the updated project detail.",
|
|
19
|
-
inputSchema: DropProjectInput,
|
|
20
|
-
handler: dropProjectHandler,
|
|
21
|
-
} as const;
|
package/src/tools/dropTask.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { runSnippet } from "../runtime/index.js";
|
|
3
|
-
import { IdSchema, TaskDetail } from "../schemas/index.js";
|
|
4
|
-
|
|
5
|
-
const dropTaskSchema = z.object({
|
|
6
|
-
id: IdSchema.describe("The task's id.primaryKey"),
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
export type DropTaskInput = z.infer<typeof dropTaskSchema>;
|
|
10
|
-
|
|
11
|
-
export async function dropTaskHandler(
|
|
12
|
-
input: DropTaskInput
|
|
13
|
-
): Promise<z.infer<typeof TaskDetail>> {
|
|
14
|
-
const raw = await runSnippet("drop_task", { id: input.id });
|
|
15
|
-
return TaskDetail.parse(raw);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export const dropTaskTool = {
|
|
19
|
-
name: "drop_task",
|
|
20
|
-
description: "Mark a task dropped by its stable ID. Returns the updated task detail.",
|
|
21
|
-
inputSchema: dropTaskSchema,
|
|
22
|
-
handler: dropTaskHandler,
|
|
23
|
-
} as const;
|
package/src/tools/editFolder.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { runSnippet } from "../runtime/index.js";
|
|
3
|
-
import { EditFolderInput, FolderDetail } from "../schemas/index.js";
|
|
4
|
-
|
|
5
|
-
export type EditFolderInputType = z.infer<typeof EditFolderInput>;
|
|
6
|
-
|
|
7
|
-
export async function editFolderHandler(
|
|
8
|
-
input: EditFolderInputType
|
|
9
|
-
): Promise<z.infer<typeof FolderDetail>> {
|
|
10
|
-
const raw = await runSnippet("edit_folder", input);
|
|
11
|
-
return FolderDetail.parse(raw);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const editFolderTool = {
|
|
15
|
-
name: "edit_folder",
|
|
16
|
-
description: "Rename an existing OmniFocus folder by its ID.",
|
|
17
|
-
inputSchema: EditFolderInput,
|
|
18
|
-
handler: editFolderHandler,
|
|
19
|
-
} as const;
|
package/src/tools/editProject.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { runSnippet } from "../runtime/index.js";
|
|
3
|
-
import { EditProjectInput, ProjectDetail } from "../schemas/index.js";
|
|
4
|
-
|
|
5
|
-
export type EditProjectInputType = z.infer<typeof EditProjectInput>;
|
|
6
|
-
|
|
7
|
-
export async function editProjectHandler(
|
|
8
|
-
input: EditProjectInputType
|
|
9
|
-
): Promise<z.infer<typeof ProjectDetail>> {
|
|
10
|
-
const raw = await runSnippet("edit_project", input);
|
|
11
|
-
return ProjectDetail.parse(raw);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const editProjectTool = {
|
|
15
|
-
name: "edit_project",
|
|
16
|
-
description:
|
|
17
|
-
"Edit an existing project. Only provided fields are changed. Pass null for deferDate, dueDate, or reviewInterval to clear them. When tagIds is provided it replaces the full tag set.",
|
|
18
|
-
inputSchema: EditProjectInput,
|
|
19
|
-
handler: editProjectHandler,
|
|
20
|
-
} as const;
|
package/src/tools/editTag.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { runSnippet } from "../runtime/index.js";
|
|
3
|
-
import { EditTagInput, TagDetail } from "../schemas/index.js";
|
|
4
|
-
|
|
5
|
-
export type EditTagInputType = z.infer<typeof EditTagInput>;
|
|
6
|
-
|
|
7
|
-
export async function editTagHandler(
|
|
8
|
-
input: EditTagInputType
|
|
9
|
-
): Promise<z.infer<typeof TagDetail>> {
|
|
10
|
-
const raw = await runSnippet("edit_tag", input);
|
|
11
|
-
return TagDetail.parse(raw);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const editTagTool = {
|
|
15
|
-
name: "edit_tag",
|
|
16
|
-
description:
|
|
17
|
-
"Edit an existing OmniFocus tag. Provide id plus any combination of name (rename) and status (active/onHold/dropped).",
|
|
18
|
-
inputSchema: EditTagInput,
|
|
19
|
-
handler: editTagHandler,
|
|
20
|
-
} as const;
|
package/src/tools/editTask.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { runSnippet } from "../runtime/index.js";
|
|
3
|
-
import { EditTaskInput, TaskDetail } from "../schemas/index.js";
|
|
4
|
-
|
|
5
|
-
export type EditTaskInputType = z.infer<typeof EditTaskInput>;
|
|
6
|
-
|
|
7
|
-
export async function editTaskHandler(
|
|
8
|
-
input: EditTaskInputType
|
|
9
|
-
): Promise<z.infer<typeof TaskDetail>> {
|
|
10
|
-
const raw = await runSnippet("edit_task", input);
|
|
11
|
-
return TaskDetail.parse(raw);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const editTaskTool = {
|
|
15
|
-
name: "edit_task",
|
|
16
|
-
description:
|
|
17
|
-
"Edit an existing task by its stable ID. Only fields included in the call are changed; omitted fields are left unchanged. When tagIds is provided it replaces the full tag set. Pass null for deferDate, dueDate, or estimatedMinutes to clear those fields.",
|
|
18
|
-
inputSchema: EditTaskInput,
|
|
19
|
-
handler: editTaskHandler,
|
|
20
|
-
} as const;
|
package/src/tools/getFolder.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { runSnippet } from "../runtime/index.js";
|
|
3
|
-
import { IdSchema, FolderDetail } from "../schemas/index.js";
|
|
4
|
-
|
|
5
|
-
export const getFolderSchema = z.object({
|
|
6
|
-
id: IdSchema.describe("The folder's id.primaryKey"),
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
export type GetFolderInput = z.infer<typeof getFolderSchema>;
|
|
10
|
-
|
|
11
|
-
export async function getFolderHandler(
|
|
12
|
-
input: GetFolderInput
|
|
13
|
-
): Promise<z.infer<typeof FolderDetail>> {
|
|
14
|
-
const raw = await runSnippet("get_folder", { id: input.id });
|
|
15
|
-
return FolderDetail.parse(raw);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export const getFolderTool = {
|
|
19
|
-
name: "get_folder",
|
|
20
|
-
description:
|
|
21
|
-
"Get full detail for a folder by its stable ID. Returns path, parentId, status, child folder IDs, and immediate project IDs.",
|
|
22
|
-
inputSchema: getFolderSchema,
|
|
23
|
-
handler: getFolderHandler,
|
|
24
|
-
} as const;
|
package/src/tools/getProject.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { runSnippet } from "../runtime/index.js";
|
|
3
|
-
import { IdSchema, ProjectDetail } from "../schemas/index.js";
|
|
4
|
-
|
|
5
|
-
export const getProjectSchema = z.object({
|
|
6
|
-
id: IdSchema.describe("The project's id.primaryKey"),
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
export type GetProjectInput = z.infer<typeof getProjectSchema>;
|
|
10
|
-
|
|
11
|
-
export async function getProjectHandler(
|
|
12
|
-
input: GetProjectInput
|
|
13
|
-
): Promise<z.infer<typeof ProjectDetail>> {
|
|
14
|
-
const raw = await runSnippet("get_project", { id: input.id });
|
|
15
|
-
return ProjectDetail.parse(raw);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export const getProjectTool = {
|
|
19
|
-
name: "get_project",
|
|
20
|
-
description:
|
|
21
|
-
"Get full detail for a project by its stable ID. Returns note, folder path, status, type, dates, review metadata, and tag IDs.",
|
|
22
|
-
inputSchema: getProjectSchema,
|
|
23
|
-
handler: getProjectHandler,
|
|
24
|
-
} as const;
|
package/src/tools/getTag.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { runSnippet } from "../runtime/index.js";
|
|
3
|
-
import { IdSchema, TagDetail } from "../schemas/index.js";
|
|
4
|
-
|
|
5
|
-
export const getTagSchema = z.object({
|
|
6
|
-
id: IdSchema.describe("The tag's id.primaryKey"),
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
export type GetTagInput = z.infer<typeof getTagSchema>;
|
|
10
|
-
|
|
11
|
-
export async function getTagHandler(
|
|
12
|
-
input: GetTagInput
|
|
13
|
-
): Promise<z.infer<typeof TagDetail>> {
|
|
14
|
-
const raw = await runSnippet("get_tag", { id: input.id });
|
|
15
|
-
return TagDetail.parse(raw);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export const getTagTool = {
|
|
19
|
-
name: "get_tag",
|
|
20
|
-
description:
|
|
21
|
-
"Get full detail for a tag by its stable ID. Returns path, parentId, status, and child tag IDs.",
|
|
22
|
-
inputSchema: getTagSchema,
|
|
23
|
-
handler: getTagHandler,
|
|
24
|
-
} as const;
|
package/src/tools/getTask.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { runSnippet } from "../runtime/index.js";
|
|
3
|
-
import { IdSchema, TaskDetail } from "../schemas/index.js";
|
|
4
|
-
|
|
5
|
-
export const getTaskSchema = z.object({
|
|
6
|
-
id: IdSchema.describe("The task's id.primaryKey"),
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
export type GetTaskInput = z.infer<typeof getTaskSchema>;
|
|
10
|
-
|
|
11
|
-
export async function getTaskHandler(
|
|
12
|
-
input: GetTaskInput
|
|
13
|
-
): Promise<z.infer<typeof TaskDetail>> {
|
|
14
|
-
const raw = await runSnippet("get_task", { id: input.id });
|
|
15
|
-
return TaskDetail.parse(raw);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export const getTaskTool = {
|
|
19
|
-
name: "get_task",
|
|
20
|
-
description:
|
|
21
|
-
"Get full detail for a task by its stable ID. Returns note, status, flagged, defer/due/completion dates, estimated minutes, container info, tag IDs, and parentTaskId (null for top-level tasks, set to the parent task's ID for subtasks).",
|
|
22
|
-
inputSchema: getTaskSchema,
|
|
23
|
-
handler: getTaskHandler,
|
|
24
|
-
} as const;
|
package/src/tools/index.ts
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
export { listProjectsTool } from "./listProjects.js";
|
|
2
|
-
export { getProjectTool } from "./getProject.js";
|
|
3
|
-
export { listFoldersTool } from "./listFolders.js";
|
|
4
|
-
export { getFolderTool } from "./getFolder.js";
|
|
5
|
-
export { listTasksTool } from "./listTasks.js";
|
|
6
|
-
export { getTaskTool } from "./getTask.js";
|
|
7
|
-
export { listTagsTool } from "./listTags.js";
|
|
8
|
-
export { getTagTool } from "./getTag.js";
|
|
9
|
-
export { resolveNameTool } from "./resolveName.js";
|
|
10
|
-
export { createTaskTool } from "./createTask.js";
|
|
11
|
-
export { editTaskTool } from "./editTask.js";
|
|
12
|
-
export { completeTaskTool } from "./completeTask.js";
|
|
13
|
-
export { dropTaskTool } from "./dropTask.js";
|
|
14
|
-
export { deleteTaskTool } from "./deleteTask.js";
|
|
15
|
-
export { createProjectTool } from "./createProject.js";
|
|
16
|
-
export { editProjectTool } from "./editProject.js";
|
|
17
|
-
export { completeProjectTool } from "./completeProject.js";
|
|
18
|
-
export { dropProjectTool } from "./dropProject.js";
|
|
19
|
-
export { deleteProjectTool } from "./deleteProject.js";
|
|
20
|
-
export { createFolderTool } from "./createFolder.js";
|
|
21
|
-
export { editFolderTool } from "./editFolder.js";
|
|
22
|
-
export { deleteFolderTool } from "./deleteFolder.js";
|
|
23
|
-
export { createTagTool } from "./createTag.js";
|
|
24
|
-
export { editTagTool } from "./editTag.js";
|
|
25
|
-
export { deleteTagTool } from "./deleteTag.js";
|
|
26
|
-
export { moveTaskTool } from "./moveTask.js";
|
|
27
|
-
export { moveProjectTool } from "./moveProject.js";
|
|
28
|
-
|
|
29
|
-
import { listProjectsTool } from "./listProjects.js";
|
|
30
|
-
import { getProjectTool } from "./getProject.js";
|
|
31
|
-
import { listFoldersTool } from "./listFolders.js";
|
|
32
|
-
import { getFolderTool } from "./getFolder.js";
|
|
33
|
-
import { listTasksTool } from "./listTasks.js";
|
|
34
|
-
import { getTaskTool } from "./getTask.js";
|
|
35
|
-
import { listTagsTool } from "./listTags.js";
|
|
36
|
-
import { getTagTool } from "./getTag.js";
|
|
37
|
-
import { resolveNameTool } from "./resolveName.js";
|
|
38
|
-
import { createTaskTool } from "./createTask.js";
|
|
39
|
-
import { editTaskTool } from "./editTask.js";
|
|
40
|
-
import { completeTaskTool } from "./completeTask.js";
|
|
41
|
-
import { dropTaskTool } from "./dropTask.js";
|
|
42
|
-
import { deleteTaskTool } from "./deleteTask.js";
|
|
43
|
-
import { createProjectTool } from "./createProject.js";
|
|
44
|
-
import { editProjectTool } from "./editProject.js";
|
|
45
|
-
import { completeProjectTool } from "./completeProject.js";
|
|
46
|
-
import { dropProjectTool } from "./dropProject.js";
|
|
47
|
-
import { deleteProjectTool } from "./deleteProject.js";
|
|
48
|
-
import { createFolderTool } from "./createFolder.js";
|
|
49
|
-
import { editFolderTool } from "./editFolder.js";
|
|
50
|
-
import { deleteFolderTool } from "./deleteFolder.js";
|
|
51
|
-
import { createTagTool } from "./createTag.js";
|
|
52
|
-
import { editTagTool } from "./editTag.js";
|
|
53
|
-
import { deleteTagTool } from "./deleteTag.js";
|
|
54
|
-
import { moveTaskTool } from "./moveTask.js";
|
|
55
|
-
import { moveProjectTool } from "./moveProject.js";
|
|
56
|
-
|
|
57
|
-
export const allTools = [
|
|
58
|
-
listProjectsTool,
|
|
59
|
-
getProjectTool,
|
|
60
|
-
listFoldersTool,
|
|
61
|
-
getFolderTool,
|
|
62
|
-
listTasksTool,
|
|
63
|
-
getTaskTool,
|
|
64
|
-
listTagsTool,
|
|
65
|
-
getTagTool,
|
|
66
|
-
resolveNameTool,
|
|
67
|
-
createTaskTool,
|
|
68
|
-
editTaskTool,
|
|
69
|
-
completeTaskTool,
|
|
70
|
-
dropTaskTool,
|
|
71
|
-
deleteTaskTool,
|
|
72
|
-
createProjectTool,
|
|
73
|
-
editProjectTool,
|
|
74
|
-
completeProjectTool,
|
|
75
|
-
dropProjectTool,
|
|
76
|
-
deleteProjectTool,
|
|
77
|
-
createFolderTool,
|
|
78
|
-
editFolderTool,
|
|
79
|
-
deleteFolderTool,
|
|
80
|
-
createTagTool,
|
|
81
|
-
editTagTool,
|
|
82
|
-
deleteTagTool,
|
|
83
|
-
moveTaskTool,
|
|
84
|
-
moveProjectTool,
|
|
85
|
-
] as const;
|
package/src/tools/listFolders.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { runSnippet } from "../runtime/index.js";
|
|
3
|
-
import { FolderSummary, ListFoldersFilter } from "../schemas/index.js";
|
|
4
|
-
|
|
5
|
-
export const listFoldersSchema = z.object({
|
|
6
|
-
filter: ListFoldersFilter.optional().describe(
|
|
7
|
-
"Optional filter. When status is provided, only folders with that status are returned. When omitted, all folders (active and dropped) are returned."
|
|
8
|
-
),
|
|
9
|
-
limit: z.number().int().positive().optional().describe(
|
|
10
|
-
"Maximum number of folders to return. Defaults to 200."
|
|
11
|
-
),
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
export type ListFoldersInput = z.infer<typeof listFoldersSchema>;
|
|
15
|
-
|
|
16
|
-
export async function listFoldersHandler(
|
|
17
|
-
input: ListFoldersInput
|
|
18
|
-
): Promise<z.infer<typeof FolderSummary>[]> {
|
|
19
|
-
const raw = await runSnippet("list_folders", {
|
|
20
|
-
filter: input.filter,
|
|
21
|
-
limit: input.limit,
|
|
22
|
-
});
|
|
23
|
-
return z.array(FolderSummary).parse(raw);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export const listFoldersTool = {
|
|
27
|
-
name: "list_folders",
|
|
28
|
-
description:
|
|
29
|
-
"List folders in OmniFocus. By default, all folders (active and dropped) are returned. Optional filter.status ('active' | 'dropped') restricts to that status. Results are capped at limit (default 200). Each folder includes id, name, full path (ancestors joined with ▸), parentId, and status.",
|
|
30
|
-
inputSchema: listFoldersSchema,
|
|
31
|
-
handler: listFoldersHandler,
|
|
32
|
-
} as const;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { runSnippet } from "../runtime/index.js";
|
|
3
|
-
import { ProjectSummary, ListProjectsFilter } from "../schemas/index.js";
|
|
4
|
-
|
|
5
|
-
export const listProjectsSchema = z.object({
|
|
6
|
-
filter: ListProjectsFilter.optional().describe(
|
|
7
|
-
"Optional filters. All fields combine as AND. When status is omitted, done and dropped projects are excluded by default."
|
|
8
|
-
),
|
|
9
|
-
limit: z.number().int().positive().optional().describe(
|
|
10
|
-
"Maximum number of projects to return. Defaults to 100."
|
|
11
|
-
),
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
export type ListProjectsInput = z.infer<typeof listProjectsSchema>;
|
|
15
|
-
|
|
16
|
-
export async function listProjectsHandler(
|
|
17
|
-
input: ListProjectsInput
|
|
18
|
-
): Promise<z.infer<typeof ProjectSummary>[]> {
|
|
19
|
-
const raw = await runSnippet("list_projects", {
|
|
20
|
-
filter: input.filter,
|
|
21
|
-
limit: input.limit,
|
|
22
|
-
});
|
|
23
|
-
return z.array(ProjectSummary).parse(raw);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export const listProjectsTool = {
|
|
27
|
-
name: "list_projects",
|
|
28
|
-
description:
|
|
29
|
-
"List projects in OmniFocus. By default, done and dropped projects are excluded — pass filter.status to override. Optional filter fields: status (array of status strings), folderId (restricts to that folder's subtree), flagged (boolean). Results are capped at limit (default 100). Each project includes folderId and flagged in addition to id, name, folderPath, status, and type.",
|
|
30
|
-
inputSchema: listProjectsSchema,
|
|
31
|
-
handler: listProjectsHandler,
|
|
32
|
-
} as const;
|
package/src/tools/listTags.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { runSnippet } from "../runtime/index.js";
|
|
3
|
-
import { TagSummary, ListTagsFilter } from "../schemas/index.js";
|
|
4
|
-
|
|
5
|
-
export const listTagsSchema = z.object({
|
|
6
|
-
filter: ListTagsFilter.optional().describe(
|
|
7
|
-
"Optional filter. When status is provided, only tags with that status are returned. When omitted, all tags (active, onHold, and dropped) are returned."
|
|
8
|
-
),
|
|
9
|
-
limit: z.number().int().positive().optional().describe(
|
|
10
|
-
"Maximum number of tags to return. Defaults to 200."
|
|
11
|
-
),
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
export type ListTagsInput = z.infer<typeof listTagsSchema>;
|
|
15
|
-
|
|
16
|
-
export async function listTagsHandler(
|
|
17
|
-
input: ListTagsInput
|
|
18
|
-
): Promise<z.infer<typeof TagSummary>[]> {
|
|
19
|
-
const raw = await runSnippet("list_tags", {
|
|
20
|
-
filter: input.filter,
|
|
21
|
-
limit: input.limit,
|
|
22
|
-
});
|
|
23
|
-
return z.array(TagSummary).parse(raw);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export const listTagsTool = {
|
|
27
|
-
name: "list_tags",
|
|
28
|
-
description:
|
|
29
|
-
"List tags in OmniFocus. By default, all tags (active, onHold, and dropped) are returned. Optional filter.status ('active' | 'onHold' | 'dropped') restricts to that status. Results are capped at limit (default 200). Each tag includes id, name, full path (ancestors joined with ▸), parentId, and status.",
|
|
30
|
-
inputSchema: listTagsSchema,
|
|
31
|
-
handler: listTagsHandler,
|
|
32
|
-
} as const;
|
package/src/tools/listTasks.ts
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { runSnippet } from "../runtime/index.js";
|
|
3
|
-
import { IdSchema, TaskSummary, ListTasksFilter } from "../schemas/index.js";
|
|
4
|
-
|
|
5
|
-
const ScopeSchema = z
|
|
6
|
-
.object({
|
|
7
|
-
projectId: IdSchema.optional(),
|
|
8
|
-
folderId: IdSchema.optional(),
|
|
9
|
-
inbox: z.literal(true).optional(),
|
|
10
|
-
all: z.literal(true).optional(),
|
|
11
|
-
})
|
|
12
|
-
.refine(
|
|
13
|
-
(s) => {
|
|
14
|
-
const keys = [s.projectId, s.folderId, s.inbox, s.all].filter(
|
|
15
|
-
(v) => v !== undefined
|
|
16
|
-
);
|
|
17
|
-
return keys.length === 1;
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
message:
|
|
21
|
-
"Exactly one of projectId, folderId, inbox, or all must be provided",
|
|
22
|
-
}
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
export const listTasksSchema = z.object({
|
|
26
|
-
scope: ScopeSchema.describe(
|
|
27
|
-
"Exactly one of: projectId (string), folderId (string), inbox (true), or all (true)"
|
|
28
|
-
),
|
|
29
|
-
filter: ListTasksFilter.optional().describe(
|
|
30
|
-
"Optional filters. All fields combine as AND. When status is omitted, complete and dropped tasks are excluded by default."
|
|
31
|
-
),
|
|
32
|
-
limit: z.number().int().positive().optional().describe(
|
|
33
|
-
"Maximum number of tasks to return. Defaults to 200."
|
|
34
|
-
),
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
export type ListTasksInput = z.infer<typeof listTasksSchema>;
|
|
38
|
-
|
|
39
|
-
export async function listTasksHandler(
|
|
40
|
-
input: ListTasksInput
|
|
41
|
-
): Promise<z.infer<typeof TaskSummary>[]> {
|
|
42
|
-
const raw = await runSnippet("list_tasks", {
|
|
43
|
-
scope: input.scope,
|
|
44
|
-
filter: input.filter,
|
|
45
|
-
limit: input.limit,
|
|
46
|
-
});
|
|
47
|
-
return z.array(TaskSummary).parse(raw);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export const listTasksTool = {
|
|
51
|
-
name: "list_tasks",
|
|
52
|
-
description:
|
|
53
|
-
"List tasks in OmniFocus within a scope. Provide exactly one of: projectId (tasks in a project), folderId (tasks across all projects in a folder), inbox (inbox tasks), or all (every task). By default, complete and dropped tasks are excluded — pass filter.status to override. Optional filter fields: flagged (boolean), status (array of status strings), tagId (string), dueBeforeDate (ISO datetime). Results are capped at limit (default 200). Each returned task includes dueDate and tagIds.",
|
|
54
|
-
inputSchema: listTasksSchema,
|
|
55
|
-
handler: listTasksHandler,
|
|
56
|
-
} as const;
|
package/src/tools/moveProject.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { runSnippet } from "../runtime/index.js";
|
|
3
|
-
import { MoveProjectInput, ProjectSummary } from "../schemas/index.js";
|
|
4
|
-
|
|
5
|
-
export type MoveProjectInputType = z.infer<typeof MoveProjectInput>;
|
|
6
|
-
|
|
7
|
-
export async function moveProjectHandler(
|
|
8
|
-
input: MoveProjectInputType
|
|
9
|
-
): Promise<z.infer<typeof ProjectSummary>> {
|
|
10
|
-
const raw = await runSnippet("move_project", input);
|
|
11
|
-
return ProjectSummary.parse(raw);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const moveProjectTool = {
|
|
15
|
-
name: "move_project",
|
|
16
|
-
description:
|
|
17
|
-
"Move a project to a different folder or to the top level. Pass folderId as a string to move into a folder, or null to move to the top level. Throws a not-found error if either ID does not exist.",
|
|
18
|
-
inputSchema: MoveProjectInput,
|
|
19
|
-
handler: moveProjectHandler,
|
|
20
|
-
} as const;
|
package/src/tools/moveTask.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { runSnippet } from "../runtime/index.js";
|
|
3
|
-
import { MoveTaskInput, TaskSummary } from "../schemas/index.js";
|
|
4
|
-
|
|
5
|
-
export type MoveTaskInputType = z.infer<typeof MoveTaskInput>;
|
|
6
|
-
|
|
7
|
-
export async function moveTaskHandler(
|
|
8
|
-
input: MoveTaskInputType
|
|
9
|
-
): Promise<z.infer<typeof TaskSummary>> {
|
|
10
|
-
const raw = await runSnippet("move_task", input);
|
|
11
|
-
return TaskSummary.parse(raw);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const moveTaskTool = {
|
|
15
|
-
name: "move_task",
|
|
16
|
-
description:
|
|
17
|
-
"Move a task to a different project (making it a top-level task) or make it a subtask of another task. Exactly one of projectId or parentTaskId must be provided. Throws a not-found error if any ID does not exist.",
|
|
18
|
-
inputSchema: MoveTaskInput,
|
|
19
|
-
handler: moveTaskHandler,
|
|
20
|
-
} as const;
|