opencode-ipynb 0.1.2 → 2.0.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.
Files changed (126) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.md +191 -41
  3. package/dist/domain/cell.d.ts +2 -1
  4. package/dist/domain/errors.d.ts +3 -31
  5. package/dist/domain/execution.d.ts +4 -1
  6. package/dist/domain/notebook.d.ts +1 -1
  7. package/dist/domain/output.d.ts +0 -1
  8. package/dist/format/diagnostics.d.ts +0 -1
  9. package/dist/format/markdown.d.ts +1 -2
  10. package/dist/format/{diff.d.ts → notebook.d.ts} +2 -1
  11. package/dist/format/outputs.d.ts +3 -2
  12. package/dist/index.d.ts +3 -1
  13. package/dist/index.js +7303 -26413
  14. package/dist/load-document.d.ts +16 -0
  15. package/dist/lsp.d.ts +97 -0
  16. package/dist/lsp.js +129 -0
  17. package/dist/notebook-diagnostics.d.ts +55 -0
  18. package/dist/notebook-hooks.d.ts +23 -0
  19. package/dist/plugin-options.d.ts +4 -1
  20. package/dist/plugin-v2.d.ts +35 -0
  21. package/dist/plugin.d.ts +2 -3
  22. package/dist/registrations.d.ts +5 -0
  23. package/dist/rpc.d.ts +141 -0
  24. package/dist/rpc.js +84 -0
  25. package/dist/services/KernelManager.d.ts +36 -0
  26. package/dist/services/NotebookCleanService.d.ts +3 -7
  27. package/dist/services/NotebookEditService.d.ts +6 -12
  28. package/dist/services/NotebookExecutionService.d.ts +15 -11
  29. package/dist/services/NotebookExportService.d.ts +3 -7
  30. package/dist/services/NotebookFileService.d.ts +19 -13
  31. package/dist/services/NotebookInspectService.d.ts +15 -14
  32. package/dist/services/NotebookOutputService.d.ts +4 -10
  33. package/dist/services/NotebookReadService.d.ts +4 -10
  34. package/dist/services/PathService.d.ts +5 -7
  35. package/dist/services/PermissionService.d.ts +6 -8
  36. package/dist/services/PythonService.d.ts +23 -42
  37. package/dist/services/index.d.ts +22 -29
  38. package/dist/services/revision.d.ts +15 -0
  39. package/dist/tool.d.ts +66 -0
  40. package/dist/tools/_readPermission.d.ts +8 -0
  41. package/dist/tools/_resolveOptions.d.ts +13 -2
  42. package/dist/tools/cell_delete.d.ts +4 -13
  43. package/dist/tools/cell_insert.d.ts +10 -21
  44. package/dist/tools/cell_move.d.ts +5 -15
  45. package/dist/tools/clean.d.ts +8 -21
  46. package/dist/tools/doctor.d.ts +3 -11
  47. package/dist/tools/edit.d.ts +10 -21
  48. package/dist/tools/export.d.ts +12 -23
  49. package/dist/tools/inspect.d.ts +7 -19
  50. package/dist/tools/kernel.d.ts +13 -21
  51. package/dist/tools/lsp.d.ts +9 -0
  52. package/dist/tools/outputs.d.ts +15 -29
  53. package/dist/tools/read.d.ts +12 -29
  54. package/dist/tools/repro.d.ts +6 -14
  55. package/dist/tools/run.d.ts +17 -34
  56. package/dist/utils/ansi.d.ts +2 -1
  57. package/dist/utils/atomic-replace.d.ts +6 -0
  58. package/dist/utils/attachments.d.ts +2 -3
  59. package/dist/utils/execution-order.d.ts +8 -0
  60. package/dist/utils/fence.d.ts +2 -0
  61. package/dist/utils/i18n.d.ts +1 -2
  62. package/dist/utils/imports.d.ts +6 -1
  63. package/dist/utils/json.d.ts +0 -1
  64. package/dist/utils/limits.d.ts +12 -2
  65. package/dist/utils/markdown-safe.d.ts +7 -0
  66. package/dist/utils/metadata.d.ts +3 -0
  67. package/dist/utils/mime.d.ts +1 -1
  68. package/dist/utils/paths.d.ts +0 -2
  69. package/dist/utils/truncate.d.ts +0 -1
  70. package/dist/utils/windows.d.ts +4 -0
  71. package/dist/virtual-materialize.d.ts +36 -0
  72. package/package.json +30 -18
  73. package/python/ipynb_runner.py +247 -17
  74. package/python/requirements.txt +5 -4
  75. package/server.js +3 -0
  76. package/dist/domain/cell.d.ts.map +0 -1
  77. package/dist/domain/errors.d.ts.map +0 -1
  78. package/dist/domain/execution.d.ts.map +0 -1
  79. package/dist/domain/notebook.d.ts.map +0 -1
  80. package/dist/domain/output.d.ts.map +0 -1
  81. package/dist/format/diagnostics.d.ts.map +0 -1
  82. package/dist/format/diff.d.ts.map +0 -1
  83. package/dist/format/markdown.d.ts.map +0 -1
  84. package/dist/format/outputs.d.ts.map +0 -1
  85. package/dist/index.d.ts.map +0 -1
  86. package/dist/plugin-options.d.ts.map +0 -1
  87. package/dist/plugin.d.ts.map +0 -1
  88. package/dist/services/DiffService.d.ts +0 -17
  89. package/dist/services/DiffService.d.ts.map +0 -1
  90. package/dist/services/NotebookCleanService.d.ts.map +0 -1
  91. package/dist/services/NotebookEditService.d.ts.map +0 -1
  92. package/dist/services/NotebookExecutionService.d.ts.map +0 -1
  93. package/dist/services/NotebookExportService.d.ts.map +0 -1
  94. package/dist/services/NotebookFileService.d.ts.map +0 -1
  95. package/dist/services/NotebookInspectService.d.ts.map +0 -1
  96. package/dist/services/NotebookOutputService.d.ts.map +0 -1
  97. package/dist/services/NotebookReadService.d.ts.map +0 -1
  98. package/dist/services/PathService.d.ts.map +0 -1
  99. package/dist/services/PermissionService.d.ts.map +0 -1
  100. package/dist/services/PythonService.d.ts.map +0 -1
  101. package/dist/services/index.d.ts.map +0 -1
  102. package/dist/tools/_resolveOptions.d.ts.map +0 -1
  103. package/dist/tools/cell_delete.d.ts.map +0 -1
  104. package/dist/tools/cell_insert.d.ts.map +0 -1
  105. package/dist/tools/cell_move.d.ts.map +0 -1
  106. package/dist/tools/clean.d.ts.map +0 -1
  107. package/dist/tools/doctor.d.ts.map +0 -1
  108. package/dist/tools/edit.d.ts.map +0 -1
  109. package/dist/tools/export.d.ts.map +0 -1
  110. package/dist/tools/inspect.d.ts.map +0 -1
  111. package/dist/tools/kernel.d.ts.map +0 -1
  112. package/dist/tools/outputs.d.ts.map +0 -1
  113. package/dist/tools/read.d.ts.map +0 -1
  114. package/dist/tools/repro.d.ts.map +0 -1
  115. package/dist/tools/run.d.ts.map +0 -1
  116. package/dist/utils/ansi.d.ts.map +0 -1
  117. package/dist/utils/attachments.d.ts.map +0 -1
  118. package/dist/utils/fiber.d.ts +0 -2
  119. package/dist/utils/fiber.d.ts.map +0 -1
  120. package/dist/utils/i18n.d.ts.map +0 -1
  121. package/dist/utils/imports.d.ts.map +0 -1
  122. package/dist/utils/json.d.ts.map +0 -1
  123. package/dist/utils/limits.d.ts.map +0 -1
  124. package/dist/utils/mime.d.ts.map +0 -1
  125. package/dist/utils/paths.d.ts.map +0 -1
  126. package/dist/utils/truncate.d.ts.map +0 -1
@@ -1,9 +1,8 @@
1
- import { Context, Effect } from "effect";
1
+ import { Effect } from "effect";
2
2
  import { CellIndexOutOfBoundsError, NotebookNotFoundError, NotebookParseError, NotebookValidationError, NotebookWriteError, PathOutsideWorktreeError, PermissionDeniedError } from "../domain/errors.js";
3
- import { type NotebookFileServiceShape } from "./NotebookFileService.js";
4
- import { type PathServiceShape } from "./PathService.js";
3
+ import type { NotebookFileServiceShape } from "./NotebookFileService.js";
4
+ import type { PathServiceShape } from "./PathService.js";
5
5
  import { type PermissionServiceShape } from "./PermissionService.js";
6
- import { type DiffServiceShape } from "./DiffService.js";
7
6
  import { type NotebookRaw } from "../domain/notebook.js";
8
7
  export interface EditRequest {
9
8
  readonly cellIndex: number;
@@ -16,9 +15,7 @@ export interface EditResult {
16
15
  readonly cellIndex: number;
17
16
  readonly cellType: "code" | "markdown" | "raw";
18
17
  readonly clearedOutputs: boolean;
19
- readonly diff: string;
20
- readonly oldPreview: string;
21
- readonly newPreview: string;
18
+ readonly changed: boolean;
22
19
  readonly notebook: NotebookRaw;
23
20
  }
24
21
  export interface InsertResult {
@@ -42,6 +39,7 @@ export interface MoveResult {
42
39
  readonly absPath: string;
43
40
  readonly fromIndex: number;
44
41
  readonly toIndex: number;
42
+ readonly cellType: CellType;
45
43
  readonly totalCells: number;
46
44
  }
47
45
  export type CellType = "code" | "markdown" | "raw";
@@ -55,9 +53,5 @@ export interface NotebookEditServiceShape {
55
53
  readonly deleteCell: (filePath: string, cellIndex: number) => Effect.Effect<DeleteResult, NotebookNotFoundError | NotebookParseError | NotebookValidationError | CellIndexOutOfBoundsError | NotebookWriteError | PathOutsideWorktreeError | PermissionDeniedError>;
56
54
  readonly moveCell: (filePath: string, fromIndex: number, toIndex: number) => Effect.Effect<MoveResult, NotebookNotFoundError | NotebookParseError | NotebookValidationError | CellIndexOutOfBoundsError | NotebookWriteError | PathOutsideWorktreeError | PermissionDeniedError>;
57
55
  }
58
- declare const NotebookEditService_base: Context.TagClass<NotebookEditService, "@ipynb/NotebookEditService", NotebookEditServiceShape>;
59
- export declare class NotebookEditService extends NotebookEditService_base {
60
- }
61
- declare const makeEditImpl: (pathSvc: PathServiceShape, fileSvc: NotebookFileServiceShape, diffSvc: DiffServiceShape, permSvc: PermissionServiceShape) => NotebookEditServiceShape;
56
+ declare const makeEditImpl: (pathSvc: PathServiceShape, fileSvc: NotebookFileServiceShape, permSvc: PermissionServiceShape) => NotebookEditServiceShape;
62
57
  export { makeEditImpl };
63
- //# sourceMappingURL=NotebookEditService.d.ts.map
@@ -1,10 +1,10 @@
1
- import { Context, Effect } from "effect";
1
+ import { Effect } from "effect";
2
2
  import { type NotebookError } from "../domain/errors.js";
3
- import { type NotebookFileServiceShape } from "./NotebookFileService.js";
4
- import { type PathServiceShape } from "./PathService.js";
3
+ import type { NotebookFileServiceShape } from "./NotebookFileService.js";
4
+ import type { PathServiceShape } from "./PathService.js";
5
5
  import { type PermissionServiceShape } from "./PermissionService.js";
6
- import { type KernelManagerShape, type PythonServiceShape } from "./PythonService.js";
7
- import { cellSource } from "../domain/notebook.js";
6
+ import { type PythonServiceShape } from "./PythonService.js";
7
+ import type { KernelManagerShape } from "./KernelManager.js";
8
8
  import type { RunResponse, CellExecutionSummary, EnvReport } from "../domain/execution.js";
9
9
  import { type TruncationHintKey } from "../utils/i18n.js";
10
10
  export type ExecutionMode = "cell" | "range" | "all" | "from";
@@ -22,33 +22,37 @@ export interface ExecutionRequest {
22
22
  export interface ExecutionResult {
23
23
  readonly displayPath: string;
24
24
  readonly absPath: string;
25
+ readonly kernelPath: string;
25
26
  readonly executedCells: ReadonlyArray<number>;
26
27
  readonly durationMs: number;
27
28
  readonly saved: boolean;
28
29
  readonly response: RunResponse;
29
30
  }
30
31
  export interface NotebookExecutionServiceShape {
31
- readonly execute: (filePath: string, request: ExecutionRequest) => Effect.Effect<ExecutionResult, NotebookError>;
32
+ readonly execute: (filePath: string, request: ExecutionRequest, options?: {
33
+ readonly signal?: AbortSignal;
34
+ }) => Effect.Effect<ExecutionResult, NotebookError>;
32
35
  readonly reportEnv: (filePath: string, options?: ReportEnvOptions) => Effect.Effect<EnvReport, NotebookError>;
33
36
  }
34
37
  export interface ReportEnvOptions {
35
38
  readonly timeoutMs?: number | undefined;
39
+ readonly signal?: AbortSignal | undefined;
40
+ /** The caller already asserted shell for the probe and helper. */
41
+ readonly skipShellPermission?: boolean | undefined;
36
42
  }
37
43
  export interface ExecutionOptions {
38
44
  readonly kernelManager?: KernelManagerShape | undefined;
39
45
  readonly warmKernel: boolean;
40
46
  readonly defaultTimeoutMs: number;
41
- }
42
- declare const NotebookExecutionService_base: Context.TagClass<NotebookExecutionService, "@ipynb/NotebookExecutionService", NotebookExecutionServiceShape>;
43
- export declare class NotebookExecutionService extends NotebookExecutionService_base {
47
+ /** Configured interpreter, used for the pre-probe shell permission. */
48
+ readonly pythonPath?: string | undefined;
44
49
  }
45
50
  declare const truncateText: (text: string | undefined, maxChars: number, locale?: string, hintKey?: TruncationHintKey) => string | undefined;
46
51
  declare const truncateTraceback: (tb: ReadonlyArray<string>, maxChars: number) => ReadonlyArray<string>;
52
+ export declare const cellSummaryChars: (summary: CellExecutionSummary) => number;
47
53
  declare const truncateCellSummary: (summary: CellExecutionSummary, maxOutputChars: number) => CellExecutionSummary;
48
54
  declare const truncateRunResponse: (response: RunResponse, maxOutputChars: number) => RunResponse;
49
55
  export declare const buildPersistedOutputs: (summary: CellExecutionSummary) => Array<Record<string, unknown>>;
50
56
  declare const makeExecutionImpl: (pathSvc: PathServiceShape, fileSvc: NotebookFileServiceShape, permSvc: PermissionServiceShape, pythonSvc: PythonServiceShape, execOpts?: ExecutionOptions) => NotebookExecutionServiceShape;
51
57
  export { makeExecutionImpl };
52
- export { cellSource };
53
58
  export { truncateText, truncateTraceback, truncateCellSummary, truncateRunResponse };
54
- //# sourceMappingURL=NotebookExecutionService.d.ts.map
@@ -1,7 +1,7 @@
1
- import { Context, Effect } from "effect";
1
+ import { Effect } from "effect";
2
2
  import { NotebookNotFoundError, NotebookParseError, NotebookValidationError, NotebookWriteError, PathOutsideWorktreeError, PermissionDeniedError } from "../domain/errors.js";
3
- import { type NotebookFileServiceShape } from "./NotebookFileService.js";
4
- import { type PathServiceShape } from "./PathService.js";
3
+ import type { NotebookFileServiceShape } from "./NotebookFileService.js";
4
+ import type { PathServiceShape } from "./PathService.js";
5
5
  import { type PermissionServiceShape } from "./PermissionService.js";
6
6
  import { DEFAULT_MAX_EXPORT_CHARS } from "../utils/limits.js";
7
7
  export type ExportFormat = "markdown" | "python" | "summary";
@@ -24,10 +24,6 @@ export interface ExportResult {
24
24
  export interface NotebookExportServiceShape {
25
25
  readonly export: (filePath: string, options: ExportOptions) => Effect.Effect<ExportResult, NotebookNotFoundError | NotebookParseError | NotebookValidationError | NotebookWriteError | PathOutsideWorktreeError | PermissionDeniedError>;
26
26
  }
27
- declare const NotebookExportService_base: Context.TagClass<NotebookExportService, "@ipynb/NotebookExportService", NotebookExportServiceShape>;
28
- export declare class NotebookExportService extends NotebookExportService_base {
29
- }
30
27
  declare const makeExportImpl: (pathSvc: PathServiceShape, fileSvc: NotebookFileServiceShape, permSvc: PermissionServiceShape) => NotebookExportServiceShape;
31
28
  export { makeExportImpl };
32
29
  export { DEFAULT_MAX_EXPORT_CHARS };
33
- //# sourceMappingURL=NotebookExportService.d.ts.map
@@ -1,18 +1,24 @@
1
- import { Context, Effect } from "effect";
2
- import { LockError, NotebookNotFoundError, NotebookParseError, NotebookValidationError, NotebookWriteError } from "../domain/errors.js";
3
- import { NotebookSchema, type NotebookRaw, cellSource } from "../domain/notebook.js";
4
- export interface NotebookFileServiceShape {
5
- readonly read: (filePath: string) => Effect.Effect<NotebookRaw, NotebookNotFoundError | NotebookParseError | NotebookValidationError>;
6
- readonly readText: (filePath: string) => Effect.Effect<string, NotebookNotFoundError>;
7
- readonly writeAtomic: (filePath: string, notebook: NotebookRaw) => Effect.Effect<void, NotebookParseError | NotebookValidationError | NotebookWriteError>;
8
- readonly withFileLock: <A, E, R>(filePath: string, program: Effect.Effect<A, E, R>) => Effect.Effect<A, E | LockError, R>;
1
+ import { Effect } from "effect";
2
+ import { NotebookNotFoundError, NotebookParseError, NotebookValidationError, NotebookWriteError, PathOutsideWorktreeError } from "../domain/errors.js";
3
+ import { NotebookSchema, type NotebookRaw } from "../domain/notebook.js";
4
+ interface NotebookFileServiceOptions {
5
+ /** When set, real paths are pinned and checked against this worktree. */
6
+ readonly worktree?: string;
9
7
  }
10
- declare const NotebookFileService_base: Context.TagClass<NotebookFileService, "@ipynb/NotebookFileService", NotebookFileServiceShape>;
11
- export declare class NotebookFileService extends NotebookFileService_base {
8
+ export interface NotebookFileServiceShape {
9
+ readonly read: (filePath: string) => Effect.Effect<NotebookRaw, NotebookNotFoundError | NotebookParseError | NotebookValidationError | PathOutsideWorktreeError>;
10
+ readonly readText: (filePath: string) => Effect.Effect<string, NotebookNotFoundError | NotebookValidationError | PathOutsideWorktreeError>;
11
+ readonly readWithText: (filePath: string) => Effect.Effect<{
12
+ readonly notebook: NotebookRaw;
13
+ readonly text: string;
14
+ }, NotebookNotFoundError | NotebookParseError | NotebookValidationError | PathOutsideWorktreeError>;
15
+ readonly writeAtomic: (filePath: string, notebook: NotebookRaw, options?: {
16
+ readonly noFollowFinal?: boolean;
17
+ }) => Effect.Effect<void, NotebookParseError | NotebookValidationError | NotebookWriteError | PathOutsideWorktreeError>;
18
+ readonly withFileLock: <A, E, R>(filePath: string, program: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>;
12
19
  }
13
- export declare const makeNotebookFileService: () => NotebookFileServiceShape;
14
- export { cellSource };
20
+ export declare const makeNotebookFileService: (options?: NotebookFileServiceOptions) => NotebookFileServiceShape;
15
21
  export declare const _schemas: {
16
22
  readonly NotebookSchema: typeof NotebookSchema;
17
23
  };
18
- //# sourceMappingURL=NotebookFileService.d.ts.map
24
+ export {};
@@ -1,7 +1,7 @@
1
- import { Context, Effect } from "effect";
1
+ import { Effect } from "effect";
2
2
  import { NotebookNotFoundError, NotebookParseError, NotebookValidationError, PathOutsideWorktreeError } from "../domain/errors.js";
3
- import { type NotebookFileServiceShape } from "./NotebookFileService.js";
4
- import { type PathServiceShape } from "./PathService.js";
3
+ import type { NotebookFileServiceShape } from "./NotebookFileService.js";
4
+ import type { PathServiceShape } from "./PathService.js";
5
5
  import { type CellInspection } from "../format/diagnostics.js";
6
6
  import type { NotebookRaw } from "../domain/notebook.js";
7
7
  export interface InspectSummary {
@@ -25,9 +25,6 @@ export interface InspectOptions {
25
25
  export interface NotebookInspectServiceShape {
26
26
  readonly inspect: (filePath: string, options?: Partial<InspectOptions>) => Effect.Effect<InspectSummary, NotebookNotFoundError | NotebookParseError | NotebookValidationError | PathOutsideWorktreeError>;
27
27
  }
28
- declare const NotebookInspectService_base: Context.TagClass<NotebookInspectService, "@ipynb/NotebookInspectService", NotebookInspectServiceShape>;
29
- export declare class NotebookInspectService extends NotebookInspectService_base {
30
- }
31
28
  export interface AnalyzeMissingPackagesOptions {
32
29
  readonly pythonPath: string;
33
30
  readonly checkImport: (pythonPath: string, module: string) => Effect.Effect<{
@@ -35,15 +32,16 @@ export interface AnalyzeMissingPackagesOptions {
35
32
  available: boolean;
36
33
  detail: string;
37
34
  }, never>;
35
+ readonly checkImports?: (pythonPath: string, modules: ReadonlyArray<string>, signal?: AbortSignal) => Effect.Effect<ReadonlyArray<{
36
+ name: string;
37
+ available: boolean;
38
+ detail: string;
39
+ }>, never>;
40
+ readonly signal?: AbortSignal | undefined;
38
41
  }
42
+ export declare const MAX_MISSING_PACKAGE_CHECKS = 500;
39
43
  export declare const analyzeMissingPackages: (notebook: NotebookRaw, options: AnalyzeMissingPackagesOptions) => Effect.Effect<ReadonlyArray<string>, never>;
40
44
  export declare const analyzeReproducibility: (notebook: NotebookRaw) => ReadonlyArray<string>;
41
- export interface ExecutionOrderEntry {
42
- readonly cellIndex: number;
43
- readonly executionCount: number;
44
- readonly previousCount: number;
45
- }
46
- export declare const analyzeExecutionOrder: (notebook: NotebookRaw) => ReadonlyArray<ExecutionOrderEntry>;
47
45
  export declare const analyzeExecutionOrderWarnings: (notebook: NotebookRaw) => ReadonlyArray<string>;
48
46
  declare const build: (pathSvc: PathServiceShape, fileSvc: NotebookFileServiceShape) => NotebookInspectServiceShape;
49
47
  /**
@@ -55,8 +53,11 @@ export declare const analyzeMissingPackagesForPython: (notebook: NotebookRaw, py
55
53
  name: string;
56
54
  available: boolean;
57
55
  detail: string;
58
- }, never>) => Effect.Effect<ReadonlyArray<string>, never>;
56
+ }, never>, checkImports?: (pythonPath: string, modules: ReadonlyArray<string>, signal?: AbortSignal) => Effect.Effect<ReadonlyArray<{
57
+ name: string;
58
+ available: boolean;
59
+ detail: string;
60
+ }>, never>, signal?: AbortSignal) => Effect.Effect<ReadonlyArray<string>, never>;
59
61
  export { build as makeInspectImpl };
60
62
  export declare const formatInspectSummary: (summary: InspectSummary) => string;
61
63
  export type { CellInspection };
62
- //# sourceMappingURL=NotebookInspectService.d.ts.map
@@ -1,9 +1,8 @@
1
- import { Context, Effect } from "effect";
1
+ import { Effect } from "effect";
2
2
  import { CellIndexOutOfBoundsError, NotebookNotFoundError, NotebookParseError, NotebookValidationError, NotebookWriteError, PathOutsideWorktreeError, PermissionDeniedError } from "../domain/errors.js";
3
- import { type NotebookFileServiceShape } from "./NotebookFileService.js";
4
- import { type PathServiceShape } from "./PathService.js";
3
+ import type { NotebookFileServiceShape } from "./NotebookFileService.js";
4
+ import type { PathServiceShape } from "./PathService.js";
5
5
  import { type PermissionServiceShape } from "./PermissionService.js";
6
- import { cellSource } from "../domain/notebook.js";
7
6
  export type OutputOperation = "list" | "read" | "read_error" | "clear_cell" | "clear_all";
8
7
  export interface OutputListEntry {
9
8
  readonly cellIndex: number;
@@ -47,16 +46,11 @@ export interface ClearOutputsResult {
47
46
  export interface NotebookOutputServiceShape {
48
47
  readonly listOutputs: (filePath: string, offset?: number | undefined, limit?: number | undefined) => Effect.Effect<ListOutputsResult, NotebookNotFoundError | NotebookParseError | NotebookValidationError | PathOutsideWorktreeError>;
49
48
  readonly readOutputs: (filePath: string, request: OutputReadRequest) => Effect.Effect<OutputReadResult, NotebookNotFoundError | NotebookParseError | NotebookValidationError | CellIndexOutOfBoundsError | PathOutsideWorktreeError>;
50
- readonly readError: (filePath: string, cellIndex: number) => Effect.Effect<OutputErrorResult, NotebookNotFoundError | NotebookParseError | NotebookValidationError | CellIndexOutOfBoundsError | PathOutsideWorktreeError>;
49
+ readonly readError: (filePath: string, cellIndex: number, maxOutputChars?: number) => Effect.Effect<OutputErrorResult, NotebookNotFoundError | NotebookParseError | NotebookValidationError | CellIndexOutOfBoundsError | PathOutsideWorktreeError>;
51
50
  readonly clearCellOutputs: (filePath: string, cellIndex: number) => Effect.Effect<ClearOutputsResult, NotebookNotFoundError | NotebookParseError | NotebookValidationError | CellIndexOutOfBoundsError | NotebookWriteError | PathOutsideWorktreeError | PermissionDeniedError>;
52
51
  readonly clearAllOutputs: (filePath: string) => Effect.Effect<ClearOutputsResult, NotebookNotFoundError | NotebookParseError | NotebookValidationError | NotebookWriteError | PathOutsideWorktreeError | PermissionDeniedError>;
53
52
  }
54
53
  export type ClearCellOutputsError = NotebookNotFoundError | NotebookParseError | NotebookValidationError | CellIndexOutOfBoundsError | NotebookWriteError | PathOutsideWorktreeError | PermissionDeniedError;
55
54
  export type ClearAllOutputsError = NotebookNotFoundError | NotebookParseError | NotebookValidationError | NotebookWriteError | PathOutsideWorktreeError | PermissionDeniedError;
56
- declare const NotebookOutputService_base: Context.TagClass<NotebookOutputService, "@ipynb/NotebookOutputService", NotebookOutputServiceShape>;
57
- export declare class NotebookOutputService extends NotebookOutputService_base {
58
- }
59
55
  declare const makeOutputImpl: (pathSvc: PathServiceShape, fileSvc: NotebookFileServiceShape, permSvc: PermissionServiceShape) => NotebookOutputServiceShape;
60
56
  export { makeOutputImpl };
61
- export { cellSource };
62
- //# sourceMappingURL=NotebookOutputService.d.ts.map
@@ -1,9 +1,8 @@
1
- import { Context, Effect } from "effect";
1
+ import { Effect } from "effect";
2
2
  import { CellIndexOutOfBoundsError, NotebookNotFoundError, NotebookParseError, NotebookValidationError, PathOutsideWorktreeError } from "../domain/errors.js";
3
- import { type NotebookFileServiceShape } from "./NotebookFileService.js";
4
- import { type PathServiceShape } from "./PathService.js";
5
- import { cellSource } from "../domain/notebook.js";
6
- import type { ToolAttachment } from "@opencode-ai/plugin";
3
+ import type { NotebookFileServiceShape } from "./NotebookFileService.js";
4
+ import type { PathServiceShape } from "./PathService.js";
5
+ import type { ToolAttachment } from "../tool.js";
7
6
  export interface ReadRangeRequest {
8
7
  readonly cellIndex?: number | undefined;
9
8
  readonly start?: number | undefined;
@@ -28,9 +27,4 @@ export interface NotebookReadServiceShape {
28
27
  readonly readCell: (filePath: string, cellIndex: number, options?: Partial<ReadRangeRequest>) => Effect.Effect<ReadRangeResult, NotebookNotFoundError | NotebookParseError | NotebookValidationError | CellIndexOutOfBoundsError | PathOutsideWorktreeError>;
29
28
  readonly readRange: (filePath: string, start: number, end: number, options?: Partial<ReadRangeRequest>) => Effect.Effect<ReadRangeResult, NotebookNotFoundError | NotebookParseError | NotebookValidationError | CellIndexOutOfBoundsError | PathOutsideWorktreeError>;
30
29
  }
31
- declare const NotebookReadService_base: Context.TagClass<NotebookReadService, "@ipynb/NotebookReadService", NotebookReadServiceShape>;
32
- export declare class NotebookReadService extends NotebookReadService_base {
33
- }
34
30
  export declare const makeReadImpl: (pathSvc: PathServiceShape, fileSvc: NotebookFileServiceShape) => NotebookReadServiceShape;
35
- export { cellSource };
36
- //# sourceMappingURL=NotebookReadService.d.ts.map
@@ -1,5 +1,5 @@
1
- import { Context, Effect } from "effect";
2
- import { PathOutsideWorktreeError, NotebookNotFoundError } from "../domain/errors.js";
1
+ import { Effect } from "effect";
2
+ import { NotebookNotFoundError, NotebookWriteError, PathOutsideWorktreeError } from "../domain/errors.js";
3
3
  export interface PathEnv {
4
4
  readonly directory: string;
5
5
  readonly worktree: string;
@@ -12,15 +12,13 @@ export interface PathServiceShape {
12
12
  readonly relative: (absPath: string) => Effect.Effect<string, never>;
13
13
  readonly ensureInsideWorktree: (absPath: string) => Effect.Effect<void, PathOutsideWorktreeError>;
14
14
  readonly ensureExists: (absPath: string) => Effect.Effect<void, NotebookNotFoundError>;
15
+ readonly writeFileSafe: (absPath: string, content: string, options?: {
16
+ readonly noFollowFinal?: boolean;
17
+ }) => Effect.Effect<void, PathOutsideWorktreeError | NotebookWriteError>;
15
18
  readonly ensureIpynb: (absPath: string) => Effect.Effect<{
16
19
  absPath: string;
17
20
  warned: boolean;
18
21
  }, never>;
19
22
  readonly toDisplay: (absPath: string) => string;
20
23
  }
21
- declare const PathService_base: Context.TagClass<PathService, "@ipynb/PathService", PathServiceShape>;
22
- export declare class PathService extends PathService_base {
23
- }
24
24
  export declare const makePathService: (env: PathEnv) => PathServiceShape;
25
- export {};
26
- //# sourceMappingURL=PathService.d.ts.map
@@ -1,7 +1,9 @@
1
- import { Context, Effect } from "effect";
2
- import type { ToolContext } from "@opencode-ai/plugin";
1
+ import { Effect } from "effect";
2
+ import type { ToolContext } from "../tool.js";
3
3
  import { PermissionDeniedError } from "../domain/errors.js";
4
- export type PermissionKind = "edit" | "bash" | "read";
4
+ export declare const resolveDeepReal: (target: string) => Promise<string>;
5
+ export declare const permissionAliases: (filePath: string, bases?: ReadonlyArray<string>) => Promise<ReadonlyArray<string>>;
6
+ export type PermissionKind = "edit" | "shell" | "read";
5
7
  export interface PermissionRequest {
6
8
  readonly kind: PermissionKind;
7
9
  readonly action: string;
@@ -11,10 +13,6 @@ export interface PermissionRequest {
11
13
  }
12
14
  export interface PermissionServiceShape {
13
15
  readonly ask: (req: PermissionRequest) => Effect.Effect<void, PermissionDeniedError>;
14
- }
15
- declare const PermissionService_base: Context.TagClass<PermissionService, "@ipynb/PermissionService", PermissionServiceShape>;
16
- export declare class PermissionService extends PermissionService_base {
16
+ readonly aliases: (filePath: string) => Effect.Effect<ReadonlyArray<string>, never>;
17
17
  }
18
18
  export declare const makePermissionService: (ctx: ToolContext) => PermissionServiceShape;
19
- export {};
20
- //# sourceMappingURL=PermissionService.d.ts.map
@@ -1,6 +1,14 @@
1
- import { Effect, Context } from "effect";
2
- import { type NotebookError } from "../domain/errors.js";
3
- import { type RunRequest, type RunResponse } from "../domain/execution.js";
1
+ import { Effect } from "effect";
2
+ import { PermissionDeniedError } from "../domain/errors.js";
3
+ /**
4
+ * Environment for the Python helper process. The helper runs first-party
5
+ * code and imports stdlib/nbclient modules before it can trust the request,
6
+ * so project-controlled PYTHONPATH/PYTHONHOME values must not reach it.
7
+ * Notebook kernels get the original values back through `kernelEnv`.
8
+ */
9
+ export declare const helperSpawnEnv: () => NodeJS.ProcessEnv;
10
+ /** Original Python env values to restore only inside the notebook kernel. */
11
+ export declare const kernelEnvOverrides: () => Record<string, string> | undefined;
4
12
  export interface PythonProbeResult {
5
13
  readonly pythonPath: string;
6
14
  readonly version: string;
@@ -24,57 +32,30 @@ export interface PythonServiceOptions {
24
32
  readonly pythonPath: string | undefined;
25
33
  readonly preferUv: boolean;
26
34
  readonly helperRelativePath: string;
35
+ readonly pythonSource?: "options" | "env" | undefined;
27
36
  }
28
37
  export interface PythonServiceShape {
29
38
  readonly probe: () => Effect.Effect<PythonProbeResult, never>;
30
39
  readonly candidates: () => Effect.Effect<ReadonlyArray<PythonProbeResult>, never>;
31
40
  readonly checkDependencies: (pythonPath: string) => Effect.Effect<ReadonlyArray<DependencyCheck>, never>;
32
41
  readonly checkImport: (pythonPath: string, module: string) => Effect.Effect<DependencyCheck, never>;
42
+ /** Batch variant: one Python process for many imports. */
43
+ readonly checkImports?: (pythonPath: string, modules: ReadonlyArray<string>, signal?: AbortSignal) => Effect.Effect<ReadonlyArray<DependencyCheck>, never>;
33
44
  readonly findHelper: () => Effect.Effect<string | undefined, never>;
34
- readonly doctor: () => Effect.Effect<PythonDoctor, never>;
45
+ readonly doctor: (beforeDependencies?: (selected: PythonProbeResult) => Effect.Effect<void, PermissionDeniedError>) => Effect.Effect<PythonDoctor, PermissionDeniedError>;
35
46
  }
36
47
  export interface _PythonServiceForTest {
37
48
  readonly _invalidateDepsCache: (pythonPath?: string) => void;
38
49
  }
39
- declare const PythonService_base: Context.TagClass<PythonService, "@ipynb/PythonService", PythonServiceShape>;
40
- export declare class PythonService extends PythonService_base {
41
- }
42
50
  declare const REQUIRED_DEPS: readonly ["nbformat", "nbclient", "jupyter_client", "ipykernel"];
51
+ /**
52
+ * Absolute PATH candidates for the Python names the plugin probes. Resolving
53
+ * them without executing lets the first shell assert cover the interpreter a
54
+ * PATH lookup will actually spawn.
55
+ */
56
+ export declare const pythonInterpreterResources: (configured?: string) => ReadonlyArray<string>;
57
+ /** Back-compat: realpath-resolved PATH candidates only. */
58
+ export declare const pathPythonCandidates: () => ReadonlyArray<string>;
43
59
  declare const findHelper: (rel: string) => string | undefined;
44
60
  export declare const makePythonService: (opts: PythonServiceOptions) => PythonServiceShape;
45
61
  export { REQUIRED_DEPS, findHelper };
46
- export interface KernelManagerOptions {
47
- readonly pythonPath: string;
48
- readonly helperPath: string;
49
- readonly workingDirectory: string | undefined;
50
- readonly defaultTimeoutMs: number;
51
- }
52
- export interface KernelRuntimeOptions {
53
- readonly pythonPath: string;
54
- readonly helperPath: string;
55
- }
56
- export interface KernelInfo {
57
- readonly filePath: string;
58
- readonly pid: number;
59
- readonly lastUsedAt: number;
60
- readonly requestsHandled: number;
61
- readonly stderrTail: string;
62
- }
63
- export interface KernelManagerStats {
64
- readonly liveKernels: number;
65
- readonly totalRequests: number;
66
- }
67
- export declare const makeKernelManager: (opts: KernelManagerOptions) => KernelManagerShape;
68
- export interface KernelManagerShape {
69
- readonly execute: (filePath: string, request: RunRequest, runtime?: KernelRuntimeOptions) => Effect.Effect<RunResponse, NotebookError>;
70
- readonly isRunning: (filePath: string) => boolean;
71
- readonly list: () => ReadonlyArray<KernelInfo>;
72
- readonly restart: (filePath: string) => Effect.Effect<void, never>;
73
- readonly shutdown: (filePath: string) => Effect.Effect<void, never>;
74
- readonly disposeAll: () => Effect.Effect<void, never>;
75
- readonly stats: () => KernelManagerStats;
76
- }
77
- declare const KernelManager_base: Context.TagClass<KernelManager, "@ipynb/KernelManager", KernelManagerShape>;
78
- export declare class KernelManager extends KernelManager_base {
79
- }
80
- //# sourceMappingURL=PythonService.d.ts.map
@@ -1,9 +1,8 @@
1
- import type { ToolContext } from "@opencode-ai/plugin";
1
+ import type { ToolContext } from "../tool.js";
2
2
  import { type PluginOptions } from "../plugin-options.js";
3
3
  import { type PathServiceShape } from "./PathService.js";
4
4
  import { type PermissionServiceShape } from "./PermissionService.js";
5
5
  import { type NotebookFileServiceShape } from "./NotebookFileService.js";
6
- import { type DiffServiceShape } from "./DiffService.js";
7
6
  import { makeInspectImpl } from "./NotebookInspectService.js";
8
7
  import { type NotebookReadServiceShape } from "./NotebookReadService.js";
9
8
  import { type NotebookEditServiceShape } from "./NotebookEditService.js";
@@ -11,27 +10,30 @@ import { type NotebookCleanServiceShape } from "./NotebookCleanService.js";
11
10
  import { type NotebookOutputServiceShape } from "./NotebookOutputService.js";
12
11
  import { type NotebookExportServiceShape } from "./NotebookExportService.js";
13
12
  import { type NotebookExecutionServiceShape } from "./NotebookExecutionService.js";
14
- import { type PythonServiceShape, type KernelManagerShape } from "./PythonService.js";
15
- export { PathService, type PathServiceShape, type PathEnv, makePathService } from "./PathService.js";
16
- export { PermissionService, type PermissionServiceShape, type PermissionRequest, type PermissionKind, makePermissionService } from "./PermissionService.js";
17
- export { NotebookFileService, type NotebookFileServiceShape, makeNotebookFileService } from "./NotebookFileService.js";
18
- export { DiffService, type DiffServiceShape, makeDiffService } from "./DiffService.js";
19
- export { NotebookInspectService, makeInspectImpl } from "./NotebookInspectService.js";
20
- export { NotebookReadService, type NotebookReadServiceShape, makeReadImpl } from "./NotebookReadService.js";
21
- export { NotebookEditService, type NotebookEditServiceShape, makeEditImpl } from "./NotebookEditService.js";
22
- export { NotebookCleanService, type NotebookCleanServiceShape, makeCleanImpl } from "./NotebookCleanService.js";
23
- export { NotebookOutputService, type NotebookOutputServiceShape, makeOutputImpl } from "./NotebookOutputService.js";
24
- export { NotebookExportService, type NotebookExportServiceShape, makeExportImpl } from "./NotebookExportService.js";
25
- export { NotebookExecutionService, type NotebookExecutionServiceShape, makeExecutionImpl } from "./NotebookExecutionService.js";
26
- export { PythonService, type PythonServiceShape, type PythonDoctor, type PythonProbeResult, type DependencyCheck, type PythonServiceOptions, type KernelManagerShape, type KernelInfo, type KernelManagerStats, type KernelManagerOptions, type KernelRuntimeOptions, makePythonService, makeKernelManager } from "./PythonService.js";
27
- export { KernelManager } from "./PythonService.js";
13
+ import { type PythonServiceShape } from "./PythonService.js";
14
+ import { type KernelManagerShape } from "./KernelManager.js";
15
+ export { type PathServiceShape, type PathEnv, makePathService } from "./PathService.js";
16
+ export { type PermissionServiceShape, type PermissionRequest, type PermissionKind, makePermissionService } from "./PermissionService.js";
17
+ export { type NotebookFileServiceShape, makeNotebookFileService } from "./NotebookFileService.js";
18
+ export { makeInspectImpl } from "./NotebookInspectService.js";
19
+ export { type NotebookReadServiceShape, makeReadImpl } from "./NotebookReadService.js";
20
+ export { type NotebookEditServiceShape, makeEditImpl } from "./NotebookEditService.js";
21
+ export { type NotebookCleanServiceShape, makeCleanImpl } from "./NotebookCleanService.js";
22
+ export { type NotebookOutputServiceShape, makeOutputImpl } from "./NotebookOutputService.js";
23
+ export { type NotebookExportServiceShape, makeExportImpl } from "./NotebookExportService.js";
24
+ export { type NotebookExecutionServiceShape, makeExecutionImpl } from "./NotebookExecutionService.js";
25
+ export { type PythonServiceShape, type PythonDoctor, type PythonProbeResult, type DependencyCheck, type PythonServiceOptions, makePythonService } from "./PythonService.js";
26
+ export { type KernelManagerShape, type KernelInfo, type KernelManagerStats, type KernelManagerOptions, type KernelRuntimeOptions, makeKernelManager } from "./KernelManager.js";
28
27
  export interface NotebookServices {
29
28
  readonly path: PathServiceShape;
30
29
  readonly permission: PermissionServiceShape;
31
30
  readonly file: NotebookFileServiceShape;
32
- readonly diff: DiffServiceShape;
33
31
  readonly python: PythonServiceShape;
34
32
  readonly kernel: KernelManagerShape;
33
+ /** Interpreter selected from plugin options/env, when configured. */
34
+ readonly pythonPath: string | undefined;
35
+ /** Invalid pythonPath configuration, surfaced by Python-dependent tools. */
36
+ readonly pythonPathError: string | undefined;
35
37
  readonly inspect: ReturnType<typeof makeInspectImpl>;
36
38
  readonly read: NotebookReadServiceShape;
37
39
  readonly edit: NotebookEditServiceShape;
@@ -40,16 +42,7 @@ export interface NotebookServices {
40
42
  readonly export: NotebookExportServiceShape;
41
43
  readonly execution: NotebookExecutionServiceShape;
42
44
  }
43
- export interface BuildServicesOptions {
44
- readonly pythonPath?: string | undefined;
45
- readonly preferUv: boolean;
46
- readonly helperRelativePath: string;
47
- readonly warmKernel: boolean;
48
- readonly defaultTimeoutMs: number;
49
- readonly directory: string;
50
- }
51
- export declare const disposeSharedKernelManager: () => Promise<void>;
52
- export declare const buildServices: (ctx: ToolContext, options?: Partial<BuildServicesOptions>) => NotebookServices;
53
- declare const resolveOptionsFromEnv: () => PluginOptions;
45
+ export declare const disposeSharedKernelManager: (scope?: object) => Promise<void>;
46
+ export declare const buildServices: (ctx: ToolContext) => NotebookServices;
47
+ declare const resolveOptionsFromEnv: (instanceOptions?: unknown) => PluginOptions;
54
48
  export { resolveOptionsFromEnv };
55
- //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,15 @@
1
+ import { Effect } from "effect";
2
+ import { NotebookNotFoundError, NotebookValidationError, PathOutsideWorktreeError } from "../domain/errors.js";
3
+ import type { NotebookFileServiceShape } from "./NotebookFileService.js";
4
+ type RevisionError = NotebookNotFoundError | NotebookValidationError | PathOutsideWorktreeError;
5
+ /** Resolve the canonical target before prompting; I/O uses this pinned path. */
6
+ export declare const pinRealPath: (filePath: string) => Effect.Effect<string, never>;
7
+ /** SHA-256 of the exact bytes on disk, used to detect external edits. */
8
+ export declare const contentHash: (text: string) => string;
9
+ export declare const readRevision: (fileSvc: NotebookFileServiceShape, absPath: string) => Effect.Effect<string, RevisionError>;
10
+ /**
11
+ * Fail instead of overwriting a notebook that changed while the tool held it
12
+ * open (for example during an interactive permission prompt).
13
+ */
14
+ export declare const assertRevisionUnchanged: (fileSvc: NotebookFileServiceShape, absPath: string, expected: string) => Effect.Effect<void, RevisionError>;
15
+ export {};
package/dist/tool.d.ts ADDED
@@ -0,0 +1,66 @@
1
+ import { Effect } from "effect";
2
+ import type { z } from "zod";
3
+ /**
4
+ * Minimal tool contract used by the notebook implementations.
5
+ *
6
+ * The plugin is V2-only, but keeping this small internal helper lets every
7
+ * tool declare zod args once and share the same result/context shape. The V2
8
+ * adapter converts the zod args to JSON Schema and maps results to V2 content.
9
+ */
10
+ export interface ToolContext {
11
+ readonly sessionID: string;
12
+ readonly messageID: string;
13
+ readonly agent: string;
14
+ /** Current project directory for this session. */
15
+ readonly directory: string;
16
+ /** Project worktree root for this session. */
17
+ readonly worktree: string;
18
+ readonly abort: AbortSignal;
19
+ /** Options from this plugin instance. */
20
+ readonly pluginOptions?: unknown;
21
+ /** Identity of the plugin instance, used to scope warm-kernel cleanup. */
22
+ readonly pluginScope?: object;
23
+ metadata(input: {
24
+ title?: string;
25
+ metadata?: Record<string, any>;
26
+ }): void;
27
+ ask(input: ToolAskInput): Promise<void>;
28
+ }
29
+ export interface ToolAskInput {
30
+ readonly permission: string;
31
+ readonly patterns: string[];
32
+ readonly always: string[];
33
+ readonly metadata: Record<string, any>;
34
+ }
35
+ export interface ToolAttachment {
36
+ readonly type: "file";
37
+ readonly mime: string;
38
+ readonly url: string;
39
+ readonly filename?: string;
40
+ }
41
+ export type ToolResult = string | {
42
+ readonly title?: string;
43
+ readonly output: string;
44
+ readonly metadata?: Record<string, any>;
45
+ readonly attachments?: ToolAttachment[];
46
+ };
47
+ export interface ToolDefinition<Args extends z.ZodRawShape = z.ZodRawShape> {
48
+ readonly description: string;
49
+ readonly args: Args;
50
+ execute(args: z.infer<z.ZodObject<Args>>, context: ToolContext): Promise<ToolResult>;
51
+ }
52
+ export type AnyToolDefinition = ToolDefinition<z.ZodRawShape>;
53
+ export declare const tool: <Args extends z.ZodRawShape>(definition: ToolDefinition<Args>) => ToolDefinition<Args>;
54
+ /**
55
+ * Run an Effect from a tool executor while preserving typed failures.
56
+ *
57
+ * `Effect.runPromiseExit` preserves the typed failure, so permission errors
58
+ * can be rethrown as the V2 host expects.
59
+ */
60
+ export declare const runToolEffect: <A, E>(effect: Effect.Effect<A, E>) => Promise<A>;
61
+ /**
62
+ * V2 permission.assert rejections must propagate to the host instead of being
63
+ * converted into normal tool output. When the permission service preserved the
64
+ * original host error, rethrow that; otherwise rethrow the tagged error.
65
+ */
66
+ export declare const rethrowPermissionDenied: (error: unknown) => void;
@@ -0,0 +1,8 @@
1
+ import type { ToolContext } from "../tool.js";
2
+ /**
3
+ * Custom V2 tools are not automatically covered by the host's native `read`
4
+ * action. Ask explicitly before handing notebook content to a read-only tool.
5
+ * The lexical and resolved paths are both requested so a symlink alias cannot
6
+ * bypass a deny rule on the real notebook.
7
+ */
8
+ export declare const assertReadPermission: (context: ToolContext, filePath: string) => Promise<void>;
@@ -1,2 +1,13 @@
1
- export { resolveOptionsFromEnv as resolveToolOptions } from "../services/index.js";
2
- //# sourceMappingURL=_resolveOptions.d.ts.map
1
+ import type { ToolContext } from "../tool.js";
2
+ export declare const resolveToolOptions: (context?: ToolContext) => {
3
+ preferUv: boolean;
4
+ helperRelativePath: string;
5
+ defaultTimeoutMs: number;
6
+ defaultMaxOutputChars: number;
7
+ warmKernel: boolean;
8
+ lspDiagnostics: boolean;
9
+ pyrightPath: string;
10
+ diagnosticsTimeoutMs: number;
11
+ pythonPath?: string | undefined;
12
+ allowOutsideWorktree?: boolean | undefined;
13
+ };
@@ -1,14 +1,5 @@
1
1
  import { z } from "zod";
2
- import type { ToolContext } from "@opencode-ai/plugin";
3
- export declare const ipynbCellDeleteTool: {
4
- description: string;
5
- args: {
6
- filePath: z.ZodString;
7
- cellIndex: z.ZodNumber;
8
- };
9
- execute(args: {
10
- filePath: string;
11
- cellIndex: number;
12
- }, context: ToolContext): Promise<import("@opencode-ai/plugin").ToolResult>;
13
- };
14
- //# sourceMappingURL=cell_delete.d.ts.map
2
+ export declare const ipynbCellDeleteTool: import("../tool.js").ToolDefinition<{
3
+ filePath: z.ZodString;
4
+ cellIndex: z.ZodNumber;
5
+ }>;