@perrylink/dsh-ticktick 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/CHANGELOG.md +24 -0
- package/LICENSE +201 -0
- package/README.es.md +41 -0
- package/README.hi.md +33 -0
- package/README.md +111 -0
- package/README.pt.md +41 -0
- package/README.zh.md +111 -0
- package/cordis.patch.yml +35 -0
- package/lib/client.js +6233 -0
- package/lib/client.js.map +1 -0
- package/lib/index.js +1349 -0
- package/lib/typert.host.js +26 -0
- package/lib/types/client/TicktickAction.d.ts +29 -0
- package/lib/types/client/TicktickAction.d.ts.map +1 -0
- package/lib/types/client/TicktickSettingsCard.d.ts +27 -0
- package/lib/types/client/TicktickSettingsCard.d.ts.map +1 -0
- package/lib/types/client/api.d.ts +34 -0
- package/lib/types/client/api.d.ts.map +1 -0
- package/lib/types/client/dates.d.ts +26 -0
- package/lib/types/client/dates.d.ts.map +1 -0
- package/lib/types/client/index.d.ts +34 -0
- package/lib/types/client/index.d.ts.map +1 -0
- package/lib/types/client/locales.d.ts +61 -0
- package/lib/types/client/locales.d.ts.map +1 -0
- package/lib/types/client/order.d.ts +25 -0
- package/lib/types/client/order.d.ts.map +1 -0
- package/lib/types/client/remote.d.ts +260 -0
- package/lib/types/client/remote.d.ts.map +1 -0
- package/lib/types/client/styles.d.ts +13 -0
- package/lib/types/client/styles.d.ts.map +1 -0
- package/lib/types/config.d.ts +64 -0
- package/lib/types/config.d.ts.map +1 -0
- package/lib/types/domain.d.ts +70 -0
- package/lib/types/domain.d.ts.map +1 -0
- package/lib/types/index.d.ts +56 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/mcp.d.ts +94 -0
- package/lib/types/mcp.d.ts.map +1 -0
- package/lib/types/service.d.ts +160 -0
- package/lib/types/service.d.ts.map +1 -0
- package/lib/types/tools.d.ts +18 -0
- package/lib/types/tools.d.ts.map +1 -0
- package/lib/types/typert.host.d.ts +216 -0
- package/lib/types/typert.host.d.ts.map +1 -0
- package/lib/types/wire.d.ts +561 -0
- package/lib/types/wire.d.ts.map +1 -0
- package/lib/wire-C-vDxxnC.js +5288 -0
- package/package.json +187 -0
- package/probes/lib.mjs +65 -0
- package/probes/probe-bootstrap.mjs +10 -0
- package/probes/probe-crud.mjs +15 -0
- package/probes/probe-due.mjs +28 -0
- package/probes/probe-queries.mjs +18 -0
- package/probes/probe-reorder.mjs +24 -0
- package/src/client/TicktickAction.tsx +356 -0
- package/src/client/TicktickSettingsCard.tsx +182 -0
- package/src/client/api.ts +56 -0
- package/src/client/dates.ts +61 -0
- package/src/client/index.ts +119 -0
- package/src/client/locales.ts +113 -0
- package/src/client/order.ts +37 -0
- package/src/client/remote.ts +76 -0
- package/src/client/styles.ts +48 -0
- package/src/config.ts +136 -0
- package/src/domain.ts +224 -0
- package/src/index.ts +139 -0
- package/src/mcp.ts +213 -0
- package/src/service.ts +403 -0
- package/src/tools.ts +336 -0
- package/src/typert.host.ts +25 -0
- package/src/wire.ts +401 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { t as TICKTICK_INVOCATIONS } from "./wire-C-vDxxnC.js";
|
|
2
|
+
//#region src/typert.host.ts
|
|
3
|
+
/**
|
|
4
|
+
* The hand-written Typert HOST manifest for `dsh-ticktick`, exported as
|
|
5
|
+
* `./typert` so the harness's typert-loader registers the `ticktick`
|
|
6
|
+
* invocations automatically when this plugin mounts. Same shape as a
|
|
7
|
+
* generator output (validated by the loader): package face, empty model and
|
|
8
|
+
* schemas, and the canonical invocation list shared with the client Remote
|
|
9
|
+
* contribution (`src/wire.ts`).
|
|
10
|
+
*
|
|
11
|
+
* @module dsh-ticktick/typert
|
|
12
|
+
*/
|
|
13
|
+
/** Host Typert manifest (validated by `@deepseek-ai/dsh-typert-loader`). */
|
|
14
|
+
const TYPERT = Object.freeze({
|
|
15
|
+
package: "dsh-ticktick",
|
|
16
|
+
face: "host",
|
|
17
|
+
schemas: Object.freeze([]),
|
|
18
|
+
invocations: TICKTICK_INVOCATIONS,
|
|
19
|
+
model: Object.freeze({
|
|
20
|
+
services: Object.freeze([]),
|
|
21
|
+
events: Object.freeze([]),
|
|
22
|
+
objects: Object.freeze([])
|
|
23
|
+
})
|
|
24
|
+
});
|
|
25
|
+
//#endregion
|
|
26
|
+
export { TYPERT };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The TickTick Session-header action: a button that opens the task panel
|
|
3
|
+
* popup. The panel browses lists, filters by list, toggles between undone
|
|
4
|
+
* and completed views, runs full-text search, adds tasks, completes,
|
|
5
|
+
* deletes, sets/clears due dates, and drag-reorders (undone, single-list
|
|
6
|
+
* views only — cross-list ordering has no TickTick semantics). All data
|
|
7
|
+
* flows through the injected {@link TicktickApi}; the panel holds no other
|
|
8
|
+
* RPC.
|
|
9
|
+
*
|
|
10
|
+
* @module dsh-ticktick/client/TicktickAction
|
|
11
|
+
*/
|
|
12
|
+
import type { ReactElement } from 'react';
|
|
13
|
+
import type { TicktickApi } from './api.js';
|
|
14
|
+
import { type TicktickLocaleKey } from './locales.js';
|
|
15
|
+
/** Translator face (bound to this plugin's locale namespace by the renderer). */
|
|
16
|
+
export type TicktickTranslator = (key: TicktickLocaleKey) => string;
|
|
17
|
+
/** Props the header-actions slot injects. */
|
|
18
|
+
export interface TicktickActionInjected {
|
|
19
|
+
api: TicktickApi;
|
|
20
|
+
/** Write the API token into the settings namespace (one-step panel setup). */
|
|
21
|
+
setToken: (token: string) => Promise<void>;
|
|
22
|
+
t?: TicktickTranslator;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The header action component: button + popup panel.
|
|
26
|
+
* @param props - injected api and optional translator.
|
|
27
|
+
*/
|
|
28
|
+
export declare function TicktickAction(props: TicktickActionInjected): ReactElement;
|
|
29
|
+
//# sourceMappingURL=TicktickAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TicktickAction.d.ts","sourceRoot":"","sources":["../../../src/client/TicktickAction.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAA0B,YAAY,EAAE,MAAM,OAAO,CAAA;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAI3C,OAAO,EAAM,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAEzD,iFAAiF;AACjF,MAAM,MAAM,kBAAkB,GAAG,CAAC,GAAG,EAAE,iBAAiB,KAAK,MAAM,CAAA;AAEnE,6CAA6C;AAC7C,MAAM,WAAW,sBAAsB;IACrC,GAAG,EAAE,WAAW,CAAA;IAChB,8EAA8E;IAC9E,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1C,CAAC,CAAC,EAAE,kBAAkB,CAAA;CACvB;AAcD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,sBAAsB,GAAG,YAAY,CAoT1E"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The TickTick plugin settings card (`settings.plugin.item`, key
|
|
3
|
+
* `ticktick`). The card owns its own staging form — the shipped card-form
|
|
4
|
+
* helper is in-repo and cross-plugin value imports are rejected by the
|
|
5
|
+
* bundle-purity gate, so this card renders its fields directly over the
|
|
6
|
+
* bound `SettingsScope` and writes each field through `scope.set`.
|
|
7
|
+
*
|
|
8
|
+
* @module dsh-ticktick/client/TicktickSettingsCard
|
|
9
|
+
*/
|
|
10
|
+
import type { SettingsScope } from '@deepseek-ai/dsh-client-ui-settings/client';
|
|
11
|
+
import { type TicktickLocaleKey } from './locales.js';
|
|
12
|
+
import type { TicktickProbeResult, TicktickSettings } from '../wire.js';
|
|
13
|
+
/** Translator face (bound to this plugin's locale namespace by the renderer). */
|
|
14
|
+
export type TicktickSettingsTranslator = (key: TicktickLocaleKey) => string;
|
|
15
|
+
/** Props the settings card slot injects. */
|
|
16
|
+
export interface TicktickSettingsCardInjected {
|
|
17
|
+
scope: SettingsScope<TicktickSettings>;
|
|
18
|
+
probe: () => Promise<TicktickProbeResult>;
|
|
19
|
+
t?: TicktickSettingsTranslator;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The plugin configuration card: token (secret), token file, endpoint, and
|
|
23
|
+
* protected ids, staged locally and written field-by-field on Save.
|
|
24
|
+
* @param props - bound scope and optional translator.
|
|
25
|
+
*/
|
|
26
|
+
export declare function TicktickSettingsCard(props: TicktickSettingsCardInjected): React.ReactElement;
|
|
27
|
+
//# sourceMappingURL=TicktickSettingsCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TicktickSettingsCard.d.ts","sourceRoot":"","sources":["../../../src/client/TicktickSettingsCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAA;AAC/E,OAAO,EAAM,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAEvE,iFAAiF;AACjF,MAAM,MAAM,0BAA0B,GAAG,CAAC,GAAG,EAAE,iBAAiB,KAAK,MAAM,CAAA;AAE3E,4CAA4C;AAC5C,MAAM,WAAW,4BAA4B;IAC3C,KAAK,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAA;IACtC,KAAK,EAAE,MAAM,OAAO,CAAC,mBAAmB,CAAC,CAAA;IACzC,CAAC,CAAC,EAAE,0BAA0B,CAAA;CAC/B;AAUD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,4BAA4B,GAAG,KAAK,CAAC,YAAY,CA8I5F"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The TickTick panel API face the widget receives: typed wrappers over the
|
|
3
|
+
* `remote.ticktick` namespace that unwrap `RemoteResult` and throw the
|
|
4
|
+
* RemoteError for a failed invocation.
|
|
5
|
+
*
|
|
6
|
+
* @module dsh-ticktick/client/api
|
|
7
|
+
*/
|
|
8
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
9
|
+
import type { TicktickAddResult, TicktickProbeResult, TicktickStatus, TicktickTasksResult } from '../wire.js';
|
|
10
|
+
import type { TicktickBatchAddRow, TicktickProjectsResult } from './remote.js';
|
|
11
|
+
/** Widget-facing data contract (injected into the header action). */
|
|
12
|
+
export interface TicktickApi {
|
|
13
|
+
status(): Promise<TicktickStatus>;
|
|
14
|
+
projects(): Promise<TicktickProjectsResult>;
|
|
15
|
+
tasks(projectId?: string): Promise<TicktickTasksResult>;
|
|
16
|
+
add(title: string, projectId?: string, dueDate?: string): Promise<TicktickAddResult>;
|
|
17
|
+
complete(id: string, projectId: string): Promise<void>;
|
|
18
|
+
remove(id: string, projectId: string): Promise<void>;
|
|
19
|
+
setDue(id: string, projectId: string | undefined, dueDate?: string): Promise<void>;
|
|
20
|
+
reorder(id: string, projectId: string | undefined, sortOrder: number): Promise<void>;
|
|
21
|
+
completed(projectId?: string, days?: number): Promise<TicktickTasksResult>;
|
|
22
|
+
search(query: string): Promise<TicktickTasksResult>;
|
|
23
|
+
batchAdd(tasks: readonly TicktickBatchAddRow[]): Promise<{
|
|
24
|
+
created: number;
|
|
25
|
+
}>;
|
|
26
|
+
probe(): Promise<TicktickProbeResult>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Build the widget API over a scope carrying `remote.ticktick`.
|
|
30
|
+
* @param scope - client scope with the mounted Remote namespace.
|
|
31
|
+
* @returns the typed API.
|
|
32
|
+
*/
|
|
33
|
+
export declare function createTicktickApi(scope: Context): TicktickApi;
|
|
34
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/client/api.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OA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QAAQ,CAAC,KAAK,EAAE,SAAS,mBAAmB,EAAE,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAC7E,KAAK,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAAA;CACtC;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,CAqB7D"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Due-date presentation helpers: today / tomorrow / overdue / "M月D日"
|
|
3
|
+
* (locale-neutral date formatting) plus the ISO date-only string sent to
|
|
4
|
+
* the bridge for date-picker values.
|
|
5
|
+
*
|
|
6
|
+
* @module dsh-ticktick/client/dates
|
|
7
|
+
*/
|
|
8
|
+
/** Presentation of one due date: the label plus its urgency kind. */
|
|
9
|
+
export interface DueLabel {
|
|
10
|
+
readonly text: string;
|
|
11
|
+
readonly kind: 'overdue' | 'today' | 'tomorrow' | 'later' | 'none';
|
|
12
|
+
}
|
|
13
|
+
/** Local date key (YYYY-MM-DD) for a Date. */
|
|
14
|
+
export declare function dateKey(date: Date): string;
|
|
15
|
+
/** Local date key for today. */
|
|
16
|
+
export declare function todayKey(): string;
|
|
17
|
+
/** Local date key for tomorrow. */
|
|
18
|
+
export declare function tomorrowKey(): string;
|
|
19
|
+
/**
|
|
20
|
+
* Format one ISO due date against today.
|
|
21
|
+
* @param dueDate - ISO date or date-time; `null`/empty = no due date.
|
|
22
|
+
* @param now - optional clock injection for tests (epoch ms).
|
|
23
|
+
* @returns the presentation.
|
|
24
|
+
*/
|
|
25
|
+
export declare function formatDue(dueDate: string | null, now?: number): DueLabel;
|
|
26
|
+
//# sourceMappingURL=dates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dates.d.ts","sourceRoot":"","sources":["../../../src/client/dates.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,qEAAqE;AACrE,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,MAAM,CAAA;CACnE;AAOD,8CAA8C;AAC9C,wBAAgB,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAE1C;AAED,gCAAgC;AAChC,wBAAgB,QAAQ,IAAI,MAAM,CAEjC;AAED,mCAAmC;AACnC,wBAAgB,WAAW,IAAI,MAAM,CAIpC;AASD;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,EAAE,GAAG,GAAE,MAAmB,GAAG,QAAQ,CAWpF"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `dsh-ticktick`, browser half: mounts the `ticktick` Remote contribution,
|
|
3
|
+
* then registers the Session-header task panel action
|
|
4
|
+
* (`conversation.session.header.actions`, id `ticktick`) and the plugin
|
|
5
|
+
* settings card (`settings.plugin.item`, key `ticktick`). All data arrives
|
|
6
|
+
* through the `remote.ticktick` namespace and the bound `settingsScope`;
|
|
7
|
+
* the panel holds no state beyond its popup, forms, and drag session.
|
|
8
|
+
*
|
|
9
|
+
* @module dsh-ticktick/client
|
|
10
|
+
*/
|
|
11
|
+
import type { Context as ClientContext } from '@deepseek-ai/cordis';
|
|
12
|
+
import { type TicktickLocaleKey } from './locales.js';
|
|
13
|
+
export type { TicktickApi } from './api.js';
|
|
14
|
+
export type { TicktickLocaleKey } from './locales.js';
|
|
15
|
+
declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
16
|
+
interface LocaleNamespaceMap {
|
|
17
|
+
/** TickTick panel and settings-card copy. */
|
|
18
|
+
ticktick: TicktickLocaleKey;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
/** Dictionary namespace owned by this plugin. */
|
|
22
|
+
export declare const NS = "ticktick";
|
|
23
|
+
/** Plugin name: matches the package name, the graph row `name`, and the bundle id. */
|
|
24
|
+
export declare const name = "@perrylink/dsh-ticktick";
|
|
25
|
+
/** Services the client reads; `remote.ticktick` appears once this plugin mounts its contribution. */
|
|
26
|
+
export declare const inject: string[];
|
|
27
|
+
/**
|
|
28
|
+
* Browser plugin body: dictionaries, the scoped stylesheet, the Remote
|
|
29
|
+
* contribution mount, the header action, and the settings card.
|
|
30
|
+
*
|
|
31
|
+
* @param ctx - client root context.
|
|
32
|
+
*/
|
|
33
|
+
export declare function apply(ctx: ClientContext): Promise<void>;
|
|
34
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAiBnE,OAAO,EAAU,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAK7D,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAC3C,YAAY,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAErD,OAAO,QAAQ,kCAAkC,CAAC;IAChD,UAAU,kBAAkB;QAC1B,6CAA6C;QAC7C,QAAQ,EAAE,iBAAiB,CAAA;KAC5B;CACF;AAED,iDAAiD;AACjD,eAAO,MAAM,EAAE,aAAa,CAAA;AAE5B,sFAAsF;AACtF,eAAO,MAAM,IAAI,4BAA4B,CAAA;AAE7C,qGAAqG;AACrG,eAAO,MAAM,MAAM,UAAiD,CAAA;AAyBpE;;;;;GAKG;AACH,wBAAsB,KAAK,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAqC7D"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Locale dictionaries for the TickTick panel and settings card. The harness
|
|
3
|
+
* locale registry accepts the 'en' | 'zh' UI language codes, so this client
|
|
4
|
+
* ships those two dictionaries and follows the app's UI language.
|
|
5
|
+
*
|
|
6
|
+
* @module dsh-ticktick/client/locales
|
|
7
|
+
*/
|
|
8
|
+
export type TicktickLocaleKey = keyof typeof en;
|
|
9
|
+
export declare const en: {
|
|
10
|
+
readonly title: "TickTick";
|
|
11
|
+
readonly open: "Open TickTick tasks";
|
|
12
|
+
readonly allLists: "All lists";
|
|
13
|
+
readonly viewUndone: "Undone";
|
|
14
|
+
readonly viewCompleted: "Completed";
|
|
15
|
+
readonly searchPlaceholder: "Search tasks…";
|
|
16
|
+
readonly searchEmpty: "No matches";
|
|
17
|
+
readonly refresh: "Refresh";
|
|
18
|
+
readonly addPlaceholder: "Add a task…";
|
|
19
|
+
readonly add: "Add";
|
|
20
|
+
readonly empty: "No tasks";
|
|
21
|
+
readonly confirmDelete: "Delete this task?";
|
|
22
|
+
readonly delete: "Delete";
|
|
23
|
+
readonly complete: "Complete";
|
|
24
|
+
readonly setDue: "Set due date";
|
|
25
|
+
readonly clearDue: "Clear due date";
|
|
26
|
+
readonly overdue: "overdue";
|
|
27
|
+
readonly today: "today";
|
|
28
|
+
readonly tomorrow: "tomorrow";
|
|
29
|
+
readonly warning: "Warning";
|
|
30
|
+
readonly unconfigured: "No TickTick token: set it in Settings → Plugins → TickTick.";
|
|
31
|
+
readonly loadError: "Failed to load: ";
|
|
32
|
+
readonly settingsName: "TickTick";
|
|
33
|
+
readonly settingsToken: "API token (dp_…)";
|
|
34
|
+
readonly settingsTokenHint: "A secret saved locally; wins over the token file.";
|
|
35
|
+
readonly settingsTokenFile: "Token file path";
|
|
36
|
+
readonly settingsTokenFileHint: "Empty = $DSH_HOME/.ticktick-token, re-read per request.";
|
|
37
|
+
readonly settingsMcpUrl: "MCP endpoint";
|
|
38
|
+
readonly settingsMcpUrlHint: "Restart dsh after changing the endpoint.";
|
|
39
|
+
readonly settingsProtected: "Protected task ids";
|
|
40
|
+
readonly settingsProtectedHint: "Comma-separated; mutating operations refuse these (restart applies).";
|
|
41
|
+
readonly settingsSave: "Save";
|
|
42
|
+
readonly settingsSaved: "Saved";
|
|
43
|
+
readonly settingsTest: "Test connection";
|
|
44
|
+
readonly settingsTestOk: "Connected: N tools";
|
|
45
|
+
readonly settingsTestFail: "Connection failed: ";
|
|
46
|
+
readonly settingsClear: "Clear credentials";
|
|
47
|
+
readonly settingsCleared: "Credentials cleared";
|
|
48
|
+
readonly panelTokenPlaceholder: "Paste API token (dp_…)";
|
|
49
|
+
readonly panelTokenSave: "Save token";
|
|
50
|
+
readonly panelTokenHint: "No token yet — paste it here, or open Settings → Plugins → TickTick.";
|
|
51
|
+
readonly statusConnected: "connected";
|
|
52
|
+
readonly statusNotConnected: "configured, not connected";
|
|
53
|
+
readonly statusUnconfigured: "no token";
|
|
54
|
+
readonly endpointPreset: "Endpoint preset";
|
|
55
|
+
readonly endpointCn: "CN (mcp.dida365.com)";
|
|
56
|
+
readonly endpointIntl: "International (unverified)";
|
|
57
|
+
readonly endpointCustom: "Custom";
|
|
58
|
+
};
|
|
59
|
+
export type TicktickLocale = Record<TicktickLocaleKey, string>;
|
|
60
|
+
export declare const zh: TicktickLocale;
|
|
61
|
+
//# sourceMappingURL=locales.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../src/client/locales.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,EAAE,CAAA;AAE/C,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiDL,CAAA;AAEV,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAA;AAE9D,eAAO,MAAM,EAAE,EAAE,cAiDP,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Drag-reorder math. Measured TickTick semantics: lists order by DESCENDING
|
|
3
|
+
* sortOrder. "Place before target" = target.sortOrder + 1; "place at end" =
|
|
4
|
+
* current last.sortOrder − 1.
|
|
5
|
+
*
|
|
6
|
+
* @module dsh-ticktick/client/order
|
|
7
|
+
*/
|
|
8
|
+
/** A task row with the fields the math reads. */
|
|
9
|
+
export interface SortableRow {
|
|
10
|
+
readonly id: string;
|
|
11
|
+
readonly sortOrder: number | null;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The sortOrder that places `dragged` immediately before `target`.
|
|
15
|
+
* @param target - the row the dragged task is dropped onto.
|
|
16
|
+
* @returns the new sortOrder, or `null` when the target carries none.
|
|
17
|
+
*/
|
|
18
|
+
export declare function sortOrderBefore(target: SortableRow): number | null;
|
|
19
|
+
/**
|
|
20
|
+
* The sortOrder that places a task at the list end (below the current last).
|
|
21
|
+
* @param rows - the visible list, ordered top to bottom.
|
|
22
|
+
* @returns the new sortOrder, or `null` when the list is empty or lacks orders.
|
|
23
|
+
*/
|
|
24
|
+
export declare function sortOrderAtEnd(rows: readonly SortableRow[]): number | null;
|
|
25
|
+
//# sourceMappingURL=order.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order.d.ts","sourceRoot":"","sources":["../../../src/client/order.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,iDAAiD;AACjD,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;CAClC;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,GAAG,IAAI,CAGlE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,WAAW,EAAE,GAAG,MAAM,GAAG,IAAI,CAO1E"}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The client-side Remote face of the `ticktick` namespace: the hand-written
|
|
3
|
+
* `TypertRemoteContribution` mounted through `ctx.remote.$mount`, plus the
|
|
4
|
+
* declaration merging that types `ctx.remote.ticktick`. The descriptor list
|
|
5
|
+
* is shared with the host `./typert` manifest (`../wire.ts`), so the two
|
|
6
|
+
* faces can never drift.
|
|
7
|
+
*
|
|
8
|
+
* @module dsh-ticktick/client/remote
|
|
9
|
+
*/
|
|
10
|
+
import type { RemoteResult } from '@deepseek-ai/dsh-typert-protocol';
|
|
11
|
+
import type { TicktickAddResult, TicktickOkResult, TicktickProbeResult, TicktickStatus, TicktickTasksResult } from '../wire.js';
|
|
12
|
+
/** Result of `ticktick/projects`. */
|
|
13
|
+
export interface TicktickProjectsResult {
|
|
14
|
+
projects: readonly {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
}[];
|
|
18
|
+
}
|
|
19
|
+
/** Result of `ticktick/batchAdd`. */
|
|
20
|
+
export interface TicktickBatchAddResult {
|
|
21
|
+
created: number;
|
|
22
|
+
}
|
|
23
|
+
/** One batch-add row. */
|
|
24
|
+
export interface TicktickBatchAddRow {
|
|
25
|
+
title: string;
|
|
26
|
+
projectId?: string;
|
|
27
|
+
dueDate?: string;
|
|
28
|
+
}
|
|
29
|
+
declare module '@deepseek-ai/dsh-typert-protocol' {
|
|
30
|
+
interface TypertRemoteNamespace$ticktick {
|
|
31
|
+
status: () => Promise<RemoteResult<TicktickStatus>>;
|
|
32
|
+
projects: () => Promise<RemoteResult<TicktickProjectsResult>>;
|
|
33
|
+
tasks: (projectId?: string) => Promise<RemoteResult<TicktickTasksResult>>;
|
|
34
|
+
add: (title: string, projectId?: string, dueDate?: string) => Promise<RemoteResult<TicktickAddResult>>;
|
|
35
|
+
complete: (id: string, projectId: string) => Promise<RemoteResult<TicktickOkResult>>;
|
|
36
|
+
remove: (id: string, projectId: string) => Promise<RemoteResult<TicktickOkResult>>;
|
|
37
|
+
setDue: (id: string, projectId: string | undefined, dueDate?: string) => Promise<RemoteResult<TicktickOkResult>>;
|
|
38
|
+
reorder: (id: string, projectId: string | undefined, sortOrder: number) => Promise<RemoteResult<TicktickOkResult>>;
|
|
39
|
+
completed: (projectId?: string, days?: number) => Promise<RemoteResult<TicktickTasksResult>>;
|
|
40
|
+
search: (query: string) => Promise<RemoteResult<TicktickTasksResult>>;
|
|
41
|
+
batchAdd: (tasks: TicktickBatchAddRow[]) => Promise<RemoteResult<TicktickBatchAddResult>>;
|
|
42
|
+
probe: () => Promise<RemoteResult<TicktickProbeResult>>;
|
|
43
|
+
}
|
|
44
|
+
interface TypertRemoteMap {
|
|
45
|
+
'ticktick/status': () => Promise<RemoteResult<TicktickStatus>>;
|
|
46
|
+
'ticktick/projects': () => Promise<RemoteResult<TicktickProjectsResult>>;
|
|
47
|
+
'ticktick/tasks': (projectId?: string) => Promise<RemoteResult<TicktickTasksResult>>;
|
|
48
|
+
'ticktick/add': (title: string, projectId?: string, dueDate?: string) => Promise<RemoteResult<TicktickAddResult>>;
|
|
49
|
+
'ticktick/complete': (id: string, projectId: string) => Promise<RemoteResult<TicktickOkResult>>;
|
|
50
|
+
'ticktick/remove': (id: string, projectId: string) => Promise<RemoteResult<TicktickOkResult>>;
|
|
51
|
+
'ticktick/setDue': (id: string, projectId: string | undefined, dueDate?: string) => Promise<RemoteResult<TicktickOkResult>>;
|
|
52
|
+
'ticktick/reorder': (id: string, projectId: string | undefined, sortOrder: number) => Promise<RemoteResult<TicktickOkResult>>;
|
|
53
|
+
'ticktick/completed': (projectId?: string, days?: number) => Promise<RemoteResult<TicktickTasksResult>>;
|
|
54
|
+
'ticktick/search': (query: string) => Promise<RemoteResult<TicktickTasksResult>>;
|
|
55
|
+
'ticktick/batchAdd': (tasks: TicktickBatchAddRow[]) => Promise<RemoteResult<TicktickBatchAddResult>>;
|
|
56
|
+
'ticktick/probe': () => Promise<RemoteResult<TicktickProbeResult>>;
|
|
57
|
+
}
|
|
58
|
+
interface TypertRemoteNamespaceMap {
|
|
59
|
+
ticktick: TypertRemoteNamespace$ticktick;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/** The client Remote contribution for the `ticktick` namespace. */
|
|
63
|
+
export declare const TICKTICK_REMOTE: Readonly<{
|
|
64
|
+
package: "@perrylink/dsh-ticktick";
|
|
65
|
+
descriptors: readonly (Readonly<{
|
|
66
|
+
readonly id: "dsh-ticktick#ticktick/status";
|
|
67
|
+
readonly service: "ticktick";
|
|
68
|
+
readonly namespace: "ticktick";
|
|
69
|
+
readonly method: "status";
|
|
70
|
+
readonly invocation: Readonly<{
|
|
71
|
+
kind: "direct";
|
|
72
|
+
}>;
|
|
73
|
+
readonly parameters: readonly never[];
|
|
74
|
+
readonly result: import("@deepseek-ai/dsh-typert-protocol").TypertCodec;
|
|
75
|
+
readonly sourceLocation: Readonly<{
|
|
76
|
+
file: "src/wire.ts";
|
|
77
|
+
line: 1;
|
|
78
|
+
column: 1;
|
|
79
|
+
}>;
|
|
80
|
+
}> | Readonly<{
|
|
81
|
+
readonly id: "dsh-ticktick#ticktick/projects";
|
|
82
|
+
readonly service: "ticktick";
|
|
83
|
+
readonly namespace: "ticktick";
|
|
84
|
+
readonly method: "projects";
|
|
85
|
+
readonly invocation: Readonly<{
|
|
86
|
+
kind: "direct";
|
|
87
|
+
}>;
|
|
88
|
+
readonly parameters: readonly never[];
|
|
89
|
+
readonly result: import("@deepseek-ai/dsh-typert-protocol").TypertCodec;
|
|
90
|
+
readonly sourceLocation: Readonly<{
|
|
91
|
+
file: "src/wire.ts";
|
|
92
|
+
line: 1;
|
|
93
|
+
column: 1;
|
|
94
|
+
}>;
|
|
95
|
+
}> | Readonly<{
|
|
96
|
+
readonly id: "dsh-ticktick#ticktick/tasks";
|
|
97
|
+
readonly service: "ticktick";
|
|
98
|
+
readonly namespace: "ticktick";
|
|
99
|
+
readonly method: "tasks";
|
|
100
|
+
readonly invocation: Readonly<{
|
|
101
|
+
kind: "direct";
|
|
102
|
+
}>;
|
|
103
|
+
readonly parameters: readonly import("@deepseek-ai/dsh-typert-protocol").InvocationParameterDescriptor[];
|
|
104
|
+
readonly result: import("@deepseek-ai/dsh-typert-protocol").TypertCodec;
|
|
105
|
+
readonly sourceLocation: Readonly<{
|
|
106
|
+
file: "src/wire.ts";
|
|
107
|
+
line: 1;
|
|
108
|
+
column: 1;
|
|
109
|
+
}>;
|
|
110
|
+
}> | Readonly<{
|
|
111
|
+
readonly id: "dsh-ticktick#ticktick/add";
|
|
112
|
+
readonly service: "ticktick";
|
|
113
|
+
readonly namespace: "ticktick";
|
|
114
|
+
readonly method: "add";
|
|
115
|
+
readonly invocation: Readonly<{
|
|
116
|
+
kind: "direct";
|
|
117
|
+
}>;
|
|
118
|
+
readonly parameters: readonly import("@deepseek-ai/dsh-typert-protocol").InvocationParameterDescriptor[];
|
|
119
|
+
readonly result: import("@deepseek-ai/dsh-typert-protocol").TypertCodec;
|
|
120
|
+
readonly sourceLocation: Readonly<{
|
|
121
|
+
file: "src/wire.ts";
|
|
122
|
+
line: 1;
|
|
123
|
+
column: 1;
|
|
124
|
+
}>;
|
|
125
|
+
}> | Readonly<{
|
|
126
|
+
readonly id: "dsh-ticktick#ticktick/complete";
|
|
127
|
+
readonly service: "ticktick";
|
|
128
|
+
readonly namespace: "ticktick";
|
|
129
|
+
readonly method: "complete";
|
|
130
|
+
readonly invocation: Readonly<{
|
|
131
|
+
kind: "direct";
|
|
132
|
+
}>;
|
|
133
|
+
readonly parameters: readonly import("@deepseek-ai/dsh-typert-protocol").InvocationParameterDescriptor[];
|
|
134
|
+
readonly result: import("@deepseek-ai/dsh-typert-protocol").TypertCodec;
|
|
135
|
+
readonly sourceLocation: Readonly<{
|
|
136
|
+
file: "src/wire.ts";
|
|
137
|
+
line: 1;
|
|
138
|
+
column: 1;
|
|
139
|
+
}>;
|
|
140
|
+
}> | Readonly<{
|
|
141
|
+
readonly id: "dsh-ticktick#ticktick/remove";
|
|
142
|
+
readonly service: "ticktick";
|
|
143
|
+
readonly namespace: "ticktick";
|
|
144
|
+
readonly method: "remove";
|
|
145
|
+
readonly invocation: Readonly<{
|
|
146
|
+
kind: "direct";
|
|
147
|
+
}>;
|
|
148
|
+
readonly parameters: readonly import("@deepseek-ai/dsh-typert-protocol").InvocationParameterDescriptor[];
|
|
149
|
+
readonly result: import("@deepseek-ai/dsh-typert-protocol").TypertCodec;
|
|
150
|
+
readonly sourceLocation: Readonly<{
|
|
151
|
+
file: "src/wire.ts";
|
|
152
|
+
line: 1;
|
|
153
|
+
column: 1;
|
|
154
|
+
}>;
|
|
155
|
+
}> | Readonly<{
|
|
156
|
+
readonly id: "dsh-ticktick#ticktick/setDue";
|
|
157
|
+
readonly service: "ticktick";
|
|
158
|
+
readonly namespace: "ticktick";
|
|
159
|
+
readonly method: "setDue";
|
|
160
|
+
readonly invocation: Readonly<{
|
|
161
|
+
kind: "direct";
|
|
162
|
+
}>;
|
|
163
|
+
readonly parameters: readonly import("@deepseek-ai/dsh-typert-protocol").InvocationParameterDescriptor[];
|
|
164
|
+
readonly result: import("@deepseek-ai/dsh-typert-protocol").TypertCodec;
|
|
165
|
+
readonly sourceLocation: Readonly<{
|
|
166
|
+
file: "src/wire.ts";
|
|
167
|
+
line: 1;
|
|
168
|
+
column: 1;
|
|
169
|
+
}>;
|
|
170
|
+
}> | Readonly<{
|
|
171
|
+
readonly id: "dsh-ticktick#ticktick/reorder";
|
|
172
|
+
readonly service: "ticktick";
|
|
173
|
+
readonly namespace: "ticktick";
|
|
174
|
+
readonly method: "reorder";
|
|
175
|
+
readonly invocation: Readonly<{
|
|
176
|
+
kind: "direct";
|
|
177
|
+
}>;
|
|
178
|
+
readonly parameters: readonly import("@deepseek-ai/dsh-typert-protocol").InvocationParameterDescriptor[];
|
|
179
|
+
readonly result: import("@deepseek-ai/dsh-typert-protocol").TypertCodec;
|
|
180
|
+
readonly sourceLocation: Readonly<{
|
|
181
|
+
file: "src/wire.ts";
|
|
182
|
+
line: 1;
|
|
183
|
+
column: 1;
|
|
184
|
+
}>;
|
|
185
|
+
}> | Readonly<{
|
|
186
|
+
readonly id: "dsh-ticktick#ticktick/completed";
|
|
187
|
+
readonly service: "ticktick";
|
|
188
|
+
readonly namespace: "ticktick";
|
|
189
|
+
readonly method: "completed";
|
|
190
|
+
readonly invocation: Readonly<{
|
|
191
|
+
kind: "direct";
|
|
192
|
+
}>;
|
|
193
|
+
readonly parameters: readonly import("@deepseek-ai/dsh-typert-protocol").InvocationParameterDescriptor[];
|
|
194
|
+
readonly result: import("@deepseek-ai/dsh-typert-protocol").TypertCodec;
|
|
195
|
+
readonly sourceLocation: Readonly<{
|
|
196
|
+
file: "src/wire.ts";
|
|
197
|
+
line: 1;
|
|
198
|
+
column: 1;
|
|
199
|
+
}>;
|
|
200
|
+
}> | Readonly<{
|
|
201
|
+
readonly id: "dsh-ticktick#ticktick/search";
|
|
202
|
+
readonly service: "ticktick";
|
|
203
|
+
readonly namespace: "ticktick";
|
|
204
|
+
readonly method: "search";
|
|
205
|
+
readonly invocation: Readonly<{
|
|
206
|
+
kind: "direct";
|
|
207
|
+
}>;
|
|
208
|
+
readonly parameters: readonly import("@deepseek-ai/dsh-typert-protocol").InvocationParameterDescriptor[];
|
|
209
|
+
readonly result: import("@deepseek-ai/dsh-typert-protocol").TypertCodec;
|
|
210
|
+
readonly sourceLocation: Readonly<{
|
|
211
|
+
file: "src/wire.ts";
|
|
212
|
+
line: 1;
|
|
213
|
+
column: 1;
|
|
214
|
+
}>;
|
|
215
|
+
}> | Readonly<{
|
|
216
|
+
readonly id: "dsh-ticktick#ticktick/batchAdd";
|
|
217
|
+
readonly service: "ticktick";
|
|
218
|
+
readonly namespace: "ticktick";
|
|
219
|
+
readonly method: "batchAdd";
|
|
220
|
+
readonly invocation: Readonly<{
|
|
221
|
+
kind: "direct";
|
|
222
|
+
}>;
|
|
223
|
+
readonly parameters: readonly Readonly<{
|
|
224
|
+
name: string;
|
|
225
|
+
wire: string;
|
|
226
|
+
source: "json";
|
|
227
|
+
codec: Readonly<{
|
|
228
|
+
mode: "strict";
|
|
229
|
+
typeSymbol: "dsh-ticktick/types#BatchAddTasks";
|
|
230
|
+
schema: import("zod").ZodArray<import("zod").ZodObject<{
|
|
231
|
+
title: import("zod").ZodString;
|
|
232
|
+
projectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
233
|
+
dueDate: import("zod").ZodOptional<import("zod").ZodString>;
|
|
234
|
+
}, import("zod/v4/core").$strip>>;
|
|
235
|
+
}>;
|
|
236
|
+
}>[];
|
|
237
|
+
readonly result: import("@deepseek-ai/dsh-typert-protocol").TypertCodec;
|
|
238
|
+
readonly sourceLocation: Readonly<{
|
|
239
|
+
file: "src/wire.ts";
|
|
240
|
+
line: 1;
|
|
241
|
+
column: 1;
|
|
242
|
+
}>;
|
|
243
|
+
}> | Readonly<{
|
|
244
|
+
readonly id: "dsh-ticktick#ticktick/probe";
|
|
245
|
+
readonly service: "ticktick";
|
|
246
|
+
readonly namespace: "ticktick";
|
|
247
|
+
readonly method: "probe";
|
|
248
|
+
readonly invocation: Readonly<{
|
|
249
|
+
kind: "direct";
|
|
250
|
+
}>;
|
|
251
|
+
readonly parameters: readonly never[];
|
|
252
|
+
readonly result: import("@deepseek-ai/dsh-typert-protocol").TypertCodec;
|
|
253
|
+
readonly sourceLocation: Readonly<{
|
|
254
|
+
file: "src/wire.ts";
|
|
255
|
+
line: 1;
|
|
256
|
+
column: 1;
|
|
257
|
+
}>;
|
|
258
|
+
}>)[];
|
|
259
|
+
}>;
|
|
260
|
+
//# sourceMappingURL=remote.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../../../src/client/remote.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,YAAY,EAA4B,MAAM,kCAAkC,CAAA;AAE9F,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,mBAAmB,EACpB,MAAM,YAAY,CAA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stylesheet for the TickTick panel. Standalone bundles cannot use
|
|
3
|
+
* the in-repo CSS-module pipeline, so one inline <style> element carries the
|
|
4
|
+
* panel's scoped classes (tkt-* prefix).
|
|
5
|
+
*
|
|
6
|
+
* @module dsh-ticktick/client/styles
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Install the scoped stylesheet once per plugin fiber.
|
|
10
|
+
* @returns the effect disposer that removes the style element.
|
|
11
|
+
*/
|
|
12
|
+
export declare function installPanelStyles(): () => void;
|
|
13
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/client/styles.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA+BH;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,IAAI,CAM/C"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plugin configuration and its explicit resolve step. `resolveConfig`
|
|
3
|
+
* re-judges every default and bound so programmatic construction that
|
|
4
|
+
* bypasses Schemastery normalization still fails loud instead of running
|
|
5
|
+
* with hidden defaults (the explicit-resolve contract).
|
|
6
|
+
*
|
|
7
|
+
* @module dsh-ticktick/config
|
|
8
|
+
*/
|
|
9
|
+
import z from '@deepseek-ai/schemastery';
|
|
10
|
+
/** Default TickTick MCP endpoint (CN region). */
|
|
11
|
+
export declare const DEFAULT_MCP_URL = "https://mcp.dida365.com";
|
|
12
|
+
/** Default per-tools/call deadline in milliseconds. */
|
|
13
|
+
export declare const DEFAULT_TOOL_CALL_TIMEOUT_MS = 30000;
|
|
14
|
+
/** Ceiling for one tool call: the endpoint may block on a slow server round. */
|
|
15
|
+
export declare const MAX_TOOL_CALL_TIMEOUT_MS = 300000;
|
|
16
|
+
/** Raw MCP tool-name pins; every `''` entry is discovered by pattern. */
|
|
17
|
+
export interface ToolPins {
|
|
18
|
+
projects: string;
|
|
19
|
+
tasks: string;
|
|
20
|
+
create: string;
|
|
21
|
+
complete: string;
|
|
22
|
+
remove: string;
|
|
23
|
+
update: string;
|
|
24
|
+
move: string;
|
|
25
|
+
completed: string;
|
|
26
|
+
search: string;
|
|
27
|
+
getTask: string;
|
|
28
|
+
batchAdd: string;
|
|
29
|
+
}
|
|
30
|
+
/** Configuration for the TickTick bridge. */
|
|
31
|
+
export interface Config {
|
|
32
|
+
/** Path to a text file holding the Bearer token; `''` resolves to `<DSH_HOME>/.ticktick-token`. */
|
|
33
|
+
tokenFile?: string;
|
|
34
|
+
/** TickTick MCP endpoint. */
|
|
35
|
+
mcpUrl?: string;
|
|
36
|
+
/** Per-tools/call deadline in milliseconds. */
|
|
37
|
+
toolCallTimeoutMs?: number;
|
|
38
|
+
/** Task ids every mutating operation refuses. */
|
|
39
|
+
protectedTaskIds?: string[];
|
|
40
|
+
/** Optional raw tool-name pins, discovered by pattern when omitted. */
|
|
41
|
+
tools?: Partial<ToolPins>;
|
|
42
|
+
}
|
|
43
|
+
/** Fully resolved configuration captured at plugin load. */
|
|
44
|
+
export interface ResolvedConfig {
|
|
45
|
+
/** Path to a text file holding the Bearer token (empty = default path). */
|
|
46
|
+
tokenFile: string;
|
|
47
|
+
/** TickTick MCP endpoint. */
|
|
48
|
+
mcpUrl: string;
|
|
49
|
+
/** Per-tools/call deadline in milliseconds. */
|
|
50
|
+
toolCallTimeoutMs: number;
|
|
51
|
+
/** Task ids every mutating operation refuses. */
|
|
52
|
+
protectedTaskIds: readonly string[];
|
|
53
|
+
/** Raw tool-name pins (`''` = discover). */
|
|
54
|
+
tools: ToolPins;
|
|
55
|
+
}
|
|
56
|
+
/** Schemastery schema for loader-validated configuration. */
|
|
57
|
+
export declare const Config: z<Config>;
|
|
58
|
+
/**
|
|
59
|
+
* Resolve raw config to the runtime policy, re-validating defaults and bounds.
|
|
60
|
+
* @param config - raw loader config; `undefined` for a bare row.
|
|
61
|
+
* @returns the frozen resolved config.
|
|
62
|
+
*/
|
|
63
|
+
export declare function resolveConfig(config: Config | undefined): ResolvedConfig;
|
|
64
|
+
//# sourceMappingURL=config.d.ts.map
|