@sagmans/dsh-plannotator 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.
@@ -0,0 +1,83 @@
1
+ /**
2
+ * Deliver a reviewer's words to the model.
3
+ *
4
+ * A command's result is rendered as one notice in the terminal surface, so it
5
+ * cannot itself be the feedback channel: the model would never see it. Steering
6
+ * is the harness seam that carries text into the conversation, and it is the
7
+ * same seam `/plan <message>` uses, so the model sees the reviewer as a person
8
+ * speaking rather than as a plugin mutating history.
9
+ *
10
+ * @module dsh-plannotator/feedback
11
+ */
12
+ import { createUserMessage } from '@deepseek-ai/dsh-llm';
13
+ import { FEEDBACK_PREFIX, PLUGIN_NAME } from "./constants.js";
14
+ /**
15
+ * Frame reviewer text so the model can attribute it.
16
+ *
17
+ * The prefix is the only provenance marker the model gets: without it, an
18
+ * annotation quoted from a reviewed document is indistinguishable from the
19
+ * reader's own instruction.
20
+ *
21
+ * @param target - what was reviewed, as the reviewer saw it.
22
+ * @param body - the reviewer's text.
23
+ * @returns the message body to steer.
24
+ */
25
+ export function frameFeedback(target, body) {
26
+ return FEEDBACK_PREFIX + ' Reviewer feedback on ' + target + ':\n\n' + body.trim();
27
+ }
28
+ /**
29
+ * Frame an approval that carried notes.
30
+ *
31
+ * @param target - what was reviewed.
32
+ * @param notes - the notes written alongside the approval.
33
+ * @returns the message body to steer.
34
+ */
35
+ export function frameApprovalNotes(target, notes) {
36
+ return (FEEDBACK_PREFIX +
37
+ ' The reviewer approved ' +
38
+ target +
39
+ ' and left these non-blocking implementation notes:\n\n' +
40
+ notes.trim());
41
+ }
42
+ /**
43
+ * Hand text to the agent as a steering message.
44
+ *
45
+ * Steering targets the nearest step boundary, and an idle driver opens a turn
46
+ * for it, so feedback lands whether the agent is mid-turn or waiting for input.
47
+ *
48
+ * @param agent - the agent whose session received the review.
49
+ * @param text - the framed message body.
50
+ */
51
+ export function steerText(agent, text) {
52
+ agent.steer(createUserMessage({
53
+ content: [{ type: 'text', text }],
54
+ // The words are the reviewer's, so the model must see them as user input;
55
+ // a plugin-attributed source would read as the harness speaking.
56
+ source: { kind: 'user' },
57
+ }));
58
+ }
59
+ /**
60
+ * Decide whether an outcome produces a message for the model, and which one.
61
+ *
62
+ * Approvals are the case that needs a policy: plannotator treats notes on an
63
+ * approval as guidance rather than a change request, and a profile may prefer
64
+ * to keep them out of the conversation entirely.
65
+ *
66
+ * @param outcome - the settled review.
67
+ * @param target - what was reviewed.
68
+ * @param approveNotes - whether approval notes are forwarded.
69
+ * @returns the message body, or `undefined` when nothing should be sent.
70
+ */
71
+ export function feedbackFor(outcome, target, approveNotes) {
72
+ const body = outcome.feedback.trim();
73
+ if (outcome.decision === 'approved') {
74
+ if (body === '' || approveNotes === 'ignore')
75
+ return undefined;
76
+ return frameApprovalNotes(target, body);
77
+ }
78
+ if (body === '')
79
+ return undefined;
80
+ return frameFeedback(target, body);
81
+ }
82
+ /** The plugin's log prefix, so a diagnostic names its origin. */
83
+ export const LOG_PREFIX = PLUGIN_NAME;
@@ -0,0 +1,58 @@
1
+ /**
2
+ * dsh-plannotator — Plannotator's browser review surfaces for the terminal profile.
3
+ *
4
+ * The plugin adds no UI of its own: the terminal surface owns the alternate
5
+ * screen and exposes no drawing hook, and the review UI already exists in the
6
+ * `plannotator` CLI. What is missing is the wiring between a typed slash command
7
+ * and that CLI, plus a way back into the conversation — which is exactly what
8
+ * this bundle registers. Everything the reader sees in the terminal is one
9
+ * notice per command; everything they read and write in detail is the browser.
10
+ *
11
+ * Review is on demand by design. Plan mode's own review stays untouched, so a
12
+ * profile that cannot reach a browser (a remote host without a forwarded port,
13
+ * for one) keeps working exactly as it did without this plugin.
14
+ *
15
+ * @module @sagmans/dsh-plannotator
16
+ */
17
+ import type { Context } from '@deepseek-ai/cordis';
18
+ export { Config as configSchema, normalizeConfig, resolveDataDir, resolvePlansDir } from './config.ts';
19
+ export type { ApproveNotesMode, PlannotatorConfig } from './config.ts';
20
+ export { COMMAND_ANNOTATE, COMMAND_LAST, COMMAND_PLAN, COMMAND_REVIEW, PLUGIN_NAME } from './constants.ts';
21
+ /** Stable Loader identity; the profile patch row's id and the module name agree. */
22
+ export declare const name = "plannotator";
23
+ /**
24
+ * The registry the bundle registers into.
25
+ *
26
+ * Declaring it here rather than probing with `ctx.inject` keeps the plugin
27
+ * unmounted — not partially mounted — on a profile that has no command
28
+ * registry, which is the honest state: without it these commands have no
29
+ * reader.
30
+ */
31
+ export declare const inject: string[];
32
+ /** Validated row config; every field is defaulted, so a profile may set a subset. */
33
+ export declare const Config: import("@deepseek-ai/schemastery").default<Schemastery.ObjectS<{
34
+ binary: import("@deepseek-ai/schemastery").default<string, string>;
35
+ dataDir: import("@deepseek-ai/schemastery").default<string, string>;
36
+ reviewTimeoutMs: import("@deepseek-ai/schemastery").default<number, number>;
37
+ tailscale: import("@deepseek-ai/schemastery").default<boolean, boolean>;
38
+ steerFeedback: import("@deepseek-ai/schemastery").default<boolean, boolean>;
39
+ approveNotes: import("@deepseek-ai/schemastery").default<"ignore" | "steer", "ignore" | "steer">;
40
+ allowUntrustedBinary: import("@deepseek-ai/schemastery").default<boolean, boolean>;
41
+ maxInputBytes: import("@deepseek-ai/schemastery").default<number, number>;
42
+ }>, Schemastery.ObjectT<{
43
+ binary: import("@deepseek-ai/schemastery").default<string, string>;
44
+ dataDir: import("@deepseek-ai/schemastery").default<string, string>;
45
+ reviewTimeoutMs: import("@deepseek-ai/schemastery").default<number, number>;
46
+ tailscale: import("@deepseek-ai/schemastery").default<boolean, boolean>;
47
+ steerFeedback: import("@deepseek-ai/schemastery").default<boolean, boolean>;
48
+ approveNotes: import("@deepseek-ai/schemastery").default<"ignore" | "steer", "ignore" | "steer">;
49
+ allowUntrustedBinary: import("@deepseek-ai/schemastery").default<boolean, boolean>;
50
+ maxInputBytes: import("@deepseek-ai/schemastery").default<number, number>;
51
+ }>>;
52
+ /**
53
+ * Register the plannotator commands for this profile.
54
+ *
55
+ * @param ctx - context carrying the command registry.
56
+ * @param config - the row's config (already defaulted by the loader, re-checked here).
57
+ */
58
+ export declare function apply(ctx: Context, config: unknown): void;
package/dist/index.js ADDED
@@ -0,0 +1,45 @@
1
+ /**
2
+ * dsh-plannotator — Plannotator's browser review surfaces for the terminal profile.
3
+ *
4
+ * The plugin adds no UI of its own: the terminal surface owns the alternate
5
+ * screen and exposes no drawing hook, and the review UI already exists in the
6
+ * `plannotator` CLI. What is missing is the wiring between a typed slash command
7
+ * and that CLI, plus a way back into the conversation — which is exactly what
8
+ * this bundle registers. Everything the reader sees in the terminal is one
9
+ * notice per command; everything they read and write in detail is the browser.
10
+ *
11
+ * Review is on demand by design. Plan mode's own review stays untouched, so a
12
+ * profile that cannot reach a browser (a remote host without a forwarded port,
13
+ * for one) keeps working exactly as it did without this plugin.
14
+ *
15
+ * @module @sagmans/dsh-plannotator
16
+ */
17
+ import { defaultCommandDeps, registerPlannotatorCommands, } from "./commands.js";
18
+ import { Config as configSchema, normalizeConfig } from "./config.js";
19
+ import { PLUGIN_NAME } from "./constants.js";
20
+ export { Config as configSchema, normalizeConfig, resolveDataDir, resolvePlansDir } from "./config.js";
21
+ export { COMMAND_ANNOTATE, COMMAND_LAST, COMMAND_PLAN, COMMAND_REVIEW, PLUGIN_NAME } from "./constants.js";
22
+ /** Stable Loader identity; the profile patch row's id and the module name agree. */
23
+ export const name = PLUGIN_NAME;
24
+ /**
25
+ * The registry the bundle registers into.
26
+ *
27
+ * Declaring it here rather than probing with `ctx.inject` keeps the plugin
28
+ * unmounted — not partially mounted — on a profile that has no command
29
+ * registry, which is the honest state: without it these commands have no
30
+ * reader.
31
+ */
32
+ export const inject = ['commands'];
33
+ /** Validated row config; every field is defaulted, so a profile may set a subset. */
34
+ export const Config = configSchema;
35
+ /**
36
+ * Register the plannotator commands for this profile.
37
+ *
38
+ * @param ctx - context carrying the command registry.
39
+ * @param config - the row's config (already defaulted by the loader, re-checked here).
40
+ */
41
+ export function apply(ctx, config) {
42
+ const settings = normalizeConfig(config);
43
+ const deps = defaultCommandDeps(settings, process.env);
44
+ ctx.effect(() => registerPlannotatorCommands(ctx, { ...deps, snapshotIo: undefined }), PLUGIN_NAME + ' command lifecycle');
45
+ }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Recover the newest plan from the session log.
3
+ *
4
+ * On-demand review is only useful if the reader does not have to find the plan
5
+ * file themselves. Plan mode's exit tool is the one place a plan is recorded as
6
+ * the model wrote it, and it stays registered while plan mode is inactive, so
7
+ * its newest call is also the newest plan this session produced.
8
+ *
9
+ * @module dsh-plannotator/plan-source
10
+ */
11
+ /**
12
+ * Extract the plan text from one `tool/call` event.
13
+ *
14
+ * The arguments are the raw JSON string the model produced — the harness stores
15
+ * them unparsed — so a call this plugin cannot parse is skipped rather than
16
+ * failing the command: an unreadable older call must not hide a readable newer
17
+ * one.
18
+ *
19
+ * @param event - candidate session event.
20
+ * @returns the plan markdown, or `undefined` when the event is not a readable plan call.
21
+ */
22
+ export declare function planFromToolCall(event: unknown): string | undefined;
23
+ /**
24
+ * Find the newest plan in a session log.
25
+ *
26
+ * @param events - the session's events in sequence order.
27
+ * @returns the newest plan markdown, or `undefined` when the session has none.
28
+ */
29
+ export declare function newestPlan(events: readonly unknown[]): string | undefined;
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Recover the newest plan from the session log.
3
+ *
4
+ * On-demand review is only useful if the reader does not have to find the plan
5
+ * file themselves. Plan mode's exit tool is the one place a plan is recorded as
6
+ * the model wrote it, and it stays registered while plan mode is inactive, so
7
+ * its newest call is also the newest plan this session produced.
8
+ *
9
+ * @module dsh-plannotator/plan-source
10
+ */
11
+ import { EXIT_PLAN_MODE_TOOL } from "./constants.js";
12
+ function isRecord(value) {
13
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
14
+ }
15
+ /**
16
+ * Extract the plan text from one `tool/call` event.
17
+ *
18
+ * The arguments are the raw JSON string the model produced — the harness stores
19
+ * them unparsed — so a call this plugin cannot parse is skipped rather than
20
+ * failing the command: an unreadable older call must not hide a readable newer
21
+ * one.
22
+ *
23
+ * @param event - candidate session event.
24
+ * @returns the plan markdown, or `undefined` when the event is not a readable plan call.
25
+ */
26
+ export function planFromToolCall(event) {
27
+ if (!isRecord(event) || event['type'] !== 'tool/call')
28
+ return undefined;
29
+ const data = event['data'];
30
+ if (!isRecord(data) || data['name'] !== EXIT_PLAN_MODE_TOOL)
31
+ return undefined;
32
+ const raw = data['arguments'];
33
+ if (typeof raw !== 'string')
34
+ return undefined;
35
+ try {
36
+ const parsed = JSON.parse(raw);
37
+ if (!isRecord(parsed))
38
+ return undefined;
39
+ const plan = parsed['plan'];
40
+ return typeof plan === 'string' && plan.trim() !== '' ? plan : undefined;
41
+ }
42
+ catch {
43
+ return undefined;
44
+ }
45
+ }
46
+ /**
47
+ * Find the newest plan in a session log.
48
+ *
49
+ * @param events - the session's events in sequence order.
50
+ * @returns the newest plan markdown, or `undefined` when the session has none.
51
+ */
52
+ export function newestPlan(events) {
53
+ for (let index = events.length - 1; index >= 0; index -= 1) {
54
+ const plan = planFromToolCall(events[index]);
55
+ if (plan !== undefined)
56
+ return plan;
57
+ }
58
+ return undefined;
59
+ }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Recover the newest assistant message from the session log.
3
+ *
4
+ * The annotate-last surface reviews what the agent just said, and only this
5
+ * process has that text. Deriving it from the session's own messages — rather
6
+ * than from a stream buffer — is what makes the reviewed text the same text the
7
+ * model produced, including anything a resume or fork restored.
8
+ *
9
+ * @module dsh-plannotator/transcript
10
+ */
11
+ /** The part of a content block this module reads. */
12
+ export interface TextBlockLike {
13
+ readonly type: string;
14
+ readonly text?: string;
15
+ }
16
+ /** The part of a message this module reads. */
17
+ export interface MessageLike {
18
+ readonly role: string;
19
+ readonly content: readonly TextBlockLike[];
20
+ }
21
+ /**
22
+ * Join one message's text blocks.
23
+ *
24
+ * Non-text blocks (reasoning, tool results, attachments) are skipped: the
25
+ * annotation surface renders prose, and a caller that passed them through would
26
+ * hand the reviewer content the CLI cannot render.
27
+ *
28
+ * @param message - a message-shaped value.
29
+ * @returns the message's text, trimmed, or an empty string when it has none.
30
+ */
31
+ export declare function messageText(message: MessageLike): string;
32
+ /**
33
+ * Find the newest assistant message with text.
34
+ *
35
+ * @param messages - the session's derived messages in order.
36
+ * @returns the newest non-empty assistant text, or `undefined` when there is none yet.
37
+ */
38
+ export declare function newestAssistantText(messages: readonly MessageLike[]): string | undefined;
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Recover the newest assistant message from the session log.
3
+ *
4
+ * The annotate-last surface reviews what the agent just said, and only this
5
+ * process has that text. Deriving it from the session's own messages — rather
6
+ * than from a stream buffer — is what makes the reviewed text the same text the
7
+ * model produced, including anything a resume or fork restored.
8
+ *
9
+ * @module dsh-plannotator/transcript
10
+ */
11
+ /**
12
+ * Join one message's text blocks.
13
+ *
14
+ * Non-text blocks (reasoning, tool results, attachments) are skipped: the
15
+ * annotation surface renders prose, and a caller that passed them through would
16
+ * hand the reviewer content the CLI cannot render.
17
+ *
18
+ * @param message - a message-shaped value.
19
+ * @returns the message's text, trimmed, or an empty string when it has none.
20
+ */
21
+ export function messageText(message) {
22
+ const parts = [];
23
+ for (const block of message.content) {
24
+ if (block.type === 'text' && typeof block.text === 'string')
25
+ parts.push(block.text);
26
+ }
27
+ return parts.join('\n\n').trim();
28
+ }
29
+ /**
30
+ * Find the newest assistant message with text.
31
+ *
32
+ * @param messages - the session's derived messages in order.
33
+ * @returns the newest non-empty assistant text, or `undefined` when there is none yet.
34
+ */
35
+ export function newestAssistantText(messages) {
36
+ for (let index = messages.length - 1; index >= 0; index -= 1) {
37
+ const message = messages[index];
38
+ if (message === undefined || message.role !== 'assistant')
39
+ continue;
40
+ const text = messageText(message);
41
+ if (text !== '')
42
+ return text;
43
+ }
44
+ return undefined;
45
+ }
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Materialize review input on disk, privately.
3
+ *
4
+ * A plan reaches this plugin as a string inside a tool call, but the CLI
5
+ * reviews files: it keys history and revision diffs by path, reads from disk at
6
+ * a stable location, and refuses targets it cannot open. So the plan has to be
7
+ * written somewhere, and that somewhere must not be the reader's repository —
8
+ * the plugin would be committing a file the agent never asked for.
9
+ *
10
+ * @module dsh-plannotator/workspace
11
+ */
12
+ /** The filesystem calls snapshot writing uses, injectable for tests. */
13
+ export interface SnapshotIo {
14
+ readonly mkdir: (path: string, options: {
15
+ recursive: true;
16
+ mode: number;
17
+ }) => void;
18
+ readonly writeFile: (path: string, data: string, options: {
19
+ mode: number;
20
+ }) => void;
21
+ readonly rename: (from: string, to: string) => void;
22
+ }
23
+ /** Production filesystem calls. */
24
+ export declare const NODE_SNAPSHOT_IO: SnapshotIo;
25
+ /** Writing either yields the path the reviewer will see, or why it failed. */
26
+ export type SnapshotResult = {
27
+ readonly ok: true;
28
+ readonly path: string;
29
+ } | {
30
+ readonly ok: false;
31
+ readonly error: string;
32
+ };
33
+ /**
34
+ * Reduce a session id to a filename segment.
35
+ *
36
+ * Session ids are opaque and may carry separators or dots; a segment built from
37
+ * one must not be able to point outside the plans directory, so everything
38
+ * outside a conservative alphabet is replaced and the result is length-capped.
39
+ *
40
+ * @param sessionId - the session's identity string.
41
+ * @returns a safe, non-empty filename segment.
42
+ */
43
+ export declare function sessionSegment(sessionId: string): string;
44
+ /**
45
+ * The one path a session's plan is reviewed at.
46
+ *
47
+ * Reusing it is deliberate: overwriting the same document is what lets the
48
+ * browser show what changed since the previous review.
49
+ *
50
+ * @param plansDir - directory holding plan snapshots.
51
+ * @param sessionId - the session's identity string.
52
+ * @returns absolute path to the session's plan snapshot.
53
+ */
54
+ export declare function planSnapshotPath(plansDir: string, sessionId: string): string;
55
+ /**
56
+ * Write one plan snapshot atomically.
57
+ *
58
+ * The temporary file is created in the destination directory so the rename
59
+ * stays on one filesystem, and it is written with `0o600` before any content
60
+ * exists — a plan is the model's view of the work and often names credentials
61
+ * or internal hosts, so it must never be group- or world-readable, not even
62
+ * for the instant before a later chmod.
63
+ *
64
+ * @param plansDir - directory holding plan snapshots.
65
+ * @param sessionId - the session's identity string.
66
+ * @param text - the plan markdown.
67
+ * @param io - filesystem calls.
68
+ * @returns the path written, or the failure to report.
69
+ */
70
+ export declare function writePlanSnapshot(plansDir: string, sessionId: string, text: string, io?: SnapshotIo): SnapshotResult;
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Materialize review input on disk, privately.
3
+ *
4
+ * A plan reaches this plugin as a string inside a tool call, but the CLI
5
+ * reviews files: it keys history and revision diffs by path, reads from disk at
6
+ * a stable location, and refuses targets it cannot open. So the plan has to be
7
+ * written somewhere, and that somewhere must not be the reader's repository —
8
+ * the plugin would be committing a file the agent never asked for.
9
+ *
10
+ * @module dsh-plannotator/workspace
11
+ */
12
+ import { mkdirSync, renameSync, writeFileSync } from 'node:fs';
13
+ import { join } from 'node:path';
14
+ import { SESSION_SEGMENT_MAX_CHARS, SNAPSHOT_DIR_MODE, SNAPSHOT_FILE_MODE, } from "./constants.js";
15
+ /** Production filesystem calls. */
16
+ export const NODE_SNAPSHOT_IO = {
17
+ mkdir: (path, options) => mkdirSync(path, options),
18
+ writeFile: (path, data, options) => writeFileSync(path, data, options),
19
+ rename: (from, to) => renameSync(from, to),
20
+ };
21
+ /**
22
+ * Reduce a session id to a filename segment.
23
+ *
24
+ * Session ids are opaque and may carry separators or dots; a segment built from
25
+ * one must not be able to point outside the plans directory, so everything
26
+ * outside a conservative alphabet is replaced and the result is length-capped.
27
+ *
28
+ * @param sessionId - the session's identity string.
29
+ * @returns a safe, non-empty filename segment.
30
+ */
31
+ export function sessionSegment(sessionId) {
32
+ // Dots are excluded from the safe alphabet outright: allowing them would let a
33
+ // crafted id become ".." no matter how separators are handled.
34
+ const cleaned = sessionId
35
+ .replace(/[^A-Za-z0-9_-]/gu, '_')
36
+ .replace(/_+/gu, '_')
37
+ .replace(/^[_-]+/u, '');
38
+ const capped = cleaned.slice(0, SESSION_SEGMENT_MAX_CHARS);
39
+ return capped === '' ? 'session' : capped;
40
+ }
41
+ /**
42
+ * The one path a session's plan is reviewed at.
43
+ *
44
+ * Reusing it is deliberate: overwriting the same document is what lets the
45
+ * browser show what changed since the previous review.
46
+ *
47
+ * @param plansDir - directory holding plan snapshots.
48
+ * @param sessionId - the session's identity string.
49
+ * @returns absolute path to the session's plan snapshot.
50
+ */
51
+ export function planSnapshotPath(plansDir, sessionId) {
52
+ return join(plansDir, sessionSegment(sessionId) + '.md');
53
+ }
54
+ /**
55
+ * Write one plan snapshot atomically.
56
+ *
57
+ * The temporary file is created in the destination directory so the rename
58
+ * stays on one filesystem, and it is written with `0o600` before any content
59
+ * exists — a plan is the model's view of the work and often names credentials
60
+ * or internal hosts, so it must never be group- or world-readable, not even
61
+ * for the instant before a later chmod.
62
+ *
63
+ * @param plansDir - directory holding plan snapshots.
64
+ * @param sessionId - the session's identity string.
65
+ * @param text - the plan markdown.
66
+ * @param io - filesystem calls.
67
+ * @returns the path written, or the failure to report.
68
+ */
69
+ export function writePlanSnapshot(plansDir, sessionId, text, io = NODE_SNAPSHOT_IO) {
70
+ const path = planSnapshotPath(plansDir, sessionId);
71
+ const temporary = path + '.tmp-' + String(process.pid) + '-' + Date.now().toString(36);
72
+ try {
73
+ io.mkdir(plansDir, { recursive: true, mode: SNAPSHOT_DIR_MODE });
74
+ io.writeFile(temporary, text, { mode: SNAPSHOT_FILE_MODE });
75
+ io.rename(temporary, path);
76
+ return { ok: true, path };
77
+ }
78
+ catch (error) {
79
+ return { ok: false, error: error instanceof Error ? error.message : String(error) };
80
+ }
81
+ }
package/package.json ADDED
@@ -0,0 +1,96 @@
1
+ {
2
+ "name": "@sagmans/dsh-plannotator",
3
+ "version": "0.1.0",
4
+ "description": "Plannotator browser review surfaces for the DeepSeek Harness terminal profile: plan review, code review, file annotation, and last-answer annotation, driven on demand from slash commands.",
5
+ "keywords": [
6
+ "deepseek-harness",
7
+ "dsh",
8
+ "dsh-plugin",
9
+ "plugin",
10
+ "plannotator",
11
+ "plan-review",
12
+ "code-review",
13
+ "cordis",
14
+ "tui"
15
+ ],
16
+ "license": "MIT",
17
+ "type": "module",
18
+ "main": "./dist/index.js",
19
+ "types": "./dist/index.d.ts",
20
+ "exports": {
21
+ ".": {
22
+ "types": "./dist/index.d.ts",
23
+ "default": "./dist/index.js"
24
+ },
25
+ "./cordis.patch.yml": "./cordis.patch.yml",
26
+ "./package.json": "./package.json"
27
+ },
28
+ "files": [
29
+ "dist",
30
+ "cordis.patch.yml",
31
+ "README.md",
32
+ "LICENSE"
33
+ ],
34
+ "engines": {
35
+ "node": ">=22.19"
36
+ },
37
+ "packageManager": "pnpm@11.21.0",
38
+ "publishConfig": {
39
+ "access": "public",
40
+ "registry": "https://registry.npmjs.org/"
41
+ },
42
+ "repository": {
43
+ "type": "git",
44
+ "url": "git+https://github.com/sagmans/dsh-plannotator.git"
45
+ },
46
+ "homepage": "https://github.com/sagmans/dsh-plannotator#readme",
47
+ "bugs": {
48
+ "url": "https://github.com/sagmans/dsh-plannotator/issues"
49
+ },
50
+ "dsh": {
51
+ "bundle": {
52
+ "patch": "./cordis.patch.yml"
53
+ },
54
+ "compatibility": {
55
+ "dsh": ">=0.1.5-rc.1 <0.1.6",
56
+ "dshReleases": {
57
+ "0.1.5-rc.2": "compatible"
58
+ },
59
+ "profiles": [
60
+ "tui"
61
+ ]
62
+ }
63
+ },
64
+ "scripts": {
65
+ "typecheck": "tsc --noEmit",
66
+ "test": "node --import tsx/esm --test \"tests/*.spec.ts\"",
67
+ "build": "tsc -p tsconfig.build.json",
68
+ "test:build": "node --test \"tests/*.test.mjs\"",
69
+ "pack-smoke": "node tools/pack-smoke.mjs",
70
+ "drive": "node tools/pty-drive.mjs",
71
+ "test:release": "python3 -m unittest discover -s tests/release -p 'test_*.py'",
72
+ "check": "pnpm run typecheck && pnpm test && pnpm run build && pnpm run test:build && pnpm test:release && pnpm run pack-smoke",
73
+ "prepack": "pnpm run build",
74
+ "prepublishOnly": "pnpm run typecheck && pnpm test && pnpm test:release"
75
+ },
76
+ "peerDependencies": {
77
+ "@deepseek-ai/cordis": "^4.0.2",
78
+ "@deepseek-ai/dsh-agent": ">=0.1.5-rc.1 <0.1.6",
79
+ "@deepseek-ai/dsh-commands": ">=0.1.5-rc.1 <0.1.6",
80
+ "@deepseek-ai/dsh-llm": ">=0.1.5-rc.1 <0.1.6",
81
+ "@deepseek-ai/dsh-session": ">=0.1.5-rc.1 <0.1.6",
82
+ "@deepseek-ai/schemastery": "^3.18.2"
83
+ },
84
+ "devDependencies": {
85
+ "@deepseek-ai/cordis": "4.0.2",
86
+ "@deepseek-ai/dsh-agent": "0.1.5-rc.2",
87
+ "@deepseek-ai/dsh-commands": "0.1.5-rc.2",
88
+ "@deepseek-ai/dsh-llm": "0.1.5-rc.2",
89
+ "@deepseek-ai/dsh-session": "0.1.5-rc.2",
90
+ "@deepseek-ai/schemastery": "3.18.2",
91
+ "@types/node": "22.20.0",
92
+ "node-pty": "1.1.0",
93
+ "tsx": "4.22.4",
94
+ "typescript": "6.0.3"
95
+ }
96
+ }