@dinoxx/dinox-cli 2.20.2 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -16
- package/dist/chunks/{applePodcast-V4FSJOC5.js → applePodcast-YDYM4JYQ.js} +3 -3
- package/dist/chunks/{bbc-NTMRPYRF.js → bbc-N3BM2EGG.js} +3 -3
- package/dist/chunks/{bilibili-UA3MBSPH.js → bilibili-V4XVW33T.js} +63 -9
- package/dist/chunks/{bohaishibei-B7UVXH4Y.js → bohaishibei-IQO5CZTN.js} +3 -3
- package/dist/chunks/{chunk-BZQYECIH.js → chunk-52XLDO77.js} +1 -1
- package/dist/chunks/{chunk-XEPDFQYD.js → chunk-5SORBZTD.js} +27 -27
- package/dist/chunks/{chunk-XMMTGPZ6.js → chunk-AZ43P73A.js} +56 -2
- package/dist/chunks/{chunk-W4EWLODY.js → chunk-DKY574LO.js} +3 -3
- package/dist/chunks/{chunk-4GM3PRSK.js → chunk-G6Y3MOUL.js} +6167 -3846
- package/dist/chunks/{chunk-BKCNERPB.js → chunk-JNRA4TTH.js} +99 -18
- package/dist/chunks/{chunk-3VZNZWDG.js → chunk-LAWV5XGL.js} +5 -0
- package/dist/chunks/{chunk-FIQYJ6KZ.js → chunk-LLAXR5EG.js} +1 -1
- package/dist/chunks/{chunk-MLOITAK6.js → chunk-LXC3IW4L.js} +2 -2
- package/dist/chunks/{chunk-TILRKKRN.js → chunk-MKEL2KNU.js} +893 -468
- package/dist/chunks/{chunk-7MGDG5BW.js → chunk-MMO7CINX.js} +499 -651
- package/dist/chunks/{chunk-FGQRYB7F.js → chunk-MZMOE3RX.js} +13 -1
- package/dist/chunks/{chunk-D3CETVY5.js → chunk-OZXS77HJ.js} +7 -7
- package/dist/chunks/{chunk-MDWXLRRN.js → chunk-PCB2JD6H.js} +6 -6
- package/dist/chunks/{chunk-6AZT4ARG.js → chunk-R2CGNGOT.js} +3 -3
- package/dist/chunks/{chunk-GTDX2LIJ.js → chunk-RSSEVU2F.js} +58 -10
- package/dist/chunks/{chunk-6D3QLMRM.js → chunk-TOGYWN3D.js} +1 -1
- package/dist/chunks/{chunk-CHGKDZV6.js → chunk-WCY3EKJQ.js} +4 -4
- package/dist/chunks/{chunk-QFSMFANX.js → chunk-YFGDTC2F.js} +9 -2
- package/dist/chunks/{chunk-QFUD3I7W.js → chunk-YX4SIEVS.js} +3 -4
- package/dist/chunks/{cookies-6QQHSM26.js → cookies-UUQZXH4R.js} +4 -6
- package/dist/chunks/{doubanGroup-HR4K2KMY.js → doubanGroup-MADXDGDI.js} +4 -4
- package/dist/chunks/{doubao-MXUHPLUB.js → doubao-DKZERP6Y.js} +2 -2
- package/dist/chunks/{douyin-UU2FSQPS.js → douyin-PIWFZHK7.js} +91 -5
- package/dist/chunks/{ensure-E3DIRHSQ.js → ensure-2OPNFDRW.js} +7 -7
- package/dist/chunks/{execute-YP2N2AMS.js → execute-C5W5ZJDC.js} +5 -5
- package/dist/chunks/{facebook-SZFOVE7R.js → facebook-TI2CF5UY.js} +2 -2
- package/dist/chunks/{feishu-ISWRJ7HI.js → feishu-XSSEBWQD.js} +2 -2
- package/dist/chunks/{ima-D7CX5WR4.js → ima-SKE2C64C.js} +2 -2
- package/dist/chunks/{instagram-HNDPO37H.js → instagram-4W4HCWJN.js} +2 -2
- package/dist/chunks/{install-IIMVFNAT.js → install-VBMWNPO6.js} +1 -3
- package/dist/chunks/{jike-H7L4LJTN.js → jike-GS64MEEO.js} +4 -4
- package/dist/chunks/{mcp-AK373P5P.js → mcp-WK7KIU44.js} +14 -12
- package/dist/chunks/{mcpServer-7VL4KJH2.js → mcpServer-M4HJFSNU.js} +17 -15
- package/dist/chunks/{metaso-ZVZW5UBB.js → metaso-RRYEUXIL.js} +2 -2
- package/dist/chunks/{run-OYMMVKCB.js → run-WNHMZLSJ.js} +11 -11
- package/dist/chunks/{runCli-ZJ7WYHJ7.js → runCli-GKTCIDBF.js} +12 -12
- package/dist/chunks/{setup-EEU6GSWX.js → setup-UYCLFOZH.js} +6 -6
- package/dist/chunks/{threads-ADW6IANQ.js → threads-JKMT3E73.js} +3 -3
- package/dist/chunks/{twitter-NAGCB3NI.js → twitter-WNBOJELM.js} +2 -2
- package/dist/chunks/{web-QFKZCM4F.js → web-LJESVHHV.js} +4 -4
- package/dist/chunks/{wechat-OXNNLT4J.js → wechat-N7O77CB4.js} +40 -1
- package/dist/chunks/{weibo-PMVGDNQU.js → weibo-XPEV5CLQ.js} +4 -4
- package/dist/chunks/{workbuddy-NNAXIIIZ.js → workbuddy-ZXNDX7O7.js} +5 -5
- package/dist/chunks/{xiaoheihe-WFQJRBAD.js → xiaoheihe-WXFAORLQ.js} +3 -3
- package/dist/chunks/{xiaohongshu-5CXBELGW.js → xiaohongshu-3N3ZVSXJ.js} +2 -2
- package/dist/chunks/{xiaoyuzhou-6L6IB46Y.js → xiaoyuzhou-OGIWFABL.js} +3 -3
- package/dist/chunks/{youtube-52NGBTQC.js → youtube-YRSK7CWC.js} +3 -3
- package/dist/chunks/{zcool-HDSWK4KD.js → zcool-K5KJ2KDG.js} +2 -2
- package/dist/chunks/{zhihu-EX2VRJYY.js → zhihu-X6XSPD6B.js} +2 -2
- package/dist/dinox.js +7 -7
- package/dist/dsh-plugin/lib/client.js +1030 -578
- package/dist/dsh-plugin/lib/index.js +11 -7
- package/dist/dsh-plugin/package.json +1 -1
- package/dist/dsh-plugin/runtime.json +2 -2
- package/dist/editor-ui/mcp-app.html +449 -583
- package/package.json +25 -12
|
@@ -22,8 +22,8 @@ import {
|
|
|
22
22
|
} from "./chunk-QZQRG3JY.js";
|
|
23
23
|
import {
|
|
24
24
|
composeClipMarkdown
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-LLAXR5EG.js";
|
|
26
|
+
import "./chunk-AZ43P73A.js";
|
|
27
27
|
import "./chunk-URYABAYN.js";
|
|
28
28
|
import {
|
|
29
29
|
clipEngineConfig,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "./chunk-WMJXAF3X.js";
|
|
13
13
|
import {
|
|
14
14
|
DinoxError
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-LAWV5XGL.js";
|
|
16
16
|
import "./chunk-XQZUX7OT.js";
|
|
17
17
|
|
|
18
18
|
// src/editor/install.ts
|
|
@@ -25,7 +25,6 @@ import { promisify } from "node:util";
|
|
|
25
25
|
var DSH_PLUGIN_PACKAGE = "dinox-editor-dsh";
|
|
26
26
|
var DSH_APP_CLI = "/Applications/DeepSeek Harness.app/Contents/Resources/runtime/cli/bin/dsh";
|
|
27
27
|
var run = promisify(execFile);
|
|
28
|
-
var EDITOR_HOSTS = ["dsh"];
|
|
29
28
|
function pluginDir(root = editorPackageRoot()) {
|
|
30
29
|
return path.join(root, "dist", "dsh-plugin");
|
|
31
30
|
}
|
|
@@ -293,7 +292,6 @@ function editorStatus(options = {}) {
|
|
|
293
292
|
}
|
|
294
293
|
export {
|
|
295
294
|
DSH_PLUGIN_PACKAGE,
|
|
296
|
-
EDITOR_HOSTS,
|
|
297
295
|
dshInvocation,
|
|
298
296
|
editorStatus,
|
|
299
297
|
findDshCli,
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
} from "./chunk-67RXND3H.js";
|
|
8
8
|
import {
|
|
9
9
|
extractWebClip
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-R2CGNGOT.js";
|
|
11
11
|
import "./chunk-ULKGDBAJ.js";
|
|
12
12
|
import {
|
|
13
13
|
downloadWebImages
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-MKEL2KNU.js";
|
|
15
15
|
import "./chunk-2LW76QIL.js";
|
|
16
16
|
import "./chunk-PTFGE4KS.js";
|
|
17
17
|
import "./chunk-PJDD4R46.js";
|
|
@@ -27,8 +27,8 @@ import {
|
|
|
27
27
|
import "./chunk-QZQRG3JY.js";
|
|
28
28
|
import {
|
|
29
29
|
composeClipMarkdown
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import "./chunk-
|
|
30
|
+
} from "./chunk-LLAXR5EG.js";
|
|
31
|
+
import "./chunk-AZ43P73A.js";
|
|
32
32
|
import "./chunk-URYABAYN.js";
|
|
33
33
|
import {
|
|
34
34
|
clipEngineConfig
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { createRequire as __dinoxCreateRequire } from 'node:module';
|
|
2
2
|
const require = __dinoxCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
|
+
TASK_STATUS_VALUES,
|
|
4
5
|
formatTodoList
|
|
5
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JNRA4TTH.js";
|
|
6
7
|
import {
|
|
7
8
|
sendDaemonRequest
|
|
8
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YFGDTC2F.js";
|
|
9
10
|
import {
|
|
10
11
|
editorPackageRoot
|
|
11
12
|
} from "./chunk-7A5QISPG.js";
|
|
@@ -13,7 +14,7 @@ import {
|
|
|
13
14
|
getPackageVersion
|
|
14
15
|
} from "./chunk-WMJXAF3X.js";
|
|
15
16
|
import "./chunk-XZLFMJOG.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-LAWV5XGL.js";
|
|
17
18
|
import "./chunk-XQZUX7OT.js";
|
|
18
19
|
|
|
19
20
|
// src/editor/mcp.ts
|
|
@@ -26,9 +27,10 @@ import { z } from "zod";
|
|
|
26
27
|
var EDITOR_RESOURCE_URI = "ui://dinox/editor";
|
|
27
28
|
var EDITOR_SESSION_META_KEY = "dinox.ai/editorSession";
|
|
28
29
|
var IMAGE_DOMAINS = ["https://bitiful.chatgo.pro", "https://*.chatgo.pro", "https://*.dinox.info"];
|
|
29
|
-
var UI_METHODS = ["sync", "save", "resolve", "search", "open", "log", "catalog", "updateMeta", "watchOpens", "todos", "todoUpdate", "todoAppend", "todoRestore", "todoSuggestion"];
|
|
30
|
+
var UI_METHODS = ["sync", "save", "resolve", "search", "excerpt", "open", "log", "catalog", "updateMeta", "watchOpens", "todos", "todoUpdate", "todoAppend", "todoRestore", "todoSuggestion", "upload", "linkPreview", "views", "viewEmbed"];
|
|
30
31
|
var SYNC_TIMEOUT_GRACE_MS = 1e4;
|
|
31
32
|
var DEFAULT_TIMEOUT_MS = 3e4;
|
|
33
|
+
var UPLOAD_TIMEOUT_MS = 15 * 6e4;
|
|
32
34
|
var INSTRUCTIONS = "Co-edit the user's Dinox notes. dinox_editor_open shows a note in a panel beside the chat; the user edits it while you read it (dinox_editor_read) and propose changes (dinox_editor_suggest), which they accept or dismiss inline. Address blocks by their [id]. Read only what you need: focus=true for the blocks at the user's cursor, since=<version> for what changed after an earlier read. Prefer small {block, find, replace} edits over rewriting whole blocks, and send related edits in one call. For feedback or reviews, leave comments instead of edits. dinox_todo_open shows the user's inline tasks (checklist items across all notes) in the same panel; change tasks with dinox_todo_update by their [task id], and propose subtasks with dinox_todo_suggest.";
|
|
33
35
|
var indent = (md) => md.replace(/\n/g, "\n ");
|
|
34
36
|
function formatRead(read) {
|
|
@@ -163,12 +165,13 @@ function createEditorMcpServer(options = {}) {
|
|
|
163
165
|
}
|
|
164
166
|
});
|
|
165
167
|
const priority = z.enum(["high", "medium", "low", "none"]);
|
|
168
|
+
const taskStatus = z.enum(TASK_STATUS_VALUES);
|
|
166
169
|
const date = z.string().regex(/^\d{4}-\d{2}-\d{2}$/);
|
|
167
170
|
registerAppTool(server, "dinox_todo_open", {
|
|
168
171
|
title: "Show Dinox tasks",
|
|
169
|
-
description: "Show the user's tasks (checklist items from all their Dinox notes) as a list in the editor panel, where they can check them off, set priorities and due dates, and jump to the note a task lives in. Returns the listed tasks with their ids. Filters left out
|
|
172
|
+
description: "Show the user's tasks (checklist items from all their Dinox notes) as a list in the editor panel, where they can check them off, set priorities and due dates, and jump to the note a task lives in. Returns the listed tasks with their ids. Filters left out keep the panel's current ones (at first: open tasks, i.e. backlog, todo and in_progress).",
|
|
170
173
|
inputSchema: {
|
|
171
|
-
status: z.
|
|
174
|
+
status: z.array(taskStatus).max(5).optional().describe("Statuses to show; [] shows every status"),
|
|
172
175
|
query: z.string().max(500).optional().describe("Words in the task text or its note title"),
|
|
173
176
|
tags: z.array(z.string().max(100)).max(20).optional().describe("Tags on the task or its note, without #"),
|
|
174
177
|
priority: z.array(priority).max(4).optional(),
|
|
@@ -195,12 +198,12 @@ function createEditorMcpServer(options = {}) {
|
|
|
195
198
|
});
|
|
196
199
|
server.registerTool("dinox_todo_update", {
|
|
197
200
|
title: "Update Dinox tasks",
|
|
198
|
-
description: "
|
|
201
|
+
description: "Set the status of, reword, prioritize or reschedule tasks by their task id (from dinox_todo_open). Statuses: backlog (deferred), todo, in_progress, done, cancelled. Closing a task (done or cancelled) closes its open subtasks the same way; reopening one reopens its closed parents as todo. The panel shows the result.",
|
|
199
202
|
inputSchema: {
|
|
200
203
|
updates: z.array(z.object({
|
|
201
204
|
taskId: z.string().describe("Task id"),
|
|
202
205
|
noteId: z.string().optional().describe("The note the task is in, when known"),
|
|
203
|
-
|
|
206
|
+
status: taskStatus.optional(),
|
|
204
207
|
priority: priority.nullable().optional().describe("none or null clears it"),
|
|
205
208
|
due: due.nullable().optional().describe("null clears the due date"),
|
|
206
209
|
text: z.string().min(1).max(2e3).optional().describe("New task words, #tags written in place; only the changed part is rewritten, formatting elsewhere stays")
|
|
@@ -258,7 +261,8 @@ function createEditorMcpServer(options = {}) {
|
|
|
258
261
|
const longPoll = method === "sync" || method === "watchOpens";
|
|
259
262
|
if (method === "todoUpdate") params = { ...params, actor: "user" };
|
|
260
263
|
const waitMs = longPoll ? Math.min(25e3, Math.max(0, Number(params.waitMs) || 0)) : 0;
|
|
261
|
-
const
|
|
264
|
+
const timeoutMs = method === "upload" ? UPLOAD_TIMEOUT_MS : waitMs + (longPoll ? SYNC_TIMEOUT_GRACE_MS : DEFAULT_TIMEOUT_MS);
|
|
265
|
+
const value = await call(`editor.${method}`, { ...params, session }, { timeoutMs });
|
|
262
266
|
return json({ value });
|
|
263
267
|
} catch (error) {
|
|
264
268
|
return failure(error);
|
|
@@ -267,7 +271,7 @@ function createEditorMcpServer(options = {}) {
|
|
|
267
271
|
return server;
|
|
268
272
|
}
|
|
269
273
|
async function serveEditorMcpOverStdio(options = {}) {
|
|
270
|
-
const { ensureDaemonRunning } = await import("./ensure-
|
|
274
|
+
const { ensureDaemonRunning } = await import("./ensure-2OPNFDRW.js");
|
|
271
275
|
let ensured = null;
|
|
272
276
|
const ensure = () => ensured ??= ensureDaemonRunning().finally(() => {
|
|
273
277
|
ensured = null;
|
|
@@ -291,7 +295,5 @@ export {
|
|
|
291
295
|
EDITOR_RESOURCE_URI,
|
|
292
296
|
EDITOR_SESSION_META_KEY,
|
|
293
297
|
createEditorMcpServer,
|
|
294
|
-
formatRead,
|
|
295
|
-
readEditorAppHtml,
|
|
296
298
|
serveEditorMcpOverStdio
|
|
297
299
|
};
|
|
@@ -3,10 +3,10 @@ const require = __dinoxCreateRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
MCP_COMMAND_GROUPS,
|
|
5
5
|
listCommandSchemas
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-MMO7CINX.js";
|
|
7
|
+
import "./chunk-PCB2JD6H.js";
|
|
8
|
+
import "./chunk-OZXS77HJ.js";
|
|
9
|
+
import "./chunk-52XLDO77.js";
|
|
10
10
|
import {
|
|
11
11
|
DINOX_MCP_SERVER_NAME,
|
|
12
12
|
DINOX_STANDALONE_MCP_SERVER_NAME,
|
|
@@ -14,25 +14,27 @@ import {
|
|
|
14
14
|
GATEWAY_SESSION_CWD_ENV,
|
|
15
15
|
GATEWAY_SESSION_TOKEN_ENV,
|
|
16
16
|
READ_CONVERSATION_MAX_LIMIT
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-G6Y3MOUL.js";
|
|
18
|
+
import "./chunk-DKY574LO.js";
|
|
19
19
|
import {
|
|
20
20
|
tryForwardToDaemon
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import
|
|
21
|
+
} from "./chunk-WCY3EKJQ.js";
|
|
22
|
+
import {
|
|
23
|
+
TASK_STATUS_VALUES
|
|
24
|
+
} from "./chunk-JNRA4TTH.js";
|
|
23
25
|
import {
|
|
24
26
|
sendDaemonRequest
|
|
25
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-YFGDTC2F.js";
|
|
26
28
|
import "./chunk-7ODU7LXP.js";
|
|
27
29
|
import {
|
|
28
30
|
getPackageVersion
|
|
29
31
|
} from "./chunk-WMJXAF3X.js";
|
|
30
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-LXC3IW4L.js";
|
|
31
33
|
import {
|
|
32
34
|
requestContext
|
|
33
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-TOGYWN3D.js";
|
|
34
36
|
import "./chunk-XZLFMJOG.js";
|
|
35
|
-
import "./chunk-
|
|
37
|
+
import "./chunk-LAWV5XGL.js";
|
|
36
38
|
import "./chunk-XQZUX7OT.js";
|
|
37
39
|
|
|
38
40
|
// src/gateway/mcpServer.ts
|
|
@@ -62,7 +64,7 @@ function createCliCommandRunner(overrides = {}) {
|
|
|
62
64
|
noticeProvider: null,
|
|
63
65
|
cwd: process.cwd()
|
|
64
66
|
};
|
|
65
|
-
const { printCliError } = await import("./runCli-
|
|
67
|
+
const { printCliError } = await import("./runCli-GKTCIDBF.js");
|
|
66
68
|
const code = requestContext.run(context, () => printCliError(error, argv));
|
|
67
69
|
throw Object.assign(new Error(`Command failed with exit code ${code}`), {
|
|
68
70
|
code,
|
|
@@ -346,7 +348,7 @@ function registerKnowledgeTools(server, call) {
|
|
|
346
348
|
description: "Search the user's Dinox todo items.",
|
|
347
349
|
inputSchema: {
|
|
348
350
|
query: z2.string().describe("Keywords; empty string lists all"),
|
|
349
|
-
status: z2.enum(
|
|
351
|
+
status: z2.array(z2.enum(TASK_STATUS_VALUES)).optional().describe("Statuses to keep; omit for every status"),
|
|
350
352
|
limit: z2.number().int().min(1).max(MAX_RESULTS).optional()
|
|
351
353
|
}
|
|
352
354
|
},
|
|
@@ -355,7 +357,7 @@ function registerKnowledgeTools(server, call) {
|
|
|
355
357
|
const result = await call("todo.search", {
|
|
356
358
|
query,
|
|
357
359
|
includeDeleted: false,
|
|
358
|
-
taskStatus: status ??
|
|
360
|
+
taskStatus: status ?? [],
|
|
359
361
|
taskTagFilter: [],
|
|
360
362
|
limit: limit ?? 20,
|
|
361
363
|
scanLimit: 500
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
} from "./chunk-X7IZXCSL.js";
|
|
7
7
|
import {
|
|
8
8
|
composeClipMarkdown
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-LLAXR5EG.js";
|
|
10
|
+
import "./chunk-AZ43P73A.js";
|
|
11
11
|
import "./chunk-URYABAYN.js";
|
|
12
12
|
import "./chunk-AHRCI2RW.js";
|
|
13
13
|
import "./chunk-6VMHHE5Y.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
toolInstallHint,
|
|
16
16
|
ytDlpAdvisory,
|
|
17
17
|
ytDlpStatus
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-5SORBZTD.js";
|
|
19
19
|
import {
|
|
20
20
|
commandStale,
|
|
21
21
|
parseStringListInput,
|
|
@@ -25,10 +25,10 @@ import {
|
|
|
25
25
|
syncBeforeNoteCommand,
|
|
26
26
|
waitForMutationUpload,
|
|
27
27
|
withNoteDatabase
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-OZXS77HJ.js";
|
|
29
29
|
import {
|
|
30
30
|
reportProgress
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-52XLDO77.js";
|
|
32
32
|
import {
|
|
33
33
|
convertMarkdownToNoteContent,
|
|
34
34
|
createNote,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
resolveZettelBoxIdsForCreate,
|
|
37
37
|
uploadToOfficialStorage,
|
|
38
38
|
validateTagsForCreate
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-G6Y3MOUL.js";
|
|
40
40
|
import {
|
|
41
41
|
isWorkbuddyUrl,
|
|
42
42
|
normalizeWorkbuddyUrl
|
|
@@ -139,15 +139,15 @@ import {
|
|
|
139
139
|
AI_SERVICE_URL,
|
|
140
140
|
generateId,
|
|
141
141
|
toAuthorizationHeaderValue
|
|
142
|
-
} from "./chunk-
|
|
143
|
-
import "./chunk-
|
|
144
|
-
import "./chunk-
|
|
142
|
+
} from "./chunk-WCY3EKJQ.js";
|
|
143
|
+
import "./chunk-JNRA4TTH.js";
|
|
144
|
+
import "./chunk-YFGDTC2F.js";
|
|
145
145
|
import "./chunk-7ODU7LXP.js";
|
|
146
146
|
import "./chunk-WMJXAF3X.js";
|
|
147
147
|
import {
|
|
148
148
|
clipCookiesFile
|
|
149
|
-
} from "./chunk-
|
|
150
|
-
import "./chunk-
|
|
149
|
+
} from "./chunk-YX4SIEVS.js";
|
|
150
|
+
import "./chunk-LXC3IW4L.js";
|
|
151
151
|
import {
|
|
152
152
|
parseNetscapeCookies,
|
|
153
153
|
selectCookiesForUrl
|
|
@@ -157,13 +157,13 @@ import {
|
|
|
157
157
|
printHumanReadableLine,
|
|
158
158
|
printSuccess,
|
|
159
159
|
resolveUserPath
|
|
160
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-TOGYWN3D.js";
|
|
161
161
|
import {
|
|
162
162
|
getDataDir
|
|
163
163
|
} from "./chunk-XZLFMJOG.js";
|
|
164
164
|
import {
|
|
165
165
|
DinoxError
|
|
166
|
-
} from "./chunk-
|
|
166
|
+
} from "./chunk-LAWV5XGL.js";
|
|
167
167
|
import {
|
|
168
168
|
isApplePodcastUrl,
|
|
169
169
|
normalizeApplePodcastUrl
|
|
@@ -27,28 +27,28 @@ import {
|
|
|
27
27
|
registerTodoCommands,
|
|
28
28
|
registerUpdateCommand,
|
|
29
29
|
schemaCommandMetadata
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
30
|
+
} from "./chunk-MMO7CINX.js";
|
|
31
|
+
import "./chunk-PCB2JD6H.js";
|
|
32
|
+
import "./chunk-OZXS77HJ.js";
|
|
33
33
|
import {
|
|
34
34
|
setProgressReporting
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-52XLDO77.js";
|
|
36
36
|
import {
|
|
37
37
|
registerDaemonCommands,
|
|
38
38
|
registerStandaloneCommand
|
|
39
|
-
} from "./chunk-
|
|
40
|
-
import "./chunk-
|
|
39
|
+
} from "./chunk-G6Y3MOUL.js";
|
|
40
|
+
import "./chunk-DKY574LO.js";
|
|
41
41
|
import {
|
|
42
42
|
GLOBAL_VALUE_OPTIONS,
|
|
43
43
|
validateRequestId
|
|
44
|
-
} from "./chunk-
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
44
|
+
} from "./chunk-WCY3EKJQ.js";
|
|
45
|
+
import "./chunk-JNRA4TTH.js";
|
|
46
|
+
import "./chunk-YFGDTC2F.js";
|
|
47
47
|
import "./chunk-7ODU7LXP.js";
|
|
48
48
|
import {
|
|
49
49
|
getPackageVersion
|
|
50
50
|
} from "./chunk-WMJXAF3X.js";
|
|
51
|
-
import "./chunk-
|
|
51
|
+
import "./chunk-LXC3IW4L.js";
|
|
52
52
|
import {
|
|
53
53
|
clearRequestedStructuredOutputFormat,
|
|
54
54
|
getRequestedStructuredOutputFormat,
|
|
@@ -63,14 +63,14 @@ import {
|
|
|
63
63
|
setRequestedStructuredOutputFormat,
|
|
64
64
|
writeToStderr,
|
|
65
65
|
writeToStdout
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-TOGYWN3D.js";
|
|
67
67
|
import "./chunk-XZLFMJOG.js";
|
|
68
68
|
import {
|
|
69
69
|
DinoxError,
|
|
70
70
|
buildStructuredErrorPayload,
|
|
71
71
|
isDinoxError,
|
|
72
72
|
listErrorCodes
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-LAWV5XGL.js";
|
|
74
74
|
import "./chunk-XQZUX7OT.js";
|
|
75
75
|
|
|
76
76
|
// src/cli.ts
|
|
@@ -12,29 +12,29 @@ import {
|
|
|
12
12
|
platformsNeeding,
|
|
13
13
|
toolInstallHint,
|
|
14
14
|
ytDlpStatus
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-5SORBZTD.js";
|
|
16
16
|
import {
|
|
17
17
|
reportProgress
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-52XLDO77.js";
|
|
19
19
|
import {
|
|
20
20
|
clipCookiesFile,
|
|
21
21
|
readCookieJar,
|
|
22
22
|
summarizeCookies
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-YX4SIEVS.js";
|
|
24
|
+
import "./chunk-LXC3IW4L.js";
|
|
25
25
|
import "./chunk-ULKGDBAJ.js";
|
|
26
26
|
import {
|
|
27
27
|
getRequestedStructuredOutputFormat,
|
|
28
28
|
printHumanReadableLine,
|
|
29
29
|
printSuccess,
|
|
30
30
|
writeToStderr
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-TOGYWN3D.js";
|
|
32
32
|
import {
|
|
33
33
|
getDataDir
|
|
34
34
|
} from "./chunk-XZLFMJOG.js";
|
|
35
35
|
import {
|
|
36
36
|
DinoxError
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-LAWV5XGL.js";
|
|
38
38
|
import "./chunk-W7R5JTSA.js";
|
|
39
39
|
import "./chunk-F7BDWXBG.js";
|
|
40
40
|
import "./chunk-KOAKG2QU.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
convertWebContentHtmlToMarkdown,
|
|
10
10
|
defuddleExtract,
|
|
11
11
|
replaceWebMarkdownImageUrls
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-MKEL2KNU.js";
|
|
13
13
|
import "./chunk-2LW76QIL.js";
|
|
14
14
|
import "./chunk-PTFGE4KS.js";
|
|
15
15
|
import "./chunk-PJDD4R46.js";
|
|
@@ -32,8 +32,8 @@ import {
|
|
|
32
32
|
} from "./chunk-QZQRG3JY.js";
|
|
33
33
|
import {
|
|
34
34
|
composeClipMarkdown
|
|
35
|
-
} from "./chunk-
|
|
36
|
-
import "./chunk-
|
|
35
|
+
} from "./chunk-LLAXR5EG.js";
|
|
36
|
+
import "./chunk-AZ43P73A.js";
|
|
37
37
|
import "./chunk-URYABAYN.js";
|
|
38
38
|
import {
|
|
39
39
|
clipEngineConfig
|
|
@@ -19,8 +19,8 @@ import {
|
|
|
19
19
|
} from "./chunk-QZQRG3JY.js";
|
|
20
20
|
import {
|
|
21
21
|
composeClipMarkdown
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
} from "./chunk-LLAXR5EG.js";
|
|
23
|
+
import "./chunk-AZ43P73A.js";
|
|
24
24
|
import "./chunk-URYABAYN.js";
|
|
25
25
|
import {
|
|
26
26
|
clipEngineConfig
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
captureWebWithProxyFallback,
|
|
5
5
|
extractWebClip,
|
|
6
6
|
loadWebPage
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-R2CGNGOT.js";
|
|
8
8
|
import "./chunk-ULKGDBAJ.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-MKEL2KNU.js";
|
|
10
10
|
import "./chunk-2LW76QIL.js";
|
|
11
11
|
import "./chunk-PTFGE4KS.js";
|
|
12
12
|
import "./chunk-PJDD4R46.js";
|
|
@@ -16,8 +16,8 @@ import "./chunk-224ML7QC.js";
|
|
|
16
16
|
import "./chunk-W7R5JTSA.js";
|
|
17
17
|
import "./chunk-5KU25TMX.js";
|
|
18
18
|
import "./chunk-QZQRG3JY.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-LLAXR5EG.js";
|
|
20
|
+
import "./chunk-AZ43P73A.js";
|
|
21
21
|
import "./chunk-URYABAYN.js";
|
|
22
22
|
import "./chunk-F7BDWXBG.js";
|
|
23
23
|
import "./chunk-AHRCI2RW.js";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
import {
|
|
31
31
|
normalizeClipMarkdownBody,
|
|
32
32
|
stripClipBoilerplate
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-AZ43P73A.js";
|
|
34
34
|
import "./chunk-URYABAYN.js";
|
|
35
35
|
import {
|
|
36
36
|
clipEngineConfig
|
|
@@ -1348,6 +1348,10 @@ function stripLeadingDuplicateTitleHeading(markdown, title) {
|
|
|
1348
1348
|
else break;
|
|
1349
1349
|
index = skipBlankLines(lines, index + 1);
|
|
1350
1350
|
}
|
|
1351
|
+
if (isListItemLine(lines[index])) {
|
|
1352
|
+
const listEnd = skipLeadingListBlock(lines, index);
|
|
1353
|
+
if (isTocLikeList(lines, index, listEnd)) index = skipBlankLines(lines, listEnd);
|
|
1354
|
+
}
|
|
1351
1355
|
const line = lines[index];
|
|
1352
1356
|
if (!line || !isHeadingLine(line)) return markdown;
|
|
1353
1357
|
const headingText = line.trim().replace(/^#\s+/, "").trim();
|
|
@@ -1367,6 +1371,41 @@ function isKickerLine(line) {
|
|
|
1367
1371
|
if (/[[\]()<>`*_#|!]/.test(text) || /^(?:[-+>]|\d+[.)])\s/.test(text)) return false;
|
|
1368
1372
|
return !/[。!?!?.…;;::,,、]$/.test(text);
|
|
1369
1373
|
}
|
|
1374
|
+
var LIST_ITEM_RE = /^\s*(?:[-+*]|\d+[.)])\s+\S/;
|
|
1375
|
+
var MAX_TOC_ITEMS = 40;
|
|
1376
|
+
var MAX_TOC_ITEM_CHARS = 80;
|
|
1377
|
+
function isListItemLine(line) {
|
|
1378
|
+
return typeof line === "string" && LIST_ITEM_RE.test(line);
|
|
1379
|
+
}
|
|
1380
|
+
function skipLeadingListBlock(lines, startIndex) {
|
|
1381
|
+
if (!isListItemLine(lines[startIndex])) return startIndex;
|
|
1382
|
+
let index = startIndex;
|
|
1383
|
+
while (index < lines.length) {
|
|
1384
|
+
if (isListItemLine(lines[index])) {
|
|
1385
|
+
index += 1;
|
|
1386
|
+
continue;
|
|
1387
|
+
}
|
|
1388
|
+
if (lines[index]?.trim() === "") {
|
|
1389
|
+
const next = skipBlankLines(lines, index);
|
|
1390
|
+
if (isListItemLine(lines[next])) {
|
|
1391
|
+
index = next;
|
|
1392
|
+
continue;
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
break;
|
|
1396
|
+
}
|
|
1397
|
+
return index;
|
|
1398
|
+
}
|
|
1399
|
+
function listItemText(line) {
|
|
1400
|
+
return line.trim().replace(/^(?:[-+*]|\d+[.)])\s+/, "");
|
|
1401
|
+
}
|
|
1402
|
+
function isTocLikeList(lines, startIndex, endIndex) {
|
|
1403
|
+
const items = lines.slice(startIndex, endIndex).filter((line) => isListItemLine(line));
|
|
1404
|
+
if (items.length === 0 || items.length > MAX_TOC_ITEMS) return false;
|
|
1405
|
+
const texts = items.map((line) => listItemText(line));
|
|
1406
|
+
if (texts.some((text) => text.includes("\u76EE\u5F55"))) return true;
|
|
1407
|
+
return texts.every((text) => Array.from(text).length <= MAX_TOC_ITEM_CHARS);
|
|
1408
|
+
}
|
|
1370
1409
|
function normalizeTitleKey(value) {
|
|
1371
1410
|
return value.replace(/[\s*_`#]/g, "").toLowerCase();
|
|
1372
1411
|
}
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "./chunk-77UP745T.js";
|
|
13
13
|
import {
|
|
14
14
|
downloadWebImages
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-MKEL2KNU.js";
|
|
16
16
|
import "./chunk-2LW76QIL.js";
|
|
17
17
|
import "./chunk-PTFGE4KS.js";
|
|
18
18
|
import "./chunk-PJDD4R46.js";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
import {
|
|
30
30
|
downloadVideo,
|
|
31
31
|
resolveVideoMetadata
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-RSSEVU2F.js";
|
|
33
33
|
import {
|
|
34
34
|
summarizeImageFailures
|
|
35
35
|
} from "./chunk-5KU25TMX.js";
|
|
@@ -39,8 +39,8 @@ import {
|
|
|
39
39
|
} from "./chunk-QZQRG3JY.js";
|
|
40
40
|
import {
|
|
41
41
|
composeClipMarkdown
|
|
42
|
-
} from "./chunk-
|
|
43
|
-
import "./chunk-
|
|
42
|
+
} from "./chunk-LLAXR5EG.js";
|
|
43
|
+
import "./chunk-AZ43P73A.js";
|
|
44
44
|
import "./chunk-URYABAYN.js";
|
|
45
45
|
import {
|
|
46
46
|
clipEngineConfig
|
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
} from "./chunk-QZQRG3JY.js";
|
|
14
14
|
import {
|
|
15
15
|
composeClipMarkdown
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-LLAXR5EG.js";
|
|
17
|
+
import "./chunk-AZ43P73A.js";
|
|
18
18
|
import "./chunk-URYABAYN.js";
|
|
19
19
|
import {
|
|
20
20
|
clipEngineConfig
|
|
@@ -279,12 +279,12 @@ function extractBootstrapJson(html) {
|
|
|
279
279
|
}
|
|
280
280
|
let depth = 0;
|
|
281
281
|
let inString = false;
|
|
282
|
-
let
|
|
282
|
+
let escaping = false;
|
|
283
283
|
for (let index = brace; index < html.length; index += 1) {
|
|
284
284
|
const char = html[index] ?? "";
|
|
285
285
|
if (inString) {
|
|
286
|
-
if (
|
|
287
|
-
else if (char === "\\")
|
|
286
|
+
if (escaping) escaping = false;
|
|
287
|
+
else if (char === "\\") escaping = true;
|
|
288
288
|
else if (char === '"') inString = false;
|
|
289
289
|
continue;
|
|
290
290
|
}
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./chunk-3EKNTO6G.js";
|
|
8
8
|
import {
|
|
9
9
|
downloadWebImages
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-MKEL2KNU.js";
|
|
11
11
|
import "./chunk-2LW76QIL.js";
|
|
12
12
|
import "./chunk-PTFGE4KS.js";
|
|
13
13
|
import "./chunk-PJDD4R46.js";
|
|
@@ -24,8 +24,8 @@ import {
|
|
|
24
24
|
import "./chunk-QZQRG3JY.js";
|
|
25
25
|
import {
|
|
26
26
|
composeClipMarkdown
|
|
27
|
-
} from "./chunk-
|
|
28
|
-
import "./chunk-
|
|
27
|
+
} from "./chunk-LLAXR5EG.js";
|
|
28
|
+
import "./chunk-AZ43P73A.js";
|
|
29
29
|
import "./chunk-URYABAYN.js";
|
|
30
30
|
import {
|
|
31
31
|
clipEngineConfig
|
|
@@ -26,8 +26,8 @@ import {
|
|
|
26
26
|
} from "./chunk-QZQRG3JY.js";
|
|
27
27
|
import {
|
|
28
28
|
composeClipMarkdown
|
|
29
|
-
} from "./chunk-
|
|
30
|
-
import "./chunk-
|
|
29
|
+
} from "./chunk-LLAXR5EG.js";
|
|
30
|
+
import "./chunk-AZ43P73A.js";
|
|
31
31
|
import "./chunk-URYABAYN.js";
|
|
32
32
|
import {
|
|
33
33
|
clipEngineConfig
|
|
@@ -6,15 +6,15 @@ import {
|
|
|
6
6
|
} from "./chunk-KL75BFYJ.js";
|
|
7
7
|
import {
|
|
8
8
|
formatDuration
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-RSSEVU2F.js";
|
|
10
10
|
import {
|
|
11
11
|
isTransientError,
|
|
12
12
|
retry
|
|
13
13
|
} from "./chunk-QZQRG3JY.js";
|
|
14
14
|
import {
|
|
15
15
|
composeClipMarkdown
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-LLAXR5EG.js";
|
|
17
|
+
import "./chunk-AZ43P73A.js";
|
|
18
18
|
import "./chunk-URYABAYN.js";
|
|
19
19
|
import {
|
|
20
20
|
clipEngineConfig
|
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
buildVideoMarkdown,
|
|
8
8
|
downloadVideo,
|
|
9
9
|
resolveVideoMetadata
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-RSSEVU2F.js";
|
|
11
|
+
import "./chunk-LLAXR5EG.js";
|
|
12
|
+
import "./chunk-AZ43P73A.js";
|
|
13
13
|
import "./chunk-URYABAYN.js";
|
|
14
14
|
import {
|
|
15
15
|
ytdlpOptionsFor
|
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
} from "./chunk-QZQRG3JY.js";
|
|
14
14
|
import {
|
|
15
15
|
composeClipMarkdown
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-LLAXR5EG.js";
|
|
17
|
+
import "./chunk-AZ43P73A.js";
|
|
18
18
|
import "./chunk-URYABAYN.js";
|
|
19
19
|
import {
|
|
20
20
|
clipEngineConfig
|