nx-kv 0.48.0 → 0.48.1
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 +23 -0
- package/package.json +1 -1
- package/src/modules/auth/actions/auth-login.ts +3 -3
- package/src/modules/auth/actions/auth-logout.ts +3 -3
- package/src/modules/auth/actions/auth-me.ts +3 -3
- package/src/modules/auth/actions/auth-status.ts +3 -3
- package/src/modules/bundled/actions/bundled-get.ts +3 -3
- package/src/modules/bundled/actions/bundled-groups.ts +3 -3
- package/src/modules/bundled/actions/bundled-install.ts +3 -3
- package/src/modules/bundled/actions/bundled-list.ts +3 -3
- package/src/modules/db/actions/db-backup.ts +3 -3
- package/src/modules/db/actions/db-migrate.ts +3 -3
- package/src/modules/db/actions/db-status.ts +3 -3
- package/src/modules/db/actions/db-verify.ts +3 -3
- package/src/modules/docs/actions/doc-add.ts +3 -3
- package/src/modules/docs/actions/doc-attach-note.ts +3 -3
- package/src/modules/docs/actions/doc-attach.ts +3 -3
- package/src/modules/docs/actions/doc-attachments.ts +3 -3
- package/src/modules/docs/actions/doc-detach.ts +3 -3
- package/src/modules/docs/actions/doc-get.ts +3 -3
- package/src/modules/docs/actions/doc-list.ts +3 -3
- package/src/modules/docs/actions/doc-remove.ts +3 -3
- package/src/modules/docs/actions/doc-update.ts +3 -3
- package/src/modules/docs/actions/docs-bind.ts +3 -3
- package/src/modules/docs/actions/docs-index.ts +3 -3
- package/src/modules/docs/actions/docs-link.ts +3 -3
- package/src/modules/docs/actions/docs-notebind.ts +3 -3
- package/src/modules/docs/actions/docs-seed.ts +3 -3
- package/src/modules/file/actions/file-content.ts +9 -7
- package/src/modules/file/actions/file-get.ts +3 -3
- package/src/modules/file/actions/file-list.ts +3 -3
- package/src/modules/file/actions/file-orphans.ts +3 -3
- package/src/modules/file/actions/file-prune.ts +3 -3
- package/src/modules/file/actions/file-remove.ts +3 -3
- package/src/modules/file/actions/file-sync.ts +3 -3
- package/src/modules/file/actions/file-upload.ts +3 -3
- package/src/modules/localtask/actions/localtask-add.ts +3 -3
- package/src/modules/localtask/actions/localtask-attach-note.ts +3 -3
- package/src/modules/localtask/actions/localtask-attach.ts +3 -3
- package/src/modules/localtask/actions/localtask-attachments.ts +3 -3
- package/src/modules/localtask/actions/localtask-cancel.ts +3 -3
- package/src/modules/localtask/actions/localtask-cancelMany.ts +3 -3
- package/src/modules/localtask/actions/localtask-chain.ts +3 -3
- package/src/modules/localtask/actions/localtask-claim.ts +3 -3
- package/src/modules/localtask/actions/localtask-clone.ts +3 -3
- package/src/modules/localtask/actions/localtask-closeMany.ts +3 -3
- package/src/modules/localtask/actions/localtask-config.ts +5 -5
- package/src/modules/localtask/actions/localtask-detach.ts +3 -3
- package/src/modules/localtask/actions/localtask-done.ts +3 -3
- package/src/modules/localtask/actions/localtask-events.ts +8 -6
- package/src/modules/localtask/actions/localtask-fork.ts +3 -3
- package/src/modules/localtask/actions/localtask-get.ts +3 -3
- package/src/modules/localtask/actions/localtask-importRemote.ts +8 -6
- package/src/modules/localtask/actions/localtask-list.ts +3 -3
- package/src/modules/localtask/actions/localtask-presence.ts +3 -3
- package/src/modules/localtask/actions/localtask-preview.ts +3 -3
- package/src/modules/localtask/actions/localtask-prune.ts +3 -3
- package/src/modules/localtask/actions/localtask-remove.ts +3 -3
- package/src/modules/localtask/actions/localtask-removeMany.ts +3 -3
- package/src/modules/localtask/actions/localtask-reopen.ts +6 -4
- package/src/modules/localtask/actions/localtask-reorder.ts +3 -3
- package/src/modules/localtask/actions/localtask-task-restore.ts +3 -3
- package/src/modules/localtask/actions/localtask-timegoalLog.ts +3 -3
- package/src/modules/localtask/actions/localtask-topic-add.ts +3 -3
- package/src/modules/localtask/actions/localtask-topic-remove.ts +3 -3
- package/src/modules/localtask/actions/localtask-topic-removeMany.ts +3 -3
- package/src/modules/localtask/actions/localtask-update.ts +3 -3
- package/src/modules/localtask/actions/localtask-wait.ts +3 -3
- package/src/modules/localtask/actions/task-move.ts +3 -3
- package/src/modules/repos/actions/board-add.ts +3 -3
- package/src/modules/repos/actions/board-assign.ts +3 -3
- package/src/modules/repos/actions/board-export.ts +3 -3
- package/src/modules/repos/actions/board-get.ts +3 -3
- package/src/modules/repos/actions/board-import.ts +9 -4
- package/src/modules/repos/actions/board-list.ts +3 -3
- package/src/modules/repos/actions/board-note.ts +3 -3
- package/src/modules/repos/actions/board-prefix.ts +3 -3
- package/src/modules/repos/actions/board-prune.ts +3 -3
- package/src/modules/repos/actions/board-rekey.ts +3 -3
- package/src/modules/repos/actions/board-remove.ts +3 -3
- package/src/modules/repos/actions/board-update.ts +3 -3
- package/src/modules/repos/actions/repo-add.ts +3 -3
- package/src/modules/repos/actions/repo-bind-topics.ts +3 -3
- package/src/modules/repos/actions/repo-bind.ts +3 -3
- package/src/modules/repos/actions/repo-clone.ts +3 -3
- package/src/modules/repos/actions/repo-detect.ts +3 -3
- package/src/modules/repos/actions/repo-doc-add.ts +3 -3
- package/src/modules/repos/actions/repo-doc-list.ts +3 -3
- package/src/modules/repos/actions/repo-doc-remove.ts +3 -3
- package/src/modules/repos/actions/repo-export.ts +3 -3
- package/src/modules/repos/actions/repo-get.ts +3 -3
- package/src/modules/repos/actions/repo-import-diff.ts +3 -3
- package/src/modules/repos/actions/repo-import.ts +3 -3
- package/src/modules/repos/actions/repo-key-migrate.ts +3 -3
- package/src/modules/repos/actions/repo-key-refresh.ts +3 -3
- package/src/modules/repos/actions/repo-key-set.ts +3 -3
- package/src/modules/repos/actions/repo-knowledge.ts +3 -3
- package/src/modules/repos/actions/repo-list.ts +3 -3
- package/src/modules/repos/actions/repo-open.ts +3 -3
- package/src/modules/repos/actions/repo-ref-add.ts +3 -3
- package/src/modules/repos/actions/repo-ref-backfill.ts +3 -3
- package/src/modules/repos/actions/repo-ref-check.ts +3 -3
- package/src/modules/repos/actions/repo-ref-clone.ts +3 -3
- package/src/modules/repos/actions/repo-ref-note.ts +3 -3
- package/src/modules/repos/actions/repo-ref-of.ts +3 -3
- package/src/modules/repos/actions/repo-ref-sync.ts +3 -3
- package/src/modules/repos/actions/repo-remote-check.ts +3 -3
- package/src/modules/repos/actions/repo-remote-list.ts +3 -3
- package/src/modules/repos/actions/repo-remote-pick.ts +3 -3
- package/src/modules/repos/actions/repo-remote.ts +3 -3
- package/src/modules/repos/actions/repo-remove.ts +3 -3
- package/src/modules/repos/actions/repo-scan.ts +3 -3
- package/src/modules/repos/actions/repo-update.ts +3 -3
- package/src/modules/setting/actions/setting-get.ts +3 -3
- package/src/modules/setting/actions/setting-set.ts +3 -3
- package/src/modules/system/actions/bootstrap.ts +3 -4
- package/src/modules/system/actions/health.ts +3 -4
- package/src/modules/system/actions/routes.ts +3 -4
- package/src/modules/system/schemas.ts +2 -1
- package/src/modules/tasktool/actions/timegoal-check.ts +3 -3
- package/src/modules/tasktool/actions/timegoal-clear.ts +3 -3
- package/src/modules/tasktool/actions/timegoal-list.ts +3 -3
- package/src/modules/tasktool/actions/timegoal-log.ts +3 -3
- package/src/modules/tasktool/actions/timegoal-prune.ts +3 -3
- package/src/modules/tasktool/actions/timegoal-set.ts +3 -3
- package/src/modules/tasktool/actions/timegoal-show.ts +3 -3
- package/src/modules/tasktool/actions/timegoal-update.ts +3 -3
- package/src/modules/templates/actions/templates-add.ts +3 -3
- package/src/modules/templates/actions/templates-default.ts +3 -3
- package/src/modules/templates/actions/templates-list.ts +3 -3
- package/src/modules/templates/actions/templates-remove.ts +3 -3
- package/src/modules/templates/actions/templates-update.ts +3 -3
- package/src/modules/todo/actions/group-add.ts +3 -3
- package/src/modules/todo/actions/group-current.ts +3 -3
- package/src/modules/todo/actions/group-get.ts +3 -3
- package/src/modules/todo/actions/group-list.ts +3 -3
- package/src/modules/todo/actions/group-members.ts +3 -3
- package/src/modules/todo/actions/group-remove.ts +3 -3
- package/src/modules/todo/actions/group-update.ts +3 -3
- package/src/modules/todo/actions/group-use.ts +3 -3
- package/src/modules/todo/actions/prompt-get.ts +3 -3
- package/src/modules/todo/actions/prompt-remove.ts +3 -3
- package/src/modules/todo/actions/prompt-set.ts +3 -3
- package/src/modules/todo/actions/todo-add.ts +3 -3
- package/src/modules/todo/actions/todo-archive.ts +3 -3
- package/src/modules/todo/actions/todo-attach.ts +3 -3
- package/src/modules/todo/actions/todo-attachments.ts +3 -3
- package/src/modules/todo/actions/todo-done.ts +3 -3
- package/src/modules/todo/actions/todo-freeze.ts +3 -3
- package/src/modules/todo/actions/todo-get.ts +3 -3
- package/src/modules/todo/actions/todo-list.ts +3 -3
- package/src/modules/todo/actions/todo-remove.ts +3 -3
- package/src/modules/todo/actions/todo-unfreeze.ts +3 -3
- package/src/modules/todo/actions/todo-update.ts +3 -3
- package/src/modules/todo/actions/topic-add.ts +3 -3
- package/src/modules/todo/actions/topic-list.ts +3 -3
- package/src/modules/todo/actions/topic-remove.ts +3 -3
- package/src/runtime/action-base.ts +41 -1
- package/src/runtime/action-decorator.ts +26 -11
- package/src/web/frontend/api/client.generated.ts +294 -294
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
//
|
|
3
3
|
// 契约常量在 ../schemas.ts(zod);本文件只做「声明 + 实现」,业务在服务层。
|
|
4
4
|
import { action } from '../../../runtime/action-decorator.js';
|
|
5
|
-
import { ActionBase } from '../../../runtime/action-base.js';
|
|
5
|
+
import { ActionBase, type ActionInput } from '../../../runtime/action-base.js';
|
|
6
6
|
import { docsLinkInput } from '../schemas.js';
|
|
7
7
|
import * as refsNs from '../refs.js';
|
|
8
8
|
import { renderLink as _renderLink } from '../render.js';
|
|
9
9
|
const refs: any = refsNs;
|
|
10
10
|
const renderLink: any = _renderLink;
|
|
11
11
|
|
|
12
|
-
export class DocsLinkAction extends ActionBase {
|
|
12
|
+
export class DocsLinkAction extends ActionBase<typeof docsLinkInput> {
|
|
13
13
|
@action({
|
|
14
14
|
id: 'docs.link',
|
|
15
15
|
cli: ['docs', 'link'],
|
|
@@ -19,7 +19,7 @@ export class DocsLinkAction extends ActionBase {
|
|
|
19
19
|
input: docsLinkInput,
|
|
20
20
|
render: renderLink,
|
|
21
21
|
})
|
|
22
|
-
async
|
|
22
|
+
override async run(ctx: ActionInput<this['_input']>) {
|
|
23
23
|
|
|
24
24
|
return refs.setDocLink(ctx);
|
|
25
25
|
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
//
|
|
3
3
|
// 契约常量在 ../schemas.ts(zod);本文件只做「声明 + 实现」,业务在服务层。
|
|
4
4
|
import { action } from '../../../runtime/action-decorator.js';
|
|
5
|
-
import { ActionBase } from '../../../runtime/action-base.js';
|
|
5
|
+
import { ActionBase, type ActionInput } from '../../../runtime/action-base.js';
|
|
6
6
|
import { docsNotebindInput } from '../schemas.js';
|
|
7
7
|
import * as refsNs from '../refs.js';
|
|
8
8
|
import { renderNoteRef as _renderNoteRef } from '../render.js';
|
|
9
9
|
const refs: any = refsNs;
|
|
10
10
|
const renderNoteRef: any = _renderNoteRef;
|
|
11
11
|
|
|
12
|
-
export class DocsNotebindAction extends ActionBase {
|
|
12
|
+
export class DocsNotebindAction extends ActionBase<typeof docsNotebindInput> {
|
|
13
13
|
@action({
|
|
14
14
|
id: 'docs.notebind',
|
|
15
15
|
cli: ['docs', 'note-bind'],
|
|
@@ -19,7 +19,7 @@ export class DocsNotebindAction extends ActionBase {
|
|
|
19
19
|
input: docsNotebindInput,
|
|
20
20
|
render: renderNoteRef,
|
|
21
21
|
})
|
|
22
|
-
async
|
|
22
|
+
override async run(ctx: ActionInput<this['_input']>) {
|
|
23
23
|
|
|
24
24
|
return refs.setNoteDocRef(ctx);
|
|
25
25
|
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
//
|
|
3
3
|
// 契约常量在 ../schemas.ts(zod);本文件只做「声明 + 实现」,业务在服务层。
|
|
4
4
|
import { action } from '../../../runtime/action-decorator.js';
|
|
5
|
-
import { ActionBase } from '../../../runtime/action-base.js';
|
|
5
|
+
import { ActionBase, type ActionInput } from '../../../runtime/action-base.js';
|
|
6
6
|
import { docsSeedInput } from '../schemas.js';
|
|
7
7
|
import * as seedNs from '../seed.js';
|
|
8
8
|
import { renderSeed as _renderSeed } from '../render.js';
|
|
9
9
|
const seed: any = seedNs;
|
|
10
10
|
const renderSeed: any = _renderSeed;
|
|
11
11
|
|
|
12
|
-
export class DocsSeedAction extends ActionBase {
|
|
12
|
+
export class DocsSeedAction extends ActionBase<typeof docsSeedInput> {
|
|
13
13
|
@action({
|
|
14
14
|
id: 'docs.seed',
|
|
15
15
|
cli: ['docs', 'seed'],
|
|
@@ -18,7 +18,7 @@ export class DocsSeedAction extends ActionBase {
|
|
|
18
18
|
input: docsSeedInput,
|
|
19
19
|
render: renderSeed,
|
|
20
20
|
})
|
|
21
|
-
async
|
|
21
|
+
override async run(ctx: ActionInput<this['_input']>) {
|
|
22
22
|
|
|
23
23
|
return (ctx.apply ? seed.seedApply() : seed.seedPlan());
|
|
24
24
|
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
//
|
|
3
3
|
// 契约常量在 ../schemas.ts(zod);本文件只做「声明 + 实现」,业务在服务层。
|
|
4
4
|
import { action } from '../../../runtime/action-decorator.js';
|
|
5
|
-
import { ActionBase } from '../../../runtime/action-base.js';
|
|
5
|
+
import { ActionBase, type ActionInput } from '../../../runtime/action-base.js';
|
|
6
6
|
import { fileContentInput } from '../schemas.js';
|
|
7
7
|
import * as serviceNs from '../service.js';
|
|
8
8
|
const service: any = serviceNs;
|
|
9
9
|
|
|
10
|
-
export class FileContentAction extends ActionBase {
|
|
10
|
+
export class FileContentAction extends ActionBase<typeof fileContentInput> {
|
|
11
11
|
@action({
|
|
12
12
|
id: 'file.content',
|
|
13
13
|
cli: ['file', 'content'],
|
|
@@ -18,11 +18,13 @@ export class FileContentAction extends ActionBase {
|
|
|
18
18
|
render: (d: any) => service.renderContent(d),
|
|
19
19
|
stream: true,
|
|
20
20
|
})
|
|
21
|
-
async
|
|
21
|
+
override async run(ctx: ActionInput<this['_input']>) {
|
|
22
|
+
// stream:req/res/url 由 ApiRouter 在 zod parse 之后塞进 input.__raw
|
|
23
|
+
//(运行时注入,不在公共契约 schema 里——这里做局部展开让 __raw 可见)
|
|
24
|
+
const raw = ctx as typeof ctx & { __raw?: unknown };
|
|
25
|
+
return (raw.__raw
|
|
26
|
+
? service.serveContent(raw)
|
|
27
|
+
: service.getFileAction(ctx.fileId, { group: ctx.group }));
|
|
22
28
|
|
|
23
|
-
return (ctx.__raw
|
|
24
|
-
? service.serveContent(ctx)
|
|
25
|
-
: service.getFileAction(ctx.fileId, { group: ctx.group }));
|
|
26
|
-
|
|
27
29
|
}
|
|
28
30
|
}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
//
|
|
3
3
|
// 契约常量在 ../schemas.ts(zod);本文件只做「声明 + 实现」,业务在服务层。
|
|
4
4
|
import { action } from '../../../runtime/action-decorator.js';
|
|
5
|
-
import { ActionBase } from '../../../runtime/action-base.js';
|
|
5
|
+
import { ActionBase, type ActionInput } from '../../../runtime/action-base.js';
|
|
6
6
|
import { fileGetInput } from '../schemas.js';
|
|
7
7
|
import * as serviceNs from '../service.js';
|
|
8
8
|
const service: any = serviceNs;
|
|
9
9
|
|
|
10
|
-
export class FileGetAction extends ActionBase {
|
|
10
|
+
export class FileGetAction extends ActionBase<typeof fileGetInput> {
|
|
11
11
|
@action({
|
|
12
12
|
id: 'file.get',
|
|
13
13
|
cli: ['file', 'get'],
|
|
@@ -17,7 +17,7 @@ export class FileGetAction extends ActionBase {
|
|
|
17
17
|
input: fileGetInput,
|
|
18
18
|
render: (d: any) => service.renderFileInfo(d),
|
|
19
19
|
})
|
|
20
|
-
async
|
|
20
|
+
override async run(ctx: ActionInput<this['_input']>) {
|
|
21
21
|
|
|
22
22
|
return service.getFileAction(ctx.fileId, { group: ctx.group });
|
|
23
23
|
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
//
|
|
3
3
|
// 契约常量在 ../schemas.ts(zod);本文件只做「声明 + 实现」,业务在服务层。
|
|
4
4
|
import { action } from '../../../runtime/action-decorator.js';
|
|
5
|
-
import { ActionBase } from '../../../runtime/action-base.js';
|
|
5
|
+
import { ActionBase, type ActionInput } from '../../../runtime/action-base.js';
|
|
6
6
|
import { fileListInput } from '../schemas.js';
|
|
7
7
|
import * as serviceNs from '../service.js';
|
|
8
8
|
const service: any = serviceNs;
|
|
9
9
|
|
|
10
|
-
export class FileListAction extends ActionBase {
|
|
10
|
+
export class FileListAction extends ActionBase<typeof fileListInput> {
|
|
11
11
|
@action({
|
|
12
12
|
id: 'file.list',
|
|
13
13
|
cli: ['file', 'list'],
|
|
@@ -16,7 +16,7 @@ export class FileListAction extends ActionBase {
|
|
|
16
16
|
input: fileListInput,
|
|
17
17
|
render: (d: any) => service.renderFileList(d),
|
|
18
18
|
})
|
|
19
|
-
async
|
|
19
|
+
override async run(ctx: ActionInput<this['_input']>) {
|
|
20
20
|
|
|
21
21
|
return service.listFilesAction(ctx);
|
|
22
22
|
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
//
|
|
3
3
|
// 契约常量在 ../schemas.ts(zod);本文件只做「声明 + 实现」,业务在服务层。
|
|
4
4
|
import { action } from '../../../runtime/action-decorator.js';
|
|
5
|
-
import { ActionBase } from '../../../runtime/action-base.js';
|
|
5
|
+
import { ActionBase, type ActionInput } from '../../../runtime/action-base.js';
|
|
6
6
|
import { fileOrphansInput } from '../schemas.js';
|
|
7
7
|
import * as serviceNs from '../service.js';
|
|
8
8
|
const service: any = serviceNs;
|
|
9
9
|
|
|
10
|
-
export class FileOrphansAction extends ActionBase {
|
|
10
|
+
export class FileOrphansAction extends ActionBase<typeof fileOrphansInput> {
|
|
11
11
|
@action({
|
|
12
12
|
id: 'file.orphans',
|
|
13
13
|
cli: ['file', 'orphans'],
|
|
@@ -16,7 +16,7 @@ export class FileOrphansAction extends ActionBase {
|
|
|
16
16
|
input: fileOrphansInput,
|
|
17
17
|
render: (d: any) => service.renderOrphans(d),
|
|
18
18
|
})
|
|
19
|
-
async
|
|
19
|
+
override async run(_ctx: ActionInput<this['_input']>) {
|
|
20
20
|
|
|
21
21
|
return service.listOrphanAttachmentsAction();
|
|
22
22
|
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
//
|
|
3
3
|
// 契约常量在 ../schemas.ts(zod);本文件只做「声明 + 实现」,业务在服务层。
|
|
4
4
|
import { action } from '../../../runtime/action-decorator.js';
|
|
5
|
-
import { ActionBase } from '../../../runtime/action-base.js';
|
|
5
|
+
import { ActionBase, type ActionInput } from '../../../runtime/action-base.js';
|
|
6
6
|
import { filePruneInput } from '../schemas.js';
|
|
7
7
|
import * as serviceNs from '../service.js';
|
|
8
8
|
const service: any = serviceNs;
|
|
9
9
|
|
|
10
|
-
export class FilePruneAction extends ActionBase {
|
|
10
|
+
export class FilePruneAction extends ActionBase<typeof filePruneInput> {
|
|
11
11
|
@action({
|
|
12
12
|
id: 'file.prune',
|
|
13
13
|
cli: ['file', 'prune'],
|
|
@@ -16,7 +16,7 @@ export class FilePruneAction extends ActionBase {
|
|
|
16
16
|
input: filePruneInput,
|
|
17
17
|
render: (d: any) => service.renderPrune(d),
|
|
18
18
|
})
|
|
19
|
-
async
|
|
19
|
+
override async run(ctx: ActionInput<this['_input']>) {
|
|
20
20
|
|
|
21
21
|
return service.pruneOrphanAttachmentsAction({ dryRun: (ctx.dryRun ?? ctx['dry-run']) === true });
|
|
22
22
|
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
//
|
|
3
3
|
// 契约常量在 ../schemas.ts(zod);本文件只做「声明 + 实现」,业务在服务层。
|
|
4
4
|
import { action } from '../../../runtime/action-decorator.js';
|
|
5
|
-
import { ActionBase } from '../../../runtime/action-base.js';
|
|
5
|
+
import { ActionBase, type ActionInput } from '../../../runtime/action-base.js';
|
|
6
6
|
import { fileRemoveInput } from '../schemas.js';
|
|
7
7
|
import * as serviceNs from '../service.js';
|
|
8
8
|
const service: any = serviceNs;
|
|
9
9
|
|
|
10
|
-
export class FileRemoveAction extends ActionBase {
|
|
10
|
+
export class FileRemoveAction extends ActionBase<typeof fileRemoveInput> {
|
|
11
11
|
@action({
|
|
12
12
|
id: 'file.remove',
|
|
13
13
|
cli: ['file', 'remove'],
|
|
@@ -17,7 +17,7 @@ export class FileRemoveAction extends ActionBase {
|
|
|
17
17
|
input: fileRemoveInput,
|
|
18
18
|
render: (d: any) => service.renderRemove(d),
|
|
19
19
|
})
|
|
20
|
-
async
|
|
20
|
+
override async run(ctx: ActionInput<this['_input']>) {
|
|
21
21
|
|
|
22
22
|
return service.removeFileAction(ctx.fileId, { group: ctx.group });
|
|
23
23
|
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
//
|
|
3
3
|
// 契约常量在 ../schemas.ts(zod);本文件只做「声明 + 实现」,业务在服务层。
|
|
4
4
|
import { action } from '../../../runtime/action-decorator.js';
|
|
5
|
-
import { ActionBase } from '../../../runtime/action-base.js';
|
|
5
|
+
import { ActionBase, type ActionInput } from '../../../runtime/action-base.js';
|
|
6
6
|
import { fileSyncInput } from '../schemas.js';
|
|
7
7
|
import * as serviceNs from '../service.js';
|
|
8
8
|
const service: any = serviceNs;
|
|
9
9
|
|
|
10
|
-
export class FileSyncAction extends ActionBase {
|
|
10
|
+
export class FileSyncAction extends ActionBase<typeof fileSyncInput> {
|
|
11
11
|
@action({
|
|
12
12
|
id: 'file.sync',
|
|
13
13
|
cli: ['file', 'sync'],
|
|
@@ -16,7 +16,7 @@ export class FileSyncAction extends ActionBase {
|
|
|
16
16
|
input: fileSyncInput,
|
|
17
17
|
render: (d: any) => service.renderSync(d),
|
|
18
18
|
})
|
|
19
|
-
async
|
|
19
|
+
override async run(ctx: ActionInput<this['_input']>) {
|
|
20
20
|
|
|
21
21
|
return service.syncFilesAction(ctx);
|
|
22
22
|
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
//
|
|
3
3
|
// 契约常量在 ../schemas.ts(zod);本文件只做「声明 + 实现」,业务在服务层。
|
|
4
4
|
import { action } from '../../../runtime/action-decorator.js';
|
|
5
|
-
import { ActionBase } from '../../../runtime/action-base.js';
|
|
5
|
+
import { ActionBase, type ActionInput } from '../../../runtime/action-base.js';
|
|
6
6
|
import { fileUploadInput } from '../schemas.js';
|
|
7
7
|
import * as serviceNs from '../service.js';
|
|
8
8
|
const service: any = serviceNs;
|
|
9
9
|
|
|
10
|
-
export class FileUploadAction extends ActionBase {
|
|
10
|
+
export class FileUploadAction extends ActionBase<typeof fileUploadInput> {
|
|
11
11
|
@action({
|
|
12
12
|
id: 'file.upload',
|
|
13
13
|
cli: ['file', 'upload'],
|
|
@@ -16,7 +16,7 @@ export class FileUploadAction extends ActionBase {
|
|
|
16
16
|
input: fileUploadInput,
|
|
17
17
|
render: (d: any) => service.renderUpload(d),
|
|
18
18
|
})
|
|
19
|
-
async
|
|
19
|
+
override async run(ctx: ActionInput<this['_input']>) {
|
|
20
20
|
|
|
21
21
|
return service.uploadFileAction(ctx);
|
|
22
22
|
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
//
|
|
3
3
|
// 契约常量在 ../schemas.ts(zod);本文件只做「声明 + 实现」,业务在服务层。
|
|
4
4
|
import { action } from '../../../runtime/action-decorator.js';
|
|
5
|
-
import { ActionBase } from '../../../runtime/action-base.js';
|
|
5
|
+
import { ActionBase, type ActionInput } from '../../../runtime/action-base.js';
|
|
6
6
|
import { localtaskAddInput } from '../schemas.js';
|
|
7
7
|
import { renderAdd as _renderAdd } from '../action-render.js';
|
|
8
8
|
const renderAdd: any = _renderAdd;
|
|
9
9
|
|
|
10
|
-
export class LocaltaskAddAction extends ActionBase {
|
|
10
|
+
export class LocaltaskAddAction extends ActionBase<typeof localtaskAddInput> {
|
|
11
11
|
@action({
|
|
12
12
|
id: 'localtask.add',
|
|
13
13
|
cli: ['localtask', 'add'],
|
|
@@ -17,7 +17,7 @@ export class LocaltaskAddAction extends ActionBase {
|
|
|
17
17
|
input: localtaskAddInput,
|
|
18
18
|
render: renderAdd,
|
|
19
19
|
})
|
|
20
|
-
async
|
|
20
|
+
override async run(ctx: ActionInput<this['_input']>) {
|
|
21
21
|
|
|
22
22
|
// 派任务编排已迁 tasktool/add.js(任务工具语义归 tasktool;命令名不变)。
|
|
23
23
|
// 落点判定(--board/--project 严格口径 / 正文 frontmatter fail-open)只此一份实现,
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
//
|
|
3
3
|
// 契约常量在 ../schemas.ts(zod);本文件只做「声明 + 实现」,业务在服务层。
|
|
4
4
|
import { action } from '../../../runtime/action-decorator.js';
|
|
5
|
-
import { ActionBase } from '../../../runtime/action-base.js';
|
|
5
|
+
import { ActionBase, type ActionInput } from '../../../runtime/action-base.js';
|
|
6
6
|
import { localtaskAttachNoteInput } from '../schemas.js';
|
|
7
7
|
|
|
8
|
-
export class LocaltaskAttachNoteAction extends ActionBase {
|
|
8
|
+
export class LocaltaskAttachNoteAction extends ActionBase<typeof localtaskAttachNoteInput> {
|
|
9
9
|
@action({
|
|
10
10
|
id: 'localtask.attach-note',
|
|
11
11
|
cli: ['localtask', 'attach-note'],
|
|
@@ -14,7 +14,7 @@ export class LocaltaskAttachNoteAction extends ActionBase {
|
|
|
14
14
|
input: localtaskAttachNoteInput,
|
|
15
15
|
render: (d: any) => `已更新 ${d.attachment} 的说明:${d.note || '(清空)'}`,
|
|
16
16
|
})
|
|
17
|
-
async
|
|
17
|
+
override async run(ctx: ActionInput<this['_input']>) {
|
|
18
18
|
|
|
19
19
|
const { noteTaskAttachment } = await (import('../../tasktool/attach.js') as any);
|
|
20
20
|
return noteTaskAttachment({
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
//
|
|
3
3
|
// 契约常量在 ../schemas.ts(zod);本文件只做「声明 + 实现」,业务在服务层。
|
|
4
4
|
import { action } from '../../../runtime/action-decorator.js';
|
|
5
|
-
import { ActionBase } from '../../../runtime/action-base.js';
|
|
5
|
+
import { ActionBase, type ActionInput } from '../../../runtime/action-base.js';
|
|
6
6
|
import { localtaskAttachInput } from '../schemas.js';
|
|
7
7
|
|
|
8
|
-
export class LocaltaskAttachAction extends ActionBase {
|
|
8
|
+
export class LocaltaskAttachAction extends ActionBase<typeof localtaskAttachInput> {
|
|
9
9
|
@action({
|
|
10
10
|
id: 'localtask.attach',
|
|
11
11
|
cli: ['localtask', 'attach'],
|
|
@@ -15,7 +15,7 @@ export class LocaltaskAttachAction extends ActionBase {
|
|
|
15
15
|
render: (d: any) =>
|
|
16
16
|
`已附加 ${d.fileId}(${d.kind === 'image' ? '图片' : d.kind === 'url' ? '链接' : d.kind === 'task' ? '任务' : d.kind === 'ref' ? '文档' : '文件'})到主题「${d.name}」#${d.task.id} · ${d.role === 'doc' ? '文档资料(交付进原文)' : d.area === 'area' ? '附件区(未写正文)' : '正文内嵌'}${d.markdown ? `\n嵌入: ${d.markdown}` : ''}`,
|
|
17
17
|
})
|
|
18
|
-
async
|
|
18
|
+
override async run(ctx: ActionInput<this['_input']>) {
|
|
19
19
|
|
|
20
20
|
const { attachToTask } = await (import('../../tasktool/attach.js') as any);
|
|
21
21
|
return attachToTask({
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
//
|
|
3
3
|
// 契约常量在 ../schemas.ts(zod);本文件只做「声明 + 实现」,业务在服务层。
|
|
4
4
|
import { action } from '../../../runtime/action-decorator.js';
|
|
5
|
-
import { ActionBase } from '../../../runtime/action-base.js';
|
|
5
|
+
import { ActionBase, type ActionInput } from '../../../runtime/action-base.js';
|
|
6
6
|
import { localtaskAttachmentsInput } from '../schemas.js';
|
|
7
7
|
import { renderTaskAttachments as _renderTaskAttachments } from '../action-render.js';
|
|
8
8
|
const renderTaskAttachments: any = _renderTaskAttachments;
|
|
9
9
|
|
|
10
|
-
export class LocaltaskAttachmentsAction extends ActionBase {
|
|
10
|
+
export class LocaltaskAttachmentsAction extends ActionBase<typeof localtaskAttachmentsInput> {
|
|
11
11
|
@action({
|
|
12
12
|
id: 'localtask.attachments',
|
|
13
13
|
cli: ['localtask', 'attachments'],
|
|
@@ -16,7 +16,7 @@ export class LocaltaskAttachmentsAction extends ActionBase {
|
|
|
16
16
|
input: localtaskAttachmentsInput,
|
|
17
17
|
render: renderTaskAttachments,
|
|
18
18
|
})
|
|
19
|
-
async
|
|
19
|
+
override async run(ctx: ActionInput<this['_input']>) {
|
|
20
20
|
|
|
21
21
|
const { listTaskAttachments } = await (import('../../tasktool/attach.js') as any);
|
|
22
22
|
return listTaskAttachments({ id: ctx.id, cwd: ctx.cwd, key: ctx.key });
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
//
|
|
3
3
|
// 契约常量在 ../schemas.ts(zod);本文件只做「声明 + 实现」,业务在服务层。
|
|
4
4
|
import { action } from '../../../runtime/action-decorator.js';
|
|
5
|
-
import { ActionBase } from '../../../runtime/action-base.js';
|
|
5
|
+
import { ActionBase, type ActionInput } from '../../../runtime/action-base.js';
|
|
6
6
|
import { localtaskCancelInput } from '../schemas.js';
|
|
7
7
|
import * as serviceNs from '../service.js';
|
|
8
8
|
import { renderCancel as _renderCancel } from '../action-render.js';
|
|
9
9
|
const service: any = serviceNs;
|
|
10
10
|
const renderCancel: any = _renderCancel;
|
|
11
11
|
|
|
12
|
-
export class LocaltaskCancelAction extends ActionBase {
|
|
12
|
+
export class LocaltaskCancelAction extends ActionBase<typeof localtaskCancelInput> {
|
|
13
13
|
@action({
|
|
14
14
|
id: 'localtask.cancel',
|
|
15
15
|
cli: ['localtask', 'cancel'],
|
|
@@ -18,7 +18,7 @@ export class LocaltaskCancelAction extends ActionBase {
|
|
|
18
18
|
input: localtaskCancelInput,
|
|
19
19
|
render: renderCancel,
|
|
20
20
|
})
|
|
21
|
-
async
|
|
21
|
+
override async run(ctx: ActionInput<this['_input']>) {
|
|
22
22
|
|
|
23
23
|
return service.cancelWait({ cwd: ctx.cwd, key: ctx.key });
|
|
24
24
|
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
//
|
|
3
3
|
// 契约常量在 ../schemas.ts(zod);本文件只做「声明 + 实现」,业务在服务层。
|
|
4
4
|
import { action } from '../../../runtime/action-decorator.js';
|
|
5
|
-
import { ActionBase } from '../../../runtime/action-base.js';
|
|
5
|
+
import { ActionBase, type ActionInput } from '../../../runtime/action-base.js';
|
|
6
6
|
import { localtaskCancelManyInput } from '../schemas.js';
|
|
7
7
|
import * as serviceNs from '../service.js';
|
|
8
8
|
const service: any = serviceNs;
|
|
9
9
|
|
|
10
|
-
export class LocaltaskCancelManyAction extends ActionBase {
|
|
10
|
+
export class LocaltaskCancelManyAction extends ActionBase<typeof localtaskCancelManyInput> {
|
|
11
11
|
@action({
|
|
12
12
|
id: 'localtask.cancelMany',
|
|
13
13
|
cli: ['localtask', 'cancel-many'],
|
|
@@ -26,7 +26,7 @@ export class LocaltaskCancelManyAction extends ActionBase {
|
|
|
26
26
|
return head + skip + miss;
|
|
27
27
|
},
|
|
28
28
|
})
|
|
29
|
-
async
|
|
29
|
+
override async run(ctx: ActionInput<this['_input']>) {
|
|
30
30
|
|
|
31
31
|
return service.cancelTasks({ ids: ctx.ids, cwd: ctx.cwd, key: ctx.key });
|
|
32
32
|
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
//
|
|
3
3
|
// 契约常量在 ../schemas.ts(zod);本文件只做「声明 + 实现」,业务在服务层。
|
|
4
4
|
import { action } from '../../../runtime/action-decorator.js';
|
|
5
|
-
import { ActionBase } from '../../../runtime/action-base.js';
|
|
5
|
+
import { ActionBase, type ActionInput } from '../../../runtime/action-base.js';
|
|
6
6
|
import { localtaskChainInput } from '../schemas.js';
|
|
7
7
|
import * as serviceNs from '../service.js';
|
|
8
8
|
import { renderChain as _renderChain } from '../action-render.js';
|
|
9
9
|
const service: any = serviceNs;
|
|
10
10
|
const renderChain: any = _renderChain;
|
|
11
11
|
|
|
12
|
-
export class LocaltaskChainAction extends ActionBase {
|
|
12
|
+
export class LocaltaskChainAction extends ActionBase<typeof localtaskChainInput> {
|
|
13
13
|
@action({
|
|
14
14
|
id: 'localtask.chain',
|
|
15
15
|
cli: ['localtask', 'chain'],
|
|
@@ -18,7 +18,7 @@ export class LocaltaskChainAction extends ActionBase {
|
|
|
18
18
|
input: localtaskChainInput,
|
|
19
19
|
render: renderChain,
|
|
20
20
|
})
|
|
21
|
-
async
|
|
21
|
+
override async run(ctx: ActionInput<this['_input']>) {
|
|
22
22
|
|
|
23
23
|
return service.taskChain({ id: ctx.id, cwd: ctx.cwd, key: ctx.key });
|
|
24
24
|
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
//
|
|
3
3
|
// 契约常量在 ../schemas.ts(zod);本文件只做「声明 + 实现」,业务在服务层。
|
|
4
4
|
import { action } from '../../../runtime/action-decorator.js';
|
|
5
|
-
import { ActionBase } from '../../../runtime/action-base.js';
|
|
5
|
+
import { ActionBase, type ActionInput, type ActionRunMeta } from '../../../runtime/action-base.js';
|
|
6
6
|
import { localtaskClaimInput } from '../schemas.js';
|
|
7
7
|
import { renderWait as _renderWait } from '../action-render.js';
|
|
8
8
|
const renderWait: any = _renderWait;
|
|
9
9
|
|
|
10
|
-
export class LocaltaskClaimAction extends ActionBase {
|
|
10
|
+
export class LocaltaskClaimAction extends ActionBase<typeof localtaskClaimInput> {
|
|
11
11
|
@action({
|
|
12
12
|
id: 'localtask.claim',
|
|
13
13
|
cli: ['localtask', 'get'],
|
|
@@ -16,7 +16,7 @@ export class LocaltaskClaimAction extends ActionBase {
|
|
|
16
16
|
input: localtaskClaimInput,
|
|
17
17
|
render: renderWait,
|
|
18
18
|
})
|
|
19
|
-
async
|
|
19
|
+
override async run(ctx: ActionInput<this['_input']>, meta: ActionRunMeta = {}) {
|
|
20
20
|
|
|
21
21
|
const { getTask } = await (import('../../tasktool/get.js') as any);
|
|
22
22
|
const { parseParams } = await (import('../../tasktool/params.js') as any);
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
//
|
|
3
3
|
// 契约常量在 ../schemas.ts(zod);本文件只做「声明 + 实现」,业务在服务层。
|
|
4
4
|
import { action } from '../../../runtime/action-decorator.js';
|
|
5
|
-
import { ActionBase } from '../../../runtime/action-base.js';
|
|
5
|
+
import { ActionBase, type ActionInput } from '../../../runtime/action-base.js';
|
|
6
6
|
import { localtaskCloneInput } from '../schemas.js';
|
|
7
7
|
import * as serviceNs from '../service.js';
|
|
8
8
|
const service: any = serviceNs;
|
|
9
9
|
|
|
10
|
-
export class LocaltaskCloneAction extends ActionBase {
|
|
10
|
+
export class LocaltaskCloneAction extends ActionBase<typeof localtaskCloneInput> {
|
|
11
11
|
@action({
|
|
12
12
|
id: 'localtask.clone',
|
|
13
13
|
cli: ['localtask', 'clone'],
|
|
@@ -17,7 +17,7 @@ export class LocaltaskCloneAction extends ActionBase {
|
|
|
17
17
|
render: (d: any) =>
|
|
18
18
|
`已克隆 #${d.from.id} → #${d.task.id} @ ${d.name}(内容复制,无派生链;${d.delivered ? '已实时投递' : '待领取'})`,
|
|
19
19
|
})
|
|
20
|
-
async
|
|
20
|
+
override async run(ctx: ActionInput<this['_input']>) {
|
|
21
21
|
|
|
22
22
|
return service.cloneTask({ id: ctx.id, cwd: ctx.cwd, key: ctx.key });
|
|
23
23
|
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
//
|
|
3
3
|
// 契约常量在 ../schemas.ts(zod);本文件只做「声明 + 实现」,业务在服务层。
|
|
4
4
|
import { action } from '../../../runtime/action-decorator.js';
|
|
5
|
-
import { ActionBase } from '../../../runtime/action-base.js';
|
|
5
|
+
import { ActionBase, type ActionInput } from '../../../runtime/action-base.js';
|
|
6
6
|
import { localtaskCloseManyInput } from '../schemas.js';
|
|
7
7
|
import * as serviceNs from '../service.js';
|
|
8
8
|
const service: any = serviceNs;
|
|
9
9
|
|
|
10
|
-
export class LocaltaskCloseManyAction extends ActionBase {
|
|
10
|
+
export class LocaltaskCloseManyAction extends ActionBase<typeof localtaskCloseManyInput> {
|
|
11
11
|
@action({
|
|
12
12
|
id: 'localtask.closeMany',
|
|
13
13
|
cli: ['localtask', 'close-many'],
|
|
@@ -27,7 +27,7 @@ export class LocaltaskCloseManyAction extends ActionBase {
|
|
|
27
27
|
return head + skip + miss;
|
|
28
28
|
},
|
|
29
29
|
})
|
|
30
|
-
async
|
|
30
|
+
override async run(ctx: ActionInput<this['_input']>) {
|
|
31
31
|
|
|
32
32
|
return service.closeTasks({
|
|
33
33
|
ids: ctx.ids,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
//
|
|
3
3
|
// 契约常量在 ../schemas.ts(zod);本文件只做「声明 + 实现」,业务在服务层。
|
|
4
4
|
import { action } from '../../../runtime/action-decorator.js';
|
|
5
|
-
import { ActionBase } from '../../../runtime/action-base.js';
|
|
5
|
+
import { ActionBase, type ActionInput } from '../../../runtime/action-base.js';
|
|
6
6
|
import { localtaskConfigInput } from '../schemas.js';
|
|
7
7
|
import * as serviceNs from '../service.js';
|
|
8
8
|
import { BLOCK_DEFS as _BLOCK_DEFS, resolveBlockTemplates as _resolveBlockTemplates } from '../../../shared/prompt-blocks.js';
|
|
@@ -12,7 +12,7 @@ const BLOCK_DEFS: any = _BLOCK_DEFS;
|
|
|
12
12
|
const resolveBlockTemplates: any = _resolveBlockTemplates;
|
|
13
13
|
const badInput: any = _badInput;
|
|
14
14
|
|
|
15
|
-
export class LocaltaskConfigAction extends ActionBase {
|
|
15
|
+
export class LocaltaskConfigAction extends ActionBase<typeof localtaskConfigInput> {
|
|
16
16
|
@action({
|
|
17
17
|
id: 'localtask.config',
|
|
18
18
|
cli: ['localtask', 'config'],
|
|
@@ -27,7 +27,7 @@ export class LocaltaskConfigAction extends ActionBase {
|
|
|
27
27
|
return `已配置等待超时 ${s.timeoutSec} 秒(推荐 ${s.recommendedSec},最大 ${s.maxSec})· ${ack} · 追加模式:${mode} · 区块模板:${blocks}`;
|
|
28
28
|
},
|
|
29
29
|
})
|
|
30
|
-
async
|
|
30
|
+
override async run(ctx: ActionInput<this['_input']>) {
|
|
31
31
|
|
|
32
32
|
const patch: any = { timeoutSec: ctx.timeout };
|
|
33
33
|
if (ctx.ack !== undefined) patch.ackPrompt = ctx.ack;
|
|
@@ -44,10 +44,10 @@ export class LocaltaskConfigAction extends ActionBase {
|
|
|
44
44
|
if (attachTpl !== undefined) patch.attachTemplate = attachTpl;
|
|
45
45
|
if (ctx['reset-attach-template']) patch.attachTemplate = '';
|
|
46
46
|
// 系统上下文追加模式(全局)
|
|
47
|
-
const appendMode: any = ctx
|
|
47
|
+
const appendMode: any = ctx['append-mode'];
|
|
48
48
|
if (appendMode !== undefined) patch.appendMode = appendMode;
|
|
49
49
|
// 每区块模板列表(设置面板「提示词模板」模块):支持 JSON 字符串 / HTTP body 对象
|
|
50
|
-
let blockTemplates: any = ctx
|
|
50
|
+
let blockTemplates: any = ctx['block-templates'];
|
|
51
51
|
if (typeof blockTemplates === 'string') {
|
|
52
52
|
try {
|
|
53
53
|
blockTemplates = JSON.parse(blockTemplates);
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
//
|
|
3
3
|
// 契约常量在 ../schemas.ts(zod);本文件只做「声明 + 实现」,业务在服务层。
|
|
4
4
|
import { action } from '../../../runtime/action-decorator.js';
|
|
5
|
-
import { ActionBase } from '../../../runtime/action-base.js';
|
|
5
|
+
import { ActionBase, type ActionInput } from '../../../runtime/action-base.js';
|
|
6
6
|
import { localtaskDetachInput } from '../schemas.js';
|
|
7
7
|
import { renderDetach as _renderDetach } from '../action-render.js';
|
|
8
8
|
const renderDetach: any = _renderDetach;
|
|
9
9
|
|
|
10
|
-
export class LocaltaskDetachAction extends ActionBase {
|
|
10
|
+
export class LocaltaskDetachAction extends ActionBase<typeof localtaskDetachInput> {
|
|
11
11
|
@action({
|
|
12
12
|
id: 'localtask.detach',
|
|
13
13
|
cli: ['localtask', 'detach'],
|
|
@@ -16,7 +16,7 @@ export class LocaltaskDetachAction extends ActionBase {
|
|
|
16
16
|
input: localtaskDetachInput,
|
|
17
17
|
render: renderDetach,
|
|
18
18
|
})
|
|
19
|
-
async
|
|
19
|
+
override async run(ctx: ActionInput<this['_input']>) {
|
|
20
20
|
|
|
21
21
|
const { detachTaskAttachment } = await (import('../../tasktool/attach.js') as any);
|
|
22
22
|
return detachTaskAttachment({
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
//
|
|
3
3
|
// 契约常量在 ../schemas.ts(zod);本文件只做「声明 + 实现」,业务在服务层。
|
|
4
4
|
import { action } from '../../../runtime/action-decorator.js';
|
|
5
|
-
import { ActionBase } from '../../../runtime/action-base.js';
|
|
5
|
+
import { ActionBase, type ActionInput } from '../../../runtime/action-base.js';
|
|
6
6
|
import { localtaskDoneInput } from '../schemas.js';
|
|
7
7
|
import * as serviceNs from '../service.js';
|
|
8
8
|
const service: any = serviceNs;
|
|
9
9
|
|
|
10
|
-
export class LocaltaskDoneAction extends ActionBase {
|
|
10
|
+
export class LocaltaskDoneAction extends ActionBase<typeof localtaskDoneInput> {
|
|
11
11
|
@action({
|
|
12
12
|
id: 'localtask.done',
|
|
13
13
|
cli: ['localtask', 'done'],
|
|
@@ -28,7 +28,7 @@ export class LocaltaskDoneAction extends ActionBase {
|
|
|
28
28
|
return `已标记完成: #${d.id} @ ${d.name}(${d.completedAt})${goal}`;
|
|
29
29
|
},
|
|
30
30
|
})
|
|
31
|
-
async
|
|
31
|
+
override async run(ctx: ActionInput<this['_input']>) {
|
|
32
32
|
|
|
33
33
|
return service.completeTask({ id: ctx.id, cwd: ctx.cwd, key: ctx.key, summary: ctx.summary });
|
|
34
34
|
|