dsh-typst-plugin 0.0.0-stage → 0.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/LICENSE +21 -0
- package/README.en.md +121 -0
- package/README.md +120 -2
- package/cordis.patch.yml +6 -0
- package/docs/images/icon.png +0 -0
- package/docs/plugin-detail.en.md +2 -0
- package/docs/plugin-detail.md +2 -0
- package/lib/client.js +41996 -0
- package/lib/client.js.map +7 -0
- package/lib/config.d.ts +107 -0
- package/lib/config.d.ts.map +1 -0
- package/lib/config.js +167 -0
- package/lib/config.js.map +1 -0
- package/lib/constants.d.ts +77 -0
- package/lib/constants.d.ts.map +1 -0
- package/lib/constants.js +85 -0
- package/lib/constants.js.map +1 -0
- package/lib/contract.d.ts +263 -0
- package/lib/contract.d.ts.map +1 -0
- package/lib/contract.js +9 -0
- package/lib/contract.js.map +1 -0
- package/lib/diagnostic-text.d.ts +13 -0
- package/lib/diagnostic-text.d.ts.map +1 -0
- package/lib/diagnostic-text.js +28 -0
- package/lib/diagnostic-text.js.map +1 -0
- package/lib/errors.d.ts +119 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +161 -0
- package/lib/errors.js.map +1 -0
- package/lib/host/facts.d.ts +31 -0
- package/lib/host/facts.d.ts.map +1 -0
- package/lib/host/facts.js +145 -0
- package/lib/host/facts.js.map +1 -0
- package/lib/host/which.d.ts +20 -0
- package/lib/host/which.d.ts.map +1 -0
- package/lib/host/which.js +50 -0
- package/lib/host/which.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -0
- package/lib/remote.d.ts +70 -0
- package/lib/remote.d.ts.map +1 -0
- package/lib/remote.js +156 -0
- package/lib/remote.js.map +1 -0
- package/lib/service.d.ts +71 -0
- package/lib/service.d.ts.map +1 -0
- package/lib/service.js +213 -0
- package/lib/service.js.map +1 -0
- package/lib/skills/typst.d.ts +13 -0
- package/lib/skills/typst.d.ts.map +1 -0
- package/lib/skills/typst.js +78 -0
- package/lib/skills/typst.js.map +1 -0
- package/lib/status-codec.d.ts +11 -0
- package/lib/status-codec.d.ts.map +1 -0
- package/lib/status-codec.js +11 -0
- package/lib/status-codec.js.map +1 -0
- package/lib/tools/registration.d.ts +23 -0
- package/lib/tools/registration.d.ts.map +1 -0
- package/lib/tools/registration.js +758 -0
- package/lib/tools/registration.js.map +1 -0
- package/lib/tools/shared.d.ts +30 -0
- package/lib/tools/shared.d.ts.map +1 -0
- package/lib/tools/shared.js +79 -0
- package/lib/tools/shared.js.map +1 -0
- package/lib/typert.d.ts +25 -0
- package/lib/typert.d.ts.map +1 -0
- package/lib/typert.js +116 -0
- package/lib/typert.js.map +1 -0
- package/lib/typst/diagnostics.d.ts +58 -0
- package/lib/typst/diagnostics.d.ts.map +1 -0
- package/lib/typst/diagnostics.js +237 -0
- package/lib/typst/diagnostics.js.map +1 -0
- package/lib/typst/flags.d.ts +8 -0
- package/lib/typst/flags.d.ts.map +1 -0
- package/lib/typst/flags.js +8 -0
- package/lib/typst/flags.js.map +1 -0
- package/lib/typst/locate.d.ts +61 -0
- package/lib/typst/locate.d.ts.map +1 -0
- package/lib/typst/locate.js +152 -0
- package/lib/typst/locate.js.map +1 -0
- package/lib/typst/mainfile.d.ts +40 -0
- package/lib/typst/mainfile.d.ts.map +1 -0
- package/lib/typst/mainfile.js +136 -0
- package/lib/typst/mainfile.js.map +1 -0
- package/lib/typst/match.d.ts +67 -0
- package/lib/typst/match.d.ts.map +1 -0
- package/lib/typst/match.js +227 -0
- package/lib/typst/match.js.map +1 -0
- package/lib/typst/oneshot.d.ts +48 -0
- package/lib/typst/oneshot.d.ts.map +1 -0
- package/lib/typst/oneshot.js +86 -0
- package/lib/typst/oneshot.js.map +1 -0
- package/lib/typst/owners.d.ts +28 -0
- package/lib/typst/owners.d.ts.map +1 -0
- package/lib/typst/owners.js +98 -0
- package/lib/typst/owners.js.map +1 -0
- package/lib/typst/pdf-extract.d.ts +28 -0
- package/lib/typst/pdf-extract.d.ts.map +1 -0
- package/lib/typst/pdf-extract.js +111 -0
- package/lib/typst/pdf-extract.js.map +1 -0
- package/lib/typst/process.d.ts +73 -0
- package/lib/typst/process.d.ts.map +1 -0
- package/lib/typst/process.js +147 -0
- package/lib/typst/process.js.map +1 -0
- package/lib/typst/text.d.ts +62 -0
- package/lib/typst/text.d.ts.map +1 -0
- package/lib/typst/text.js +282 -0
- package/lib/typst/text.js.map +1 -0
- package/lib/typst/watcher.d.ts +76 -0
- package/lib/typst/watcher.d.ts.map +1 -0
- package/lib/typst/watcher.js +210 -0
- package/lib/typst/watcher.js.map +1 -0
- package/lib/wire-schemas.d.ts +433 -0
- package/lib/wire-schemas.d.ts.map +1 -0
- package/lib/wire-schemas.js +428 -0
- package/lib/wire-schemas.js.map +1 -0
- package/lib/workspace/containment.d.ts +25 -0
- package/lib/workspace/containment.d.ts.map +1 -0
- package/lib/workspace/containment.js +54 -0
- package/lib/workspace/containment.js.map +1 -0
- package/lib/workspace/session.d.ts +268 -0
- package/lib/workspace/session.d.ts.map +1 -0
- package/lib/workspace/session.js +1576 -0
- package/lib/workspace/session.js.map +1 -0
- package/locale/en.json +15 -0
- package/locale/zh.json +15 -0
- package/package.json +113 -4
- package/release-provenance.json +137 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server-side PDF inspection with the user-space geometry the highlight
|
|
3
|
+
* engine needs: page count and per-page text + spans. pdf.js runs on the
|
|
4
|
+
* main thread through its fake-worker entry (`globalThis.pdfjsWorker`), the
|
|
5
|
+
* same arrangement the ZCode typst-workbench server (0.2.0) ships. Loading
|
|
6
|
+
* is lazy: a session that never highlights never pays for the module.
|
|
7
|
+
* Host half only.
|
|
8
|
+
* @module dsh-typst/typst/pdf-extract
|
|
9
|
+
*/
|
|
10
|
+
import { existsSync } from "node:fs";
|
|
11
|
+
import { createRequire } from "node:module";
|
|
12
|
+
import { dirname, join, resolve, sep } from "node:path";
|
|
13
|
+
import { buildPage } from "./text.js";
|
|
14
|
+
let loading = null;
|
|
15
|
+
/** Load pdf.js (legacy build) once; the fake-worker entry must be set first. */
|
|
16
|
+
async function pdfjs() {
|
|
17
|
+
if (loading !== null)
|
|
18
|
+
return loading;
|
|
19
|
+
const pending = (async () => {
|
|
20
|
+
const [pdf, worker] = await Promise.all([
|
|
21
|
+
// pdf.js's own types describe the browser surface; the extraction
|
|
22
|
+
// surface used here is the small one below, so the module is trusted
|
|
23
|
+
// through `unknown` and consumed via PdfJsModule.
|
|
24
|
+
import("pdfjs-dist/legacy/build/pdf.mjs"),
|
|
25
|
+
import("pdfjs-dist/legacy/build/pdf.worker.mjs"),
|
|
26
|
+
]);
|
|
27
|
+
globalThis.pdfjsWorker = worker;
|
|
28
|
+
return pdf;
|
|
29
|
+
})();
|
|
30
|
+
loading = pending;
|
|
31
|
+
try {
|
|
32
|
+
return await pending;
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
// A rejected import must not be cached forever: a transient module-load
|
|
36
|
+
// failure would otherwise disable page counts and highlights for the
|
|
37
|
+
// whole process.
|
|
38
|
+
if (loading === pending)
|
|
39
|
+
loading = null;
|
|
40
|
+
throw error;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The directory pdf.js should read its cmaps and standard fonts from (the
|
|
45
|
+
* installed pdfjs-dist package), or null when it cannot be resolved; typst
|
|
46
|
+
* embeds its fonts, so extraction works without them.
|
|
47
|
+
*/
|
|
48
|
+
export function pdfjsDataDir() {
|
|
49
|
+
try {
|
|
50
|
+
const require = createRequire(import.meta.url);
|
|
51
|
+
const dir = dirname(require.resolve("pdfjs-dist/package.json"));
|
|
52
|
+
if (existsSync(join(dir, "cmaps")))
|
|
53
|
+
return resolve(dir) + sep;
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
// Not resolvable (vendored without node_modules).
|
|
57
|
+
}
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
async function open(data, dataDir) {
|
|
61
|
+
const module = await pdfjs();
|
|
62
|
+
return module.getDocument({
|
|
63
|
+
data: new Uint8Array(data),
|
|
64
|
+
...(dataDir
|
|
65
|
+
? {
|
|
66
|
+
cMapUrl: `${dataDir}cmaps${sep}`,
|
|
67
|
+
cMapPacked: true,
|
|
68
|
+
standardFontDataUrl: `${dataDir}standard_fonts${sep}`,
|
|
69
|
+
}
|
|
70
|
+
: {}),
|
|
71
|
+
disableFontFace: true,
|
|
72
|
+
useSystemFonts: false,
|
|
73
|
+
verbosity: 0,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Number of pages in a PDF, or a rejection when the bytes are not readable.
|
|
78
|
+
* Runs without cmaps: only the structure is read.
|
|
79
|
+
*/
|
|
80
|
+
export async function pageCount(data) {
|
|
81
|
+
const task = await open(data, null);
|
|
82
|
+
try {
|
|
83
|
+
return (await task.promise).numPages;
|
|
84
|
+
}
|
|
85
|
+
finally {
|
|
86
|
+
await task.destroy();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Extract per-page text + spans for quote matching and highlight rectangles.
|
|
91
|
+
* @param data - the PDF bytes.
|
|
92
|
+
* @param dataDir - cmap/standard-font directory from {@link pdfjsDataDir}.
|
|
93
|
+
*/
|
|
94
|
+
export async function extractPages(data, dataDir) {
|
|
95
|
+
const task = await open(data, dataDir);
|
|
96
|
+
try {
|
|
97
|
+
const doc = await task.promise;
|
|
98
|
+
const pages = [];
|
|
99
|
+
for (let index = 0; index < doc.numPages; index++) {
|
|
100
|
+
const page = await doc.getPage(index + 1);
|
|
101
|
+
const content = await page.getTextContent();
|
|
102
|
+
pages.push(buildPage(content.items, { index }));
|
|
103
|
+
page.cleanup();
|
|
104
|
+
}
|
|
105
|
+
return pages;
|
|
106
|
+
}
|
|
107
|
+
finally {
|
|
108
|
+
await task.destroy();
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=pdf-extract.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-extract.js","sourceRoot":"","sources":["../../src/typst/pdf-extract.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,SAAS,EAAmC,MAAM,WAAW,CAAC;AAoBvE,IAAI,OAAO,GAAgC,IAAI,CAAC;AAEhD,gFAAgF;AAChF,KAAK,UAAU,KAAK;IAClB,IAAI,OAAO,KAAK,IAAI;QAAE,OAAO,OAAO,CAAC;IACrC,MAAM,OAAO,GAAG,CAAC,KAAK,IAAI,EAAE;QAC1B,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;YACtC,kEAAkE;YAClE,qEAAqE;YACrE,kDAAkD;YAClD,MAAM,CAAC,iCAAiC,CAAqB;YAC7D,MAAM,CAAC,wCAAwC,CAAC;SACjD,CAAC,CAAC;QACF,UAAsC,CAAC,WAAW,GAAG,MAAM,CAAC;QAC7D,OAAO,GAAkB,CAAC;IAC5B,CAAC,CAAC,EAAE,CAAC;IACL,OAAO,GAAG,OAAO,CAAC;IAClB,IAAI,CAAC;QACH,OAAO,MAAM,OAAO,CAAC;IACvB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,wEAAwE;QACxE,qEAAqE;QACrE,iBAAiB;QACjB,IAAI,OAAO,KAAK,OAAO;YAAE,OAAO,GAAG,IAAI,CAAC;QACxC,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,YAAY;IAC1B,IAAI,CAAC;QACH,M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B,OAAsB;IAEtB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACvC,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC;QAC/B,MAAM,KAAK,GAAe,EAAE,CAAC;QAC7B,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,GAAG,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,CAAC;YAClD,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;YAC1C,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;YAC5C,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;YAChD,IAAI,CAAC,OAAO,EAAE,CAAC;QACjB,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;YAAS,CAAC;QACT,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;IACvB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The plugin's single subprocess entry point. Every typst invocation and the
|
|
3
|
+
* login-shell lookup go through the harness `ctx.subprocess` seam, which
|
|
4
|
+
* supplies the scrubbed environment, managed process range, abort propagation
|
|
5
|
+
* and host-exit teardown.
|
|
6
|
+
*
|
|
7
|
+
* Two shapes are exposed: {@link ProcessRunner.run} collects a short command's
|
|
8
|
+
* output for toolchain probes and one-shot compiles; {@link ProcessRunner.spawnPiped}
|
|
9
|
+
* streams a long-running child (the watch) with incremental UTF-8 decoding.
|
|
10
|
+
* @module dsh-typst/typst/process
|
|
11
|
+
*/
|
|
12
|
+
import type { SubprocessHandle, SubprocessOutcome, SubprocessRuntime } from "@deepseek-ai/dsh-subprocess";
|
|
13
|
+
/** Spawn facts shared by every typst child. */
|
|
14
|
+
export interface ProcessOptions {
|
|
15
|
+
/** Child working directory. */
|
|
16
|
+
cwd: string;
|
|
17
|
+
/** Explicit environment entries merged onto the provider's scrubbed base. */
|
|
18
|
+
env?: NodeJS.ProcessEnv;
|
|
19
|
+
/** Cancellation; the provider starts its managed-range termination. */
|
|
20
|
+
signal?: AbortSignal;
|
|
21
|
+
/** Grace period before the provider escalates termination. */
|
|
22
|
+
graceMs?: number;
|
|
23
|
+
}
|
|
24
|
+
/** The outcome of one short command; a nonzero exit is a normal value. */
|
|
25
|
+
export interface ProcessResult {
|
|
26
|
+
code: number | null;
|
|
27
|
+
signal: NodeJS.Signals | null;
|
|
28
|
+
stdout: string;
|
|
29
|
+
stderr: string;
|
|
30
|
+
timedOut: boolean;
|
|
31
|
+
aborted: boolean;
|
|
32
|
+
}
|
|
33
|
+
/** A long-running child whose stdout and stderr are decoded as text. */
|
|
34
|
+
export interface PipedProcess {
|
|
35
|
+
readonly handle: SubprocessHandle;
|
|
36
|
+
readonly done: Promise<SubprocessOutcome>;
|
|
37
|
+
/** Attach one listener fed by both streams; call once, immediately after spawn. */
|
|
38
|
+
onOutput(listener: (text: string) => void): void;
|
|
39
|
+
/** Start the provider's managed-range termination. */
|
|
40
|
+
terminate(): void;
|
|
41
|
+
/** Wait until the managed range is empty; false when `signal` aborted first. */
|
|
42
|
+
waitForExit(signal?: AbortSignal): Promise<boolean>;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Wrap the host subprocess capability. One instance is owned by the workbench
|
|
46
|
+
* service and shared by every workspace session.
|
|
47
|
+
*/
|
|
48
|
+
export declare class ProcessRunner {
|
|
49
|
+
private readonly runtime;
|
|
50
|
+
constructor(runtime: SubprocessRuntime);
|
|
51
|
+
/**
|
|
52
|
+
* Spawn a long-running child with raw pipes. Both streams are decoded with
|
|
53
|
+
* a streaming decoder, so a multi-byte character split across chunks is
|
|
54
|
+
* never replaced with U+FFFD.
|
|
55
|
+
* @param argv - executable and arguments; never shell-interpreted.
|
|
56
|
+
* @param options - cwd, explicit env, cancellation and grace.
|
|
57
|
+
* @returns the live handle plus text-output helpers.
|
|
58
|
+
*/
|
|
59
|
+
spawnPiped(argv: readonly string[], options: ProcessOptions): PipedProcess;
|
|
60
|
+
/**
|
|
61
|
+
* Run a short command to completion with bounded collected output.
|
|
62
|
+
* A nonzero exit resolves; only a spawn/provider failure or the deadline
|
|
63
|
+
* produces the failure shape.
|
|
64
|
+
* @param argv - executable and arguments.
|
|
65
|
+
* @param options - cwd, explicit env, cancellation, deadline and output cap.
|
|
66
|
+
* @returns exit facts plus decoded stdout/stderr.
|
|
67
|
+
*/
|
|
68
|
+
run(argv: readonly string[], options: ProcessOptions & {
|
|
69
|
+
timeoutMs?: number;
|
|
70
|
+
collectBytes?: number;
|
|
71
|
+
}): Promise<ProcessResult>;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=process.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process.d.ts","sourceRoot":"","sources":["../../src/typst/process.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,6BAA6B,CAAC;AAKrC,+CAA+C;AAC/C,MAAM,WAAW,cAAc;IAC7B,+BAA+B;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,6EAA6E;IAC7E,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,uEAAuE;IACvE,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,8DAA8D;IAC9D,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,0EAA0E;AAC1E,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,wEAAwE;AACxE,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAClC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAC1C,mFAAmF;IACnF,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,CAAC;IACjD,sDAAsD;IACtD,SAAS,IAAI,IAAI,CAAC;IAClB,gFAAgF;IAChF,WAAW,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACrD;AAED;;;GAGG;AACH,qBAAa,aAAa;IACZ,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,iBAAiB;IAEvD;;;;;;;OAOG;IACH,UAAU,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,EAAE,cAAc,GAAG,YAAY;IAsC1E;;;;;;;OAOG;IACG,GAAG,CACP,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,OAAO,EAAE,cAAc,GAAG;QACxB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,GACA,OAAO,CAAC,aAAa,CAAC;CA+D1B"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The plugin's single subprocess entry point. Every typst invocation and the
|
|
3
|
+
* login-shell lookup go through the harness `ctx.subprocess` seam, which
|
|
4
|
+
* supplies the scrubbed environment, managed process range, abort propagation
|
|
5
|
+
* and host-exit teardown.
|
|
6
|
+
*
|
|
7
|
+
* Two shapes are exposed: {@link ProcessRunner.run} collects a short command's
|
|
8
|
+
* output for toolchain probes and one-shot compiles; {@link ProcessRunner.spawnPiped}
|
|
9
|
+
* streams a long-running child (the watch) with incremental UTF-8 decoding.
|
|
10
|
+
* @module dsh-typst/typst/process
|
|
11
|
+
*/
|
|
12
|
+
import { StringDecoder } from "node:string_decoder";
|
|
13
|
+
import { deadline, timeoutOf } from "@deepseek-ai/dsh-timeout";
|
|
14
|
+
import { LIMITS } from "../constants.js";
|
|
15
|
+
import { TYPST_TIMEOUT } from "../errors.js";
|
|
16
|
+
/**
|
|
17
|
+
* Wrap the host subprocess capability. One instance is owned by the workbench
|
|
18
|
+
* service and shared by every workspace session.
|
|
19
|
+
*/
|
|
20
|
+
export class ProcessRunner {
|
|
21
|
+
runtime;
|
|
22
|
+
constructor(runtime) {
|
|
23
|
+
this.runtime = runtime;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Spawn a long-running child with raw pipes. Both streams are decoded with
|
|
27
|
+
* a streaming decoder, so a multi-byte character split across chunks is
|
|
28
|
+
* never replaced with U+FFFD.
|
|
29
|
+
* @param argv - executable and arguments; never shell-interpreted.
|
|
30
|
+
* @param options - cwd, explicit env, cancellation and grace.
|
|
31
|
+
* @returns the live handle plus text-output helpers.
|
|
32
|
+
*/
|
|
33
|
+
spawnPiped(argv, options) {
|
|
34
|
+
const handle = this.runtime.spawn({
|
|
35
|
+
argv,
|
|
36
|
+
cwd: options.cwd,
|
|
37
|
+
stdio: { stdin: "ignore", stdout: "pipe", stderr: "pipe" },
|
|
38
|
+
graceMs: options.graceMs ?? LIMITS.stopGraceMs,
|
|
39
|
+
...(options.env === undefined ? {} : { env: options.env }),
|
|
40
|
+
...(options.signal === undefined ? {} : { signal: options.signal }),
|
|
41
|
+
});
|
|
42
|
+
return {
|
|
43
|
+
handle,
|
|
44
|
+
done: handle.done,
|
|
45
|
+
onOutput: (listener) => {
|
|
46
|
+
const stdout = new StringDecoder("utf8");
|
|
47
|
+
const stderr = new StringDecoder("utf8");
|
|
48
|
+
const flush = () => {
|
|
49
|
+
for (const decoder of [stdout, stderr]) {
|
|
50
|
+
const tail = decoder.end();
|
|
51
|
+
if (tail.length > 0)
|
|
52
|
+
listener(tail);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
handle.stdout?.on("data", (chunk) => {
|
|
56
|
+
const text = stdout.write(chunk);
|
|
57
|
+
if (text.length > 0)
|
|
58
|
+
listener(text);
|
|
59
|
+
});
|
|
60
|
+
handle.stderr?.on("data", (chunk) => {
|
|
61
|
+
const text = stderr.write(chunk);
|
|
62
|
+
if (text.length > 0)
|
|
63
|
+
listener(text);
|
|
64
|
+
});
|
|
65
|
+
// Flush before the owner's own `done` continuation runs: listeners are
|
|
66
|
+
// registered in call order, and the owner registers after this call.
|
|
67
|
+
void handle.done.then(flush, flush);
|
|
68
|
+
},
|
|
69
|
+
terminate: () => handle.terminate(),
|
|
70
|
+
waitForExit: (signal) => handle.waitForExit(signal),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Run a short command to completion with bounded collected output.
|
|
75
|
+
* A nonzero exit resolves; only a spawn/provider failure or the deadline
|
|
76
|
+
* produces the failure shape.
|
|
77
|
+
* @param argv - executable and arguments.
|
|
78
|
+
* @param options - cwd, explicit env, cancellation, deadline and output cap.
|
|
79
|
+
* @returns exit facts plus decoded stdout/stderr.
|
|
80
|
+
*/
|
|
81
|
+
async run(argv, options) {
|
|
82
|
+
const timeoutMs = options.timeoutMs ?? LIMITS.oneshotTimeoutMs;
|
|
83
|
+
const fuse = deadline(options.signal, timeoutMs, TYPST_TIMEOUT);
|
|
84
|
+
const collect = {
|
|
85
|
+
maxBytes: options.collectBytes ?? LIMITS.processOutputBytes,
|
|
86
|
+
};
|
|
87
|
+
try {
|
|
88
|
+
let handle;
|
|
89
|
+
try {
|
|
90
|
+
handle = this.runtime.spawn({
|
|
91
|
+
argv,
|
|
92
|
+
cwd: options.cwd,
|
|
93
|
+
stdio: { stdin: "ignore", stdout: collect, stderr: collect },
|
|
94
|
+
graceMs: options.graceMs ?? LIMITS.stopGraceMs,
|
|
95
|
+
signal: fuse.signal,
|
|
96
|
+
...(options.env === undefined ? {} : { env: options.env }),
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
catch (error) {
|
|
100
|
+
return {
|
|
101
|
+
code: null,
|
|
102
|
+
signal: null,
|
|
103
|
+
stdout: "",
|
|
104
|
+
stderr: error instanceof Error ? error.message : String(error),
|
|
105
|
+
timedOut: timeoutOf(fuse.signal, TYPST_TIMEOUT) !== undefined,
|
|
106
|
+
aborted: options.signal?.aborted === true,
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
let outcome = null;
|
|
110
|
+
let providerFailure = null;
|
|
111
|
+
try {
|
|
112
|
+
outcome = await handle.done;
|
|
113
|
+
}
|
|
114
|
+
catch (error) {
|
|
115
|
+
providerFailure =
|
|
116
|
+
error instanceof Error ? error.message : String(error);
|
|
117
|
+
}
|
|
118
|
+
const stdout = handle.collected.stdout?.readFrom(0).text ?? "";
|
|
119
|
+
const stderr = handle.collected.stderr?.readFrom(0).text ?? "";
|
|
120
|
+
const timedOut = timeoutOf(fuse.signal, TYPST_TIMEOUT) !== undefined;
|
|
121
|
+
if (providerFailure !== null) {
|
|
122
|
+
return {
|
|
123
|
+
code: null,
|
|
124
|
+
signal: null,
|
|
125
|
+
stdout,
|
|
126
|
+
stderr: stderr.length > 0
|
|
127
|
+
? `${stderr}\n${providerFailure}`
|
|
128
|
+
: providerFailure,
|
|
129
|
+
timedOut,
|
|
130
|
+
aborted: options.signal?.aborted === true,
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
return {
|
|
134
|
+
code: outcome === null ? null : outcome.exitCode,
|
|
135
|
+
signal: outcome === null ? null : outcome.signal,
|
|
136
|
+
stdout,
|
|
137
|
+
stderr,
|
|
138
|
+
timedOut,
|
|
139
|
+
aborted: options.signal?.aborted === true,
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
finally {
|
|
143
|
+
fuse[Symbol.dispose]();
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
//# sourceMappingURL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AAI;aAC1C,CAAC;QACJ,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;QACzB,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Page text model: pdf.js text items → per-page text with span geometry,
|
|
3
|
+
* quote search (tolerant of reflow and punctuation), highlight rectangles,
|
|
4
|
+
* and page-spec parsing. Ported from the ZCode typst-workbench server
|
|
5
|
+
* (0.2.0) `src/domain/text.ts`. Host half only.
|
|
6
|
+
* @module dsh-typst/typst/text
|
|
7
|
+
*/
|
|
8
|
+
/** One text item as pdf.js reports it (`getTextContent().items`). */
|
|
9
|
+
export interface PdfTextItem {
|
|
10
|
+
str?: unknown;
|
|
11
|
+
transform?: number[];
|
|
12
|
+
width?: number;
|
|
13
|
+
height?: number;
|
|
14
|
+
hasEOL?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface PdfPageInfo {
|
|
17
|
+
index: number;
|
|
18
|
+
}
|
|
19
|
+
export interface TextSpan {
|
|
20
|
+
start: number;
|
|
21
|
+
end: number;
|
|
22
|
+
x: number;
|
|
23
|
+
y: number;
|
|
24
|
+
width: number;
|
|
25
|
+
size: number;
|
|
26
|
+
}
|
|
27
|
+
/** One page's extracted text plus the spans that locate it on the page. */
|
|
28
|
+
export interface PageText extends PdfPageInfo {
|
|
29
|
+
text: string;
|
|
30
|
+
spans: TextSpan[];
|
|
31
|
+
}
|
|
32
|
+
/** Build one page's text from pdf.js items, inserting line/space separators. */
|
|
33
|
+
export declare function buildPage(items: PdfTextItem[], page: PdfPageInfo): PageText;
|
|
34
|
+
/** Whitespace-normalized text for display (de-hyphenate line breaks). */
|
|
35
|
+
export declare function readableText(text: string): string;
|
|
36
|
+
interface PageHit {
|
|
37
|
+
pageIndex: number;
|
|
38
|
+
start: number;
|
|
39
|
+
end: number;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Find a quote in the extracted pages: exact (folded) match first, then
|
|
43
|
+
* across adjacent pages, preferring the preferred page when given. `from`
|
|
44
|
+
* is a UTF-16 offset hint on the preferred page and `occurrence` names the
|
|
45
|
+
* match ordinal (from that offset) to keep when the text repeats.
|
|
46
|
+
*/
|
|
47
|
+
export declare function findQuote(pages: PageText[], quote: string, preferredPage?: number, from?: number, occurrence?: number): PageHit | null;
|
|
48
|
+
/**
|
|
49
|
+
* PDF user-space rectangles covering `page.text[start, end)`, merged across
|
|
50
|
+
* adjacent spans on the same line. The panel maps them through the page
|
|
51
|
+
* viewport to draw highlights.
|
|
52
|
+
*/
|
|
53
|
+
export declare function rectsFor(page: PageText, start: number, end: number): number[][];
|
|
54
|
+
/** The rendered text of a range, whitespace-collapsed for display. */
|
|
55
|
+
export declare function textAt(page: PageText, start: number, end: number): string;
|
|
56
|
+
/**
|
|
57
|
+
* Parse a 1-based page spec into 0-based indices, bounded by `pageCount`.
|
|
58
|
+
* @throws when a part of the spec is malformed.
|
|
59
|
+
*/
|
|
60
|
+
export declare function parsePages(spec: string, pageCount: number): number[];
|
|
61
|
+
export {};
|
|
62
|
+
//# sourceMappingURL=text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/typst/text.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,qEAAqE;AACrE,MAAM,WAAW,WAAW;IAC1B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,MA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