@pecot/visual-mcp 3.1.1-dev.142 → 3.1.1-dev.143

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.
Files changed (101) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/cli/dist/commands/drawio/export.d.ts +9 -24
  3. package/cli/dist/commands/drawio/export.js +15 -135
  4. package/cli/dist/commands/drawio/theme.d.ts +3 -3
  5. package/cli/dist/commands/drawio/theme.js +10 -10
  6. package/cli/dist/commands/drawio/url.d.ts +9 -26
  7. package/cli/dist/commands/drawio/url.js +18 -131
  8. package/cli/dist/commands/evidence-xlsx/create.d.ts +4 -12
  9. package/cli/dist/commands/evidence-xlsx/create.js +9 -92
  10. package/cli/dist/commands/slidev-project/create.d.ts +5 -30
  11. package/cli/dist/commands/slidev-project/create.js +12 -136
  12. package/cli/dist/commands/slidev-project/linked-theme.d.ts +1 -1
  13. package/cli/dist/commands/slidev-project/linked-theme.js +2 -2
  14. package/cli/dist/commands/slidev-project/lint.d.ts +8 -37
  15. package/cli/dist/commands/slidev-project/lint.js +16 -161
  16. package/cli/dist/commands/slidev-project/sync.d.ts +7 -26
  17. package/cli/dist/commands/slidev-project/sync.js +15 -156
  18. package/cli/dist/commands/slidev-project/theme.d.ts +2 -13
  19. package/cli/dist/commands/slidev-project/theme.js +3 -93
  20. package/cli/dist/commands/slidev-to-pptx/convert.d.ts +10 -17
  21. package/cli/dist/commands/slidev-to-pptx/convert.js +25 -266
  22. package/cli/dist/diagnostics.d.ts +0 -4
  23. package/cli/dist/diagnostics.js +0 -6
  24. package/cli/dist/domain/_shared/failure-kind.d.ts +2 -2
  25. package/cli/dist/domain/_shared/failure-kind.js +2 -2
  26. package/cli/dist/domain/_shared/ports.d.ts +3 -4
  27. package/cli/dist/domain/evidence-xlsx/image-dimensions.d.ts +1 -1
  28. package/cli/dist/domain/pptx-ooxml/preview-normalize.d.ts +0 -12
  29. package/cli/dist/domain/pptx-ooxml/preview-normalize.js +1 -25
  30. package/cli/dist/domain/slidev-project/errors.js +2 -2
  31. package/cli/dist/domain/slidev-project/generated-files.js +3 -3
  32. package/cli/dist/domain/slidev-project/lint.d.ts +7 -7
  33. package/cli/dist/domain/slidev-project/lint.js +8 -8
  34. package/cli/dist/domain/slidev-project/package-json.d.ts +1 -1
  35. package/cli/dist/domain/slidev-project/package-json.js +2 -2
  36. package/cli/dist/domain/slidev-project/sync.d.ts +11 -11
  37. package/cli/dist/domain/slidev-project/sync.js +18 -19
  38. package/cli/dist/domain/slidev-theme/deck-lint-input.js +1 -1
  39. package/cli/dist/domain/slidev-theme/declaration.js +1 -1
  40. package/cli/dist/domain/slidev-theme/skeleton.js +1 -1
  41. package/cli/dist/domain/slidev-theme/talk-theme.d.ts +3 -3
  42. package/cli/dist/domain/slidev-theme/talk-theme.js +5 -7
  43. package/cli/dist/domain/slidev-to-pptx/config.d.ts +1 -1
  44. package/cli/dist/domain/slidev-to-pptx/config.js +1 -1
  45. package/cli/dist/domain/slidev-to-pptx/errors.d.ts +4 -4
  46. package/cli/dist/domain/slidev-to-pptx/errors.js +4 -4
  47. package/cli/dist/domain/slidev-to-pptx/types.d.ts +1 -1
  48. package/cli/dist/infra/_shared/dependency-root.d.ts +9 -67
  49. package/cli/dist/infra/_shared/dependency-root.js +15 -126
  50. package/cli/dist/infra/_shared/flock.js +1 -2
  51. package/cli/dist/infra/_shared/plugin-root.d.ts +3 -5
  52. package/cli/dist/infra/_shared/plugin-root.js +5 -12
  53. package/cli/dist/infra/evidence-xlsx/workbook-writer.d.ts +1 -1
  54. package/cli/dist/infra/playwright/chromium.d.ts +4 -15
  55. package/cli/dist/infra/playwright/chromium.js +6 -18
  56. package/cli/dist/infra/playwright/host-dependencies.d.ts +2 -2
  57. package/cli/dist/infra/playwright/host-dependencies.js +6 -6
  58. package/cli/dist/infra/pptx-ooxml/soffice.js +1 -1
  59. package/cli/dist/infra/slidev-project/eslint-runner.d.ts +1 -1
  60. package/cli/dist/infra/slidev-project/eslint-runner.js +2 -2
  61. package/cli/dist/infra/slidev-to-pptx/index.js +1 -1
  62. package/cli/dist/infra/slidev-to-pptx/pipeline.js +1 -1
  63. package/cli/dist/infra/slidev-to-pptx/prerender-capture.js +1 -1
  64. package/cli/dist/infra/slidev-to-pptx/server.js +2 -2
  65. package/cli/dist/main.d.ts +3 -0
  66. package/cli/dist/main.js +28 -0
  67. package/cli/dist/mcp/result.d.ts +5 -1
  68. package/cli/dist/mcp/result.js +9 -1
  69. package/cli/dist/mcp/serve.d.ts +2 -3
  70. package/cli/dist/mcp/serve.js +4 -5
  71. package/cli/dist/mcp/server.d.ts +5 -1
  72. package/cli/dist/mcp/server.js +10 -7
  73. package/cli/dist/mcp/tool-names.js +4 -1
  74. package/cli/dist/mcp/tools/_shared.d.ts +1 -1
  75. package/cli/dist/mcp/tools/_shared.js +2 -2
  76. package/cli/dist/mcp/tools/drawio.js +12 -15
  77. package/cli/dist/mcp/tools/evidence.js +2 -2
  78. package/cli/dist/mcp/tools/file.d.ts +31 -0
  79. package/cli/dist/mcp/tools/file.js +482 -0
  80. package/cli/dist/mcp/tools/index.d.ts +1 -1
  81. package/cli/dist/mcp/tools/index.js +6 -3
  82. package/cli/dist/mcp/tools/setup.js +3 -3
  83. package/cli/dist/mcp/tools/slide-dev.js +6 -7
  84. package/cli/dist/mcp/tools/slide-page.js +3 -3
  85. package/cli/dist/mcp/tools/slide-theme.d.ts +0 -1
  86. package/cli/dist/mcp/tools/slide-theme.js +2 -3
  87. package/cli/dist/mcp/tools/slide.d.ts +4 -4
  88. package/cli/dist/mcp/tools/slide.js +13 -14
  89. package/cli/dist/node-runtime.d.ts +2 -2
  90. package/cli/dist/node-runtime.js +4 -13
  91. package/cli/dist/version.d.ts +1 -8
  92. package/cli/dist/version.js +2 -11
  93. package/npm-shrinkwrap.json +7 -17
  94. package/package.json +2 -3
  95. package/bin/pecot-visual-mcp.mjs +0 -10
  96. package/cli/dist/cli.d.ts +0 -5
  97. package/cli/dist/cli.js +0 -109
  98. package/cli/dist/commands/chromium/host-dependencies.d.ts +0 -18
  99. package/cli/dist/commands/chromium/host-dependencies.js +0 -75
  100. package/cli/dist/commands/pptx-ooxml/preview.d.ts +0 -74
  101. package/cli/dist/commands/pptx-ooxml/preview.js +0 -399
@@ -29,7 +29,7 @@ export interface EslintRunArguments {
29
29
  */
30
30
  readonly deckLintConfig: string;
31
31
  /**
32
- テーマの宣言の解釈結果(`slide theme` の lint)。環境変数 PECOTV_DECK_LINT に JSON で渡る。
32
+ テーマの宣言の解釈結果(slide_theme の lint)。環境変数 PECOTV_DECK_LINT に JSON で渡る。
33
33
  */
34
34
  readonly lint: DeckLintInput;
35
35
  }
@@ -37,7 +37,7 @@ export interface EslintRunArguments {
37
37
  本体の `assets/slidev` の eslint を子プロセスで起動する port。
38
38
 
39
39
  eslint・flat config・プラグインは `assets/slidev` の node_modules から解決され、
40
- CLI 自身の依存ツリーとは別にある。同じ 10 系でも別のインスタンスなので、
40
+ 本体自身の依存ツリーとは別にある。同じ 10 系でも別のインスタンスなので、
41
41
  Node.js API (`new ESLint()`) ではなく必ず子プロセス起動で実装する。
42
42
  */
43
43
  export interface EslintRunner {
@@ -89,17 +89,17 @@ export interface SlideLintDependencies {
89
89
  /**
90
90
  talk-dir マーカー検証。振り分けは domain/slidev-project/sync.ts の
91
91
  `assertTalkDirectory` と同一方針(例外型のみ Lint 系)。
92
- - 絶対パスでない: `relative-dir` (usage error / exit 2)。
93
- - 存在しない: `dir-not-found` (runtime error / exit 1)。
94
- - ディレクトリでない: `not-a-directory` (runtime error / exit 1)。
95
- - `slides.md` を含まない: `not-talk-dir` (runtime error / exit 1)。
92
+ - 絶対パスでない: `relative-dir` (usage error)。
93
+ - 存在しない: `dir-not-found` (runtime error)。
94
+ - ディレクトリでない: `not-a-directory` (runtime error)。
95
+ - `slides.md` を含まない: `not-talk-dir` (runtime error)。
96
96
  */
97
97
  export declare function assertTalkDirectory(directory: string, fs: Readonly<SlideLintFsAdapter>): Promise<void>;
98
98
  /**
99
99
  talk-dir 全体を lint し、集計結果を返す。
100
100
 
101
101
  eslint の exit code は 0=違反なし / 1=違反あり / 2=設定エラー・内部エラー。
102
- 2 は CLI の usage error (exit 2) と衝突させないため `SlideLintRuntimeError` に変換する。
102
+ 2 は usage error と区別するため `SlideLintRuntimeError` に変換する。
103
103
  起動失敗 (`exitCode: null`) と timeout (`timedOut: true`) は SpawnResult の契約上
104
104
  reject されないので、ここで明示的に分岐する。
105
105
  */
@@ -1,4 +1,4 @@
1
- // `pecotv slide lint` の domain ロジック。talk-dir 全体 (`pages/**/*.md` + `slides.md`) を
1
+ // slide_lint の domain ロジック。talk-dir 全体 (`pages/**/*.md` + `slides.md`) を
2
2
  // 本体の assets/slidev の eslint で lint し、結果を集計する。
3
3
  //
4
4
  // PostToolUse hook (`hooks/lib/post-tool-use/eslint-check.sh`) は、編集された 1 ファイルしか見ない。
@@ -30,14 +30,14 @@ export class SlideLintRuntimeError extends Error {
30
30
  /**
31
31
  talk-dir マーカー検証。振り分けは domain/slidev-project/sync.ts の
32
32
  `assertTalkDirectory` と同一方針(例外型のみ Lint 系)。
33
- - 絶対パスでない: `relative-dir` (usage error / exit 2)。
34
- - 存在しない: `dir-not-found` (runtime error / exit 1)。
35
- - ディレクトリでない: `not-a-directory` (runtime error / exit 1)。
36
- - `slides.md` を含まない: `not-talk-dir` (runtime error / exit 1)。
33
+ - 絶対パスでない: `relative-dir` (usage error)。
34
+ - 存在しない: `dir-not-found` (runtime error)。
35
+ - ディレクトリでない: `not-a-directory` (runtime error)。
36
+ - `slides.md` を含まない: `not-talk-dir` (runtime error)。
37
37
  */
38
38
  export async function assertTalkDirectory(directory, fs) {
39
39
  if (!path.isAbsolute(directory)) {
40
- throw new SlideLintUsageError(`--dir must be an absolute path: ${directory}`, 'relative-dir');
40
+ throw new SlideLintUsageError(`dir must be an absolute path: ${directory}`, 'relative-dir');
41
41
  }
42
42
  const info = await fs.talkDirectoryExists(directory);
43
43
  if (!info.exists) {
@@ -49,14 +49,14 @@ export async function assertTalkDirectory(directory, fs) {
49
49
  const hasSlidesMd = await fs.doesSlidesMdExist(directory);
50
50
  if (!hasSlidesMd) {
51
51
  throw new SlideLintRuntimeError(`not a talk-dir (no slides.md): ${directory}; `
52
- + 'specify a talk-dir created by pecotv slide create', 'not-talk-dir');
52
+ + 'specify a talk-dir created by slide_create', 'not-talk-dir');
53
53
  }
54
54
  }
55
55
  /**
56
56
  talk-dir 全体を lint し、集計結果を返す。
57
57
 
58
58
  eslint の exit code は 0=違反なし / 1=違反あり / 2=設定エラー・内部エラー。
59
- 2 は CLI の usage error (exit 2) と衝突させないため `SlideLintRuntimeError` に変換する。
59
+ 2 は usage error と区別するため `SlideLintRuntimeError` に変換する。
60
60
  起動失敗 (`exitCode: null`) と timeout (`timedOut: true`) は SpawnResult の契約上
61
61
  reject されないので、ここで明示的に分岐する。
62
62
  */
@@ -13,7 +13,7 @@ export interface TalkPackageJsonInput {
13
13
  readonly themeSpec: string;
14
14
  }
15
15
  /**
16
- slide create が生成する package.json の全文を返す。
16
+ slide_create が生成する package.json の全文を返す。
17
17
  依存はテーマ 1 つだけで、そのほかの依存は実行用ミラーの node_modules から張る。
18
18
  */
19
19
  export declare function talkPackageJsonSource(input: Readonly<TalkPackageJsonInput>): string;
@@ -1,7 +1,7 @@
1
1
  // talk-dir の package.json を生成する。
2
- // テーマを 1 つ参照する package.json を作る(slide create と、slide sync のテーマへの移行)。
2
+ // テーマを 1 つ参照する package.json を作る(slide_create と、slide_sync のテーマへの移行)。
3
3
  /**
4
- slide create が生成する package.json の全文を返す。
4
+ slide_create が生成する package.json の全文を返す。
5
5
  依存はテーマ 1 つだけで、そのほかの依存は実行用ミラーの node_modules から張る。
6
6
  */
7
7
  export function talkPackageJsonSource(input) {
@@ -70,21 +70,21 @@ export interface SlideSyncSummary {
70
70
  */
71
71
  readonly removed: readonly string[];
72
72
  /**
73
- 利用者に伝える警告。テーマの宣言の警告と、使わなかった `--theme`。
73
+ 利用者に伝える警告。テーマの宣言の警告と、使わなかった `theme`。
74
74
  */
75
75
  readonly warnings: readonly string[];
76
76
  }
77
77
  /**
78
78
  talk-dir マーカー検証。
79
- - 絶対パスでない: `relative-dir` (usage error / exit 2)。
80
- - 存在しない: `dir-not-found` (runtime error / exit 1)。
81
- - ディレクトリでない: `not-a-directory` (runtime error / exit 1)。
82
- - `slides.md` を含まない: `not-talk-dir` (runtime error / exit 1)。
79
+ - 絶対パスでない: `relative-dir` (usage error)。
80
+ - 存在しない: `dir-not-found` (runtime error)。
81
+ - ディレクトリでない: `not-a-directory` (runtime error)。
82
+ - `slides.md` を含まない: `not-talk-dir` (runtime error)。
83
83
  誤って ~/Documents に sync を撒かないための marker check。
84
84
  */
85
85
  export declare function assertTalkDirectory(directory: string, fs: Readonly<Pick<SlideSyncFsAdapter, 'talkDirectoryExists' | 'doesSlidesMdExist'>>): Promise<void>;
86
86
  /**
87
- 張り直しだけを行う sync(`--node-modules-only` と移行済みの talk-dir)が、テーマの取得と張り直しを任せる港。
87
+ 張り直しだけを行う sync(`node_modules_only` と移行済みの talk-dir)が、テーマの取得と張り直しを任せる港。
88
88
  `theme` は張る対象のテーマで、テーマを参照しない talk-dir(`theme: none`)は undefined。
89
89
  `relinked` が true なら、すでに張り直しを終えている(`nodeModulesTarget` を持つ)。
90
90
  `regenerated` が true なら、本体の生成ファイル(`vite.config.ts`・`start.mjs`)を書き直している。
@@ -114,7 +114,7 @@ export interface PreparedTheme {
114
114
  readonly warnings: readonly string[];
115
115
  }
116
116
  /**
117
- `--theme` の指定を解釈し、依存ルートを確かめ、テーマを取得し、宣言を読む。何も書き換えない。
117
+ `theme` の指定を解釈し、依存ルートを確かめ、テーマを取得し、宣言を読む。何も書き換えない。
118
118
  */
119
119
  export type PrepareThemePort = (themeSpec: string, talkDirectory: string) => Promise<PreparedTheme>;
120
120
  export interface SlideSyncDependencies {
@@ -131,13 +131,13 @@ export interface SlideSyncDependencies {
131
131
  /**
132
132
  sync の工程。talk-dir を 3 通りに分けて進める。
133
133
 
134
- - `--node-modules-only`: 分けずに、テーマの取得と node_modules の張り直しだけを行う。
135
- 移行前の talk-dir は、テーマ無しで張り直す。`--theme` との同時指定は usage error。
134
+ - `node_modules_only`: 分けずに、テーマの取得と node_modules の張り直しだけを行う。
135
+ 移行前の talk-dir は、テーマ無しで張り直す。`theme` との同時指定は usage error。
136
136
  - 移行済み: 張り直しだけを行う。依存の版を書き換えてから打てば、その版のテーマで張り直す。
137
- `--theme` を付けても使わず、警告に出す。
137
+ `theme` を渡しても使わず、警告に出す。
138
138
  - テーマの dir(`pecot-theme.json` を持つ): 何も書き換えず usage error で止める。
139
139
  移行前に入れると、layouts・components を消しうるため。
140
- - 移行前: `--theme` が必須(無ければ usage error)。次の順で移す。
140
+ - 移行前: `theme` が必須(無ければ usage error)。次の順で移す。
141
141
  1. `prepareTheme` が指定の解釈・依存ルートの確認・取得・宣言の読み取りを済ませる。
142
142
  2. slides.md と package.json の新しい中身を組み立てる。
143
143
  3. ここまでで失敗したら何も消さない。
@@ -1,11 +1,11 @@
1
- // `pecotv slide sync` の domain ロジック。
1
+ // slide_sync の domain ロジック。
2
2
  //
3
3
  // 役割は次の 2 つ。
4
4
  // - `assertTalkDirectory`: 絶対パスチェック + dir 存在 + slides.md 存在を、usage / runtime error に振り分ける。
5
5
  // infra fs helper を呼ぶが、infra → domain の逆依存は作らない。
6
6
  // - `runSlideSync`: talk-dir を 3 通りに分けて、sync の工程をオーケストレーションする。
7
- // 移行前(テンプレートのコピーを持つ形)に `--theme` を付けると、テーマを参照する形へ移す。
8
- // 移行済みと `--node-modules-only` は、テーマの取得と node_modules の張り直しだけを行う。
7
+ // 移行前(テンプレートのコピーを持つ形)に `theme` を渡すと、テーマを参照する形へ移す。
8
+ // 移行済みと `node_modules_only` は、テーマの取得と node_modules の張り直しだけを行う。
9
9
  // `pecot-theme.json` を持つテーマの dir は、移行前に入れず usage error で止める。
10
10
  import path from 'node:path';
11
11
  import { isThemeError } from '../slidev-theme/error-reason.js';
@@ -31,15 +31,15 @@ export class SlideSyncRuntimeError extends Error {
31
31
  }
32
32
  /**
33
33
  talk-dir マーカー検証。
34
- - 絶対パスでない: `relative-dir` (usage error / exit 2)。
35
- - 存在しない: `dir-not-found` (runtime error / exit 1)。
36
- - ディレクトリでない: `not-a-directory` (runtime error / exit 1)。
37
- - `slides.md` を含まない: `not-talk-dir` (runtime error / exit 1)。
34
+ - 絶対パスでない: `relative-dir` (usage error)。
35
+ - 存在しない: `dir-not-found` (runtime error)。
36
+ - ディレクトリでない: `not-a-directory` (runtime error)。
37
+ - `slides.md` を含まない: `not-talk-dir` (runtime error)。
38
38
  誤って ~/Documents に sync を撒かないための marker check。
39
39
  */
40
40
  export async function assertTalkDirectory(directory, fs) {
41
41
  if (!path.isAbsolute(directory)) {
42
- throw new SlideSyncUsageError(`--dir must be an absolute path: ${directory}`, 'relative-dir');
42
+ throw new SlideSyncUsageError(`dir must be an absolute path: ${directory}`, 'relative-dir');
43
43
  }
44
44
  const info = await fs.talkDirectoryExists(directory);
45
45
  if (!info.exists) {
@@ -51,26 +51,25 @@ export async function assertTalkDirectory(directory, fs) {
51
51
  const hasSlidesMd = await fs.doesSlidesMdExist(directory);
52
52
  if (!hasSlidesMd) {
53
53
  throw new SlideSyncRuntimeError(`not a talk-dir (no slides.md): ${directory}; `
54
- + 'specify a talk-dir created by pecotv slide create', 'not-talk-dir');
54
+ + 'specify a talk-dir created by slide_create', 'not-talk-dir');
55
55
  }
56
56
  }
57
57
  function themeRequiredMessage(directory) {
58
58
  return `${directory} is a talk-dir from before migration that does not reference a theme; specify the theme to migrate to: `
59
- + `slide sync --dir ${directory} --theme <theme-spec>`
60
- + ` (MCP: slide_sync with dir: ${directory}, theme: <theme-spec>)`;
59
+ + `call slide_sync with dir: ${directory}, theme: <theme-spec>`;
61
60
  }
62
- const IGNORED_THEME_WARNING = '--theme was not used because this talk-dir already references a theme; '
63
- + 'to change the theme or its version, edit the dependency in package.json and run sync';
61
+ const IGNORED_THEME_WARNING = 'theme was not used because this talk-dir already references a theme; '
62
+ + 'to change the theme or its version, edit the dependency in package.json and call slide_sync';
64
63
  /**
65
64
  sync の工程。talk-dir を 3 通りに分けて進める。
66
65
 
67
- - `--node-modules-only`: 分けずに、テーマの取得と node_modules の張り直しだけを行う。
68
- 移行前の talk-dir は、テーマ無しで張り直す。`--theme` との同時指定は usage error。
66
+ - `node_modules_only`: 分けずに、テーマの取得と node_modules の張り直しだけを行う。
67
+ 移行前の talk-dir は、テーマ無しで張り直す。`theme` との同時指定は usage error。
69
68
  - 移行済み: 張り直しだけを行う。依存の版を書き換えてから打てば、その版のテーマで張り直す。
70
- `--theme` を付けても使わず、警告に出す。
69
+ `theme` を渡しても使わず、警告に出す。
71
70
  - テーマの dir(`pecot-theme.json` を持つ): 何も書き換えず usage error で止める。
72
71
  移行前に入れると、layouts・components を消しうるため。
73
- - 移行前: `--theme` が必須(無ければ usage error)。次の順で移す。
72
+ - 移行前: `theme` が必須(無ければ usage error)。次の順で移す。
74
73
  1. `prepareTheme` が指定の解釈・依存ルートの確認・取得・宣言の読み取りを済ませる。
75
74
  2. slides.md と package.json の新しい中身を組み立てる。
76
75
  3. ここまでで失敗したら何も消さない。
@@ -81,8 +80,8 @@ export async function runSlideSync(options, dependencies) {
81
80
  await assertTalkDirectory(options.directory, dependencies.fs);
82
81
  if (options.nodeModulesOnly) {
83
82
  if (options.theme !== undefined) {
84
- throw new SlideSyncUsageError('--node-modules-only and --theme cannot be used together; '
85
- + 'use --node-modules-only to relink node_modules only, or --theme to migrate', 'theme-with-node-modules-only');
83
+ throw new SlideSyncUsageError('node_modules_only and theme cannot be used together; '
84
+ + 'use node_modules_only to relink node_modules only, or theme to migrate', 'theme-with-node-modules-only');
86
85
  }
87
86
  return await relink(options, dependencies, []);
88
87
  }
@@ -1,4 +1,4 @@
1
1
  // デッキ lint(deck-lint.config.js)が受ける、テーマの宣言の解釈結果。
2
- // `slide theme --json` の lint と同じ形で、CLI が環境変数 PECOTV_DECK_LINT に JSON で渡す。
2
+ // `slide_theme` の lint と同じ形で、環境変数 PECOTV_DECK_LINT に JSON で渡す。
3
3
  export {};
4
4
  //# sourceMappingURL=deck-lint-input.js.map
@@ -1,6 +1,6 @@
1
1
  // テーマの pecot 用の宣言(pecot-theme.json)を読む。
2
2
  // 形の契約は specs/016-slidev-theme-split/contracts/theme-declaration.md。
3
- // CLI・MCP・hooks・lint の規則は、ここの結果を受け取る。
3
+ // MCP・hooks・lint の規則は、ここの結果を受け取る。
4
4
  import path from 'node:path';
5
5
  import { z } from 'zod';
6
6
  import { isRecord } from '../_shared/json.js';
@@ -1,5 +1,5 @@
1
1
  // 参照 yaml(レイアウトの宣言)の `examples` から、ページの雛形(フロントマター)を取り出す。
2
- // `slide_page` が雛形を書き出すときと、`slide create` が初期ページを作るときに共用する。
2
+ // `slide_page` が雛形を書き出すときと、`slide_create` が初期ページを作るときに共用する。
3
3
  /**
4
4
  参照 yaml の examples ブロックの開始行。雛形の探索はここから後ろだけを見る。
5
5
  */
@@ -11,9 +11,9 @@ export interface TalkTheme {
11
11
  readonly linked: boolean;
12
12
  }
13
13
  /**
14
- 移行前の talk-dir を止めるときの案内。CLI と MCP のどちらから読んでも打てるよう、両方の手順を持つ。
14
+ 移行前の talk-dir を止めるときの案内。
15
15
  */
16
- export declare const MIGRATE_ADVICE: string;
16
+ export declare const MIGRATE_ADVICE = "to migrate to a theme reference, call slide_sync with theme: <theme-spec>";
17
17
  /**
18
18
  talk-dir が `dependencies` で参照するテーマの名前と指定(spec)を返す。node_modules には触れない。
19
19
  `theme:` が none か未指定(テーマを参照しない talk-dir)は undefined。
@@ -48,7 +48,7 @@ export declare function themeRootMessage(directory: string): string;
48
48
  talk-dir がテーマをどう持つかを 3 通りに分ける。node_modules には触れない。
49
49
  - `migrated`: `theme:` がパッケージ名で、`dependencies` がそれを指す。
50
50
  - `theme-root`: `theme:` が none か未指定で、その dir 自身が `pecot-theme.json` を持つ。テーマの dir であり、talk-dir ではない。
51
- 移行前に入れると、`sync --theme` が layouts・components を消しうるため、別に分けて止める。
51
+ 移行前に入れると、`slide_sync` の `theme` が layouts・components を消しうるため、別に分けて止める。
52
52
  - `legacy`: テンプレートのコピーを持つ移行前の形。`theme:` が none・未指定・パス形式で、`pecot-theme.json` が無い。
53
53
  パス形式は、`resolveTalkTheme` が `theme-none` で止める形と同じなので、ここに入れる。
54
54
  `theme:` がパッケージ名なのに `dependencies` に無ければ、`theme-unlinked` で止める。
@@ -15,16 +15,14 @@ export class ThemeResolveError extends Error {
15
15
  }
16
16
  }
17
17
  const NO_THEME = 'none';
18
- // 失敗の文言に添える、復旧の案内。CLI と MCP のどちらから呼ばれても読めるよう、両方の手順を 1 か所で持つ。
18
+ // 失敗の文言に添える、復旧の案内。
19
19
  function relinkAdvice(talkDirectory) {
20
- return `run slide sync --dir ${talkDirectory} --node-modules-only to relink`
21
- + ` (MCP: slide_sync with dir: ${talkDirectory}, node_modules_only: true)`;
20
+ return `call slide_sync with dir: ${talkDirectory}, node_modules_only: true to relink`;
22
21
  }
23
22
  /**
24
- 移行前の talk-dir を止めるときの案内。CLI と MCP のどちらから読んでも打てるよう、両方の手順を持つ。
23
+ 移行前の talk-dir を止めるときの案内。
25
24
  */
26
- export const MIGRATE_ADVICE = 'to migrate to a theme reference, run slide sync --theme <theme-spec>'
27
- + ' (MCP: slide_sync with theme: <theme-spec>)';
25
+ export const MIGRATE_ADVICE = 'to migrate to a theme reference, call slide_sync with theme: <theme-spec>';
28
26
  /**
29
27
  `<talk>/slides.md` の frontmatter `theme:` を読む。
30
28
  無い・読めない・`none` は undefined(テーマを指していない)。
@@ -182,7 +180,7 @@ export function themeRootMessage(directory) {
182
180
  talk-dir がテーマをどう持つかを 3 通りに分ける。node_modules には触れない。
183
181
  - `migrated`: `theme:` がパッケージ名で、`dependencies` がそれを指す。
184
182
  - `theme-root`: `theme:` が none か未指定で、その dir 自身が `pecot-theme.json` を持つ。テーマの dir であり、talk-dir ではない。
185
- 移行前に入れると、`sync --theme` が layouts・components を消しうるため、別に分けて止める。
183
+ 移行前に入れると、`slide_sync` の `theme` が layouts・components を消しうるため、別に分けて止める。
186
184
  - `legacy`: テンプレートのコピーを持つ移行前の形。`theme:` が none・未指定・パス形式で、`pecot-theme.json` が無い。
187
185
  パス形式は、`resolveTalkTheme` が `theme-none` で止める形と同じなので、ここに入れる。
188
186
  `theme:` がパッケージ名なのに `dependencies` に無ければ、`theme-unlinked` で止める。
@@ -68,7 +68,7 @@ export declare const defaultExportToPptxOptions: {
68
68
  /**
69
69
  Phase 1 が出す単スライド PPTX のファイル名 prefix(`<prefix><N>.pptx`)の既定値。
70
70
 
71
- `pecotv slide convert` はこの値を pipeline へ渡し、同じ値で merge 入力を走査する
71
+ slide_convert はこの値を pipeline へ渡し、同じ値で merge 入力を走査する
72
72
  (commands/slidev-to-pptx/convert.ts)。出力側と走査側で別々の prefix を使うと merge 入力が
73
73
  0 件になり「slides/ に slide-<N>.pptx が存在しません」という原因の分かりにくいエラーになる。
74
74
  名前の組み立て / 読み取りは下の formatSlideFilename / parseSlideFilename に閉じる。
@@ -41,7 +41,7 @@ export const defaultExportToPptxOptions = {
41
41
  /**
42
42
  Phase 1 が出す単スライド PPTX のファイル名 prefix(`<prefix><N>.pptx`)の既定値。
43
43
 
44
- `pecotv slide convert` はこの値を pipeline へ渡し、同じ値で merge 入力を走査する
44
+ slide_convert はこの値を pipeline へ渡し、同じ値で merge 入力を走査する
45
45
  (commands/slidev-to-pptx/convert.ts)。出力側と走査側で別々の prefix を使うと merge 入力が
46
46
  0 件になり「slides/ に slide-<N>.pptx が存在しません」という原因の分かりにくいエラーになる。
47
47
  名前の組み立て / 読み取りは下の formatSlideFilename / parseSlideFilename に閉じる。
@@ -13,11 +13,11 @@ export declare class PipelineTimeoutError extends Error {
13
13
  */
14
14
  readonly lastProgress?: string;
15
15
  /**
16
- pipeline が中断までに積んだ警告。commands 層が `--json` の error payload へ載せる。
16
+ pipeline が中断までに積んだ警告。commands 層が失敗の結果へ載せる。
17
17
  */
18
18
  readonly warnings?: readonly string[];
19
19
  /**
20
- pipeline が中断までに積んだエラー。commands 層が `--json` の error payload へ載せる。
20
+ pipeline が中断までに積んだエラー。commands 層が失敗の結果へ載せる。
21
21
  */
22
22
  readonly errors?: readonly PipelineError[];
23
23
  constructor(idleTimeoutMs: number, options: Readonly<{
@@ -32,11 +32,11 @@ export declare class PipelineTimeoutError extends Error {
32
32
  }
33
33
  export declare class PipelineRuntimeError extends Error {
34
34
  /**
35
- pipeline が失敗までに積んだ警告。commands 層が `--json` の error payload へ載せる。
35
+ pipeline が失敗までに積んだ警告。commands 層が失敗の結果へ載せる。
36
36
  */
37
37
  readonly warnings?: readonly string[];
38
38
  /**
39
- pipeline が失敗までに積んだエラー。commands 層が `--json` の error payload へ載せる。
39
+ pipeline が失敗までに積んだエラー。commands 層が失敗の結果へ載せる。
40
40
  */
41
41
  readonly errors?: readonly PipelineError[];
42
42
  constructor(message: string, options?: Readonly<{
@@ -15,11 +15,11 @@ export class PipelineTimeoutError extends Error {
15
15
  */
16
16
  lastProgress;
17
17
  /**
18
- pipeline が中断までに積んだ警告。commands 層が `--json` の error payload へ載せる。
18
+ pipeline が中断までに積んだ警告。commands 層が失敗の結果へ載せる。
19
19
  */
20
20
  warnings;
21
21
  /**
22
- pipeline が中断までに積んだエラー。commands 層が `--json` の error payload へ載せる。
22
+ pipeline が中断までに積んだエラー。commands 層が失敗の結果へ載せる。
23
23
  */
24
24
  errors;
25
25
  constructor(idleTimeoutMs, options) {
@@ -40,11 +40,11 @@ export class PipelineTimeoutError extends Error {
40
40
  }
41
41
  export class PipelineRuntimeError extends Error {
42
42
  /**
43
- pipeline が失敗までに積んだ警告。commands 層が `--json` の error payload へ載せる。
43
+ pipeline が失敗までに積んだ警告。commands 層が失敗の結果へ載せる。
44
44
  */
45
45
  warnings;
46
46
  /**
47
- pipeline が失敗までに積んだエラー。commands 層が `--json` の error payload へ載せる。
47
+ pipeline が失敗までに積んだエラー。commands 層が失敗の結果へ載せる。
48
48
  */
49
49
  errors;
50
50
  constructor(message, options) {
@@ -104,7 +104,7 @@ export interface SinglePassFallbackTiming {
104
104
  }
105
105
  /**
106
106
  1 パス方式を試みた run の所要。変換した run はグループ別、run 全体を退避した run は理由と判定時間。
107
- `kind` で判別する(`slide convert --json` の `timings.singlePass` にもそのまま載る)。
107
+ `kind` で判別する(slide_convert の `timings.singlePass` にもそのまま載る)。
108
108
  */
109
109
  export type SinglePassTiming = SinglePassGroupsTiming | SinglePassFallbackTiming;
110
110
  export interface PipelineTiming {
@@ -1,21 +1,10 @@
1
1
  /**
2
2
  データ置き場。作らずに値を返す。
3
- 有効な HOME と有効な XDG_DATA_HOME がどちらも無いときは undefined。
4
-
5
- bin/_lib.sh の plugin_data_dir_resolve と同じ解決順で、同じ入力なら同じ結果になる。
6
- この対応は tests/unit/infra/dependency-root.test.ts が固定する。
7
- 順序は CLAUDE_PLUGIN_DATA、PLUGIN_DATA、XDG_DATA_HOME、HOME の順。
8
- XDG_DATA_HOME の下は `pecot/pecot-visual`、HOME の下は `.local/share/pecot/pecot-visual`。
9
- XDG_DATA_HOME が絶対パスでなければ未設定として扱う。
10
- HOME が使えるのは絶対パスのときだけ。
3
+ 順序は CLAUDE_PLUGIN_DATA、PLUGIN_DATA、XDG_DATA_HOME、HOME。どれも使えなければ undefined。
11
4
  */
12
5
  export declare function dataDirectory(): string | undefined;
13
6
  /**
14
- 永続層のルート(`${データ置き場}/mcp-dist`)。配下の `node_modules` が単体配布の依存ルートになる。
15
-
16
- 作らずに値を返すだけで、作成は installRuntimeDependencies が行う。
17
- プラグインの `runtime/` とは別のディレクトリなので、bin/pecotv の世代削除とは干渉しない。
18
- 置き場を決められない環境では undefined。
7
+ 永続層のルート(`${データ置き場}/mcp-dist`)。置き場を決められなければ undefined。
19
8
  */
20
9
  export declare function runtimeDependencyRoot(): string | undefined;
21
10
  /**
@@ -26,68 +15,25 @@ export declare function runtimeDependencyRoot(): string | undefined;
26
15
  */
27
16
  export declare function themeStoreRoot(): string | undefined;
28
17
  /**
29
- 環境変数の値。未設定・空白のみは undefined。
30
- */
31
- export declare function trimmedEnvironment(name: string): string | undefined;
32
- /**
33
- プラグイン配布の依存ルート。
34
-
35
- `PECOTV_DEPENDENCY_ROOT`(bin/pecotv が渡す実行用ミラー)を優先し、無ければ従来どおり
36
- `CLAUDE_PLUGIN_ROOT`。同梱アセットの起点はここではなく resolvePluginRoot()。
37
- */
38
- export declare function pluginDependencyRoot(): string | undefined;
39
- /**
40
- Chromium 取得のロックと OS ライブラリ確認の印を置くディレクトリ(`${データ置き場}/runtime`)。
41
-
42
- bin/pecotv と同じ場所にする。
43
- 依存ルートの node_modules に置くと、ミラーのハードリンク複製で別世代と inode を共有する。
44
- bin と cli の置き場が食い違うと、確認が毎回実行され、二重取得も起きる。
45
- 求め方は、bin/pecotv が渡す `PECOTV_RUNTIME_DIR`(`runtime/<hash>`)の親。
46
- undefined を返すのは、`PECOTV_RUNTIME_DIR` の欠落、相対パス、親の不在のとき。
47
-
48
- 呼び出し側は、従来の依存ルートの node_modules を使う。
49
- 実在しない親では、flock(1) がロックファイルを作れず exit 66 で終わり、印も書けない。
18
+ 同梱の依存ルート。同梱アセットの起点(resolvePluginRoot)と同じ場所。
50
19
  */
51
- export declare function runtimeStateDirectory(): string | undefined;
20
+ export declare function pluginDependencyRoot(): string;
52
21
  /**
53
- Chromium 取得のロックと OS ライブラリ確認の印を置くディレクトリ。
54
-
55
- `${データ置き場}/runtime`(runtimeStateDirectory)を優先する。
56
- 実行用ミラーを使わない場合(開発・単体配布)は、従来どおり依存ルートの node_modules。
57
- どこにも無ければ undefined。
22
+ Chromium 取得のロックと OS ライブラリ確認の印を置くディレクトリ(実在する依存ルートの node_modules)。
58
23
  */
59
24
  export declare function stateFileDirectory(): string | undefined;
60
25
  /**
61
- 実行中のミラー(`PECOTV_RUNTIME_DIR`。bin/pecotv が渡す `runtime/<hash>`)。無ければ undefined。
62
-
63
- lint のテンプレートなど、cli 自身と同じ版で揃えたいものの起点に使う。`PECOTV_DEPENDENCY_ROOT`
64
- (`runtime/current`)は別セッションが切り替えた新版を指すので使わない。
65
- */
66
- export declare function runningMirrorDirectory(): string | undefined;
67
- /**
68
- 依存を探すルートを優先順に返す。プラグイン配布 → 永続層の順。
69
-
70
- 返すのは `node_modules` を持つ側のディレクトリで、`node_modules` は付けない。
71
- `createRequire` の基準点にも npm の `--prefix` にも、この形で渡すため。
72
- プラグイン配布を先に見るのは、永続層が併存していても、従来どおり同梱の依存を使うため。
26
+ 依存を探すルート(`node_modules` を持つ側のディレクトリ)を、同梱 → 永続層の順に返す。
73
27
  */
74
28
  export declare function dependencyRoots(): readonly string[];
75
29
  /**
76
- 実在する依存ルートの `node_modules`(env 由来のプラグインルート → 永続層の順)。
30
+ 実在する依存ルートの `node_modules`(プラグインルート → 永続層の順)。
77
31
  */
78
32
  export declare function existingDependencyNodeModules(): string | undefined;
79
33
  /**
80
34
  talk-dir から張る `node_modules` symlink の実体を解決する。
81
35
 
82
- 依存ルートは env ではなく引数で受ける。
83
- create / sync は deps 経由で依存ルートを受け取っており、その値と食い違わせないため。
84
- 依存ルートは PECOTV_DEPENDENCY_ROOT で、無ければプラグインルート。
85
-
86
- 判定は `node_modules` の実在ではなく、代表パッケージ(RUNTIME_DEPENDENCY_PROBES)が
87
- その `node_modules` 配下から引けるかで行う。
88
- areRuntimeDependenciesInstalled と基準を揃え、次の食い違いを避ける。
89
- npm が版衝突で `<配布パッケージ>/node_modules` を掘ると、symlink は依存を含まないツリーを指す。
90
- 一方で runtime_setup は永続層へ install する。
36
+ 依存ルート(create / sync が deps で受けた値)→ 永続層の順に、代表パッケージがその配下から引けるかで選ぶ。
91
37
  */
92
38
  export declare function resolveTalkDirectoryNodeModules(dependencyRoot: string): string | undefined;
93
39
  /**
@@ -100,12 +46,8 @@ export declare function resolveTalkDirectoryNodeModules(dependencyRoot: string):
100
46
  export declare function resolveDependency(specifier: string, fromUrl?: string): string | undefined;
101
47
  /**
102
48
  実行時依存が引けないときに利用者へ示す回復手段。
103
-
104
- 配布形態ごとに手段が違うため、両方を並べる。
105
- 呼び出し元は、自分がどちらの配布形態かを判定しない。
106
- 判定できるのは依存ルートの実在だけで、配布形態そのものではない。
107
49
  */
108
- export declare const DEPENDENCY_RECOVERY_HINT: string;
50
+ export declare const DEPENDENCY_RECOVERY_HINT = "call the `runtime_setup` tool (it fetches the runtime dependencies)";
109
51
  /**
110
52
  実行時依存が揃っているかの判定に使う specifier。
111
53